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> <template>
<div> <div>
<template v-for="item in this.menuList"> <template v-for="item in this.menuList">
<el-submenu :key="item.id" :index="item.id" v-if="item.children && item.children.length"> <el-submenu :key="item.id" :index="item.id" v-if="item.children && item.children.length">
<template slot="title"> <template slot="title">
<span :class="{active: curId == item.id}">{{item.name}}</span> <span :class="{active: curId == item.id}">{{item.name}}</span>

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

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

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

@ -2,20 +2,10 @@
<!-- 内容管理 --> <!-- 内容管理 -->
<div class="flex"> <div class="flex">
<div class="menu-con"> <div class="menu-con">
<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>
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>
</div> </div>
<div class="right"> <div class="right">
<ContentList v-show="menuList.length" :columnId="columnId" /> <ContentList ref="content" v-show="menuList.length" :columnId="columnId" />
</div> </div>
</div> </div>
</template> </template>
@ -47,7 +37,8 @@ export default {
this.$get(this.api.queryAllColumns, { this.$get(this.api.queryAllColumns, {
school: 0 school: 0
}).then(res => { }).then(res => {
this.menuList = res.columnTree; this.menuList = res.columnTree
const storeId = this.$store.state.columnId
if (this.menuList.length) { if (this.menuList.length) {
this.getId(this.menuList) this.getId(this.menuList)
if (this.menuList[0].children && this.menuList[0].children.length) { if (this.menuList[0].children && this.menuList[0].children.length) {
@ -55,12 +46,15 @@ export default {
} else { } else {
this.columnId = this.menuList[0].id; this.columnId = this.menuList[0].id;
} }
if (!this.$store.state.columnId) { if (!storeId) {
this.$store.commit('setColumnId', this.columnId) this.$store.commit('setColumnId', this.columnId)
} else { } else {
this.columnId = this.$store.state.columnId; this.columnId = storeId
} }
} }
this.$nextTick(() => {
this.$refs.column.setCurrentKey(storeId)
})
}).catch(err => { }).catch(err => {
}); });
}, },
@ -71,14 +65,9 @@ export default {
e.children.length && this.getId(e.children) 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) { handleSelect(key) {
this.columnId = key; this.columnId = key.id
this.$store.commit('setColumnId', key); this.$store.commit('setColumnId', key.id);
} }
} }
}; };
@ -90,20 +79,8 @@ export default {
height: calc(100vh - 250px); height: calc(100vh - 250px);
border-right: solid 1px #e6e6e6; border-right: solid 1px #e6e6e6;
background-color: #F2F6FC; background-color: #F2F6FC;
.el-menu { /deep/.el-tree-node__content {
background-color: transparent; height: 50px;
.el-submenu {
background-color: transparent;
&.is-active {
color: #9076FF;
}
}
.el-menu-item.is-active {
color: #ffffff;
background-color: #9278FF;
}
} }
} }
.right { .right {

@ -1,16 +1,12 @@
<template> <template>
<!-- 资讯管理 --> <!-- 资讯管理 -->
<div class="page"> <div class="page">
<el-tabs v-model="tabsName" tab-position="left" @tab-click="handleClick"> <ul class="column-tab">
<el-tab-pane name="1" v-auth="'栏目管理'"> <li :class="{active: tabsName == 1}" @click="handleClick(1)"><i class="el-icon-collection-tag"></i> 栏目管理</li>
<span slot="label"><i class="el-icon-collection-tag"></i> 栏目管理</span> <li :class="{active: tabsName == 2}" @click="handleClick(2)"><i class="el-icon-document"></i> 内容管理</li>
<columnManage v-if="tabsName === '1'" /> </ul>
</el-tab-pane> <columnManage class="flex-1" v-if="tabsName === 1" />
<el-tab-pane name="2" v-auth="'内容管理'"> <ContentManage class="flex-1" ref="contentManage" v-if="tabsName === 2" />
<span slot="label"><i class="el-icon-document"></i> 内容管理</span>
<ContentManage v-if="tabsName === '2'" />
</el-tab-pane>
</el-tabs>
</div> </div>
</template> </template>
@ -27,9 +23,51 @@ export default {
tabsName: this.$store.state.tabId 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: { methods: {
handleClick(tab, event) { switchTab(id) {
this.$store.commit('setInfoTab', tab.name) 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() { mounted() {
@ -39,21 +77,25 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.page .el-tabs--left { .flex-1 {
// height: calc(100vh - 250px); flex: 1;
/deep/ .el-tabs__item {
height: 60px;
line-height: 60px;
} }
.page {
/deep/ el-tabs__active-bar { display: flex;
}
.column-tab {
width: 120px;
li {
display: flex;
align-items: center;
height: 60px; height: 60px;
transform: translateY(60px); cursor: pointer;
i {
margin-right: 5px;
}
&:hover, &.active {
color: #9278FF;
} }
.el-menu {
border-right: 0;
} }
} }
</style> </style>

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

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

Loading…
Cancel
Save