dev_202303
yujialong 2 years ago
parent 5b5c1cd57e
commit 2c1c7187b9
  1. 1
      src/components/Sidebar.vue
  2. 6
      src/store/index.js
  3. 4
      src/views/course/Curriculum.vue
  4. 4
      src/views/customer/customer.vue
  5. 4
      src/views/order/Order.vue
  6. 6
      src/views/serve/Configure.vue
  7. 19
      src/views/system/role.vue
  8. 18
      src/views/theoreticalCourse/contentSettings/index.vue
  9. 8
      src/views/theoreticalCourse/list/index.vue

@ -154,6 +154,7 @@ export default {
const routes = res.permissionMenu[0].children
addRoutes(routes)
this.initMenu()
this.$store.commit('setDataPer', res.dataPermissionList)
}).catch(err => {
if (err.status === 500) {
localStorage.removeItem('ms_username');

@ -25,7 +25,8 @@ const store = new Vuex.Store({
matchPage: 1,
platformSource: 0,
columnId: '',
tabId: '1'
tabId: '1',
dataPer: []
},
actions: {
setSystemId({ state,commit },systemId) {
@ -84,6 +85,9 @@ const store = new Vuex.Store({
addRoutes(state,routes) {
state.routes = routes
},
setDataPer(state, dataPer) {
state.dataPer = dataPer
},
SET_C_PAGE: (state, page) => {
state.customerPage = page
},

@ -164,10 +164,12 @@ export default {
},
//
getData() {
const sid = this.$store.state.dataPer.find(e => e.permissionName === '课程管理')
let data = {
...this.form,
pageNum: this.pageNo,
pageSize: this.pageSize
pageSize: this.pageSize,
supplierId: sid ? sid.supplierId : ''
};
this.$post(this.api.curriculumList, data).then(res => {
this.courseData = res.page.records;

@ -134,6 +134,7 @@ export default {
},
methods: {
getData() {
const sid = this.$store.state.dataPer.find(e => e.permissionName === '客户管理')
this.loading = true
this.$post(this.api.queryCustomer,{
countries: this.form.countries,
@ -141,7 +142,8 @@ export default {
cityId: this.form.city,
searchContent: this.form.keyword,
page: this.page,
size: this.pageSize
size: this.pageSize,
supplierId: sid ? sid.supplierId : ''
}).then(res => {
this.listData = res.message.list
this.total = res.message.totalCount

@ -181,6 +181,7 @@ export default {
}
},
getData() {
const sid = this.$store.state.dataPer.find(e => e.permissionName === '订单管理')
let data = {
cityId: this.form.city,
customerName: this.keyword,
@ -188,7 +189,8 @@ export default {
orderType: this.form.orderType,
pageNo: this.pageNo,
pageSize: this.pageSize,
provinceId: this.form.provinces
provinceId: this.form.provinces,
supplierId: sid ? sid.supplierId : ''
};
this.$post(this.api.orderList, data).then(res => {
res.orderPage.orders.forEach(e => {

@ -54,7 +54,7 @@
{{ systemTypeKeys[scope.row.type] }}
</template>
</el-table-column>
<el-table-column prop="systemName" label="供应商" align="center"></el-table-column>
<el-table-column prop="supplierName" label="供应商" align="center"></el-table-column>
<el-table-column prop="belong" label="系统归属" align="center">
<template slot-scope="scope">
{{ systemBelongKeys[scope.row.belong] }}
@ -156,12 +156,14 @@ export default {
this.getData();
},
getData() {
const sid = this.$store.state.dataPer.find(e => e.permissionName === '服务配置')
let data = {
belong: this.systemAttribution,
type: this.systemType,
systemName: this.systemSearch,
pageNum: this.pageNo,
pageSize: this.pageSize
pageSize: this.pageSize,
supplierId: sid ? sid.supplierId : ''
};
this.$post(this.api.queryServiceConfig, data).then(res => {
this.systemData = res.serviceList.records;

@ -285,7 +285,7 @@ export default {
this.roleVisible = true;
},
async saveData() {
const { form } = this
const { form, datas } = this
if (!form.roleName) return this.$message.warning("请填写角色名称");
if (!form.remark) return this.$message.warning("请填写角色描述");
const tree = this.$refs.per
@ -294,8 +294,10 @@ export default {
const checks = [...this.$refs.per.getHalfCheckedNodes(), ...this.$refs.per.getCheckedNodes()];
const ids = []
const roleId = form.id
// id
checks.map(e => {
if (e.supplierIds) {
//
if (datas.includes(e.name) && e.supplierIds) {
e.supplierIds.map(n => {
ids.push({
permissionId: e.id,
@ -303,21 +305,14 @@ export default {
supplierId: n
})
})
} else {
ids.push({
permissionId: e.id,
roleId
})
}
})
console.log("🚀 ~ file: role.vue ~ line 296 ~ saveData ~ checks", checks, ids)
let data = {
this.$post(this.api.saveOrUpdate, {
...this.form,
permissionId: [...tree.getHalfCheckedKeys(), ...tree.getCheckedKeys()],
dataPermissionList: ids,
platformId: Setting.platformId,
};
debugger
this.$post(this.api.saveOrUpdate, data).then(res => {
}).then(res => {
this.$message.success(form.id ? "修改成功" : "新增成功");
this.getData();
this.roleVisible = false;

@ -12,8 +12,8 @@
<div class="p-title">内容设置</div>
<div class="btns" style="top: -10px">
<template v-if="!sorting">
<el-button v-auth="'/course/list:课程管理:内容设置:添加章节'" type="primary" round @click="addChapter">添加章节</el-button>
<el-button v-auth="'/course/list:课程管理:内容设置:编辑顺序'" type="primary" round @click="sort">编辑顺序</el-button>
<el-button type="primary" round @click="addChapter">添加章节</el-button>
<el-button type="primary" round @click="sort">编辑顺序</el-button>
</template>
<template v-else>
<el-button type="primary" round @click="move">批量移动</el-button>
@ -29,9 +29,9 @@
<div>{{ chapter.name }}</div>
<div>
<template v-if="!sorting">
<el-button v-auth="'/course/list:课程管理:内容设置:修改章节名称'" class="action-btn" type="primary" round @click="editChapter(chapter)">修改章节名称</el-button>
<el-button v-auth="'/course/list:课程管理:内容设置:添加小节'" class="action-btn" type="primary" round @click="addSection(chapter.id)">添加小节</el-button>
<el-button v-auth="'/course/list:课程管理:内容设置:章节删除'" class="action-btn" type="primary" round @click="delChapter(chapter.id)">删除</el-button>
<el-button class="action-btn" type="primary" round @click="editChapter(chapter)">修改章节名称</el-button>
<el-button class="action-btn" type="primary" round @click="addSection(chapter.id)">添加小节</el-button>
<el-button class="action-btn" type="primary" round @click="delChapter(chapter.id)">删除</el-button>
</template>
<template v-else>
<i class="el-icon-top sort-icon" :class="{disabled: index == 0}" style="margin-right: 5px" @click="sortChapter(chapter,'up',index == 0,index)"></i>
@ -59,10 +59,10 @@
<el-table-column label="操作" align="center" width="300">
<template slot-scope="scope">
<template v-if="!sorting">
<el-button v-auth="'/course/list:课程管理:内容设置:查看'" type="text" @click="preview(scope.row)">查看</el-button>
<el-button v-auth="'/course/list:课程管理:内容设置:小节删除'" type="text" @click="delSection(scope.row)">删除</el-button>
<el-button v-auth="'/course/list:课程管理:内容设置:修改小节名称'" type="text" @click="editSectionName(scope.row,chapter.id)">修改小节名称</el-button>
<el-button v-auth="'/course/list:课程管理:内容设置:更换文件'" type="text" @click="switchFile(scope.row,chapter.id)">更换文件</el-button>
<el-button type="text" @click="preview(scope.row)">查看</el-button>
<el-button type="text" @click="delSection(scope.row)">删除</el-button>
<el-button type="text" @click="editSectionName(scope.row,chapter.id)">修改小节名称</el-button>
<el-button type="text" @click="switchFile(scope.row,chapter.id)">更换文件</el-button>
</template>
<template v-else>
<i class="el-icon-top sort-icon" :class="{disabled: scope.$index == 0}" style="margin-right: 5px" @click="sortSection(index,'up',scope.$index == 0,scope.$index)"></i>

@ -17,7 +17,6 @@
<script>
import Setting from "@/setting";
import { mapState } from "vuex";
import buildPlatform from "./buildPlatform";
import CourseManagement from "./courseManagement";
import SortManagement from "./sortManagement";
@ -40,11 +39,6 @@ export default {
showTabs: true
};
},
computed: {
...mapState("auth", [
"btns"
])
},
mounted() {
Setting.dynamicRoute && this.initTabs();
},
@ -53,7 +47,7 @@ export default {
this.active = index;
},
initTabs() {
const { btns } = this
const { btns } = this.$store.state
const tab1 = btns.includes('/course/list:课程管理')
const tab2 = btns.includes('/course/list:分类管理')
tab1 || delete this.tabs.first

Loading…
Cancel
Save