fixAuth V2.4.3
yujialong 2 years ago
parent d366b227d2
commit 7a8e99ce49
  1. 1
      src/components/menuTree/index.vue
  2. 1
      src/views/course/contentSettings.vue
  3. 2
      src/views/customer/AddCustomer.vue
  4. 28
      src/views/information/contentManage/contentList.vue
  5. 49
      src/views/information/contentManage/index.vue
  6. 90
      src/views/information/list/index.vue
  7. 3
      src/views/order/AddOrder.vue
  8. 2
      src/views/serve/projectAdd.vue

@ -1,7 +1,6 @@
<template>
<div>
<template v-for="item in this.menuList">
<el-submenu :key="item.id" :index="item.id" v-if="item.children && item.children.length">
<template slot="title">
<span :class="{active: curId == item.id}">{{item.name}}</span>

@ -97,6 +97,7 @@
:action="this.api.fileupload"
:file-list="uploadList"
:headers="headers"
:http-request="handleRequest"
name="file"
>
<el-button size="small"><img src="@/assets/img/upload.png" alt=""> 上传资源</el-button>

@ -326,7 +326,7 @@ export default {
account: [
{ required: true, message: '请输入账号', trigger: 'blur' },
{
pattern: /^[A-Za-z0-9]*$/,
pattern: /^[A-Za-z0-9]{4,}$/,
message: "请输入正确的账号",
trigger: "blur"
}

@ -9,7 +9,7 @@
<el-button v-auth="'内容管理:新增文章'" class="action-btn" type="primary" @click="addArticle">新增文章</el-button>
</div>
<div class="page-content" style="padding-top: 24px">
<el-table ref="table" :data="listData" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id">
<el-table ref="table" :data="list" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id">
<el-table-column type="selection" width="80" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center">
<template slot-scope="scope">
@ -70,11 +70,12 @@ export default {
tabs: {
first: "栏目内容管理"
},
listData: [],
list: [],
multipleSelection: [],
pageNo: +this.$route.query.page || 1,
pageSize: 10,
totals: 0
totals: 0,
originSort: []
};
},
props: {
@ -93,10 +94,11 @@ export default {
let data = {
columnId: this.columnId
};
this.$get(`${this.api.queryArticleByCondition}/${this.pageNo}/${this.pageSize}`, data).then(res => {
this.listData = res.articleList;
this.totals = res.total;
if (!this.listData.length && this.totals) {
this.$get(`${this.api.queryArticleByCondition}/${this.pageNo}/${this.pageSize}`, data).then(({ articleList, total }) => {
this.list = articleList;
this.totals = total;
if (JSON.stringify(this.originSort) !== '{}') this.originSort = JSON.parse(JSON.stringify(articleList))
if (!this.list.length && this.totals) {
this.pageNo--;
this.getData();
}
@ -112,7 +114,7 @@ export default {
this.getData();
},
addArticle() {
this.$router.push(`/addArticle?columnId=${this.columnId}&sort=${this.listData.length + 1}`);
this.$router.push(`/addArticle?columnId=${this.columnId}&sort=${this.list.length + 1}`);
},
editArticle(scope) {
this.$router.push(`/addArticle?columnId=${this.columnId}&id=${scope.row.id}&sort=${scope.$index + 1}`);
@ -155,7 +157,7 @@ export default {
this.getData();
}).catch(res => {
});
if(this.multipleSelection.length === this.listData.length && this.pageNo>1) {
if(this.multipleSelection.length === this.list.length && this.pageNo>1) {
this.handleCurrentChange(this.pageNo - 1)
}
})
@ -174,12 +176,12 @@ export default {
});
},
sortSubmit() {
if (this.listData.length) {
if (this.listData.find(n => n.sort < 1)) return util.errorMsg("排序值最小为1");
let data = { articleList: this.listData };
if (this.list.length) {
if (this.list.find(n => n.sort < 1)) return util.errorMsg("排序值最小为1");
let data = { articleList: this.list };
this.$post(this.api.articleSort, data).then(res => {
util.successMsg("保存成功");
this.getContent(this.columnId);
this.getData()
})
.catch(err => {
});

@ -2,20 +2,10 @@
<!-- 内容管理 -->
<div class="flex">
<div class="menu-con">
<el-menu
ref="columnMenu"
text-color="#303133"
:default-openeds="ids"
:default-active="activeName"
@open="menuClick"
@close="menuClick"
@select="handleSelect"
>
<menuTree :menuList="menuList" :curId.sync="curId"></menuTree>
</el-menu>
<el-tree ref="column" :data="menuList" :props="{ label: 'name' }" highlight-current :expand-on-click-node="false" default-expand-all node-key="id" @node-click="handleSelect"></el-tree>
</div>
<div class="right">
<ContentList v-show="menuList.length" :columnId="columnId" />
<ContentList ref="content" v-show="menuList.length" :columnId="columnId" />
</div>
</div>
</template>
@ -47,7 +37,8 @@ export default {
this.$get(this.api.queryAllColumns, {
school: 0
}).then(res => {
this.menuList = res.columnTree;
this.menuList = res.columnTree
const storeId = this.$store.state.columnId
if (this.menuList.length) {
this.getId(this.menuList)
if (this.menuList[0].children && this.menuList[0].children.length) {
@ -55,12 +46,15 @@ export default {
} else {
this.columnId = this.menuList[0].id;
}
if (!this.$store.state.columnId) {
if (!storeId) {
this.$store.commit('setColumnId', this.columnId)
} else {
this.columnId = this.$store.state.columnId;
this.columnId = storeId
}
}
this.$nextTick(() => {
this.$refs.column.setCurrentKey(storeId)
})
}).catch(err => {
});
},
@ -71,14 +65,9 @@ export default {
e.children.length && this.getId(e.children)
})
},
menuClick(key) {
this.curId = key
console.log("🚀 ~ file: index.vue ~ line 76 ~ menuClick ~ this.curId", this.curId)
this.handleSelect(key)
},
handleSelect(key) {
this.columnId = key;
this.$store.commit('setColumnId', key);
this.columnId = key.id
this.$store.commit('setColumnId', key.id);
}
}
};
@ -90,20 +79,8 @@ export default {
height: calc(100vh - 250px);
border-right: solid 1px #e6e6e6;
background-color: #F2F6FC;
.el-menu {
background-color: transparent;
.el-submenu {
background-color: transparent;
&.is-active {
color: #9076FF;
}
}
.el-menu-item.is-active {
color: #ffffff;
background-color: #9278FF;
}
/deep/.el-tree-node__content {
height: 50px;
}
}
.right {

@ -1,16 +1,12 @@
<template>
<!-- 资讯管理 -->
<div class="page">
<el-tabs v-model="tabsName" tab-position="left" @tab-click="handleClick">
<el-tab-pane name="1" v-auth="'栏目管理'">
<span slot="label"><i class="el-icon-collection-tag"></i> 栏目管理</span>
<columnManage v-if="tabsName === '1'" />
</el-tab-pane>
<el-tab-pane name="2" v-auth="'内容管理'">
<span slot="label"><i class="el-icon-document"></i> 内容管理</span>
<ContentManage v-if="tabsName === '2'" />
</el-tab-pane>
</el-tabs>
<ul class="column-tab">
<li :class="{active: tabsName == 1}" @click="handleClick(1)"><i class="el-icon-collection-tag"></i> 栏目管理</li>
<li :class="{active: tabsName == 2}" @click="handleClick(2)"><i class="el-icon-document"></i> 内容管理</li>
</ul>
<columnManage class="flex-1" v-if="tabsName === 1" />
<ContentManage class="flex-1" ref="contentManage" v-if="tabsName === 2" />
</div>
</template>
@ -27,9 +23,51 @@ export default {
tabsName: this.$store.state.tabId
};
},
//
beforeRouteLeave(to, from, next) {
const { content } = this.$refs.contentManage.$refs
const { list, originSort } = content
//
if (JSON.stringify(list) !== JSON.stringify(originSort)) {
this.$confirm(`您已更改了文章排序,是否保存更改?`, '提示', {
type: 'warning'
}).then(() => {
content.sortSubmit()
next()
}).catch(() => {
next()
})
} else {
next()
}
},
methods: {
handleClick(tab, event) {
this.$store.commit('setInfoTab', tab.name)
switchTab(id) {
this.tabsName = id
this.$store.commit('setInfoTab', id)
},
handleClick(id) {
if (this.tabsName == 2) {
const { content } = this.$refs.contentManage.$refs
const { list, originSort } = content
//
if (JSON.stringify(list) !== JSON.stringify(originSort)) {
this.$confirm(`您已更改了文章排序,是否保存更改?`, '提示', {
type: 'warning'
}).then(() => {
content.sortSubmit()
this.switchTab(id)
}).catch(() => {
this.switchTab(id)
})
} else {
this.switchTab(id)
}
} else {
this.switchTab(id)
}
}
},
mounted() {
@ -39,21 +77,25 @@ export default {
</script>
<style lang="scss" scoped>
.page .el-tabs--left {
// height: calc(100vh - 250px);
/deep/ .el-tabs__item {
height: 60px;
line-height: 60px;
.flex-1 {
flex: 1;
}
/deep/ el-tabs__active-bar {
.page {
display: flex;
}
.column-tab {
width: 120px;
li {
display: flex;
align-items: center;
height: 60px;
transform: translateY(60px);
cursor: pointer;
i {
margin-right: 5px;
}
&:hover, &.active {
color: #9278FF;
}
.el-menu {
border-right: 0;
}
}
</style>

@ -941,6 +941,7 @@ export default {
},
setStartDate(renewList, orderOther) {
let list = orderOther.map(e => {
e.settlementPriceUnit = e.settlementPrice
const now = Date.now()
const item = renewList.find(n => n.dataOrCourseId === e.dataOrCourseId && n.authority === e.authority) // renew
console.log("🚀 ~ file: AddOrder.vue ~ line 946 ~ list ~ item", item)
@ -965,7 +966,7 @@ export default {
e.endTime = cur.endTime.split(" ")[0];
}
// }
if (item) {
if (item && this.renewDisabled) {
e.marketValue = item.marketValue
}
const startTime = new Date(e.startTime)

@ -573,7 +573,7 @@ export default {
};
if (systemId == 2 || systemId == 3) {
console.log("系统id:", systemId);
} else if (systemId == 11) {
} else if (systemId == 11 || systemId == 12) {
// ()
this.rowKey = "lcId";
this.getProcessClassData(params);

Loading…
Cancel
Save