全站添加筛选功能缓存

dev_review V2.5.2
yujialong 7 months ago
parent 34d84486ea
commit ebf4e9ffbc
  1. 1
      src/components/Sidebar.vue
  2. 32
      src/store/index.js
  3. 12
      src/views/course/AddCurriculum.vue
  4. 258
      src/views/course/Curriculum.vue
  5. 10
      src/views/course/contentSettings.vue
  6. 13
      src/views/customer/AddCustomer.vue
  7. 124
      src/views/customer/Order.vue
  8. 23
      src/views/customer/customer.vue
  9. 125
      src/views/information/contentManage/contentList.vue
  10. 4
      src/views/match/add/index.vue
  11. 17
      src/views/match/add/step4.vue
  12. 53
      src/views/match/list/index.vue
  13. 2
      src/views/match/manage/index.vue
  14. 3
      src/views/match/manage/matchArch.vue
  15. 24
      src/views/match/manage/matchArchList.vue
  16. 25
      src/views/match/manage/matchRank.vue
  17. 7
      src/views/match/manage/matchSignup.vue
  18. 12
      src/views/order/AddOrder.vue
  19. 279
      src/views/order/Order.vue
  20. 57
      src/views/parnerOperation/index.vue
  21. 339
      src/views/parnerOperation/info.vue
  22. 339
      src/views/parnerOperation/learn.vue
  23. 10
      src/views/parnerOperation/learnMg.vue
  24. 221
      src/views/parnerOperation/mobileRole.vue
  25. 269
      src/views/parnerOperation/pcRole.vue
  26. 279
      src/views/parnerOperation/plan.vue
  27. 9
      src/views/parnerOperation/schemeSet.vue
  28. 268
      src/views/parnerOperation/staff.vue
  29. 122
      src/views/serve/Configure.vue
  30. 2
      src/views/serve/backstage/index.vue
  31. 10
      src/views/serve/backstage/model.vue
  32. 9
      src/views/serve/backstage/sourceModel.vue
  33. 4
      src/views/serve/projectAdd.vue
  34. 83
      src/views/serve/projectList.vue
  35. 9
      src/views/shop/addProduct/index.vue
  36. 17
      src/views/shop/list/index.vue
  37. 24
      src/views/shop/list/product/index.vue
  38. 6
      src/views/theoreticalCourse/add/index.vue
  39. 44
      src/views/theoreticalCourse/contentSettings/index.vue
  40. 46
      src/views/theoreticalCourse/list/buildPlatform/index.vue
  41. 210
      src/views/theoreticalCourse/list/courseManagement/index.vue
  42. 23
      src/views/theoreticalCourse/list/index.vue
  43. 10
      src/views/theoreticalCourse/preview/index.vue
  44. 220
      src/views/user/AddUser.vue
  45. 33
      src/views/user/User.vue

@ -138,7 +138,6 @@ export default {
methods: { methods: {
handleSelect (index) { handleSelect (index) {
this.onRoutes = index this.onRoutes = index
this.$store.commit('setOrderParam', null)
this.$store.commit('setInfoTab', '1') this.$store.commit('setInfoTab', '1')
this.$store.commit('setColumnId', '') this.$store.commit('setColumnId', '')
this.$store.commit('setCompetitionCache', null) this.$store.commit('setCompetitionCache', null)

@ -21,14 +21,13 @@ const store = new Vuex.Store({
projectFields: {}, projectFields: {},
btns: [], btns: [],
routes: [], routes: [],
customerPage: 1,
matchPage: 1,
platformSource: 0,
columnId: '', columnId: '',
tabId: '1', tabId: '1',
dataPer: [], dataPer: [],
competitionCache: null,
referrer: '',
innerReferrer: '',
orderParam: null, orderParam: null,
competitionCache: null
}, },
actions: { actions: {
setSystemId({ state,commit },systemId) { setSystemId({ state,commit },systemId) {
@ -54,15 +53,6 @@ const store = new Vuex.Store({
SET_USERNAME (state, userName) { SET_USERNAME (state, userName) {
state.userName = userName state.userName = userName
}, },
SET_C_PAGE: (state, page) => {
state.customerPage = page
},
SET_M_PAGE: (state, page) => {
state.matchPage = page
},
SET_M_SOURCE: (state, platformSource) => {
state.platformSource = platformSource
},
courseData (state, payload) { courseData (state, payload) {
state.courseId = payload.course_id state.courseId = payload.course_id
}, },
@ -75,10 +65,6 @@ const store = new Vuex.Store({
configData (state, payload) { configData (state, payload) {
state.configId = payload.config_id state.configId = payload.config_id
}, },
systemData (state, payload) {
state.systemId = payload.system_id
state.orderId = payload.order_id
},
userLoginData (state, payload) { userLoginData (state, payload) {
state.userLoginId = payload.userLogin_id state.userLoginId = payload.userLogin_id
state.userName = payload.userName state.userName = payload.userName
@ -105,12 +91,18 @@ const store = new Vuex.Store({
setInfoTab: (state, tabId) => { setInfoTab: (state, tabId) => {
state.tabId = tabId state.tabId = tabId
}, },
setOrderParam: (state, orderParam) => {
state.orderParam = orderParam
},
setCompetitionCache: (state, param) => { setCompetitionCache: (state, param) => {
state.competitionCache = param state.competitionCache = param
}, },
setReferrer: (state, val) => {
state.referrer = val
},
setInnerReferrer: (state, val) => {
state.innerReferrer = val
},
setOrderParam: (state, val) => {
state.orderParam = val
},
} }
}); });

@ -7,7 +7,7 @@
<div class="flex-between"> <div class="flex-between">
<div class="per_title" <div class="per_title"
v-preventReClick v-preventReClick
@click="goback()"> @click="back">
<i class="el-icon-arrow-left"></i> <i class="el-icon-arrow-left"></i>
<span class="per_back">返回</span> <span class="per_back">返回</span>
<span class="per_school" <span class="per_school"
@ -1047,8 +1047,8 @@ export default {
}).then(() => { }).then(() => {
this.$router.push(`/contentSettings?cid=${res.cid}`); this.$router.push(`/contentSettings?cid=${res.cid}`);
}).catch(() => { }).catch(() => {
this.backPage() this.$router.push('/curriculum')
}) : this.backPage() }) : this.$router.push('/curriculum')
}).catch((res) => { }).catch((res) => {
this.submiting = false this.submiting = false
this.loadIns.close() this.loadIns.close()
@ -1059,7 +1059,7 @@ export default {
} }
}); });
}, },
goback () { back () {
const id = this.form.cid const id = this.form.cid
const updateTime = this.updateTime const updateTime = this.updateTime
// //
@ -1078,8 +1078,8 @@ export default {
}, },
// //
backPage () { backPage () {
this.$router.back() this.loadIns && this.loadIns.close()
this.loadIns.close() this.$router.push(this.$store.state.referrer || '/curriculum')
} }
} }
}; };

@ -1,6 +1,7 @@
<template> <template>
<div> <div>
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover"
class="mgb20">
<div> <div>
<div class="flex-center mgb20"> <div class="flex-center mgb20">
<p class="hr_tag"></p> <p class="hr_tag"></p>
@ -10,9 +11,12 @@
<el-form label-width="80px"> <el-form label-width="80px">
<el-col :span="4"> <el-col :span="4">
<el-form-item label="学科类别"> <el-form-item label="学科类别">
<el-select v-model="form.categoryId" clearable <el-select v-model="form.categoryId"
@change="getProfessionalClass()" @clear="clearClass()"> clearable
<el-option v-for="(item,index) in subjectList" :key="index" @change="getProfessionalClass()"
@clear="clearClass()">
<el-option v-for="(item,index) in subjectList"
:key="index"
:label="item.disciplineName" :label="item.disciplineName"
:value="item.disciplineId"></el-option> :value="item.disciplineId"></el-option>
</el-select> </el-select>
@ -20,10 +24,13 @@
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item label="专业类"> <el-form-item label="专业类">
<el-select v-model="form.professionalCategoryId" clearable <el-select v-model="form.professionalCategoryId"
clearable
:disabled="form.categoryId ? false : true" :disabled="form.categoryId ? false : true"
@change="getProfessional()" @clear="clearProfess()"> @change="getProfessional()"
<el-option v-for="(item,index) in ProfessionalClassList" :key="index" @clear="clearProfess()">
<el-option v-for="(item,index) in ProfessionalClassList"
:key="index"
:label="item.professionalClassName" :label="item.professionalClassName"
:value="item.professionalClassId"></el-option> :value="item.professionalClassId"></el-option>
</el-select> </el-select>
@ -31,10 +38,12 @@
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item label="专业"> <el-form-item label="专业">
<el-select v-model="form.professionalId" clearable <el-select v-model="form.professionalId"
clearable
:disabled="form.professionalCategoryId ? false : true" :disabled="form.professionalCategoryId ? false : true"
@change="getData()"> @change="getData()">
<el-option v-for="(item,index) in ProfessionalList" :key="index" <el-option v-for="(item,index) in ProfessionalList"
:key="index"
:label="item.professionalName" :label="item.professionalName"
:value="item.professionalId"></el-option> :value="item.professionalId"></el-option>
</el-select> </el-select>
@ -42,17 +51,22 @@
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item label="课程类别"> <el-form-item label="课程类别">
<el-select v-model="form.curriculumType" clearable <el-select v-model="form.curriculumType"
clearable
@change="getData()"> @change="getData()">
<el-option label="理论课程" :value="0"></el-option> <el-option label="理论课程"
<el-option label="实训课程" :value="1"></el-option> :value="0"></el-option>
<el-option label="实训课程"
:value="1"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item> <el-form-item>
<el-input placeholder="请输入课程名称" prefix-icon="el-icon-search" <el-input placeholder="请输入课程名称"
v-model="form.curriculumName" clearable prefix-icon="el-icon-search"
v-model="form.curriculumName"
clearable
@keyup.enter.native="onSearch"></el-input> @keyup.enter.native="onSearch"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -61,40 +75,69 @@
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" class="card"> <el-card shadow="hover"
class="card">
<div class="flex-between mgb20"> <div class="flex-between mgb20">
<div class="flex-center"> <div class="flex-center">
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>课程列表</span> <span>课程列表</span>
</div> </div>
<div> <div>
<el-button type="primary" round @click="addcourse" v-auth>新增课程</el-button> <el-button type="primary"
<el-button type="primary" round @click="delAllSelection" v-auth>批量删除</el-button> round
@click="addcourse"
v-auth>新增课程</el-button>
<el-button type="primary"
round
@click="delAllSelection"
v-auth>批量删除</el-button>
</div> </div>
</div> </div>
<el-table v-loading="loading" :data="courseData" class="table" ref="table" stripe header-align="center" <el-table v-loading="loading"
@selection-change="handleSelectionChange" :row-key="getRowKeys"> :data="courseData"
<el-table-column type="selection" width="55" align="center" class="table"
ref="table"
stripe
header-align="center"
@selection-change="handleSelectionChange"
:row-key="getRowKeys">
<el-table-column type="selection"
width="55"
align="center"
:reserve-selection="true"></el-table-column> :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column> <el-table-column type="index"
<el-table-column prop="curriculumName" label="课程名称" align="center"></el-table-column> width="100"
<el-table-column prop="curriculumType" label="课程类型" align="center"> label="序号"
align="center"></el-table-column>
<el-table-column prop="curriculumName"
label="课程名称"
align="center"></el-table-column>
<el-table-column prop="curriculumType"
label="课程类型"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span class="ellipsis">{{ courseTypeStatus[scope.row.curriculumType] }}</span> <span class="ellipsis">{{ courseTypeStatus[scope.row.curriculumType] }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="userName" label="创建人" align="center"></el-table-column> <el-table-column prop="userName"
<el-table-column label="配置的实训应用" align="center"> label="创建人"
align="center"></el-table-column>
<el-table-column label="配置的实训应用"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span class="ellipsis">{{ scope.row.sysName }}</span> <span class="ellipsis">{{ scope.row.sysName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="orderVolume" label="订单量" align="center"></el-table-column> <el-table-column prop="orderVolume"
<el-table-column prop="expectedCourse" label="预计课时" align="center"></el-table-column> label="订单量"
<el-table-column label="上架/下架" align="center"> align="center"></el-table-column>
<el-table-column prop="expectedCourse"
label="预计课时"
align="center"></el-table-column>
<el-table-column label="上架/下架"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch v-model="scope.row.isShelves"
v-model="scope.row.isShelves"
:active-value="1" :active-value="1"
:inactive-value="0" :inactive-value="0"
@change="changeSwitch($event, scope.row)" @change="changeSwitch($event, scope.row)"
@ -102,26 +145,36 @@
</el-switch> </el-switch>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="edit(scope.row)" v-auth>编辑</el-button> <el-button type="text"
<el-button type="text" @click="config(scope.row)" v-auth>内容设置</el-button> @click="edit(scope.row)"
<el-button type="text" @click="handleDelete(scope.row)" v-auth>删除</el-button> v-auth>编辑</el-button>
<el-button type="text"
@click="config(scope.row)"
v-auth>内容设置</el-button>
<el-button type="text"
@click="handleDelete(scope.row)"
v-auth>删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background @current-change="handleCurrentChange" :current-page="pageNo" <el-pagination background
layout="total, prev, pager, next" :total="totals"></el-pagination> @current-change="handleCurrentChange"
:current-page="page"
layout="total, prev, pager, next"
:total="totals"></el-pagination>
</div> </div>
</el-card> </el-card>
</div> </div>
</template> </template>
<script> <script>
import qs from 'qs'
export default { export default {
name: "customer", data () {
data() {
return { return {
courseTypeStatus: { courseTypeStatus: {
0: "理论课程", 0: "理论课程",
@ -130,13 +183,13 @@ export default {
name: localStorage.getItem("ms_username"), name: localStorage.getItem("ms_username"),
courseData: [], courseData: [],
form: { form: {
categoryId: "", categoryId: +this.$route.query.categoryId || '',
professionalCategoryId: "", professionalCategoryId: +this.$route.query.professionalCategoryId || '',
professionalId: "", professionalId: +this.$route.query.professionalId || '',
curriculumType: "", curriculumType: this.$route.query.curriculumType ? +this.$route.query.curriculumType : '',
curriculumName: "" curriculumName: this.$route.query.curriculumName || ''
}, },
pageNo: +this.$route.query.page || 1, page: +this.$route.query.page || 1,
pageSize: 10, pageSize: 10,
totals: 0, totals: 0,
subjectList: [], // subjectList: [], //
@ -148,27 +201,27 @@ export default {
}; };
}, },
watch: { watch: {
"form.curriculumName": function(val) { "form.curriculumName": function (val) {
clearTimeout(this.searchTimer); clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.initData(); this.initData();
}, 500); }, 500);
} }
}, },
mounted() { mounted () {
this.getSubject(); this.getSubject();
this.getData(); this.getData();
}, },
methods: { methods: {
getRowKeys(row) { getRowKeys (row) {
return row.cid; return row.cid;
}, },
// //
getData() { getData () {
const sid = this.$store.state.dataPer.find(e => e.permissionName === '课程管理') const sid = this.$store.state.dataPer.find(e => e.permissionName === '课程管理')
let data = { let data = {
...this.form, ...this.form,
pageNum: this.pageNo, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
supplierId: sid ? sid.supplierId : '' supplierId: sid ? sid.supplierId : ''
}; };
@ -176,75 +229,75 @@ export default {
this.courseData = res.page.records; this.courseData = res.page.records;
this.totals = res.page.total; this.totals = res.page.total;
this.loading = false; this.loading = false;
}).catch(err => { }).catch(err => { });
});
}, },
initData() { initData () {
this.pageNo = 1; this.page = 1;
this.getData(); this.getData();
}, },
// //
getSubject() { async getSubject () {
this.$get(this.api.courseDiscipline).then(res => { const { list } = await this.$get(this.api.courseDiscipline)
this.subjectList = res.list; this.subjectList = list
}).catch(err => { this.form.professionalCategoryId && this.getProfessionalClassData()
});
}, },
// //
clearClass() { clearClass () {
this.form.professionalCategoryId = ""; this.form.professionalCategoryId = ''
this.form.professionalId = ""; this.form.professionalId = ''
}, },
// //
getProfessionalClass() { getProfessionalClass () {
this.clearClass(); this.clearClass();
this.getProfessionalClassData(); this.getProfessionalClassData();
this.pageNo = 1; this.page = 1;
this.getData(); this.getData();
}, },
getProfessionalClassData() { async getProfessionalClassData () {
let data = { const { list } = await this.$get(this.api.courseProfessionalClass, {
disciplineId: this.form.categoryId disciplineId: this.form.categoryId
}; })
this.$get(this.api.courseProfessionalClass, data).then(res => { this.ProfessionalClassList = list
this.ProfessionalClassList = res.list; this.form.professionalId && this.getProfessionalData()
}).catch(err => {
});
}, },
// //
clearProfess() { clearProfess () {
this.form.professionalId = ""; this.form.professionalId = ''
}, },
// //
getProfessional() { getProfessional () {
this.clearProfess(); this.clearProfess();
this.getProfessionalData(); this.getProfessionalData();
this.pageNo = 1; this.page = 1;
this.getData(); this.getData();
}, },
getProfessionalData() { async getProfessionalData () {
let data = { const { list } = await this.$get(this.api.courseProfessional, {
professionalClassId: this.form.professionalCategoryId professionalClassId: this.form.professionalCategoryId
}; })
this.$get(this.api.courseProfessional, data).then(res => { this.ProfessionalList = list
this.ProfessionalList = res.list; },
}).catch(err => { // url
}); setReferrer () {
this.$store.commit('setReferrer', `${this.$route.path}?${qs.stringify(this.form)}&page=${this.page}`)
}, },
// //
addcourse() { addcourse () {
this.setReferrer()
this.$router.push("/addcurriculum"); this.$router.push("/addcurriculum");
}, },
// //
edit(row) { edit (row) {
this.setReferrer()
this.$router.push(`/addcurriculum?cid=${row.cid}`); this.$router.push(`/addcurriculum?cid=${row.cid}`);
}, },
// //
config(row) { config (row) {
this.setReferrer()
this.$router.push(`/contentSettings?cid=${row.cid}&name=${row.curriculumName}`); this.$router.push(`/contentSettings?cid=${row.cid}&name=${row.curriculumName}`);
}, },
// //
handleDelete(row) { handleDelete (row) {
this.$post(`${this.api.deleteCoursePrompt}?cids=${row.cid}`).then(({ status }) => { this.$post(`${this.api.deleteCoursePrompt}?cids=${row.cid}`).then(({ status }) => {
if (status === 200) { if (status === 200) {
this.$confirm("确定要删除吗?", "提示", { this.$confirm("确定要删除吗?", "提示", {
@ -253,18 +306,18 @@ export default {
this.$post(`${this.api.delCourse}?cids=${row.cid}`).then(res => { this.$post(`${this.api.delCourse}?cids=${row.cid}`).then(res => {
this.getData(); this.getData();
this.$message.success("删除成功"); this.$message.success("删除成功");
}).catch(err => {}) }).catch(err => { })
}).catch(() => { }).catch(() => {
}); });
} }
}).catch(err => {}) }).catch(err => { })
}, },
// //
handleSelectionChange(val) { handleSelectionChange (val) {
this.multipleSelection = val; this.multipleSelection = val;
}, },
// //
delAllSelection() { delAllSelection () {
if (this.multipleSelection.length) { if (this.multipleSelection.length) {
let cids = [] let cids = []
this.multipleSelection.forEach(i => { this.multipleSelection.forEach(i => {
@ -277,35 +330,35 @@ export default {
}).then(() => { }).then(() => {
let ids = this.multipleSelection.map(i => i.cid); let ids = this.multipleSelection.map(i => i.cid);
this.$post(`${this.api.delCourse}?cids=${ids.toString()}`).then(res => { this.$post(`${this.api.delCourse}?cids=${ids.toString()}`).then(res => {
if(ids.length == this.courseData.length){ if (ids.length == this.courseData.length) {
if(this.pageNo > 1){ if (this.page > 1) {
this.pageNo = this.pageNo-1 this.page = this.page - 1
} }
} }
this.getData(); this.getData();
this.$message.success("删除成功"); this.$message.success("删除成功");
this.$refs.table.clearSelection() this.$refs.table.clearSelection()
}).catch(err => {}) }).catch(err => { })
}).catch(() => {}) }).catch(() => { })
} }
}).catch(err => {}) }).catch(err => { })
} else { } else {
this.$message.warning("请先选择课程 !"); this.$message.warning("请先选择课程 !");
} }
}, },
// //
handleCurrentChange(val) { handleCurrentChange (val) {
this.pageNo = val; this.page = val;
this.$router.push(`curriculum?page=${val}`) this.$router.push(`/curriculum?page=${val}`)
this.getData(); this.getData();
}, },
// //
onSearch() { onSearch () {
this.pageNo = 1; this.page = 1;
this.getData(); this.getData();
}, },
// //
changeSwitch(value, row) { changeSwitch (value, row) {
this.$post(`${this.api.isShelves}?cid=${row.cid}&isShelves=${value}`).then((res) => { this.$post(`${this.api.isShelves}?cid=${row.cid}&isShelves=${value}`).then((res) => {
this.getData(); this.getData();
this.$message.success("修改上下架状态成功!"); this.$message.success("修改上下架状态成功!");
@ -320,8 +373,5 @@ export default {
.card { .card {
min-height: calc(100vh - 300px); min-height: calc(100vh - 300px);
} }
.mag {
margin-right: 20px;
}
</style> </style>

@ -3,7 +3,7 @@
<el-card shadow="hover" <el-card shadow="hover"
class="mgb20"> class="mgb20">
<div class="flex-between"> <div class="flex-between">
<el-page-header @back="goBack" <el-page-header @back="back"
:content="name + '/' + (sorting? '编辑排序' : '内容设置')"></el-page-header> :content="name + '/' + (sorting? '编辑排序' : '内容设置')"></el-page-header>
</div> </div>
</el-card> </el-card>
@ -432,11 +432,11 @@ export default {
// //
if (window.history && window.history.pushState) { if (window.history && window.history.pushState) {
history.pushState(null, null, document.URL); history.pushState(null, null, document.URL);
window.addEventListener("popstate", this.goBack, false); window.addEventListener("popstate", this.back, false);
} }
}, },
destroyed () { destroyed () {
window.removeEventListener("popstate", this.goBack, false); window.removeEventListener("popstate", this.back, false);
}, },
methods: { methods: {
getData () { getData () {
@ -452,7 +452,7 @@ export default {
handleSelectionChange (val) { handleSelectionChange (val) {
this.multipleSelection = val this.multipleSelection = val
}, },
goBack () { back () {
// //
if (this.previewing) { if (this.previewing) {
this.closeIframe(); this.closeIframe();
@ -475,7 +475,7 @@ export default {
this.sorting = false this.sorting = false
} }
} else { } else {
this.$router.back() this.$router.push(this.$store.state.referrer || '/curriculum')
} }
} }
}, },

@ -643,6 +643,7 @@
import pdf from '../../components/pdf.vue' import pdf from '../../components/pdf.vue'
import util from '@/utils/util' import util from '@/utils/util'
import axios from 'axios' import axios from 'axios'
import qs from 'qs'
export default { export default {
components: { pdf }, components: { pdf },
data () { data () {
@ -796,9 +797,9 @@ export default {
totalProduct: 0, totalProduct: 0,
form3: { form3: {
orderType: '', orderType: +this.$route.query.orderType || '',
orderStatus: '', orderStatus: +this.$route.query.orderStatus || '',
keyword: '' keyword: this.$route.query.keyword || ''
}, },
// //
orderTypeList: [{ orderTypeList: [{
@ -1188,6 +1189,7 @@ export default {
}, },
// //
toOrderDetail (row) { toOrderDetail (row) {
this.$router.push(`/addcustomer?id=${this.customerId}&type=tab3&${qs.stringify(this.form3)}&page=${this.pageOrder}`)
this.$router.push(`/AddOrder?val=watch&orderId=${row.orderId}&orderStatus=${row.orderStatus === '已完成' ? 1 : 0}`) this.$router.push(`/AddOrder?val=watch&orderId=${row.orderId}&orderStatus=${row.orderStatus === '已完成' ? 1 : 0}`)
}, },
@ -1216,6 +1218,7 @@ export default {
}, },
// //
toOrder (row) { toOrder (row) {
this.$router.push(`/addcustomer?id=${this.customerId}&type=tab5&keyword=${this.bmsKeyword}&page=${this.pageOrder}`)
this.$router.push(`/bmOrder?businessManagerId=${row.businessManagerId}&customerId=${this.customerId}&customerName=${this.form.customerName}&userName=${row.userName}&teamId=${row.teamId}`) this.$router.push(`/bmOrder?businessManagerId=${row.businessManagerId}&customerId=${this.customerId}&customerName=${this.form.customerName}&userName=${row.userName}&teamId=${row.teamId}`)
}, },
@ -1411,7 +1414,7 @@ export default {
}, 1500) }, 1500)
this.$store.commit('schoolIdData', { schoolId: this.form.schoolId }) this.$store.commit('schoolIdData', { schoolId: this.form.schoolId })
this.$message.success('添加成功') this.$message.success('添加成功')
tab ? this.tabChange(tab, 1) : this.backPage() tab ? this.tabChange(tab, 1) : this.router.push('list')
}).catch((res) => { }).catch((res) => {
this.submiting = false this.submiting = false
}) })
@ -1457,7 +1460,7 @@ export default {
} }
}, },
backPage () { backPage () {
this.$router.push(`customer?page=${this.$store.state.customerPage}`) this.$router.push(this.$store.state.referrer || '/customer')
} }
} }
}; };

@ -1,8 +1,11 @@
<template> <template>
<div> <div>
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover"
class="mgb20">
<div class="flex-between"> <div class="flex-between">
<div class="per_title" v-preventReClick @click="back"> <div class="per_title"
v-preventReClick
@click="back">
<i class="el-icon-arrow-left"></i> <i class="el-icon-arrow-left"></i>
<span class="per_back">返回</span> <span class="per_back">返回</span>
<span class="per_school">{{ $route.query.userName }}的订单</span> <span class="per_school">{{ $route.query.userName }}的订单</span>
@ -10,45 +13,80 @@
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" class="card"> <el-card shadow="hover"
class="card">
<div class="flex-between mgb20"> <div class="flex-between mgb20">
<div class="flex-center"> <div class="flex-center">
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>订单列表</span> <span>订单列表</span>
</div> </div>
<el-input style="width: 300px" placeholder="请输入订单编号/产品名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input> <el-input style="width: 300px"
placeholder="请输入订单编号/产品名称"
prefix-icon="el-icon-search"
v-model="keyword"
clearable></el-input>
</div> </div>
<el-table :data="orderData" class="table" ref="table" stripe header-align="center" <el-table :data="orderData"
@selection-change="handleSelectionChange" :row-key="getRowKeys"> class="table"
<el-table-column type="index" width="100" label="序号" align="center"> ref="table"
stripe
header-align="center"
@selection-change="handleSelectionChange"
:row-key="getRowKeys">
<el-table-column type="index"
width="100"
label="序号"
align="center">
</el-table-column> </el-table-column>
<el-table-column prop="orderNumber" label="订单编号" align="center"> <el-table-column prop="orderNumber"
label="订单编号"
align="center">
</el-table-column> </el-table-column>
<el-table-column prop="customerName" label="客户名称" align="center"> <el-table-column prop="customerName"
label="客户名称"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ customerName }} {{ customerName }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="productName" label="产品内容" align="center" show-overflow-tooltip></el-table-column> <el-table-column prop="productName"
<el-table-column prop="orderAmount" label="订单金额(元)" align="center"> label="产品内容"
align="center"
show-overflow-tooltip></el-table-column>
<el-table-column prop="orderAmount"
label="订单金额(元)"
align="center">
</el-table-column> </el-table-column>
<el-table-column prop="createTime" label="订单日期" align="center"> <el-table-column prop="createTime"
label="订单日期"
align="center">
</el-table-column> </el-table-column>
<el-table-column prop="orderType" label="订单类型" align="center"> <el-table-column prop="orderType"
label="订单类型"
align="center">
</el-table-column> </el-table-column>
<el-table-column prop="orderStatus" label="订单状态" align="center"> <el-table-column prop="orderStatus"
label="订单状态"
align="center">
</el-table-column> </el-table-column>
<el-table-column prop="orderNature" label="订单性质" align="center"> <el-table-column prop="orderNature"
label="订单性质"
align="center">
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="toDetail(scope.row)">查看</el-button> <el-button type="text"
@click="toDetail(scope.row)">查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background layout="total, prev, pager, next" <el-pagination background
@current-change="handleCurrentChange" :current-page="page" :total="totals"> layout="total, prev, pager, next"
@current-change="handleCurrentChange"
:current-page="page"
:total="totals">
</el-pagination> </el-pagination>
</div> </div>
</el-card> </el-card>
@ -57,7 +95,7 @@
<script> <script>
export default { export default {
data() { data () {
return { return {
businessManagerId: this.$route.query.businessManagerId, businessManagerId: this.$route.query.businessManagerId,
teamId: this.$route.query.teamId, teamId: this.$route.query.teamId,
@ -72,18 +110,25 @@ export default {
}; };
}, },
watch: { watch: {
keyword: function(val) { keyword: function (val) {
clearTimeout(this.searchTimer); clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.initData(); this.initData();
}, 500); }, 500);
} }
}, },
created() { created () {
const { orderParam } = this.$store.state
if (orderParam) {
this.keyword = orderParam.keyword
this.page = orderParam.page
this.$store.commit('setOrderParam', null)
}
this.getData(); this.getData();
}, },
methods: { methods: {
getData() { getData () {
let data = { let data = {
businessManagerId: this.businessManagerId, businessManagerId: this.businessManagerId,
teamId: this.teamId, teamId: this.teamId,
@ -101,23 +146,31 @@ export default {
}); });
this.orderData = records this.orderData = records
this.totals = data.total this.totals = data.total
}).catch(res => {}) }).catch(res => { })
}, },
initData() { initData () {
this.page = 1 this.page = 1
this.getData() this.getData()
}, },
toDetail(row) { handleCurrentChange (val) {
this.page = val
this.getData()
},
toDetail (row) {
this.$store.commit('setOrderParam', {
keyword: this.keyword,
page: this.page,
})
this.$router.push({ this.$router.push({
path:'/AddOrder', path: '/AddOrder',
query:{ query: {
val: 'watch', val: 'watch',
orderId: row.orderId, orderId: row.orderId,
orderStatus: row.orderStatus === '已完成' ? 1 : 0 orderStatus: row.orderStatus === '已完成' ? 1 : 0,
} }
}) })
}, },
back() { back () {
this.$router.back() this.$router.back()
} }
} }
@ -131,8 +184,8 @@ export default {
.mag { .mag {
margin-right: 20px; margin-right: 20px;
} }
.cell{ .cell {
white-space:pre-wrap; white-space: pre-wrap;
width: 140px; width: 140px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
@ -141,10 +194,11 @@ export default {
line-clamp: 2; line-clamp: 2;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} }
.tags{ .tags {
border: none; border: none;
background: none;color: #000; background: none;
white-space:pre-wrap; color: #000;
white-space: pre-wrap;
width: 140px; width: 140px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;

@ -176,6 +176,7 @@
import Setting from '@/setting' import Setting from '@/setting'
import axios from 'axios'; import axios from 'axios';
import util from "@/libs/util"; import util from "@/libs/util";
import qs from 'qs'
export default { export default {
name: 'customer', name: 'customer',
data () { data () {
@ -204,10 +205,10 @@ export default {
}], }],
listData: [], listData: [],
form: { form: {
customerType: '', customerType: +this.$route.query.customerType || '',
provinces: '', provinces: +this.$route.query.provinces || '',
city: '', city: +this.$route.query.city || '',
keyword: '' keyword: this.$route.query.keyword || ''
}, },
multipleSelection: [], multipleSelection: [],
provinceList: [], provinceList: [],
@ -227,6 +228,11 @@ export default {
}, },
}, },
mounted () { mounted () {
const { query } = this.$route
if (query.page) {
this.$router.push('/customer').catch(() => { })
}
this.getData() this.getData()
this.getProvince() this.getProvince()
}, },
@ -258,6 +264,7 @@ export default {
this.$get(this.api.queryProvince).then(res => { this.$get(this.api.queryProvince).then(res => {
this.provinceList = res.list this.provinceList = res.list
this.$store.commit("provinceData", { provinceList: this.provinceList }) this.$store.commit("provinceData", { provinceList: this.provinceList })
this.form.city && this.getCityData()
}).catch(res => { }) }).catch(res => { })
}, },
clearprovince () { clearprovince () {
@ -307,13 +314,20 @@ export default {
util.downloadFileDirect(`客户列表.xlsx`, new Blob([res.data])) util.downloadFileDirect(`客户列表.xlsx`, new Blob([res.data]))
}).catch(res => { }) }).catch(res => { })
}, },
// url
setReferrer () {
this.$store.commit('setReferrer', `${this.$route.path}?${qs.stringify(this.form)}&page=${this.page}`)
},
addcustomer () { addcustomer () {
this.setReferrer()
this.$router.push('addcustomer') this.$router.push('addcustomer')
}, },
edit (row) { edit (row) {
this.setReferrer()
this.$router.push(`addcustomer?id=${row.customerId}`) this.$router.push(`addcustomer?id=${row.customerId}`)
}, },
show (row) { show (row) {
this.setReferrer()
this.$router.push(`addcustomer?id=${row.customerId}&show=true`) this.$router.push(`addcustomer?id=${row.customerId}&show=true`)
}, },
handleDelete (row) { handleDelete (row) {
@ -363,7 +377,6 @@ export default {
}, },
handleCurrentChange (val) { handleCurrentChange (val) {
this.page = val this.page = val
this.$store.commit('SET_C_PAGE', val)
this.$router.push(`customer?page=${val}`) this.$router.push(`customer?page=${val}`)
this.getData() this.getData()
}, },

@ -4,59 +4,108 @@
<!-- <a class="item" v-for="(item,index) in tabs" :key="index" :class="{active: index == activeName}" @click="tabChange(index)">{{item}}</a>--> <!-- <a class="item" v-for="(item,index) in tabs" :key="index" :class="{active: index == activeName}" @click="tabChange(index)">{{item}}</a>-->
<!-- </div>--> <!-- </div>-->
<div class="btn-wrap"> <div class="btn-wrap">
<el-button v-auth="'内容管理:保存排序'" class="action-btn" type="primary" @click="sortSubmit">保存排序</el-button> <el-button v-auth="'内容管理:保存排序'"
<el-button v-auth="'内容管理:批量删除'" class="action-btn" type="primary" @click="delAllData">批量删除</el-button> class="action-btn"
<el-button v-auth="'内容管理:新增文章'" class="action-btn" type="primary" @click="addArticle">新增文章</el-button> type="primary"
@click="sortSubmit">保存排序</el-button>
<el-button v-auth="'内容管理:批量删除'"
class="action-btn"
type="primary"
@click="delAllData">批量删除</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"
<el-table ref="table" :data="list" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id"> style="padding-top: 24px">
<el-table-column type="selection" width="80" align="center" :reserve-selection="true"></el-table-column> <el-table ref="table"
<el-table-column type="index" width="60" label="序号" align="center"> :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"> <template slot-scope="scope">
{{ scope.$index + (pageNo - 1) * pageSize + 1 }} {{ scope.$index + (pageNo - 1) * pageSize + 1 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="title" label="标题" show-overflow-tooltip align="center"> <el-table-column prop="title"
label="标题"
show-overflow-tooltip
align="center">
</el-table-column> </el-table-column>
<el-table-column prop="title" label="栏目" show-overflow-tooltip align="center"> <el-table-column prop="title"
label="栏目"
show-overflow-tooltip
align="center">
{{ columnName }} {{ columnName }}
</el-table-column> </el-table-column>
<el-table-column prop="name" label="排序值" width="80" align="center"> <el-table-column prop="name"
label="排序值"
width="80"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input class="sort-input" width="120" min="1" v-model.number="scope.row.sort" type="number"></el-input> <el-input class="sort-input"
width="120"
min="1"
v-model.number="scope.row.sort"
type="number"></el-input>
<span>{{ scope.row.sort }}</span> <span>{{ scope.row.sort }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="date" label="添加日期" align="center"> <el-table-column prop="date"
label="添加日期"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ transferDate(scope.row.date) }} {{ transferDate(scope.row.date) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="170"> <el-table-column label="操作"
align="center"
width="170">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-auth="'内容管理:编辑'" type="text" @click="editArticle(scope)">编辑</el-button> <el-button v-auth="'内容管理:编辑'"
<el-divider v-auth="'内容管理:编辑'" direction="vertical"></el-divider> type="text"
<el-button v-auth="'内容管理:删除'" type="text" @click="delData(scope.row)">删除</el-button> @click="editArticle(scope)">编辑</el-button>
<el-divider v-auth="'内容管理:编辑'"
direction="vertical"></el-divider>
<el-button v-auth="'内容管理:删除'"
type="text"
@click="delData(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="name" label="文章发布状态" width="120" align="center"> <el-table-column prop="name"
label="文章发布状态"
width="120"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch v-auth="'内容管理:禁用'"
v-auth="'内容管理:禁用'"
class="off" class="off"
v-model="scope.row.status" v-model="scope.row.status"
:active-value="0" :active-value="0"
:inactive-value="1" :inactive-value="1"
style="margin: 0 5px" style="margin: 0 5px"
:active-text="scope.row.status ? '关' : '开'" :active-text="scope.row.status ? '关' : '开'"
@change="switchOff($event,scope.row,scope.$index)" @change="switchOff($event,scope.row,scope.$index)"></el-switch>
></el-switch>
<span>{{ scope.row.status ? "禁用" : "启用" }}</span> <span>{{ scope.row.status ? "禁用" : "启用" }}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background layout="total, prev, pager, next" :total="totals" @current-change="handleCurrentChange" :current-page="pageNo"> <el-pagination background
layout="total, prev, pager, next"
:total="totals"
@current-change="handleCurrentChange"
:current-page="pageNo">
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
@ -67,7 +116,7 @@
import util from "@/libs/util"; import util from "@/libs/util";
export default { export default {
data() { data () {
return { return {
activeName: "first", activeName: "first",
tabs: { tabs: {
@ -87,17 +136,17 @@ export default {
columnId: "" columnId: ""
}, },
watch: { watch: {
columnId() { columnId () {
this.getColumnName(this.$parent.menuList) this.getColumnName(this.$parent.menuList)
this.getData(); this.getData();
} }
}, },
mounted() { mounted () {
this.getColumnName(this.$parent.menuList) this.getColumnName(this.$parent.menuList)
this.getData(); this.getData();
}, },
methods: { methods: {
getData(id) { getData (id) {
let data = { let data = {
columnId: this.columnId columnId: this.columnId
}; };
@ -112,16 +161,16 @@ export default {
}).catch(res => { }).catch(res => {
}); });
}, },
handleSelectionChange(val) { handleSelectionChange (val) {
this.multipleSelection = val; this.multipleSelection = val;
}, },
handleCurrentChange(val) { handleCurrentChange (val) {
this.pageNo = val; this.pageNo = val;
this.$router.push(`list?page=${val}`) this.$router.push(`/information?page=${val}`)
this.getData(); this.getData();
}, },
// //
getColumnName(data) { getColumnName (data) {
data.map(e => { data.map(e => {
if (e.id == this.columnId) { if (e.id == this.columnId) {
this.columnName = e.name this.columnName = e.name
@ -130,13 +179,13 @@ export default {
} }
}) })
}, },
addArticle() { addArticle () {
this.$router.push(`/addArticle?columnId=${this.columnId}&sort=${this.list.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}`);
}, },
delData(row) { delData (row) {
this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", { this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", {
type: "warning" type: "warning"
}) })
@ -150,10 +199,10 @@ export default {
.catch(() => { .catch(() => {
}); });
}, },
transferDate(date) { transferDate (date) {
return date.replace(" 00:00:00", ""); return date.replace(" 00:00:00", "");
}, },
delAllData() { delAllData () {
if (this.multipleSelection.length != "") { if (this.multipleSelection.length != "") {
let newArr = this.multipleSelection; let newArr = this.multipleSelection;
let delList = newArr.map(item => { let delList = newArr.map(item => {
@ -174,7 +223,7 @@ export default {
this.getData(); this.getData();
}).catch(res => { }).catch(res => {
}); });
if(this.multipleSelection.length === this.list.length && this.pageNo>1) { if (this.multipleSelection.length === this.list.length && this.pageNo > 1) {
this.handleCurrentChange(this.pageNo - 1) this.handleCurrentChange(this.pageNo - 1)
} }
}) })
@ -184,7 +233,7 @@ export default {
util.errorMsg("请先选择数据 !"); util.errorMsg("请先选择数据 !");
} }
}, },
switchOff(val, row, index) { switchOff (val, row, index) {
this.$put(`${this.api.enableArticle}/${row.id}/${val}`) this.$put(`${this.api.enableArticle}/${row.id}/${val}`)
.then(res => { .then(res => {
val == 1 ? util.errorMsg("该文章已隐藏,对学生端用户不可见") : util.successMsg("该文章已发布,对学生端用户可见"); val == 1 ? util.errorMsg("该文章已隐藏,对学生端用户不可见") : util.successMsg("该文章已发布,对学生端用户可见");
@ -192,7 +241,7 @@ export default {
.catch(err => { .catch(err => {
}); });
}, },
sortSubmit() { sortSubmit () {
if (this.list.length) { if (this.list.length) {
if (this.list.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.list }; let data = { articleList: this.list };

@ -220,7 +220,7 @@ export default {
this.editing = false this.editing = false
} }
} else { } else {
this.$router.push(`/match?page=${this.$store.state.matchPage}&platformSource=${this.$store.state.platformSource}`) this.backPage()
} }
}, },
back () { back () {
@ -240,7 +240,7 @@ export default {
} }
}, },
backPage () { backPage () {
this.$router.push(`/match?page=${this.$store.state.matchPage}&platformSource=${this.$store.state.platformSource}`) this.$router.push(this.$store.state.referrer || '/match')
} }
} }
}; };

@ -1,7 +1,9 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<div class="modal"> <div class="modal">
<el-steps :space="200" :active="4" finish-status="success"> <el-steps :space="200"
:active="4"
finish-status="success">
<el-step title="大赛信息填写"></el-step> <el-step title="大赛信息填写"></el-step>
<el-step title="赛程与规则设置"></el-step> <el-step title="赛程与规则设置"></el-step>
<el-step title="比赛内容设置"></el-step> <el-step title="比赛内容设置"></el-step>
@ -9,7 +11,8 @@
</el-steps> </el-steps>
<h1>大赛已发布</h1> <h1>大赛已发布</h1>
<div class="btns"> <div class="btns">
<el-button type="primary" @click="back">确定</el-button> <el-button type="primary"
@click="back">确定</el-button>
</div> </div>
</div> </div>
</div> </div>
@ -17,17 +20,17 @@
<script> <script>
export default { export default {
data() { data () {
return { return {
}; };
}, },
mounted() { mounted () {
}, },
methods: { methods: {
back() { back () {
this.$router.push(`/match?page=${this.$store.state.matchPage}`) this.$router.push(this.$store.state.referrer || '/match')
} }
} }
}; };
@ -41,7 +44,7 @@ export default {
.modal { .modal {
width: 500px; width: 500px;
padding-top: 150px; padding-top: 150px;
margin: 0 auto ; margin: 0 auto;
h1 { h1 {
margin: 20px; margin: 20px;
text-align: center; text-align: center;

@ -35,7 +35,7 @@
<li> <li>
<el-input placeholder="请输入竞赛名称/创建人" <el-input placeholder="请输入竞赛名称/创建人"
suffix-icon="el-icon-search" suffix-icon="el-icon-search"
v-model="keyword" v-model="form.keyWord"
clearable></el-input> clearable></el-input>
</li> </li>
</ul> </ul>
@ -232,18 +232,16 @@
<script> <script>
import util from "@/libs/util"; import util from "@/libs/util";
import Setting from "@/setting";
import { Loading } from 'element-ui'
import Bus from '@/libs/bus' import Bus from '@/libs/bus'
import qs from 'qs'
export default { export default {
name: "match", name: "match",
data () { data () {
return { return {
timer: null, timer: null,
keyword: "",
sourceList: [ sourceList: [
{ {
id: "", id: null,
name: "不限" name: "不限"
}, },
{ {
@ -257,7 +255,7 @@ export default {
], ],
rangeList: [ rangeList: [
{ {
id: "", id: '',
name: "不限" name: "不限"
}, },
{ {
@ -275,12 +273,12 @@ export default {
], ],
matchData: [], matchData: [],
form: { form: {
month: "", keyWord: this.$route.query.keyWord || null,
publishStatus: "", month: +this.$route.query.month || '',
startTime: "", startTime: this.$route.query.startTime || '',
endTime: "", endTime: this.$route.query.endTime || '',
platformSource: +this.$route.query.platformSource || 0, // (01) platformSource: this.$route.query.platformSource === 'null' ? null : (+this.$route.query.platformSource || 0), // (01)
competitionScope: '', // (0: 1: 2.) competitionScope: this.$route.query.competitionScope ? +this.$route.query.competitionScope : '', // (0: 1: 2.)
}, },
multipleSelection: [], multipleSelection: [],
dateList: [ dateList: [
@ -336,12 +334,12 @@ export default {
this.form.startTime = val[0]; this.form.startTime = val[0];
this.form.endTime = val[1]; this.form.endTime = val[1];
} else { } else {
this.form.startTime = ""; this.form.startTime = ''
this.form.endTime = ""; this.form.endTime = ''
} }
this.initData(); this.initData();
}, },
keyword: function (val) { 'form.keyWord': function (val) {
clearTimeout(this.searchTimer); clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.initData(); this.initData();
@ -349,7 +347,11 @@ export default {
} }
}, },
mounted () { mounted () {
this.$store.commit('SET_M_PAGE', 1) const { query } = this.$route
if (query.page) {
this.$router.push('/match').catch(() => { })
}
// websocket // websocket
Bus.$on('matchSocket', () => { Bus.$on('matchSocket', () => {
this.getData() this.getData()
@ -369,8 +371,8 @@ export default {
pageSize: this.pageSize, pageSize: this.pageSize,
competitionScope: form.competitionScope === '' ? null : form.competitionScope, competitionScope: form.competitionScope === '' ? null : form.competitionScope,
endTime: form.endTime || null, endTime: form.endTime || null,
keyWord: this.keyword || null, keyWord: form.keyWord,
platformSource: form.platformSource === '' ? null : form.platformSource, platformSource: form.platformSource,
startTime: form.startTime || null, startTime: form.startTime || null,
}).then(({ data }) => { }).then(({ data }) => {
const list = data.records const list = data.records
@ -413,7 +415,12 @@ export default {
this.page = 1; this.page = 1;
this.getData(); this.getData();
}, },
// url
setReferrer () {
this.$store.commit('setReferrer', `${this.$route.path}?${qs.stringify(this.form)}&page=${this.page}`)
},
add () { add () {
this.setReferrer()
this.$router.push("/addMatch"); this.$router.push("/addMatch");
}, },
// //
@ -452,6 +459,7 @@ export default {
}, },
// //
manage (row) { manage (row) {
this.setReferrer()
this.$router.push(`/matchManage?id=${row.id}&name=${row.competitionName}`) this.$router.push(`/matchManage?id=${row.id}&name=${row.competitionName}`)
}, },
@ -461,14 +469,6 @@ export default {
}, },
// //
sourceChange (val) { sourceChange (val) {
this.$router.push({
path: '/match',
query: {
...this.$route.query,
platformSource: val
}
})
this.$store.commit('SET_M_SOURCE', val)
this.initData() this.initData()
}, },
delData (row) { delData (row) {
@ -511,7 +511,6 @@ export default {
this.page = val; this.page = val;
this.$router.push(`match?page=${val}`) this.$router.push(`match?page=${val}`)
this.getData(); this.getData();
this.$store.commit('SET_M_PAGE', val)
}, },
transferTime (date, type) { transferTime (date, type) {
if (date == "0000-00-00 00:00:00") return "---"; if (date == "0000-00-00 00:00:00") return "---";

@ -114,7 +114,7 @@ export default {
}, },
// //
backPage () { backPage () {
this.$router.push(`/match?page=${this.$store.state.matchPage}&platformSource=${this.$store.state.platformSource}`) this.$router.push(this.$store.state.referrer || '/match')
}, },
// tab // tab
tabSwitch (i) { tabSwitch (i) {

@ -56,7 +56,6 @@
</template> </template>
<script> <script>
import util from "@/libs/util";
import Const from '@/const/match' import Const from '@/const/match'
export default { export default {
name: "matchArch", name: "matchArch",
@ -118,10 +117,12 @@ export default {
}, },
// //
toRank (row, i) { toRank (row, i) {
this.$store.commit('setInnerReferrer', this.$route.fullPath)
this.$router.push(`/matchRank?id=${this.id}&stageId=${row.stageId}&index=${i}&method=${row.method}&competitionType=${row.competitionType}&rule=${row.rule}`) this.$router.push(`/matchRank?id=${this.id}&stageId=${row.stageId}&index=${i}&method=${row.method}&competitionType=${row.competitionType}&rule=${row.rule}`)
}, },
// //
toArch (row, i) { toArch (row, i) {
this.$store.commit('setInnerReferrer', this.$route.fullPath)
const cur = this.form.competitionStage[i] const cur = this.form.competitionStage[i]
const showFile = !!(cur.method === 2 && cur.competitionStageContentSetting && cur.competitionStageContentSetting.whetherToUploadFiles) const showFile = !!(cur.method === 2 && cur.competitionStageContentSetting && cur.competitionStageContentSetting.whetherToUploadFiles)
this.$router.push(`/matchArchList?id=${this.id}&stageId=${row.stageId}&method=${row.method}&competitionType=${row.competitionType}&showFile=${showFile}`) this.$router.push(`/matchArchList?id=${this.id}&stageId=${row.stageId}&method=${row.method}&competitionType=${row.competitionType}&showFile=${showFile}`)

@ -3,7 +3,7 @@
<el-card shadow="hover" <el-card shadow="hover"
class="m-b-20 head-card"> class="m-b-20 head-card">
<div class="flex-between m-b-20"> <div class="flex-between m-b-20">
<el-page-header @back="$router.back()" <el-page-header @back="back"
content="成绩管理"></el-page-header> content="成绩管理"></el-page-header>
</div> </div>
@ -291,7 +291,6 @@
</template> </template>
<script> <script>
import Setting from "@/setting";
import util from "@/libs/util"; import util from "@/libs/util";
import * as echarts from "echarts"; import * as echarts from "echarts";
import axios from 'axios'; import axios from 'axios';
@ -305,11 +304,11 @@ export default {
competitionType: +this.$route.query.competitionType, competitionType: +this.$route.query.competitionType,
showFile: this.$route.query.showFile === 'true', showFile: this.$route.query.showFile === 'true',
isCompress: util.isCompress, isCompress: util.isCompress,
keyword: "", keyword: this.$route.query.keyword || '',
searchTimer: null, searchTimer: null,
list: [], list: [],
multipleSelection: [], multipleSelection: [],
page: 1, page: +this.$route.query.page || 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
@ -339,6 +338,13 @@ export default {
keyword: function (val) { keyword: function (val) {
clearTimeout(this.searchTimer); clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.$router.push({
path: '/matchArchList',
query: {
...this.$route.query,
keyword: val
}
})
this.initData(); this.initData();
}, 500); }, 500);
} }
@ -485,6 +491,13 @@ export default {
this.multipleSelection = val; this.multipleSelection = val;
}, },
handleCurrentChange (val) { // handleCurrentChange (val) { //
this.$router.push({
path: '/matchArchList',
query: {
...this.$route.query,
page: val
}
})
this.page = val; this.page = val;
this.getData(); this.getData();
}, },
@ -624,6 +637,9 @@ export default {
} }
x.send() x.send()
}, },
back () {
this.$router.push(this.$store.state.innerReferrer)
}
} }
}; };
</script> </script>

@ -4,7 +4,7 @@
class="m-b-20 head-card"> class="m-b-20 head-card">
<div class="flex-between m-b-20"> <div class="flex-between m-b-20">
<el-page-header v-if="grades.length" <el-page-header v-if="grades.length"
@back="$router.back()" @back="back"
:content="grades[index].stageName + '/排名'"></el-page-header> :content="grades[index].stageName + '/排名'"></el-page-header>
</div> </div>
@ -272,9 +272,7 @@
</template> </template>
<script> <script>
import Setting from '@/setting'
import util from "@/libs/util"; import util from "@/libs/util";
import echarts from "echarts";
import axios from 'axios'; import axios from 'axios';
export default { export default {
data () { data () {
@ -286,7 +284,7 @@ export default {
competitionType: +this.$route.query.competitionType, competitionType: +this.$route.query.competitionType,
rule: +this.$route.query.rule, rule: +this.$route.query.rule,
searchTimer: null, searchTimer: null,
keyword: '', keyword: this.$route.query.keyword || '',
teamCalculationMethods: [ teamCalculationMethods: [
{ {
id: 0, id: 0,
@ -307,7 +305,7 @@ export default {
active: '', active: '',
grades: [], grades: [],
list: [], list: [],
page: 1, page: +this.$route.query.page || 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
type: 0, type: 0,
@ -354,6 +352,13 @@ export default {
keyword: function (val) { keyword: function (val) {
clearTimeout(this.searchTimer); clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.$router.push({
path: '/matchRank',
query: {
...this.$route.query,
keyword: val
}
})
this.getRank(); this.getRank();
}, 500); }, 500);
} }
@ -552,6 +557,13 @@ export default {
this.multipleSelection = val; this.multipleSelection = val;
}, },
handleCurrentChange (val) { // handleCurrentChange (val) { //
this.$router.push({
path: '/matchRank',
query: {
...this.$route.query,
page: val
}
})
this.page = val; this.page = val;
this.getData(); this.getData();
}, },
@ -772,6 +784,9 @@ export default {
this.getRank() this.getRank()
this.importVisible = false this.importVisible = false
}, },
back () {
this.$router.push(this.$store.state.innerReferrer)
}
} }
}; };
</script> </script>

@ -345,7 +345,7 @@ export default {
info: { info: {
completeCompetitionSetup: {} completeCompetitionSetup: {}
}, },
isDisable: '', isDisable: this.$route.query.isDisable ? +this.$route.query.isDisable : '',
statusList: [ statusList: [
{ {
id: '', id: '',
@ -360,10 +360,10 @@ export default {
name: '未禁用' name: '未禁用'
} }
], ],
keyword: "", keyword: this.$route.query.keyword || '',
listData: [], listData: [],
multipleSelection: [], multipleSelection: [],
page: 1, page: +this.$route.query.page || 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
schoolOrder: '', schoolOrder: '',
@ -813,6 +813,7 @@ export default {
}, },
// //
toInfo (row) { toInfo (row) {
this.$store.commit('setInnerReferrer', `${this.$route.fullPath}&keyword=${this.keyword}&page=${this.page}&isDisable=${this.isDisable}`)
this.$router.push(`/matchInfo?id=${this.id}&accountId=${row.accountId}`) this.$router.push(`/matchInfo?id=${this.id}&accountId=${row.accountId}`)
}, },
exportAll () { exportAll () {

@ -9,7 +9,7 @@
<div class="flex-between"> <div class="flex-between">
<div class="per_title" <div class="per_title"
v-preventReClick v-preventReClick
@click="goBack()"> @click="back">
<i class="el-icon-arrow-left"></i> <i class="el-icon-arrow-left"></i>
<span class="per_back">返回</span> <span class="per_back">返回</span>
<span class="per_school">{{ titlesw }}</span> <span class="per_school">{{ titlesw }}</span>
@ -1756,7 +1756,6 @@ export default {
cityId: "", cityId: "",
phone: "", phone: "",
orderAmount: 0, orderAmount: 0,
// orderId: this.$store.state.orderId,
customerName: "",// customerName: "",//
teamId: '', teamId: '',
businessManagerId: '', businessManagerId: '',
@ -2350,7 +2349,7 @@ export default {
this.refreshCache() this.refreshCache()
this.$message.success("修改成功"); this.$message.success("修改成功");
this.loading = false; this.loading = false;
this.$router.back(); this.back();
}).catch(err => { }).catch(err => {
this.loading = false; this.loading = false;
}); });
@ -2359,7 +2358,7 @@ export default {
this.refreshCache() this.refreshCache()
this.$message.success("添加订单成功"); this.$message.success("添加订单成功");
this.loading = false; this.loading = false;
this.renewDisabled ? this.$router.push('/order') : this.$router.back(); this.renewDisabled ? this.$router.push('/order') : this.back();
}).catch(err => { }).catch(err => {
this.loading = false; this.loading = false;
}); });
@ -3005,8 +3004,9 @@ export default {
IPSure () { IPSure () {
this.ipVisible = false; this.ipVisible = false;
}, },
goBack () { back () {
this.$router.go(-1); // this.$router.push(this.$store.state.referrer || '/order')
this.$router.back()
}, },
/** /**
* 添加实训课程产品权限,理论课程 ,数据前瞻平台权限,职站增值应用产品权限,实训课程非集成,实验工具 * 添加实训课程产品权限,理论课程 ,数据前瞻平台权限,职站增值应用产品权限,实训课程非集成,实验工具

@ -1,6 +1,7 @@
<template> <template>
<div> <div>
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover"
class="mgb20">
<div> <div>
<div class="flex-center mgb20"> <div class="flex-center mgb20">
<p class="hr_tag"></p> <p class="hr_tag"></p>
@ -10,43 +11,64 @@
<el-form label-width="80px"> <el-form label-width="80px">
<el-col :span="4"> <el-col :span="4">
<el-form-item label="省份"> <el-form-item label="省份">
<el-select v-model="form.provinces" clearable placeholder="请选择省份" <el-select v-model="form.provinceId"
@change="getCity()" @clear="clearprovince()"> clearable
<el-option v-for="(item,index) in provinceList" :key="index" placeholder="请选择省份"
:label="item.provinceName" :value="item.provinceId"></el-option> @change="getCity()"
@clear="clearprovince()">
<el-option v-for="(item,index) in provinceList"
:key="index"
:label="item.provinceName"
:value="item.provinceId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item label="城市"> <el-form-item label="城市">
<el-select v-model="form.city" clearable placeholder="请选择城市" <el-select v-model="form.cityId"
:disabled="form.provinces ? false : true" @change="getData()"> clearable
<el-option v-for="(item,index) in cityList" :key="index" placeholder="请选择城市"
:label="item.cityName" :value="item.cityId"></el-option> :disabled="form.provinceId ? false : true"
@change="getData()">
<el-option v-for="(item,index) in cityList"
:key="index"
:label="item.cityName"
:value="item.cityId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item label="订单类型"> <el-form-item label="订单类型">
<el-select v-model="form.orderType" clearable placeholder="请选择订单类型" <el-select v-model="form.orderType"
clearable
placeholder="请选择订单类型"
@change="getData()"> @change="getData()">
<el-option v-for="(item,index) in orderTypeList" :key="index" <el-option v-for="(item,index) in orderTypeList"
:label="item.name" :value="item.value"></el-option> :key="index"
:label="item.name"
:value="item.value"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item label="订单状态"> <el-form-item label="订单状态">
<el-select v-model="form.orderStatus" clearable placeholder="请选择订单状态" <el-select v-model="form.orderStatus"
clearable
placeholder="请选择订单状态"
@change="getData()"> @change="getData()">
<el-option v-for="(item,index) in orderStatusList" :key="index" <el-option v-for="(item,index) in orderStatusList"
:label="item.name" :value="item.value"></el-option> :key="index"
:label="item.name"
:value="item.value"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item> <el-form-item>
<el-input placeholder="请输入订单号/客户名称/订单名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input> <el-input placeholder="请输入订单号/客户名称/订单名称"
prefix-icon="el-icon-search"
v-model="form.customerName"
clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
@ -54,57 +76,104 @@
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" class="card"> <el-card shadow="hover"
class="card">
<div class="flex-between mgb20"> <div class="flex-between mgb20">
<div class="flex-center"> <div class="flex-center">
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>订单列表</span> <span>订单列表</span>
</div> </div>
<div> <div>
<el-button type="primary" round @click="addOrder()" v-auth>新建订单</el-button> <el-button type="primary"
<el-button type="primary" round @click="delAllSelection" v-auth>批量删除</el-button> round
@click="addOrder"
v-auth>新建订单</el-button>
<el-button type="primary"
round
@click="delAllSelection"
v-auth>批量删除</el-button>
</div> </div>
</div> </div>
<el-table :data="orderData" class="table" ref="table" stripe header-align="center" <el-table :data="orderData"
@selection-change="handleSelectionChange" row-key="orderId"> class="table"
<el-table-column type="selection" width="55" align="center" ref="table"
stripe
header-align="center"
@selection-change="handleSelectionChange"
row-key="orderId">
<el-table-column type="selection"
width="55"
align="center"
:reserve-selection="true"></el-table-column> :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"> <el-table-column type="index"
width="100"
label="序号"
align="center">
</el-table-column> </el-table-column>
<el-table-column prop="orderNumber" label="订单编号" align="center"> <el-table-column prop="orderNumber"
label="订单编号"
align="center">
</el-table-column> </el-table-column>
<el-table-column prop="customerName" label="客户名称" align="center"> <el-table-column prop="customerName"
label="客户名称"
align="center">
</el-table-column> </el-table-column>
<el-table-column prop="orderContent" label="订单内容" align="center" show-overflow-tooltip></el-table-column> <el-table-column prop="orderContent"
<el-table-column prop="orderAmount" label="订单金额(元)" align="center"> label="订单内容"
align="center"
show-overflow-tooltip></el-table-column>
<el-table-column prop="orderAmount"
label="订单金额(元)"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.orderType === '试用' ? 0 : scope.row.orderAmount }} {{ scope.row.orderType === '试用' ? 0 : scope.row.orderAmount }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createTime" label="订单日期" align="center"> <el-table-column prop="createTime"
label="订单日期"
align="center">
</el-table-column> </el-table-column>
<el-table-column prop="orderType" label="订单类型" align="center"> <el-table-column prop="orderType"
label="订单类型"
align="center">
</el-table-column> </el-table-column>
<el-table-column prop="orderStatus" label="订单状态" align="center"> <el-table-column prop="orderStatus"
label="订单状态"
align="center">
</el-table-column> </el-table-column>
<el-table-column prop="orderNature" label="订单性质" align="center"> <el-table-column prop="orderNature"
label="订单性质"
align="center">
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" v-if="scope.row.isDel!==1" @click="handle('edit',scope.row)" v-auth="'/order:修改'"> <el-button type="text"
v-if="scope.row.isDel!==1"
@click="handle('edit',scope.row)"
v-auth="'/order:修改'">
{{ scope.row.orderStatus === "已完成" ? "修改" : "处理" }} {{ scope.row.orderStatus === "已完成" ? "修改" : "处理" }}
</el-button> </el-button>
<el-button type="text" @click="handle('watch',scope.row)" v-auth>查看</el-button> <el-button type="text"
<el-button type="text" @click="handleDelete(scope.row)" v-auth>删除</el-button> @click="handle('watch',scope.row)"
<el-button type="text" v-if="scope.row.orderStatus==='已完成'&&scope.row.isDel!==1" v-auth>查看</el-button>
@click="handle('renew',scope.row)" v-auth>续费 <el-button type="text"
@click="handleDelete(scope.row)"
v-auth>删除</el-button>
<el-button type="text"
v-if="scope.row.orderStatus==='已完成'&&scope.row.isDel!==1"
@click="handle('renew',scope.row)"
v-auth>续费
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background layout="total, prev, pager, next" <el-pagination background
@current-change="handleCurrentChange" :current-page="pageNo" :total="totals"> layout="total, prev, pager, next"
@current-change="handleCurrentChange"
:current-page="page"
:total="totals">
</el-pagination> </el-pagination>
</div> </div>
</el-card> </el-card>
@ -112,17 +181,17 @@
</template> </template>
<script> <script>
import qs from 'qs'
export default { export default {
data() { data () {
return { return {
orderParam: this.$store.state.orderParam,
form: { form: {
provinces: "", provinceId: +this.$route.query.provinceId || '',
city: "", cityId: +this.$route.query.cityId || '',
orderType: "", orderType: +this.$route.query.orderType || '',
orderStatus: "" orderStatus: this.$route.query.orderStatus ? +this.$route.query.orderStatus : '',
customerName: this.$route.query.customerName || ''
}, },
keyword: "",
orderData: [], orderData: [],
multipleSelection: [], multipleSelection: [],
provinceList: this.$store.state.provinceList, provinceList: this.$store.state.provinceList,
@ -147,7 +216,7 @@ export default {
name: "已取消", name: "已取消",
value: 2 value: 2
}], }],
pageNo: +this.$route.query.page || 1, page: +this.$route.query.page || 1,
pageSize: 10, pageSize: 10,
totals: 0, totals: 0,
searchTimer: null, searchTimer: null,
@ -155,34 +224,35 @@ export default {
}; };
}, },
watch: { watch: {
keyword: function(val) { 'form.customerName': function (val) {
clearTimeout(this.searchTimer); clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.initData(); this.initData();
}, 500); }, 500);
} }
}, },
created() { mounted () {
if (this.orderParam) this.form = this.orderParam const { query } = this.$route
if (query.page) {
this.$router.push('/order').catch(() => { })
}
this.form.provinceId && this.getCityData()
this.getData() this.getData()
this.getSchool() this.getSchool()
}, },
methods: { methods: {
test(val) { test (val) {
if (val.length > 5) { if (val.length > 5) {
val = 5; val = 5;
} }
}, },
getData() { getData () {
const sid = this.$store.state.dataPer.find(e => e.permissionName === '订单管理') const sid = this.$store.state.dataPer.find(e => e.permissionName === '订单管理')
let data = { let data = {
cityId: this.form.city, ...this.form,
customerName: this.keyword, pageNo: this.page,
orderStatus: this.form.orderStatus,
orderType: this.form.orderType,
pageNo: this.pageNo,
pageSize: this.pageSize, pageSize: this.pageSize,
provinceId: this.form.provinces,
supplierId: sid ? sid.supplierId : '' supplierId: sid ? sid.supplierId : ''
}; };
this.$post(this.api.orderList, data).then(res => { this.$post(this.api.orderList, data).then(res => {
@ -193,58 +263,58 @@ export default {
}); });
this.orderData = res.orderPage.orders; this.orderData = res.orderPage.orders;
this.totals = res.orderPage.total; this.totals = res.orderPage.total;
}).catch(res => { }).catch(res => { });
});
}, },
// //
clearprovince() { clearprovince () {
this.form.city = ""; this.form.cityId = ''
}, },
// //
getCity() { getCity () {
this.clearprovince(); this.clearprovince();
this.getCityData(); this.getCityData();
this.pageNo = 1; this.page = 1;
this.getData(); this.getData();
}, },
getCityData() { async getCityData () {
let data = { const { list } = await this.$get(this.api.queryCity, {
provinceId: this.form.provinces provinceId: this.form.provinceId
}; })
this.$get(this.api.queryCity, data).then(res => { this.cityList = list
this.cityList = res.list; },
}).catch(res => { // url
}); setReferrer () {
this.$router.push(`${this.$route.path}?${qs.stringify(this.form)}&page=${this.page}`)
// this.$store.commit('setReferrer', `${this.$route.path}?${qs.stringify(this.form)}&page=${this.page}`)
}, },
addOrder() { addOrder () {
this.$store.commit("systemData", { order_id: "" }); this.setReferrer()
this.$router.push({ this.$router.push({
path:'/AddOrder', path: '/AddOrder',
query:{ query: {
val:'isAdd', val: 'isAdd',
} }
}) })
}, },
handle(val, row) { handle (val, row) {
this.setReferrer()
let orderStatus let orderStatus
if(row.orderStatus == '已完成'){ if (row.orderStatus == '已完成') {
orderStatus = 1 orderStatus = 1
}else{ } else {
orderStatus = 0 orderStatus = 0
} }
this.$store.commit('setOrderParam', this.form)
this.$router.push({ this.$router.push({
path:'/AddOrder', path: '/AddOrder',
query:{ query: {
val:val, val: val,
orderId:row.orderId, orderId: row.orderId,
orderStatus orderStatus
} }
}) })
// this.$router.push("/addorder?" + val + "=" + row.orderId+"&orderStatus="+orderStatus);
}, },
// //
getSchool() { getSchool () {
let sid = this.$store.state.dataPer.find(e => e.permissionName === '客户管理') let sid = this.$store.state.dataPer.find(e => e.permissionName === '客户管理')
// //
if (!sid) sid = this.$store.state.dataPer.find(e => e.permissionName === '订单管理') if (!sid) sid = this.$store.state.dataPer.find(e => e.permissionName === '订单管理')
@ -258,14 +328,14 @@ export default {
// supplierId: sid ? sid.supplierId : '' // supplierId: sid ? sid.supplierId : ''
}).then(res => { }).then(res => {
this.schools = res.message.list this.schools = res.message.list
}).catch(res => {}) }).catch(res => { })
}, },
// //
refreshCache(customerId) { refreshCache (customerId) {
this.$post(`${this.api.refreshCache}?schoolId=${this.schools.find(e => e.customerId == customerId).schoolId}`).then(res => {}).catch(res => {}) this.$post(`${this.api.refreshCache}?schoolId=${this.schools.find(e => e.customerId == customerId).schoolId}`).then(res => { }).catch(res => { })
}, },
// //
handleDelete(row) { handleDelete (row) {
this.$confirm("确定要删除吗?", "提示", { this.$confirm("确定要删除吗?", "提示", {
type: "warning" type: "warning"
}).then(() => { }).then(() => {
@ -281,17 +351,17 @@ export default {
}); });
}, },
// //
handleRenew(row) { handleRenew (row) {
}, },
handleSelectionChange(val) { handleSelectionChange (val) {
if (val.length > 0) { if (val.length > 0) {
this.multipleSelection = val.map(e => e.orderId); this.multipleSelection = val.map(e => e.orderId);
} else { } else {
this.multipleSelection = []; this.multipleSelection = [];
} }
}, },
delAllSelection() { delAllSelection () {
const list = this.multipleSelection const list = this.multipleSelection
if (list.length != "") { if (list.length != "") {
// //
@ -313,17 +383,17 @@ export default {
this.$message.error("请先选择订单 !"); this.$message.error("请先选择订单 !");
} }
}, },
initData() { initData () {
this.pageNo = 1; this.page = 1;
this.getData(); this.getData();
}, },
handleCurrentChange(val) { handleCurrentChange (val) {
this.pageNo = val; this.page = val;
this.$router.push(`order?page=${val}`) this.$router.push(`order?page=${val}`)
this.getData(); this.getData();
}, },
// //
gotoClient() { gotoClient () {
this.$router.push(""); this.$router.push("");
} }
} }
@ -337,8 +407,8 @@ export default {
.mag { .mag {
margin-right: 20px; margin-right: 20px;
} }
.cell{ .cell {
white-space:pre-wrap; white-space: pre-wrap;
width: 140px; width: 140px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
@ -347,10 +417,11 @@ export default {
line-clamp: 2; line-clamp: 2;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} }
.tags{ .tags {
border: none; border: none;
background: none;color: #000; background: none;
white-space:pre-wrap; color: #000;
white-space: pre-wrap;
width: 140px; width: 140px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;

@ -1,59 +1,58 @@
<template> <template>
<div class="page system" style="padding: 0"> <div class="page system"
style="padding: 0">
<div class="tabs"> <div class="tabs">
<a class="item" v-for="(item,index) in tabs" :key="index" :class="{active: index == active}" @click="tabChange(index)">{{ item }}</a> <a class="item"
v-for="(item,index) in tabs"
:key="index"
:class="{active: index == active}"
@click="tabChange(index)">{{ item }}</a>
</div> </div>
<staff v-if="active == 'staff'"></staff> <learn v-if="active == 'learn'" />
<pc-role v-if="active == 'pcRole'"></pc-role> <info v-if="active == 'info'" />
<mobile-role v-if="active == 'mobileRole'"></mobile-role> <plan v-if="active == 'plan'" />
</div> </div>
</template> </template>
<script> <script>
import Setting from "@/setting"; import Setting from "@/setting";
import staff from "./staff"; import learn from "./learn";
import pcRole from "./pcRole"; import info from "./info";
import mobileRole from "./mobileRole"; import plan from "./plan";
export default { export default {
data() { data () {
return { return {
active: this.$route.query.type || 'staff', active: this.$route.query.type || 'learn',
tabs: { tabs: {
staff: "合伙人学习管理", learn: "合伙人学习管理",
pcRole: "合伙人资讯管理", info: "合伙人资讯管理",
mobileRole: "方案管理" plan: "方案管理"
} }
}; };
}, },
components: { components: {
staff, learn,
pcRole, info,
mobileRole plan
}, },
created() { created () {
Setting.dynamicRoute && this.initTabs(); Setting.dynamicRoute && this.initTabs();
}, },
methods: { methods: {
tabChange(index) { tabChange (index) {
this.active = index this.active = index
this.$router.push({ this.$router.push(`/parnerOperation?type=${index}`)
path: 'parnerOperation',
query: {
...this.$route.query,
type: index
}
})
}, },
initTabs() { initTabs () {
const btns = this.$store.state.btns const btns = this.$store.state.btns
const tab1 = btns.includes('/parnerOperation:合伙人学习管理') const tab1 = btns.includes('/parnerOperation:合伙人学习管理')
const tab2 = btns.includes('/parnerOperation:合伙人资讯管理') const tab2 = btns.includes('/parnerOperation:合伙人资讯管理')
const tab3 = btns.includes('/parnerOperation:方案管理') const tab3 = btns.includes('/parnerOperation:方案管理')
tab1 || delete this.tabs.staff tab1 || delete this.tabs.learn
tab2 || delete this.tabs.pcRole tab2 || delete this.tabs.info
tab3 || delete this.tabs.mobileRole tab3 || delete this.tabs.plan
const type = this.$route.query.type const type = this.$route.query.type
const keys = Object.keys(this.tabs) const keys = Object.keys(this.tabs)
this.active = keys.includes(type) ? type : keys[0] this.active = keys.includes(type) ? type : keys[0]

@ -0,0 +1,339 @@
<template>
<div class="page">
<div class="tool">
<div class="search-wrap">
<el-select v-model="field"
@change="initData">
<el-option v-for="(item, i) in keywords"
:key="i"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
<el-input class="keyword"
:placeholder="'请输入' + keywords.find(e => e.id === field).name"
v-model.trim="keyword"
clearable></el-input>
</div>
<div class="actions">
<el-button v-auth="'/parnerOperation:合伙人资讯管理:批量删除'"
@click="batchDel">批量删除</el-button>
<el-button v-auth="'/parnerOperation:合伙人资讯管理:新增文章'"
type="primary"
@click="add">新增文章</el-button>
</div>
</div>
<el-table :data="list"
class="table"
ref="table"
header-align="center"
@selection-change="handleSelectionChange"
row-key="id"
@sort-change="sortChange">
<el-table-column type="selection"
width="55"
align="center"
:reserve-selection="true"></el-table-column>
<el-table-column type="index"
width="60"
label="序号"
align="center"></el-table-column>
<el-table-column show-overflow-tooltip
prop="title"
label="标题"
align="center"
min-width="150"></el-table-column>
<el-table-column prop="classificationName"
label="所属分类"
align="center"
min-width="120"
sortable="custom"></el-table-column>
<el-table-column prop="founderName"
label="录入人"
align="center"
min-width="80"></el-table-column>
<el-table-column prop="editorName"
label="修改人"
align="center"
min-width="80"></el-table-column>
<el-table-column prop="updateTime"
label="修改日期"
align="center"
min-width="150"
sortable="custom"></el-table-column>
<el-table-column prop="releaseTime"
label="发布日期"
align="center"
min-width="100"
sortable="custom"></el-table-column>
<el-table-column prop="learnerNumber"
label="总浏览"
align="center"
min-width="70"></el-table-column>
<el-table-column prop="workNumber"
label="状态"
align="center"
min-width="80">
<template slot-scope="scope">
{{ scope.row.isRelease ? '已发布' : '草稿' }}
</template>
</el-table-column>
<el-table-column prop="sequence"
label="置顶"
align="center"
min-width="80"
sortable="custom">
<template slot-scope="scope">
<i v-if="scope.row.isRelease"
:class="['squ-icon', scope.row.isTop ? 'el-icon-check' : 'el-icon-close']"
@click="sticky(scope.row)"></i>
</template>
</el-table-column>
<el-table-column label="操作"
align="center"
width="210">
<template slot-scope="scope">
<el-button v-auth="'/parnerOperation:合伙人资讯管理:编辑'"
type="text"
@click="edit(scope.row)">编辑</el-button>
<el-button v-auth="'/parnerOperation:合伙人资讯管理:删除'"
type="text"
@click="handleDelete(scope.row)">删除</el-button>
<el-switch v-auth="'/parnerOperation:合伙人资讯管理:禁用'"
v-if="scope.row.isRelease"
class="m-l-10"
v-model="scope.row.isDisable"
:active-value="0"
:inactive-value="1"
@change="switchOff($event, scope.row, scope.$index)">
</el-switch>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background
@current-change="currentChange"
:current-page="page"
layout="total, prev, pager, next"
:total="total"></el-pagination>
</div>
</div>
</template>
<script>
import util from '@/libs/util'
export default {
data () {
return {
field: this.$route.query.field || 'title',
keywords: [
{
id: 'title',
name: '标题'
},
{
id: 'founder',
name: '录入人'
},
{
id: 'editor',
name: '修改人'
}
],
keyword: this.$route.query.keyword || '',
list: [],
page: +this.$route.query.page || 1,
pageSize: 10,
total: 0,
topSort: '',
classificationNameSort: '',
releaseDateSort: '',
editTimeSort: '',
multipleSelection: [],
};
},
watch: {
keyword: function (val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.initData()
}, 500)
}
},
mounted () {
const { query } = this.$route
if (query.page) {
this.$router.push('/parnerOperation?type=info').catch(() => { })
}
this.getData()
},
methods: {
//
getData () {
const { keyword } = this
this.$post(this.api.partnerOperatingList, {
pageNum: this.page,
pageSize: this.pageSize,
querySource: 3, //(3. 4.)
topSort: this.topSort,
classificationNameSort: this.classificationNameSort,
editTimeSort: this.editTimeSort,
releaseDateSort: this.releaseDateSort,
typeId: 2, // (1.2.)
title: this.field === 'title' ? keyword : '',
founderName: this.field === 'founder' ? keyword : '',
editorName: this.field === 'editor' ? keyword : ''
}).then(({ page, total }) => {
page.forEach(e => {
e.editing = false
})
this.list = page
this.total = total
}).catch(err => { })
},
currentChange (val) {
this.page = val
this.getData()
},
handleSelectionChange (val) {
this.multipleSelection = val
},
initData () {
this.$refs.table.clearSelection()
this.page = 1
this.getData()
},
//
batchDel () {
const list = this.multipleSelection
if (list.length) {
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
}).then(() => {
const data = []
list.map(e => {
data.push('ids=' + e.id)
})
this.$post(`${this.api.batchDeletionParnerArticle}?${data.join('&')}`).then(res => {
this.$refs.table.clearSelection()
util.successMsg("删除成功")
this.getData()
}).catch(res => { })
}).catch(() => { })
} else {
util.errorMsg('请先选择数据 !')
}
},
//
handleDelete (row) {
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
}).then(() => {
this.$post(`${this.api.batchDeletionParnerArticle}?ids=${row.id}`).then(res => {
util.successMsg('删除成功')
this.getData()
}).catch(res => { })
}).catch(() => { })
},
//
switchOff (val, row) {
this.$post(`${this.api.articleEnableOrDisable}?id=${row.id}&isDisable=${val}`).then(res => { }).catch((res) => { })
},
//
sortChange (column) {
const { order } = column
// 1
if (column.prop === 'classificationName') {
this.classificationNameSort = order ? order === 'ascending' ? 'asc' : 'desc' : ''
if (order) {
this.editTimeSort = ''
this.releaseDateSort = ''
this.topSort = ''
}
}
if (column.prop === 'updateTime') {
this.editTimeSort = order ? order === 'ascending' ? 'asc' : 'desc' : ''
if (order) {
this.classificationNameSort = ''
this.releaseDateSort = ''
this.topSort = ''
}
}
if (column.prop === 'releaseTime') {
this.releaseDateSort = order ? order === 'ascending' ? 'asc' : 'desc' : ''
if (order) {
this.editTimeSort = ''
this.classificationNameSort = ''
this.topSort = ''
}
}
if (column.prop === 'sequence') {
this.topSort = order ? order === 'ascending' ? 'asc' : 'desc' : ''
if (order) {
this.editTimeSort = ''
this.releaseDateSort = ''
this.classificationNameSort = ''
}
}
this.getData()
},
//
submitSequence (row) {
if (!row.sequence) return Util.errorMsg('请输入排序')
this.$post(`${this.api.modifiedSort}?articleId=${row.id}&sequenceNumber=${row.sequence}`).then(res => {
this.initData()
}).catch(res => { })
},
//
editSequence (row) {
this.list.forEach(e => {
e.editing = false
})
row.editing = true
},
//
sticky (row) {
this.$post(`${this.api.articleTopOperation}?articleId=${row.id}&isTop=${row.isTop ? 0 : 1}`).then(res => {
this.initData()
}).catch(res => { })
},
// url
setReferrer () {
this.$store.commit('setReferrer', `${this.$route.fullPath}&keyword=${this.keyword}&field=${this.field}&page=${this.page}`)
},
//
add () {
this.setReferrer()
this.$router.push(`/learnMg?type=2`)
},
//
edit (row) {
this.setReferrer()
this.$router.push(`/learnMg?id=${row.id}&type=2`)
},
}
};
</script>
<style lang="scss" scoped>
.m-l-10 {
margin-left: 10px;
}
.squ-icon {
font-size: 16px;
font-weight: 600;
cursor: pointer;
color: #f70000;
&.el-icon-check {
color: #05991e;
}
}
/deep/.squ-input {
width: auto;
.el-input__inner {
width: 60px;
padding: 0 10px;
}
}
</style>

@ -0,0 +1,339 @@
<template>
<div class="page">
<div class="tool">
<div class="search-wrap">
<el-select v-model="field"
@change="initData">
<el-option v-for="(item, i) in keywords"
:key="i"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
<el-input class="keyword"
:placeholder="'请输入' + keywords.find(e => e.id === field).name"
v-model.trim="keyword"
clearable></el-input>
</div>
<div class="actions">
<el-button v-auth="'/parnerOperation:合伙人学习管理:批量删除'"
@click="batchDel">批量删除</el-button>
<el-button v-auth="'/parnerOperation:合伙人学习管理:新增文章'"
type="primary"
@click="add">新增文章</el-button>
</div>
</div>
<el-table :data="list"
class="table"
ref="table"
header-align="center"
@selection-change="handleSelectionChange"
row-key="id"
@sort-change="sortChange">
<el-table-column type="selection"
width="55"
align="center"
:reserve-selection="true"></el-table-column>
<el-table-column type="index"
width="60"
label="序号"
align="center"></el-table-column>
<el-table-column show-overflow-tooltip
prop="title"
label="标题"
align="center"
min-width="150"></el-table-column>
<el-table-column prop="classificationName"
label="所属分类"
align="center"
min-width="120"
sortable="custom"></el-table-column>
<el-table-column prop="founderName"
label="录入人"
align="center"
min-width="80"></el-table-column>
<el-table-column prop="editorName"
label="修改人"
align="center"
min-width="80"></el-table-column>
<el-table-column prop="updateTime"
label="修改日期"
align="center"
min-width="150"
sortable="custom"></el-table-column>
<el-table-column prop="releaseTime"
label="发布日期"
align="center"
min-width="100"
sortable="custom"></el-table-column>
<el-table-column prop="learnerNumber"
label="已学习人数"
align="center"
min-width="70"></el-table-column>
<el-table-column prop="workNumber"
label="状态"
align="center"
min-width="80">
<template slot-scope="scope">
{{ scope.row.isRelease ? '已发布' : '草稿' }}
</template>
</el-table-column>
<el-table-column prop="sequence"
label="置顶"
align="center"
min-width="80"
sortable="custom">
<template slot-scope="scope">
<i v-if="scope.row.isRelease"
:class="['squ-icon', scope.row.isTop ? 'el-icon-check' : 'el-icon-close']"
@click="sticky(scope.row)"></i>
</template>
</el-table-column>
<el-table-column label="操作"
align="center"
width="210">
<template slot-scope="scope">
<el-button v-auth="'/parnerOperation:合伙人学习管理:编辑'"
type="text"
@click="edit(scope.row)">编辑</el-button>
<el-button v-auth="'/parnerOperation:合伙人学习管理:删除'"
type="text"
@click="handleDelete(scope.row)">删除</el-button>
<el-switch v-auth="'/parnerOperation:合伙人学习管理:禁用'"
v-if="scope.row.isRelease"
class="m-l-10"
v-model="scope.row.isDisable"
:active-value="0"
:inactive-value="1"
@change="switchOff($event, scope.row, scope.$index)">
</el-switch>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background
@current-change="currentChange"
:current-page="page"
layout="total, prev, pager, next"
:total="total"></el-pagination>
</div>
</div>
</template>
<script>
import util from '@/libs/util'
export default {
data () {
return {
field: this.$route.query.field || 'title',
keywords: [
{
id: 'title',
name: '标题'
},
{
id: 'founder',
name: '录入人'
},
{
id: 'editor',
name: '修改人'
}
],
keyword: this.$route.query.keyword || '',
list: [],
page: +this.$route.query.page || 1,
pageSize: 10,
total: 0,
topSort: '',
classificationNameSort: '',
releaseDateSort: '',
editTimeSort: '',
multipleSelection: [],
};
},
watch: {
keyword: function (val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.initData()
}, 500)
}
},
mounted () {
const { query } = this.$route
if (query.page) {
this.$router.push('/parnerOperation?type=learn').catch(() => { })
}
this.getData()
},
methods: {
//
getData () {
const { keyword } = this
this.$post(this.api.partnerOperatingList, {
pageNum: this.page,
pageSize: this.pageSize,
querySource: 3, //(3. 4.)
topSort: this.topSort,
classificationNameSort: this.classificationNameSort,
editTimeSort: this.editTimeSort,
releaseDateSort: this.releaseDateSort,
typeId: 1, // (1.2.)
title: this.field === 'title' ? keyword : '',
founderName: this.field === 'founder' ? keyword : '',
editorName: this.field === 'editor' ? keyword : ''
}).then(({ page, total }) => {
page.forEach(e => {
e.editing = false
})
this.list = page
this.total = total
}).catch(err => { })
},
currentChange (val) {
this.page = val
this.getData()
},
handleSelectionChange (val) {
this.multipleSelection = val
},
initData () {
this.$refs.table.clearSelection()
this.page = 1
this.getData()
},
//
batchDel () {
const list = this.multipleSelection
if (list.length) {
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
}).then(() => {
const data = []
list.map(e => {
data.push('ids=' + e.id)
})
this.$post(`${this.api.batchDeletionParnerArticle}?${data.join('&')}`).then(res => {
this.$refs.table.clearSelection()
util.successMsg("删除成功")
this.getData()
}).catch(res => { })
}).catch(() => { })
} else {
util.errorMsg('请先选择数据 !')
}
},
//
handleDelete (row) {
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
}).then(() => {
this.$post(`${this.api.batchDeletionParnerArticle}?ids=${row.id}`).then(res => {
util.successMsg('删除成功')
this.getData()
}).catch(res => { })
}).catch(() => { })
},
//
switchOff (val, row) {
this.$post(`${this.api.articleEnableOrDisable}?id=${row.id}&isDisable=${val}`).then(res => { }).catch((res) => { })
},
//
sortChange (column) {
const { order } = column
// 1
if (column.prop === 'classificationName') {
this.classificationNameSort = order ? order === 'ascending' ? 'asc' : 'desc' : ''
if (order) {
this.editTimeSort = ''
this.releaseDateSort = ''
this.topSort = ''
}
}
if (column.prop === 'updateTime') {
this.editTimeSort = order ? order === 'ascending' ? 'asc' : 'desc' : ''
if (order) {
this.classificationNameSort = ''
this.releaseDateSort = ''
this.topSort = ''
}
}
if (column.prop === 'releaseTime') {
this.releaseDateSort = order ? order === 'ascending' ? 'asc' : 'desc' : ''
if (order) {
this.editTimeSort = ''
this.classificationNameSort = ''
this.topSort = ''
}
}
if (column.prop === 'sequence') {
this.topSort = order ? order === 'ascending' ? 'asc' : 'desc' : ''
if (order) {
this.editTimeSort = ''
this.releaseDateSort = ''
this.classificationNameSort = ''
}
}
this.getData()
},
//
submitSequence (row) {
if (!row.sequence) return Util.errorMsg('请输入排序')
this.$post(`${this.api.modifiedSort}?articleId=${row.id}&sequenceNumber=${row.sequence}`).then(res => {
this.initData()
}).catch(res => { })
},
//
editSequence (row) {
this.list.forEach(e => {
e.editing = false
})
row.editing = true
},
//
sticky (row) {
this.$post(`${this.api.articleTopOperation}?articleId=${row.id}&isTop=${row.isTop ? 0 : 1}`).then(res => {
this.initData()
}).catch(res => { })
},
// url
setReferrer () {
this.$store.commit('setReferrer', `${this.$route.fullPath}&keyword=${this.keyword}&field=${this.field}&page=${this.page}`)
},
//
add () {
this.setReferrer()
this.$router.push(`/learnMg?type=1`)
},
//
edit (row) {
this.setReferrer()
this.$router.push(`/learnMg?id=${row.id}&type=1`)
},
}
};
</script>
<style lang="scss" scoped>
.m-l-10 {
margin-left: 10px;
}
.squ-icon {
font-size: 16px;
font-weight: 600;
cursor: pointer;
color: #f70000;
&.el-icon-check {
color: #05991e;
}
}
/deep/.squ-input {
width: auto;
.el-input__inner {
width: 60px;
padding: 0 10px;
}
}
</style>

@ -660,6 +660,9 @@ export default {
preview () { preview () {
window.open((Setting.isDev ? `http://${location.hostname}:8095` : this.$store.state.content.site.domainName) + `#/article?articleId=${this.form.id}&siteId=${this.form.siteId}&id=${this.form.columnId}`) window.open((Setting.isDev ? `http://${location.hostname}:8095` : this.$store.state.content.site.domainName) + `#/article?articleId=${this.form.id}&siteId=${this.form.siteId}&id=${this.form.columnId}`)
}, },
backPage () {
this.$router.push(this.$store.state.referrer || '/parnerOperation')
},
// //
back () { back () {
this.pass = true this.pass = true
@ -671,17 +674,16 @@ export default {
}).then(() => { }).then(() => {
this.submit(this.form.isRelease) this.submit(this.form.isRelease)
}).catch(() => { }).catch(() => {
this.$router.back() this.backPage()
}) })
} else { } else {
this.$router.back() this.backPage()
} }
}, },
// //
submit (isRelease, next) { submit (isRelease, next) {
if (this.submiting) return false if (this.submiting) return false
const form = JSON.parse(JSON.stringify(this.form)) const form = JSON.parse(JSON.stringify(this.form))
console.log('form=>', form)
if (!form.title) return Util.errorMsg('请填写标题') if (!form.title) return Util.errorMsg('请填写标题')
if (this.nameRepeat) return Util.errorMsg('该标题已重复!') if (this.nameRepeat) return Util.errorMsg('该标题已重复!')
// //
@ -702,7 +704,7 @@ export default {
delete form.children delete form.children
this.$post(this.api.updateParnerArticle, form).then(res => { this.$post(this.api.updateParnerArticle, form).then(res => {
Util.successMsg('修改成功') Util.successMsg('修改成功')
next ? next() : this.$router.back() next ? next() : this.backPage()
}).catch(err => { }).catch(err => {
this.submiting = false this.submiting = false
}) })

@ -1,221 +0,0 @@
<template>
<div class="page">
<div class="tool">
<div class="search-wrap">
<el-select v-model="field" @change="initData">
<el-option
v-for="(item, i) in keywords"
:key="i"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
<el-input class="keyword" :placeholder="'请输入' + keywords.find(e => e.id === field).name" v-model.trim="keyword" clearable></el-input>
</div>
<div class="actions">
<el-button v-auth="'/parnerOperation:方案管理:批量删除'" @click="batchDel">批量删除</el-button>
<el-button v-auth="'/parnerOperation:方案管理:新增文章'" type="primary" @click="add" >新增文章</el-button>
</div>
</div>
<el-table :data="list" class="table" ref="table" header-align="center" @selection-change="handleSelectionChange" row-key="id" @sort-change="sortChange">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column show-overflow-tooltip prop="title" label="标题" align="center" min-width="150"></el-table-column>
<el-table-column prop="classificationName" label="所属分类" align="center" min-width="120" sortable="custom"></el-table-column>
<el-table-column prop="founderName" label="录入人" align="center" min-width="80"></el-table-column>
<el-table-column prop="editorName" label="修改人" align="center" min-width="80"></el-table-column>
<el-table-column prop="updateTime" label="修改日期" align="center" min-width="150" sortable="custom"></el-table-column>
<el-table-column prop="createTime" label="发布日期" align="center" min-width="100" sortable="custom"></el-table-column>
<el-table-column prop="workNumber" label="状态" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.isRelease ? '已发布' : '草稿' }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="170">
<template slot-scope="scope">
<el-button v-auth="'/parnerOperation:方案管理:编辑'" type="text" @click="edit(scope.row)">编辑</el-button>
<el-button v-auth="'/parnerOperation:方案管理:删除'" type="text" @click="handleDelete(scope.row)">删除</el-button>
<el-switch
v-auth="'/parnerOperation:方案管理:禁用'"
v-if="scope.row.isRelease"
class="m-l-10"
v-model="scope.row.isDisable"
:active-value="0"
:inactive-value="1"
@change="switchOff($event, scope.row, scope.$index)">
</el-switch>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next" :total="total"></el-pagination>
</div>
</div>
</template>
<script>
import util from '@/libs/util'
export default {
data() {
return {
field: 'title',
keywords: [
{
id: 'title',
name: '标题'
},
{
id: 'founder',
name: '录入人'
},
{
id: 'editor',
name: '修改人'
}
],
keyword: '',
list: [],
page: 1,
pageSize: 10,
total: 0,
modifiedTimeSort: '',
releaseDateSort: 'desc',
classificationNameSort: '',
editTimeSort: '',
multipleSelection: [],
};
},
watch: {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.initData()
}, 500)
}
},
mounted() {
this.getData()
},
methods: {
//
getData() {
const { keyword } = this
const data = {
pageNum: this.page,
pageSize: this.pageSize,
querySource: 3, //(3. 4.)
classificationNameSort: this.classificationNameSort,
editTimeSort: this.editTimeSort,
createTimeSort: this.releaseDateSort,
title: this.field === 'title' ? keyword : '',
founderName: this.field === 'founder' ? keyword : '',
editorName: this.field === 'editor' ? keyword : ''
}
this.$post(this.api.schemeList, data).then(({ data }) => {
this.list = data.records
this.total = +data.total
}).catch(err => {})
},
currentChange(val) {
this.page = val
this.getData()
},
handleSelectionChange(val) {
this.multipleSelection = val
},
initData() {
this.$refs.table.clearSelection()
this.page = 1
this.getData()
},
//
batchDel() {
const list = this.multipleSelection
if (list.length) {
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
}).then(() => {
const data = []
list.map(e => {
data.push('ids=' + e.id)
})
this.$post(`${this.api.batchDeletionScheme}?${data.join('&')}`).then(res => {
this.$refs.table.clearSelection()
util.successMsg("删除成功")
this.getData()
}).catch(res => {})
}).catch(() => {})
} else {
util.errorMsg('请先选择数据 !')
}
},
//
handleDelete(row) {
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
}).then(() => {
this.$post(`${this.api.batchDeletionScheme}?ids=${row.id}`).then(res => {
util.successMsg('删除成功')
this.getData()
}).catch(res => {})
}).catch(() => {})
},
//
switchOff(val, row) {
this.$post(`${this.api.enableOrDisableScheme}?id=${row.id}&isDisable=${val}`).then(res => {}).catch((res) => {})
},
//
add() {
this.$router.push(`/schemeSet`)
},
//
sortChange(column) {
const { order } = column
// 1
if (column.prop === 'classificationName') {
this.classificationNameSort = order ? order === 'ascending' ? 'asc' : 'desc' : ''
if (order) {
this.editTimeSort = ''
this.releaseDateSort = ''
this.sequenceSort = ''
}
}
if (column.prop === 'updateTime') {
this.editTimeSort = order ? order === 'ascending' ? 'asc' : 'desc' : ''
if (order) {
this.classificationNameSort = ''
this.releaseDateSort = ''
this.sequenceSort = ''
}
}
if (column.prop === 'createTime') {
this.releaseDateSort = order ? order === 'ascending' ? 'asc' : 'desc' : ''
if (order) {
this.editTimeSort = ''
this.classificationNameSort = ''
this.sequenceSort = ''
}
}
if (column.prop === 'sequence') {
this.sequenceSort = order ? order === 'ascending' ? 'asc' : 'desc' : ''
if (order) {
this.editTimeSort = ''
this.releaseDateSort = ''
this.classificationNameSort = ''
}
}
this.getData()
},
//
edit(row) {
this.$router.push(`/schemeSet?id=${row.id}`)
},
}
};
</script>
<style lang="scss" scoped>
.m-l-10 {
margin-left: 10px;
}
</style>

@ -1,269 +0,0 @@
<template>
<div class="page">
<div class="tool">
<div class="search-wrap">
<el-select v-model="field" @change="initData">
<el-option
v-for="(item, i) in keywords"
:key="i"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
<el-input class="keyword" :placeholder="'请输入' + keywords.find(e => e.id === field).name" v-model.trim="keyword" clearable></el-input>
</div>
<div class="actions">
<el-button v-auth="'/parnerOperation:合伙人资讯管理:批量删除'" @click="batchDel">批量删除</el-button>
<el-button v-auth="'/parnerOperation:合伙人资讯管理:新增文章'" type="primary" @click="add" >新增文章</el-button>
</div>
</div>
<el-table :data="list" class="table" ref="table" header-align="center" @selection-change="handleSelectionChange" row-key="id" @sort-change="sortChange">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column show-overflow-tooltip prop="title" label="标题" align="center" min-width="150"></el-table-column>
<el-table-column prop="classificationName" label="所属分类" align="center" min-width="120" sortable="custom"></el-table-column>
<el-table-column prop="founderName" label="录入人" align="center" min-width="80"></el-table-column>
<el-table-column prop="editorName" label="修改人" align="center" min-width="80"></el-table-column>
<el-table-column prop="updateTime" label="修改日期" align="center" min-width="150" sortable="custom"></el-table-column>
<el-table-column prop="releaseTime" label="发布日期" align="center" min-width="100" sortable="custom"></el-table-column>
<el-table-column prop="learnerNumber" label="总浏览" align="center" min-width="70"></el-table-column>
<el-table-column prop="workNumber" label="状态" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.isRelease ? '已发布' : '草稿' }}
</template>
</el-table-column>
<el-table-column prop="sequence" label="置顶" align="center" min-width="80" sortable="custom">
<template slot-scope="scope">
<i v-if="scope.row.isRelease" :class="['squ-icon', scope.row.isTop ? 'el-icon-check' : 'el-icon-close']" @click="sticky(scope.row)"></i>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="210">
<template slot-scope="scope">
<el-button v-auth="'/parnerOperation:合伙人资讯管理:编辑'" type="text" @click="edit(scope.row)">编辑</el-button>
<el-button v-auth="'/parnerOperation:合伙人资讯管理:删除'" type="text" @click="handleDelete(scope.row)">删除</el-button>
<el-switch
v-auth="'/parnerOperation:合伙人资讯管理:禁用'"
v-if="scope.row.isRelease"
class="m-l-10"
v-model="scope.row.isDisable"
:active-value="0"
:inactive-value="1"
@change="switchOff($event, scope.row, scope.$index)">
</el-switch>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next" :total="total"></el-pagination>
</div>
</div>
</template>
<script>
import Setting from '@/setting'
import util from '@/libs/util'
import { mapMutations } from 'vuex'
export default {
data() {
return {
field: 'title',
keywords: [
{
id: 'title',
name: '标题'
},
{
id: 'founder',
name: '录入人'
},
{
id: 'editor',
name: '修改人'
}
],
keyword: '',
list: [],
page: 1,
pageSize: 10,
total: 0,
topSort: '',
classificationNameSort: '',
releaseDateSort: '',
editTimeSort: '',
multipleSelection: [],
};
},
watch: {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.initData()
}, 500)
}
},
mounted() {
this.getData()
},
methods: {
//
getData() {
const { keyword } = this
this.$post(this.api.partnerOperatingList, {
pageNum: this.page,
pageSize: this.pageSize,
querySource: 3, //(3. 4.)
topSort: this.topSort,
classificationNameSort: this.classificationNameSort,
editTimeSort: this.editTimeSort,
releaseDateSort: this.releaseDateSort,
typeId: 2, // (1.2.)
title: this.field === 'title' ? keyword : '',
founderName: this.field === 'founder' ? keyword : '',
editorName: this.field === 'editor' ? keyword : ''
}).then(({ page, total }) => {
page.forEach(e => {
e.editing = false
})
this.list = page
this.total = total
}).catch(err => {})
},
currentChange(val) {
this.page = val
this.getData()
},
handleSelectionChange(val) {
this.multipleSelection = val
},
initData() {
this.$refs.table.clearSelection()
this.page = 1
this.getData()
},
//
batchDel() {
const list = this.multipleSelection
if (list.length) {
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
}).then(() => {
const data = []
list.map(e => {
data.push('ids=' + e.id)
})
this.$post(`${this.api.batchDeletionParnerArticle}?${data.join('&')}`).then(res => {
this.$refs.table.clearSelection()
util.successMsg("删除成功")
this.getData()
}).catch(res => {})
}).catch(() => {})
} else {
util.errorMsg('请先选择数据 !')
}
},
//
handleDelete(row) {
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
}).then(() => {
this.$post(`${this.api.batchDeletionParnerArticle}?ids=${row.id}`).then(res => {
util.successMsg('删除成功')
this.getData()
}).catch(res => {})
}).catch(() => {})
},
//
switchOff(val, row) {
this.$post(`${this.api.articleEnableOrDisable}?id=${row.id}&isDisable=${val}`).then(res => {}).catch((res) => {})
},
//
add() {
this.$router.push(`/learnMg?type=2`)
},
//
sortChange(column) {
const { order } = column
// 1
if (column.prop === 'classificationName') {
this.classificationNameSort = order ? order === 'ascending' ? 'asc' : 'desc' : ''
if (order) {
this.editTimeSort = ''
this.releaseDateSort = ''
this.topSort = ''
}
}
if (column.prop === 'updateTime') {
this.editTimeSort = order ? order === 'ascending' ? 'asc' : 'desc' : ''
if (order) {
this.classificationNameSort = ''
this.releaseDateSort = ''
this.topSort = ''
}
}
if (column.prop === 'releaseTime') {
this.releaseDateSort = order ? order === 'ascending' ? 'asc' : 'desc' : ''
if (order) {
this.editTimeSort = ''
this.classificationNameSort = ''
this.topSort = ''
}
}
if (column.prop === 'sequence') {
this.topSort = order ? order === 'ascending' ? 'asc' : 'desc' : ''
if (order) {
this.editTimeSort = ''
this.releaseDateSort = ''
this.classificationNameSort = ''
}
}
this.getData()
},
//
submitSequence(row) {
if (!row.sequence) return Util.errorMsg('请输入排序')
this.$post(`${this.api.modifiedSort}?articleId=${row.id}&sequenceNumber=${row.sequence}`).then(res => {
this.initData()
}).catch(res => {})
},
//
editSequence(row) {
this.list.forEach(e => {
e.editing = false
})
row.editing = true
},
//
sticky(row) {
this.$post(`${this.api.articleTopOperation}?articleId=${row.id}&isTop=${row.isTop ? 0 : 1}`).then(res => {
this.initData()
}).catch(res => {})
},
//
edit(row) {
this.$router.push(`/learnMg?id=${row.id}&type=2`)
},
}
};
</script>
<style lang="scss" scoped>
.m-l-10 {
margin-left: 10px;
}
.squ-icon {
font-size: 16px;
font-weight: 600;
cursor: pointer;
color: #f70000;
&.el-icon-check {
color: #05991e;
}
}
/deep/.squ-input {
width: auto;
.el-input__inner {
width: 60px;
padding: 0 10px;
}
}
</style>

@ -0,0 +1,279 @@
<template>
<div class="page">
<div class="tool">
<div class="search-wrap">
<el-select v-model="field"
@change="initData">
<el-option v-for="(item, i) in keywords"
:key="i"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
<el-input class="keyword"
:placeholder="'请输入' + keywords.find(e => e.id === field).name"
v-model.trim="keyword"
clearable></el-input>
</div>
<div class="actions">
<el-button v-auth="'/parnerOperation:方案管理:批量删除'"
@click="batchDel">批量删除</el-button>
<el-button v-auth="'/parnerOperation:方案管理:新增文章'"
type="primary"
@click="add">新增文章</el-button>
</div>
</div>
<el-table :data="list"
class="table"
ref="table"
header-align="center"
@selection-change="handleSelectionChange"
row-key="id"
@sort-change="sortChange">
<el-table-column type="selection"
width="55"
align="center"
:reserve-selection="true"></el-table-column>
<el-table-column type="index"
width="60"
label="序号"
align="center"></el-table-column>
<el-table-column show-overflow-tooltip
prop="title"
label="标题"
align="center"
min-width="150"></el-table-column>
<el-table-column prop="classificationName"
label="所属分类"
align="center"
min-width="120"
sortable="custom"></el-table-column>
<el-table-column prop="founderName"
label="录入人"
align="center"
min-width="80"></el-table-column>
<el-table-column prop="editorName"
label="修改人"
align="center"
min-width="80"></el-table-column>
<el-table-column prop="updateTime"
label="修改日期"
align="center"
min-width="150"
sortable="custom"></el-table-column>
<el-table-column prop="createTime"
label="发布日期"
align="center"
min-width="100"
sortable="custom"></el-table-column>
<el-table-column prop="workNumber"
label="状态"
align="center"
min-width="80">
<template slot-scope="scope">
{{ scope.row.isRelease ? '已发布' : '草稿' }}
</template>
</el-table-column>
<el-table-column label="操作"
align="center"
width="170">
<template slot-scope="scope">
<el-button v-auth="'/parnerOperation:方案管理:编辑'"
type="text"
@click="edit(scope.row)">编辑</el-button>
<el-button v-auth="'/parnerOperation:方案管理:删除'"
type="text"
@click="handleDelete(scope.row)">删除</el-button>
<el-switch v-auth="'/parnerOperation:方案管理:禁用'"
v-if="scope.row.isRelease"
class="m-l-10"
v-model="scope.row.isDisable"
:active-value="0"
:inactive-value="1"
@change="switchOff($event, scope.row, scope.$index)">
</el-switch>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background
@current-change="currentChange"
:current-page="page"
layout="total, prev, pager, next"
:total="total"></el-pagination>
</div>
</div>
</template>
<script>
import util from '@/libs/util'
export default {
data () {
return {
field: this.$route.query.field || 'title',
keywords: [
{
id: 'title',
name: '标题'
},
{
id: 'founder',
name: '录入人'
},
{
id: 'editor',
name: '修改人'
}
],
keyword: this.$route.query.keyword || '',
list: [],
page: +this.$route.query.page || 1,
pageSize: 10,
total: 0,
modifiedTimeSort: '',
releaseDateSort: 'desc',
classificationNameSort: '',
editTimeSort: '',
multipleSelection: [],
};
},
watch: {
keyword: function (val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.initData()
}, 500)
}
},
mounted () {
this.getData()
},
methods: {
//
getData () {
const { keyword } = this
const data = {
pageNum: this.page,
pageSize: this.pageSize,
querySource: 3, //(3. 4.)
classificationNameSort: this.classificationNameSort,
editTimeSort: this.editTimeSort,
createTimeSort: this.releaseDateSort,
title: this.field === 'title' ? keyword : '',
founderName: this.field === 'founder' ? keyword : '',
editorName: this.field === 'editor' ? keyword : ''
}
this.$post(this.api.schemeList, data).then(({ data }) => {
this.list = data.records
this.total = +data.total
}).catch(err => { })
},
currentChange (val) {
this.page = val
this.getData()
},
handleSelectionChange (val) {
this.multipleSelection = val
},
initData () {
this.$refs.table.clearSelection()
this.page = 1
this.getData()
},
//
batchDel () {
const list = this.multipleSelection
if (list.length) {
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
}).then(() => {
const data = []
list.map(e => {
data.push('ids=' + e.id)
})
this.$post(`${this.api.batchDeletionScheme}?${data.join('&')}`).then(res => {
this.$refs.table.clearSelection()
util.successMsg("删除成功")
this.getData()
}).catch(res => { })
}).catch(() => { })
} else {
util.errorMsg('请先选择数据 !')
}
},
//
handleDelete (row) {
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
}).then(() => {
this.$post(`${this.api.batchDeletionScheme}?ids=${row.id}`).then(res => {
util.successMsg('删除成功')
this.getData()
}).catch(res => { })
}).catch(() => { })
},
//
switchOff (val, row) {
this.$post(`${this.api.enableOrDisableScheme}?id=${row.id}&isDisable=${val}`).then(res => { }).catch((res) => { })
},
//
sortChange (column) {
const { order } = column
// 1
if (column.prop === 'classificationName') {
this.classificationNameSort = order ? order === 'ascending' ? 'asc' : 'desc' : ''
if (order) {
this.editTimeSort = ''
this.releaseDateSort = ''
this.sequenceSort = ''
}
}
if (column.prop === 'updateTime') {
this.editTimeSort = order ? order === 'ascending' ? 'asc' : 'desc' : ''
if (order) {
this.classificationNameSort = ''
this.releaseDateSort = ''
this.sequenceSort = ''
}
}
if (column.prop === 'createTime') {
this.releaseDateSort = order ? order === 'ascending' ? 'asc' : 'desc' : ''
if (order) {
this.editTimeSort = ''
this.classificationNameSort = ''
this.sequenceSort = ''
}
}
if (column.prop === 'sequence') {
this.sequenceSort = order ? order === 'ascending' ? 'asc' : 'desc' : ''
if (order) {
this.editTimeSort = ''
this.releaseDateSort = ''
this.classificationNameSort = ''
}
}
this.getData()
},
// url
setReferrer () {
this.$store.commit('setReferrer', `${this.$route.fullPath}&keyword=${this.keyword}&field=${this.field}&page=${this.page}`)
},
//
add () {
this.setReferrer()
this.$router.push(`/schemeSet`)
},
//
edit (row) {
this.setReferrer()
this.$router.push(`/schemeSet?id=${row.id}`)
},
}
};
</script>
<style lang="scss" scoped>
.m-l-10 {
margin-left: 10px;
}
</style>

@ -574,6 +574,9 @@ export default {
`当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!` `当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!`
) )
}, },
backPage () {
this.$router.push(this.$store.state.referrer || '/parnerOperation?type=plan')
},
// //
back () { back () {
this.pass = true this.pass = true
@ -585,10 +588,10 @@ export default {
}).then(() => { }).then(() => {
this.submit(this.form.isRelease) this.submit(this.form.isRelease)
}).catch(() => { }).catch(() => {
this.$router.back() this.backPage()
}) })
} else { } else {
this.$router.back() this.backPage()
} }
}, },
// //
@ -622,7 +625,7 @@ export default {
if (form.id) { if (form.id) {
this.$post(this.api.updateScheme, form).then(res => { this.$post(this.api.updateScheme, form).then(res => {
Util.successMsg('修改成功') Util.successMsg('修改成功')
next ? next() : this.$router.back() next ? next() : this.backPage()
}).catch(err => { }).catch(err => {
this.submiting = false this.submiting = false
}) })

@ -1,268 +0,0 @@
<template>
<div class="page">
<div class="tool">
<div class="search-wrap">
<el-select v-model="field" @change="initData">
<el-option
v-for="(item, i) in keywords"
:key="i"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
<el-input class="keyword" :placeholder="'请输入' + keywords.find(e => e.id === field).name" v-model.trim="keyword" clearable></el-input>
</div>
<div class="actions">
<el-button v-auth="'/parnerOperation:合伙人学习管理:批量删除'" @click="batchDel">批量删除</el-button>
<el-button v-auth="'/parnerOperation:合伙人学习管理:新增文章'" type="primary" @click="add" >新增文章</el-button>
</div>
</div>
<el-table :data="list" class="table" ref="table" header-align="center" @selection-change="handleSelectionChange" row-key="id" @sort-change="sortChange">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column show-overflow-tooltip prop="title" label="标题" align="center" min-width="150"></el-table-column>
<el-table-column prop="classificationName" label="所属分类" align="center" min-width="120" sortable="custom"></el-table-column>
<el-table-column prop="founderName" label="录入人" align="center" min-width="80"></el-table-column>
<el-table-column prop="editorName" label="修改人" align="center" min-width="80"></el-table-column>
<el-table-column prop="updateTime" label="修改日期" align="center" min-width="150" sortable="custom"></el-table-column>
<el-table-column prop="releaseTime" label="发布日期" align="center" min-width="100" sortable="custom"></el-table-column>
<el-table-column prop="learnerNumber" label="已学习人数" align="center" min-width="70"></el-table-column>
<el-table-column prop="workNumber" label="状态" align="center" min-width="80">
<template slot-scope="scope">
{{ scope.row.isRelease ? '已发布' : '草稿' }}
</template>
</el-table-column>
<el-table-column prop="sequence" label="置顶" align="center" min-width="80" sortable="custom">
<template slot-scope="scope">
<i v-if="scope.row.isRelease" :class="['squ-icon', scope.row.isTop ? 'el-icon-check' : 'el-icon-close']" @click="sticky(scope.row)"></i>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="210">
<template slot-scope="scope">
<el-button v-auth="'/parnerOperation:合伙人学习管理:编辑'" type="text" @click="edit(scope.row)">编辑</el-button>
<el-button v-auth="'/parnerOperation:合伙人学习管理:删除'" type="text" @click="handleDelete(scope.row)">删除</el-button>
<el-switch
v-auth="'/parnerOperation:合伙人学习管理:禁用'"
v-if="scope.row.isRelease"
class="m-l-10"
v-model="scope.row.isDisable"
:active-value="0"
:inactive-value="1"
@change="switchOff($event, scope.row, scope.$index)">
</el-switch>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next" :total="total"></el-pagination>
</div>
</div>
</template>
<script>
import Setting from '@/setting'
import util from '@/libs/util'
export default {
data() {
return {
field: 'title',
keywords: [
{
id: 'title',
name: '标题'
},
{
id: 'founder',
name: '录入人'
},
{
id: 'editor',
name: '修改人'
}
],
keyword: '',
list: [],
page: 1,
pageSize: 10,
total: 0,
topSort: '',
classificationNameSort: '',
releaseDateSort: '',
editTimeSort: '',
multipleSelection: [],
};
},
watch: {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.initData()
}, 500)
}
},
mounted() {
this.getData()
},
methods: {
//
getData() {
const { keyword } = this
this.$post(this.api.partnerOperatingList, {
pageNum: this.page,
pageSize: this.pageSize,
querySource: 3, //(3. 4.)
topSort: this.topSort,
classificationNameSort: this.classificationNameSort,
editTimeSort: this.editTimeSort,
releaseDateSort: this.releaseDateSort,
typeId: 1, // (1.2.)
title: this.field === 'title' ? keyword : '',
founderName: this.field === 'founder' ? keyword : '',
editorName: this.field === 'editor' ? keyword : ''
}).then(({ page, total }) => {
page.forEach(e => {
e.editing = false
})
this.list = page
this.total = total
}).catch(err => {})
},
currentChange(val) {
this.page = val
this.getData()
},
handleSelectionChange(val) {
this.multipleSelection = val
},
initData() {
this.$refs.table.clearSelection()
this.page = 1
this.getData()
},
//
batchDel() {
const list = this.multipleSelection
if (list.length) {
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
}).then(() => {
const data = []
list.map(e => {
data.push('ids=' + e.id)
})
this.$post(`${this.api.batchDeletionParnerArticle}?${data.join('&')}`).then(res => {
this.$refs.table.clearSelection()
util.successMsg("删除成功")
this.getData()
}).catch(res => {})
}).catch(() => {})
} else {
util.errorMsg('请先选择数据 !')
}
},
//
handleDelete(row) {
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
}).then(() => {
this.$post(`${this.api.batchDeletionParnerArticle}?ids=${row.id}`).then(res => {
util.successMsg('删除成功')
this.getData()
}).catch(res => {})
}).catch(() => {})
},
//
switchOff(val, row) {
this.$post(`${this.api.articleEnableOrDisable}?id=${row.id}&isDisable=${val}`).then(res => {}).catch((res) => {})
},
//
add() {
this.$router.push(`/learnMg?type=1`)
},
//
sortChange(column) {
const { order } = column
// 1
if (column.prop === 'classificationName') {
this.classificationNameSort = order ? order === 'ascending' ? 'asc' : 'desc' : ''
if (order) {
this.editTimeSort = ''
this.releaseDateSort = ''
this.topSort = ''
}
}
if (column.prop === 'updateTime') {
this.editTimeSort = order ? order === 'ascending' ? 'asc' : 'desc' : ''
if (order) {
this.classificationNameSort = ''
this.releaseDateSort = ''
this.topSort = ''
}
}
if (column.prop === 'releaseTime') {
this.releaseDateSort = order ? order === 'ascending' ? 'asc' : 'desc' : ''
if (order) {
this.editTimeSort = ''
this.classificationNameSort = ''
this.topSort = ''
}
}
if (column.prop === 'sequence') {
this.topSort = order ? order === 'ascending' ? 'asc' : 'desc' : ''
if (order) {
this.editTimeSort = ''
this.releaseDateSort = ''
this.classificationNameSort = ''
}
}
this.getData()
},
//
submitSequence(row) {
if (!row.sequence) return Util.errorMsg('请输入排序')
this.$post(`${this.api.modifiedSort}?articleId=${row.id}&sequenceNumber=${row.sequence}`).then(res => {
this.initData()
}).catch(res => {})
},
//
editSequence(row) {
this.list.forEach(e => {
e.editing = false
})
row.editing = true
},
//
sticky(row) {
this.$post(`${this.api.articleTopOperation}?articleId=${row.id}&isTop=${row.isTop ? 0 : 1}`).then(res => {
this.initData()
}).catch(res => {})
},
//
edit(row) {
this.$router.push(`/learnMg?id=${row.id}&type=1`)
},
}
};
</script>
<style lang="scss" scoped>
.m-l-10 {
margin-left: 10px;
}
.squ-icon {
font-size: 16px;
font-weight: 600;
cursor: pointer;
color: #f70000;
&.el-icon-check {
color: #05991e;
}
}
/deep/.squ-input {
width: auto;
.el-input__inner {
width: 60px;
padding: 0 10px;
}
}
</style>

@ -12,27 +12,27 @@
<div> <div>
<el-col :span="4"> <el-col :span="4">
<el-form-item label="系统归属"> <el-form-item label="系统归属">
<el-select v-model="systemAttribution" <el-select v-model="form.belong"
clearable clearable
placeholder="请选择系统归属" placeholder="请选择系统归属"
@change="initData"> @change="initData">
<el-option v-for="(item,index) in systemBelongList" <el-option v-for="(item, i) in belongs"
:key="index" :key="i"
:label="item.label" :label="item"
:value="item.value"></el-option> :value="i"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item label="系统类型"> <el-form-item label="系统类型">
<el-select v-model="systemType" <el-select v-model="form.type"
clearable clearable
placeholder="请选择系统类型" placeholder="请选择系统类型"
@change="initData"> @change="initData">
<el-option v-for="(item,index) in systemTypeList" <el-option v-for="(item, i) in types"
:key="index" :key="i"
:label="item.label" :label="item"
:value="item.value"></el-option> :value="i"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -41,7 +41,7 @@
<el-form-item> <el-form-item>
<el-input placeholder="请输入系统名称" <el-input placeholder="请输入系统名称"
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
v-model.trim="systemSearch" v-model.trim="form.systemName"
clearable></el-input> clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -56,7 +56,7 @@
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>服务列表</span> <span>服务列表</span>
</div> </div>
<el-table :data="systemData" <el-table :data="list"
class="table" class="table"
stripe stripe
header-align="center"> header-align="center">
@ -73,7 +73,7 @@
label="系统类型" label="系统类型"
align="center"> align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ systemTypeKeys[scope.row.type] }} {{ types[scope.row.type] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="supplierName" <el-table-column prop="supplierName"
@ -83,14 +83,14 @@
label="系统归属" label="系统归属"
align="center"> align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ systemBelongKeys[scope.row.belong] }} {{ belongs[scope.row.belong] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="state" <el-table-column prop="state"
label="系统状态" label="系统状态"
align="center"> align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ systemStatusKeys[scope.row.state] }} {{ states[scope.row.state] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="payamount" <el-table-column prop="payamount"
@ -126,8 +126,8 @@
<el-pagination background <el-pagination background
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
layout="total, prev, pager, next" layout="total, prev, pager, next"
:current-page="pageNo" :current-page="page"
:total="totals"> :total="total">
</el-pagination> </el-pagination>
</div> </div>
</el-card> </el-card>
@ -136,56 +136,32 @@
<script> <script>
import Setting from "@/setting"; import Setting from "@/setting";
import Cookie from 'js-cookie' import qs from 'qs'
export default { export default {
data () { data () {
return { return {
userId: this.$store.state.userLoginId, userId: this.$store.state.userLoginId,
token: btoa(sessionStorage.getItem('token')), token: btoa(sessionStorage.getItem('token')),
systemAttribution: "", form: {
systemType: "", belong: this.$route.query.belong || '',
systemSearch: "", type: this.$route.query.type ? +this.$route.query.type : '',
searchTimer: null, systemName: this.$route.query.systemName || ''
systemData: [],
totals: 0,
systemBelongList: [
{
label: "外部产品",
value: 1
}, },
{ searchTimer: null,
label: "内部系统", list: [],
value: 0 total: 0,
} belongs: {
],
systemBelongKeys: {
1: '外部产品', 1: '外部产品',
0: '内部系统' 0: '内部系统'
}, },
systemTypeList: [ types: ['编程类', '流程类'],
{ states: ['运行中', '默认'],
label: "编程类", page: +this.$route.query.page || 1,
value: 0
},
{
label: "流程类",
value: 1
}
],
systemTypeKeys: {
0: '编程类',
1: '流程类'
},
systemStatusKeys: {
0: '运行中',
1: '默认'
},
pageNo: +this.$route.query.page || 1,
pageSize: 10 pageSize: 10
}; };
}, },
watch: { watch: {
systemSearch: function (val) { 'form.systemName': function (val) {
clearTimeout(this.searchTimer); clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.initData(); this.initData();
@ -193,40 +169,44 @@ export default {
} }
}, },
mounted () { mounted () {
const { query } = this.$route
if (query.page) {
this.$router.push('/configure').catch(() => { })
}
this.getData(); this.getData();
}, },
methods: { methods: {
initData () { initData () {
this.pageNum = 1; this.page = 1;
this.getData(); this.getData();
}, },
getData () { getData () {
const sid = this.$store.state.dataPer.find(e => e.permissionName === '服务配置') const sid = this.$store.state.dataPer.find(e => e.permissionName === '服务配置')
let data = { let data = {
belong: this.systemAttribution, ...this.form,
type: this.systemType, pageNum: this.page,
systemName: this.systemSearch,
pageNum: this.pageNo,
pageSize: this.pageSize, pageSize: this.pageSize,
supplierId: sid ? sid.supplierId : '' supplierId: sid ? sid.supplierId : ''
}; };
this.$post(this.api.queryServiceConfig, data).then(res => { this.$post(this.api.queryServiceConfig, data).then(res => {
this.systemData = res.serviceList.records; this.list = res.serviceList.records;
this.totals = res.serviceList.total; this.total = res.serviceList.total;
}).catch(res => { }).catch(res => {
}); });
}, },
handleCurrentChange (val) { handleCurrentChange (val) {
this.pageNo = val; this.page = val;
this.$router.push(`configure?page=${val}`) this.$router.push(`configure?page=${val}`)
this.getData(); this.getData();
}, },
edit (row) { // url
this.$store.commit("configData", { config_id: row.systemId }); setReferrer () {
this.$router.push("/addconfigure"); this.$store.commit('setReferrer', `${this.$route.path}?${qs.stringify(this.form)}&page=${this.page}`)
}, },
// //
toBackstage (row) { toBackstage (row) {
this.setReferrer()
if (row.systemId == 19) { if (row.systemId == 19) {
location.href = `${Setting.sandPath}/#/config?token=${sessionStorage.getItem('token')}&admin=1&referrer=${encodeURIComponent(location.href)}` location.href = `${Setting.sandPath}/#/config?token=${sessionStorage.getItem('token')}&admin=1&referrer=${encodeURIComponent(location.href)}`
} else { } else {
@ -234,21 +214,13 @@ export default {
} }
}, },
getIntoProject (row) { getIntoProject (row) {
this.setReferrer()
this.$router.push(`/projectList?systemId=${row.systemId}&show=1&name=${row.systemName}`) this.$router.push(`/projectList?systemId=${row.systemId}&show=1&name=${row.systemName}`)
}, },
getIntoJudgement (row) { getIntoJudgement (row) {
// console.log(`${Setting.jumpPath}#/?systemId=${row.systemId}&token=${this.token}&referrer=${btoa(location.href)}`); this.setReferrer()
location.href = `${Setting.jumpPath}#/?systemId=${row.systemId}&token=${this.token}&referrer=${btoa(location.href)}`; location.href = `${Setting.jumpPath}#/?systemId=${row.systemId}&token=${this.token}&referrer=${btoa(location.href)}`;
}, },
setCookie (name, value) {
if (value) {
var days = 1;//
var exp = new Date();
exp.setTime(exp.getTime() + days * 24 * 60 * 60 * 1000);
//Cookie,toGMTString
document.cookie = name + "=" + escape(value) + ";expires=" + exp.toGMTString + ";path=/;";
}
}
} }
}; };
</script> </script>

@ -57,7 +57,7 @@ export default {
}) })
}, },
back () { back () {
this.$router.push('/configure') this.$router.push(this.$store.state.referrer || '/configure')
} }
} }
}; };

@ -106,7 +106,6 @@
</template> </template>
<script> <script>
import org from "./modelType" import org from "./modelType"
import Setting from '@/setting'
import Bus from '@/libs/bus' import Bus from '@/libs/bus'
export default { export default {
data () { data () {
@ -114,7 +113,7 @@ export default {
systemId: this.$route.query.systemId, systemId: this.$route.query.systemId,
isTopLevel: true, // isTopLevel: true, //
listData: [], listData: [],
keyword: '', keyword: this.$route.query.keyword || '',
page: +this.$route.query.page || 1, page: +this.$route.query.page || 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
@ -132,6 +131,13 @@ export default {
keyword: function (val) { keyword: function (val) {
clearTimeout(this.searchTimer); clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.$router.push({
path: 'backstage',
query: {
...this.$route.query,
keyword: val
}
})
this.initData() this.initData()
}, 500) }, 500)
} }

@ -144,7 +144,7 @@ export default {
systemId: this.$route.query.systemId, systemId: this.$route.query.systemId,
isTopLevel: true, // isTopLevel: true, //
listData: [], listData: [],
keyword: "", keyword: this.$route.query.keyword || '',
page: +this.$route.query.page || 1, page: +this.$route.query.page || 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
@ -169,6 +169,13 @@ export default {
keyword: function (val) { keyword: function (val) {
clearTimeout(this.searchTimer); clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.$router.push({
path: 'backstage',
query: {
...this.$route.query,
keyword: val
}
})
this.initData() this.initData()
}, 500) }, 500)
} }

@ -614,7 +614,7 @@ export default {
} else { } else {
this.$message.success('更新实验项目成功') this.$message.success('更新实验项目成功')
} }
this.$router.back(); this.toList();
} }
}).catch(err => { }).catch(err => {
this.submiting = false this.submiting = false
@ -887,7 +887,7 @@ export default {
}, },
// //
toList () { toList () {
this.$router.back() this.$router.push(this.$store.state.innerReferrer)
}, },
// //
back () { back () {

@ -4,7 +4,7 @@
shadow="hover" shadow="hover"
class="mgb20"> class="mgb20">
<el-page-header :content="'实验项目管理 / '+titleName" <el-page-header :content="'实验项目管理 / '+titleName"
@back="goBack"></el-page-header> @back="back"></el-page-header>
</el-card> </el-card>
<el-card shadow="hover" <el-card shadow="hover"
@ -19,7 +19,7 @@
<el-form label-width="80px"> <el-form label-width="80px">
<el-col :span="4"> <el-col :span="4">
<el-form-item label="来源"> <el-form-item label="来源">
<el-select v-model="queryData.founder" <el-select v-model="form.founder"
clearable clearable
placeholder="请选择创建人" placeholder="请选择创建人"
@change="initData"> @change="initData">
@ -32,7 +32,7 @@
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item label="状态"> <el-form-item label="状态">
<el-select v-model="queryData.state" <el-select v-model="form.state"
clearable clearable
placeholder="请选择状态" placeholder="请选择状态"
@change="initData"> @change="initData">
@ -45,7 +45,7 @@
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item label="用途"> <el-form-item label="用途">
<el-select v-model="queryData.permissions" <el-select v-model="form.permissions"
placeholder="请选择" placeholder="请选择"
@change="initData"> @change="initData">
<el-option v-for="item in permissionsList" <el-option v-for="item in permissionsList"
@ -59,7 +59,7 @@
<el-form-item> <el-form-item>
<el-input placeholder="请输入项目名称" <el-input placeholder="请输入项目名称"
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
v-model="keyword" v-model="form.projectName"
clearable></el-input> clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -84,7 +84,7 @@
@click="delAllData">批量删除</el-button> @click="delAllData">批量删除</el-button>
</div> </div>
</div> </div>
<el-table :data="listData" <el-table :data="list"
class="table" class="table"
ref="table" ref="table"
stripe stripe
@ -117,7 +117,7 @@
min-width="140" min-width="140"
align="center"> align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ queryData.founder == 1 ? scope.row.schoolName : scope.row.creator }} {{ form.founder == 1 ? scope.row.schoolName : scope.row.creator }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="用途" <el-table-column label="用途"
@ -196,23 +196,21 @@
</template> </template>
<script> <script>
import { mapState, mapActions } from 'vuex'; import qs from 'qs'
import Setting from "@/setting";
export default { export default {
data () { data () {
return { return {
showBack: Boolean(this.$route.query.show), showBack: Boolean(this.$route.query.show),
systemId: this.$route.query.systemId, systemId: this.$route.query.systemId,
titleName: this.$route.query.name, titleName: this.$route.query.name,
queryData: { form: {
platformId: 3, // :1 :3 platformId: 3, // :1 :3
founder: 0, // (0: 1:) founder: this.$route.query.founder ? +this.$route.query.founder : 0, // (0: 1:)
state: "", // (0:稿 1:) state: this.$route.query.state ? +this.$route.query.state : '', // (0:稿 1:)
permissions: "", // (0: 1: 2:) permissions: this.$route.query.permissions ? +this.$route.query.permissions : '', // (0: 1: 2:)
projectName: this.$route.query.projectName || ''
}, },
keyword: '', list: [],
status: '',
listData: [],
total: 0, total: 0,
permissionsList: [{ permissionsList: [{
value: '', value: '',
@ -273,7 +271,7 @@ export default {
}; };
}, },
watch: { watch: {
keyword: function (val) { 'form.projectName': function (val) {
clearTimeout(this.searchTimer); clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.initData(); this.initData();
@ -281,28 +279,25 @@ export default {
} }
}, },
mounted () { mounted () {
if (this.$route.query.founder && this.$route.query.founder != 'undefined') { const { query } = this.$route
this.queryData.founder = +this.$route.query.founder if (query.page) {
} else { this.$router.push(`/projectList?systemId=${query.systemId}&show=${query.show}&name=${query.name}`).catch(() => { })
this.queryData.founder = 0
} }
this.getData(); this.getData();
}, },
methods: { methods: {
getData () { getData () {
let data = { let data = {
...this.queryData, ...this.form,
projectName: this.keyword,
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
systemId: this.systemId systemId: this.systemId
}; };
this.$post(this.api.queryProjectManage, data).then(res => { this.$post(this.api.queryProjectManage, data).then(res => {
this.listData = res.data.records; this.list = res.data.records;
this.total = res.data.total; this.total = res.data.total;
}).catch(err => { }).catch(err => { });
console.log(err);
});
}, },
initData () { initData () {
this.page = 1; this.page = 1;
@ -310,20 +305,19 @@ export default {
}, },
handleCurrentChange (val) { // handleCurrentChange (val) { //
this.page = val; this.page = val;
this.$router.replace({
path: 'projectList',
query: {
...this.$route.query,
page: val
}
})
this.getData(); this.getData();
}, },
// url
setReferrer () {
this.$store.commit('setInnerReferrer', `${this.$route.path}?${qs.stringify(this.$route.query)}&${qs.stringify(this.form)}&page=${this.page}`)
},
add () { // add () { //
this.$router.push(`/projectAdd?systemId=${this.systemId}&founder=${this.queryData.founder}&isDetails=${this.$route.query.show}&name=${this.titleName}`); this.setReferrer()
this.$router.push(`/projectAdd?systemId=${this.systemId}&founder=${this.form.founder}&isDetails=${this.$route.query.show}&name=${this.titleName}`);
}, },
edit (row) { // edit (row) { //
this.$router.push(`/projectAdd?systemId=${this.systemId}&projectId=${row.projectId}&founder=${this.queryData.founder}&isDetails=${this.$route.query.show}&name=${this.titleName}`); this.setReferrer()
this.$router.push(`/projectAdd?systemId=${this.systemId}&projectId=${row.projectId}&founder=${this.form.founder}&isDetails=${this.$route.query.show}&name=${this.titleName}`);
}, },
handleSelectionChange (val) { // handleSelectionChange (val) { //
this.multipleSelection = val; this.multipleSelection = val;
@ -343,8 +337,7 @@ export default {
this.$confirm('确定要删除吗?', '提示', { this.$confirm('确定要删除吗?', '提示', {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$post(`${this.api.deleteProjectManage}?projectIds=${ids}&platformId=${this.queryData.platformId}`).then(res => { this.$post(`${this.api.deleteProjectManage}?projectIds=${ids}&platformId=${this.form.platformId}`).then(res => {
console.log(ids)
if (res.status == 200) { if (res.status == 200) {
let delList = [] let delList = []
if (isNaN(ids) == 'NaN') { if (isNaN(ids) == 'NaN') {
@ -352,7 +345,7 @@ export default {
} else { } else {
delList.push(ids) delList.push(ids)
} }
if (delList.length == this.listData.length) { if (delList.length == this.list.length) {
if (this.page > 1) { if (this.page > 1) {
this.page = this.page - 1 this.page = this.page - 1
} }
@ -372,7 +365,7 @@ export default {
}); });
}, },
switchOff (row) { // switchOff (row) { //
this.$get(`${this.api.updateIsOpen}?isOpen=${row.ztOpen}&projectId=${row.projectId}&platformId=${this.queryData.platformId}`).then(res => { this.$get(`${this.api.updateIsOpen}?isOpen=${row.ztOpen}&projectId=${row.projectId}&platformId=${this.form.platformId}`).then(res => {
if (res.status === 200) { if (res.status === 200) {
this.$message.success('更新启用状态成功'); this.$message.success('更新启用状态成功');
this.getData(); this.getData();
@ -430,19 +423,17 @@ export default {
}); });
this.$post(`${this.api.copyProjectManage}`, this.currentRow).then(res => { this.$post(`${this.api.copyProjectManage}`, this.currentRow).then(res => {
if (res.status === 200) { if (res.status === 200) {
this.queryData.founder = 0 this.form.founder = 0
this.initData(); this.initData();
this.$message.success("复制实验项目成功"); this.$message.success("复制实验项目成功");
this.copyVisible = false; this.copyVisible = false;
} else { } else {
this.$message.error(res.message); this.$message.error(res.message);
} }
}).catch(err => { }).catch(err => { });
console.log(err);
});
}, },
goBack () { // back () { //
this.$router.back() this.$router.push(this.$store.state.referrer || '/configure')
} }
} }
}; };

@ -1563,7 +1563,7 @@ export default {
this.pass = true this.pass = true
this.submiting = false; this.submiting = false;
Util.successMsg("修改成功"); Util.successMsg("修改成功");
next ? next() : this.$router.back() next ? next() : this.backPage()
}).catch(err => { }).catch(err => {
this.submiting = false; this.submiting = false;
}); });
@ -1591,12 +1591,15 @@ export default {
}).then(() => { }).then(() => {
this.submit(this.form.mall.state) this.submit(this.form.mall.state)
}).catch(() => { }).catch(() => {
this.$router.back() this.backPage()
}) })
} else { } else {
this.$router.back() this.backPage()
} }
}, },
backPage () {
this.$router.push(this.$store.state.referrer || '/shop')
}
} }
}; };
</script> </script>

@ -1,8 +1,11 @@
<template> <template>
<!-- 理论课程管理 -->
<div class="page"> <div class="page">
<div class="tabs"> <div class="tabs">
<a class="item" v-for="(item,index) in tabs" :key="index" :class="{active: index == active}" @click="tabChange(index)">{{ item }}</a> <a class="item"
v-for="(item,index) in tabs"
:key="index"
:class="{active: index == active}"
@click="tabChange(index)">{{ item }}</a>
</div> </div>
<div class="page-content"> <div class="page-content">
<product v-if="active == 'first'" /> <product v-if="active == 'first'" />
@ -16,12 +19,11 @@ import Setting from "@/setting";
import product from "./product"; import product from "./product";
import market from "./market"; import market from "./market";
export default { export default {
name: "course",
components: { components: {
product, product,
market, market,
}, },
data() { data () {
return { return {
active: "first", // active: "first", //
tabs: { tabs: {
@ -31,14 +33,14 @@ export default {
showTabs: true showTabs: true
}; };
}, },
mounted() { mounted () {
Setting.dynamicRoute && this.initTabs(); Setting.dynamicRoute && this.initTabs();
}, },
methods: { methods: {
tabChange(index) { tabChange (index) {
this.active = index; this.active = index;
}, },
initTabs() { initTabs () {
const { btns } = this.$store.state const { btns } = this.$store.state
const tab1 = btns.includes('/shop:产品管理') const tab1 = btns.includes('/shop:产品管理')
const tab2 = btns.includes('/shop:营销推广管理') const tab2 = btns.includes('/shop:营销推广管理')
@ -50,5 +52,4 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
</style> </style>

@ -181,7 +181,6 @@
<script> <script>
import Util from "@/libs/util"; import Util from "@/libs/util";
import Setting from '@/setting'
import qs from 'qs' import qs from 'qs'
export default { export default {
data () { data () {
@ -190,11 +189,11 @@ export default {
form: { form: {
hotTag: 1, hotTag: 1,
sort: 0, sort: 0,
categoryId: '', categoryId: +this.$route.query.categoryId || '',
productClassification: '', productClassification: +this.$route.query.productClassification || '',
productName: '', productName: this.$route.query.productName || '',
professionalCategoryId: '', professionalCategoryId: +this.$route.query.professionalCategoryId || '',
professionalId: '', professionalId: +this.$route.query.professionalId || '',
}, },
subjectList: [], // subjectList: [], //
professionalClassList: [], // professionalClassList: [], //
@ -216,9 +215,14 @@ export default {
} }
}, },
mounted () { mounted () {
const { query } = this.$route
if (query.page) {
this.$router.push('/shop').catch(() => { })
}
this.getSubject() this.getSubject()
this.getCategory() this.getCategory()
this.initData() this.getData()
}, },
methods: { methods: {
getData () { getData () {
@ -291,10 +295,16 @@ export default {
}).catch(err => { }).catch(err => {
}); });
}, },
// url
setReferrer () {
this.$store.commit('setReferrer', `${this.$route.path}?${qs.stringify(this.form)}&page=${this.page}`)
},
addCourse () { addCourse () {
this.setReferrer()
this.$router.push("/shop/addProduct"); this.$router.push("/shop/addProduct");
}, },
edit (row, show = 0) { edit (row, show = 0) {
this.setReferrer()
this.$router.push(`/shop/addProduct?id=${row.mallId}&show=${show}`) this.$router.push(`/shop/addProduct?id=${row.mallId}&show=${show}`)
}, },
handleDelete (row) { handleDelete (row) {

@ -501,7 +501,7 @@ export default {
this.$post(this.api.updateTheoreticalCourse, form).then(res => { this.$post(this.api.updateTheoreticalCourse, form).then(res => {
this.submiting = false; this.submiting = false;
util.successMsg("修改成功"); util.successMsg("修改成功");
this.$router.back(); this.backPage();
}).catch(err => { }).catch(err => {
this.submiting = false; this.submiting = false;
}); });
@ -516,7 +516,7 @@ export default {
}).then(() => { }).then(() => {
this.$router.replace(`/setTheoreticalCourse?id=${courseId}`); this.$router.replace(`/setTheoreticalCourse?id=${courseId}`);
}).catch(() => { }).catch(() => {
this.$router.back(); this.$router.push('/theoreticalCourse');
}); });
}).catch(err => { }).catch(err => {
this.submiting = false; this.submiting = false;
@ -527,7 +527,7 @@ export default {
}, },
// //
backPage () { backPage () {
this.$router.back() this.$router.push(this.$store.state.referrer || '/theoreticalCourse')
}, },
back () { back () {
const { id } = this.form const { id } = this.form

@ -3,7 +3,7 @@
<el-card shadow="hover" <el-card shadow="hover"
class="m-b-20"> class="m-b-20">
<div class="flex-between"> <div class="flex-between">
<el-page-header @back="goBack" <el-page-header @back="back"
:content="'课程内容/' + (sorting ? '更改排序' : '内容设置')"></el-page-header> :content="'课程内容/' + (sorting ? '更改排序' : '内容设置')"></el-page-header>
</div> </div>
</el-card> </el-card>
@ -415,11 +415,11 @@ export default {
// //
if (window.history && window.history.pushState) { if (window.history && window.history.pushState) {
history.pushState(null, null, document.URL); history.pushState(null, null, document.URL);
window.addEventListener("popstate", this.goBack, false); window.addEventListener("popstate", this.back, false);
} }
}, },
destroyed () { destroyed () {
window.removeEventListener("popstate", this.goBack, false); window.removeEventListener("popstate", this.back, false);
}, },
methods: { methods: {
getData () { getData () {
@ -427,11 +427,9 @@ export default {
.then(res => { .then(res => {
this.chapters = res.chapterList; this.chapters = res.chapterList;
}) })
.catch(err => { .catch(err => { });
});
}, },
goBack () { back () {
// //
if (this.previewing) { if (this.previewing) {
this.closeIframe(); this.closeIframe();
@ -454,7 +452,7 @@ export default {
this.sorting = false this.sorting = false
} }
} else { } else {
this.$router.back() this.$router.push(this.$store.state.referrer || '/theoreticalCourse')
} }
} }
}, },
@ -497,11 +495,6 @@ export default {
this.fileType = file.name.substring(file.name.lastIndexOf(".") + 1); this.fileType = file.name.substring(file.name.lastIndexOf(".") + 1);
this.showProgress = true this.showProgress = true
}, },
handleExceed (files, fileList) {
util.warningMsg(
`当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!`
);
},
uploadSuccess (file) { uploadSuccess (file) {
this.uploading = false; this.uploading = false;
this.fileId = '' this.fileId = ''
@ -509,31 +502,6 @@ export default {
this.fileUrl = file.url; this.fileUrl = file.url;
this.fileName = file.name; this.fileName = file.name;
}, },
uploadError (err, file, fileList) {
this.$message({
message: "上传出错,请重试!",
type: "error",
center: true
});
},
beforeRemove (file, fileList) {
if ((file.size / 1024 / 1024) < 10) {
return this.$confirm(`确定移除 ${file.name}`);
}
},
handleRemove (file, fileList) {
this.uploadList = fileList;
},
uploadSure () {
this.importVisible = false;
this.pageNo = 1;
this.staffGradeId = "";
this.keyword = "";
this.getTeacher();
},
goback () {
this.$router.push("course");
},
transferType (ext) { transferType (ext) {
const suf = ext.toLowerCase() const suf = ext.toLowerCase()
if ("jpg,jpeg,png,gif,svg,psd".includes(suf)) return "图片"; if ("jpg,jpeg,png,gif,svg,psd".includes(suf)) return "图片";

@ -48,7 +48,7 @@
<label>搜索</label> <label>搜索</label>
<el-input placeholder="请输入理论课程名称/创建人" <el-input placeholder="请输入理论课程名称/创建人"
suffix-icon="el-icon-search" suffix-icon="el-icon-search"
v-model="keyword" v-model="form.keyWord"
clearable clearable
size="small"></el-input> size="small"></el-input>
</li> </li>
@ -166,10 +166,10 @@
<script> <script>
import util from "@/libs/util"; import util from "@/libs/util";
import Setting from '@/setting' import Setting from '@/setting'
import qs from 'qs'
export default { export default {
data () { data () {
return { return {
timer: null,
regionName: ['本校内', '全平台可见', '指定院校区域'], regionName: ['本校内', '全平台可见', '指定院校区域'],
regions: [ regions: [
{ {
@ -200,11 +200,11 @@ export default {
} }
], ],
form: { form: {
visibleRange: '', keyWord: this.$route.query.keyWord || '',
categoryId: '', visibleRange: +this.$route.query.visibleRange || '',
courseType: '' categoryId: +this.$route.query.categoryId || '',
courseType: this.$route.query.courseType ? +this.$route.query.courseType : '',
}, },
keyword: "",
classificationId: "", classificationId: "",
list: [], list: [],
multipleSelection: [], multipleSelection: [],
@ -215,7 +215,7 @@ export default {
}; };
}, },
watch: { watch: {
keyword: function (val) { 'form.keyWord': function (val) {
clearTimeout(this.searchTimer); clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.initData(); this.initData();
@ -223,22 +223,23 @@ export default {
} }
}, },
mounted () { mounted () {
const { query } = this.$route
if (query.page) {
this.$router.push('/theoreticalCourse').catch(() => { })
}
this.getClassification(); this.getClassification();
this.getData(); this.getData();
this.$once('hook:beforeDestroy', function () {
clearInterval(this.timer)
})
}, },
methods: { methods: {
//: //:
// //
// 使 // 使
//1. //1.
getList () { getData () {
this.$post(this.api.listTheoreticalCourse, { this.$post(this.api.listTheoreticalCourse, {
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
keyWord: this.keyword,
createPlatform: 0, createPlatform: 0,
platformSource: Setting.platformSource, platformSource: Setting.platformSource,
...this.form ...this.form
@ -252,19 +253,6 @@ export default {
}).catch(res => { }).catch(res => {
}); });
}, },
// redis
getRedis () {
this.$post(this.api.getRedisCache).then(({ data }) => {
data && this.getList()
}).catch(res => { })
},
getData () {
this.getList()
// if (!Setting.isDev) {
// clearInterval(this.timer)
// this.timer = setInterval(this.getRedis, 1000)
// }
},
initData () { initData () {
this.page = 1; this.page = 1;
this.getData(); this.getData();
@ -282,16 +270,24 @@ export default {
this.classificationId = type; this.classificationId = type;
this.initData(); this.initData();
}, },
// url
setReferrer () {
this.$store.commit('setReferrer', `${this.$route.path}?${qs.stringify(this.form)}&page=${this.page}&tab=first`)
},
preview (row) { preview (row) {
this.setReferrer()
this.$router.push(`/previewTheoreticalCourse?id=${row.id}`); this.$router.push(`/previewTheoreticalCourse?id=${row.id}`);
}, },
config (row) { config (row) {
this.setReferrer()
this.$router.push(`/setTheoreticalCourse?id=${row.id}`); this.$router.push(`/setTheoreticalCourse?id=${row.id}`);
}, },
addCourse () { addCourse () {
this.setReferrer()
this.$router.push("/addTheoreticalCourse"); this.$router.push("/addTheoreticalCourse");
}, },
editCourse (row) { editCourse (row) {
this.setReferrer()
this.$router.push(`/addTheoreticalCourse?id=${row.id}`); this.$router.push(`/addTheoreticalCourse?id=${row.id}`);
}, },
handleDelete (row) { handleDelete (row) {

@ -2,89 +2,157 @@
<!-- 院校创建 --> <!-- 院校创建 -->
<div style="padding-top: 24px"> <div style="padding-top: 24px">
<div class="tool"> <div class="tool">
<ul class="filter" style="align-items: flex-start"> <ul class="filter"
style="align-items: flex-start">
<li> <li>
<label>可见范围</label> <label>可见范围</label>
<el-select v-model="form.visibleRange" clearable placeholder="请选择可见范围" @change="getData"> <el-select v-model="form.visibleRange"
<el-option v-for="(item,index) in regions" :key="index" :label="item.name" :value="item.id"></el-option> clearable
placeholder="请选择可见范围"
@change="getData">
<el-option v-for="(item,index) in regions"
:key="index"
:label="item.name"
:value="item.id"></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<label>课程分类</label> <label>课程分类</label>
<el-select v-model="form.categoryId" clearable placeholder="请选择课程分类" @change="getData"> <el-select v-model="form.categoryId"
<el-option label="不限" value=""></el-option> clearable
<el-option v-for="(item,index) in classificationList" :key="index" :label="item.typeName" :value="item.id"></el-option> placeholder="请选择课程分类"
@change="getData">
<el-option label="不限"
value=""></el-option>
<el-option v-for="(item,index) in classificationList"
:key="index"
:label="item.typeName"
:value="item.id"></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<label>课程类型</label> <label>课程类型</label>
<el-select v-model="form.courseType" clearable placeholder="请选择课程类型" @change="getData"> <el-select v-model="form.courseType"
<el-option v-for="(item,index) in types" :key="index" :label="item.name" :value="item.id"></el-option> clearable
placeholder="请选择课程类型"
@change="getData">
<el-option v-for="(item,index) in types"
:key="index"
:label="item.name"
:value="item.id"></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<label>搜索</label> <label>搜索</label>
<el-input placeholder="请输入理论课程名称/创建人" suffix-icon="el-icon-search" v-model="keyword" clearable size="small"></el-input> <el-input placeholder="请输入理论课程名称/创建人"
suffix-icon="el-icon-search"
v-model="form.keyWord"
clearable
size="small"></el-input>
</li> </li>
</ul> </ul>
<div> <div>
<!-- <el-button v-auth="'院校创建:新增'" type="primary" round @click="addCourse">新增</el-button> --> <!-- <el-button v-auth="'院校创建:新增'" type="primary" round @click="addCourse">新增</el-button> -->
<el-button v-auth="'院校创建:批量删除'" type="primary" round @click="delAllData">批量删除</el-button> <el-button v-auth="'院校创建:批量删除'"
type="primary"
round
@click="delAllData">批量删除</el-button>
</div> </div>
</div> </div>
<el-table :data="list" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id"> <el-table :data="list"
<el-table-column type="selection" width="80" align="center" :reserve-selection="true"></el-table-column> class="table"
<el-table-column type="index" width="100" label="序号" align="center"> ref="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="100"
label="序号"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.$index + (page - 1) * pageSize + 1 }} {{ scope.$index + (page - 1) * pageSize + 1 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="courseName" label="课程名称" align="center"> <el-table-column prop="courseName"
label="课程名称"
align="center">
</el-table-column> </el-table-column>
<el-table-column label="可见范围" align="center"> <el-table-column label="可见范围"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ regionName[scope.row.visibleRange] }} {{ regionName[scope.row.visibleRange] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createTime" label="创建时间" align="center"> <el-table-column prop="createTime"
label="创建时间"
align="center">
</el-table-column> </el-table-column>
<el-table-column prop="courseClassification" label="课程类型" align="center"> <el-table-column prop="courseClassification"
label="课程类型"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.courseType == 1 ? '付费' : '免费' }} {{ scope.row.courseType == 1 ? '付费' : '免费' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="founder" label="创建人" align="center"> <el-table-column prop="founder"
label="创建人"
align="center">
</el-table-column> </el-table-column>
<el-table-column prop="courseClassification" label="课程分类" align="center" show-overflow-tooltip> <el-table-column prop="courseClassification"
label="课程分类"
align="center"
show-overflow-tooltip>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="250"> <el-table-column label="操作"
align="center"
width="250">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-auth="'院校创建:编辑信息'" type="text" @click="editCourse(scope.row)">编辑信息</el-button> <el-button v-auth="'院校创建:编辑信息'"
<el-divider v-auth="'院校创建:编辑信息'" direction="vertical"></el-divider> type="text"
<el-button v-auth="'院校创建:内容设置'" type="text" @click="config(scope.row)">内容设置</el-button> @click="editCourse(scope.row)">编辑信息</el-button>
<el-divider v-auth="'院校创建:内容设置'" direction="vertical"></el-divider> <el-divider v-auth="'院校创建:编辑信息'"
<el-button v-auth="'院校创建:预览'" type="text" @click="preview(scope.row)">预览</el-button> direction="vertical"></el-divider>
<el-divider v-auth="'院校创建:预览'" direction="vertical"></el-divider> <el-button v-auth="'院校创建:内容设置'"
<el-button v-auth="'院校创建:删除'" type="text" @click="handleDelete(scope.row)">删除</el-button> type="text"
@click="config(scope.row)">内容设置</el-button>
<el-divider v-auth="'院校创建:内容设置'"
direction="vertical"></el-divider>
<el-button v-auth="'院校创建:预览'"
type="text"
@click="preview(scope.row)">预览</el-button>
<el-divider v-auth="'院校创建:预览'"
direction="vertical"></el-divider>
<el-button v-auth="'院校创建:删除'"
type="text"
@click="handleDelete(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="可授权状态" align="center" width="120"> <el-table-column label="可授权状态"
align="center"
width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch v-auth="'院校创建:禁用'"
v-auth="'院校创建:禁用'"
v-model="scope.row.ztOpen" v-model="scope.row.ztOpen"
:active-value="0" :active-value="0"
:inactive-value="1" :inactive-value="1"
style="margin: 0 10px 0 5px" style="margin: 0 10px 0 5px"
:active-text="scope.row.ztOpen ? '关' : '开'" :active-text="scope.row.ztOpen ? '关' : '开'"
@change="switchOff($event,scope.row,scope.$index)" @change="switchOff($event,scope.row,scope.$index)"></el-switch>
></el-switch>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background layout="total, prev, pager, next" :total="total" @current-change="handleCurrentChange" :current-page="page"> <el-pagination background
layout="total, prev, pager, next"
:total="total"
@current-change="handleCurrentChange"
:current-page="page">
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
@ -93,10 +161,10 @@
<script> <script>
import util from "@/libs/util"; import util from "@/libs/util";
import Setting from '@/setting' import Setting from '@/setting'
import qs from 'qs'
export default { export default {
data() { data () {
return { return {
timer: null,
regionName: ['本校内', '全平台可见', '指定院校区域'], regionName: ['本校内', '全平台可见', '指定院校区域'],
regions: [ regions: [
{ {
@ -131,11 +199,11 @@ export default {
} }
], ],
form: { form: {
visibleRange: '', keyWord: this.$route.query.keyWord || '',
categoryId: '', visibleRange: this.$route.query.visibleRange ? +this.$route.query.visibleRange : '',
courseType: '' categoryId: +this.$route.query.categoryId || '',
courseType: this.$route.query.courseType ? +this.$route.query.courseType : '',
}, },
keyword: "",
classificationId: "", classificationId: "",
list: [], list: [],
multipleSelection: [], multipleSelection: [],
@ -146,30 +214,31 @@ export default {
}; };
}, },
watch: { watch: {
keyword: function(val) { 'form.keyWord': function (val) {
clearTimeout(this.searchTimer); clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.initData(); this.initData();
}, 500); }, 500);
} }
}, },
mounted() { mounted () {
const { query } = this.$route
if (query.page) {
this.$router.push('/theoreticalCourse').catch(() => { })
}
this.getClassification(); this.getClassification();
this.getData(); this.getData();
this.$once('hook:beforeDestroy', function() {
clearInterval(this.timer)
})
}, },
methods: { methods: {
//: //:
// //
// 使 // 使
//1. //1.
getList() { getData () {
this.$post(this.api.listTheoreticalCourse, { this.$post(this.api.listTheoreticalCourse, {
pageNum: this.page, pageNum: this.page,
pageSize: this.pageSize, pageSize: this.pageSize,
keyWord: this.keyword,
createPlatform: 1, createPlatform: 1,
platformSource: Setting.platformSource, platformSource: Setting.platformSource,
...this.form ...this.form
@ -183,24 +252,11 @@ export default {
}).catch(res => { }).catch(res => {
}); });
}, },
// redis initData () {
getRedis() {
this.$post(this.api.getRedisCache).then(({ data }) => {
data && this.getList()
}).catch(res => {})
},
getData() {
this.getList()
if (!Setting.isDev) {
clearInterval(this.timer)
this.timer = setInterval(this.getRedis, 1000)
}
},
initData() {
this.page = 1; this.page = 1;
this.getData(); this.getData();
}, },
getClassification() { getClassification () {
this.$post(this.api.queryAllCategoriesOfSchools).then(({ data }) => { this.$post(this.api.queryAllCategoriesOfSchools).then(({ data }) => {
data.map((e, i) => { data.map((e, i) => {
const name = e.classificationName const name = e.classificationName
@ -208,25 +264,33 @@ export default {
if (data.filter((n, j) => n.classificationName === name).length > 1) e.typeName = name + '(' + e.schoolName + ')' if (data.filter((n, j) => n.classificationName === name).length > 1) e.typeName = name + '(' + e.schoolName + ')'
}) })
this.classificationList = data this.classificationList = data
}).catch(res => {}) }).catch(res => { })
}, },
changeType(type) { changeType (type) {
this.classificationId = type; this.classificationId = type;
this.initData(); this.initData();
}, },
preview(row) { // url
setReferrer () {
this.$store.commit('setReferrer', `${this.$route.path}?${qs.stringify(this.form)}&page=${this.page}&tab=second`)
},
preview (row) {
this.setReferrer()
this.$router.push(`/previewTheoreticalCourse?id=${row.id}`); this.$router.push(`/previewTheoreticalCourse?id=${row.id}`);
}, },
config(row) { config (row) {
this.setReferrer()
this.$router.push(`/setTheoreticalCourse?id=${row.id}`); this.$router.push(`/setTheoreticalCourse?id=${row.id}`);
}, },
addCourse() { addCourse () {
this.setReferrer()
this.$router.push("/addTheoreticalCourse"); this.$router.push("/addTheoreticalCourse");
}, },
editCourse(row) { editCourse (row) {
this.setReferrer()
this.$router.push(`/addTheoreticalCourse?id=${row.id}`); this.$router.push(`/addTheoreticalCourse?id=${row.id}`);
}, },
handleDelete(row) { handleDelete (row) {
this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", { this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", {
type: "warning" type: "warning"
}) })
@ -240,10 +304,10 @@ export default {
.catch(() => { .catch(() => {
}); });
}, },
handleSelectionChange(val) { handleSelectionChange (val) {
this.multipleSelection = val; this.multipleSelection = val;
}, },
delAllData() { delAllData () {
const list = this.multipleSelection const list = this.multipleSelection
if (list.length != "") { if (list.length != "") {
this.$confirm(`确定要删除吗?`, "提示", { this.$confirm(`确定要删除吗?`, "提示", {
@ -266,18 +330,18 @@ export default {
util.errorMsg("请先选择数据 !"); util.errorMsg("请先选择数据 !");
} }
}, },
handleCurrentChange(val) { handleCurrentChange (val) {
this.page = val; this.page = val;
this.getData(); this.getData();
}, },
switchOff(val, row) { switchOff (val, row) {
this.$post(this.api.disabledTheoreticalCourse, { this.$post(this.api.disabledTheoreticalCourse, {
courseId: row.id, courseId: row.id,
isOpen: val, isOpen: val,
type: 0 // (01) type: 0 // (01)
}).then(res => { }).then(res => {
val == 1 ? util.warningMsg('禁用成功') : util.successMsg('启用成功') val == 1 ? util.warningMsg('禁用成功') : util.successMsg('启用成功')
}).catch(err => {}) }).catch(err => { })
} }
} }
}; };

@ -2,7 +2,11 @@
<!-- 理论课程管理 --> <!-- 理论课程管理 -->
<div class="page"> <div class="page">
<div class="tabs"> <div class="tabs">
<a class="item" v-for="(item,index) in tabs" :key="index" :class="{active: index == active}" @click="tabChange(index)">{{ item }}</a> <a class="item"
v-for="(item, i) in tabs"
:key="i"
:class="{active: i == active}"
@click="tabChange(i)">{{ item }}</a>
</div> </div>
<div class="page-content"> <div class="page-content">
<!-- 平台自建 --> <!-- 平台自建 -->
@ -20,33 +24,31 @@ import Setting from "@/setting";
import buildPlatform from "./buildPlatform"; import buildPlatform from "./buildPlatform";
import CourseManagement from "./courseManagement"; import CourseManagement from "./courseManagement";
import SortManagement from "./sortManagement"; import SortManagement from "./sortManagement";
export default { export default {
name: "course",
components: { components: {
buildPlatform, buildPlatform,
CourseManagement, CourseManagement,
SortManagement SortManagement
}, },
data() { data () {
return { return {
active: "first", // active: this.$route.query.tab || 'first',
tabs: { tabs: {
first: "平台自建", first: "平台自建",
second: "院校创建", second: "院校创建",
third: "分类管理" third: "分类管理"
}, },
showTabs: true
}; };
}, },
mounted() { mounted () {
Setting.dynamicRoute && this.initTabs(); Setting.dynamicRoute && this.initTabs();
}, },
methods: { methods: {
tabChange(index) { tabChange (i) {
this.active = index; this.active = i;
this.$router.push(`/theoreticalCourse?tab=${this.active}`).catch(() => { })
}, },
initTabs() { initTabs () {
const { btns } = this.$store.state const { btns } = this.$store.state
const tab1 = btns.includes('/theoreticalCourse:平台自建') const tab1 = btns.includes('/theoreticalCourse:平台自建')
const tab2 = btns.includes('/theoreticalCourse:院校创建') const tab2 = btns.includes('/theoreticalCourse:院校创建')
@ -60,5 +62,4 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
</style> </style>

@ -4,7 +4,7 @@
<el-card shadow="hover" <el-card shadow="hover"
class="m-b-20"> class="m-b-20">
<div class="flex-between"> <div class="flex-between">
<el-page-header @back="goBack" <el-page-header @back="back"
:content="'课程预览'"></el-page-header> :content="'课程预览'"></el-page-header>
</div> </div>
</el-card> </el-card>
@ -185,9 +185,6 @@ export default {
this.getChapter(); this.getChapter();
}, },
methods: { methods: {
goBack () {
this.$router.back();
},
async getData () { async getData () {
let res = await this.$post(`${this.api.findTheoreticalCourse}?id=${this.id}`); let res = await this.$post(`${this.api.findTheoreticalCourse}?id=${this.id}`);
this.courseName = res.data.courseName; this.courseName = res.data.courseName;
@ -313,7 +310,10 @@ export default {
}, },
loadPdfHandler (e) { loadPdfHandler (e) {
this.currentPage = 1; this.currentPage = 1;
} },
back () {
this.$router.push(this.$store.state.referrer || '/theoreticalCourse')
},
} }
}; };
</script> </script>

@ -2,9 +2,11 @@
<div> <div>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="24"> <el-col :span="24">
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover"
class="mgb20">
<div class="flex-between"> <div class="flex-between">
<div class="per_title" @click="goback()"> <div class="per_title"
@click="goback">
<i class="el-icon-arrow-left"></i> <i class="el-icon-arrow-left"></i>
<span class="per_back">返回</span> <span class="per_back">返回</span>
<span class="per_school">{{ isDetail ? '查看' : '编辑' }}用户信息</span> <span class="per_school">{{ isDetail ? '查看' : '编辑' }}用户信息</span>
@ -13,7 +15,8 @@
</el-card> </el-card>
<!-- 账号信息 --> <!-- 账号信息 -->
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover"
class="mgb20">
<div> <div>
<div class="flex-between mgb20 user_header"> <div class="flex-between mgb20 user_header">
<div class="flex-center"> <div class="flex-center">
@ -23,34 +26,33 @@
</div> </div>
<div> <div>
<el-form <el-form ref="form"
ref="form"
:model="form" :model="form"
:rules="rules" :rules="rules"
label-width="120px" label-width="120px"
:disabled="isDetail" :disabled="isDetail">
>
<el-col :span="24"> <el-col :span="24">
<el-col :span="6" :offset="5"> <el-col :span="6"
<el-form-item prop="phone" label="个人手机"> :offset="5">
<el-input <el-form-item prop="phone"
v-model="form.phone" label="个人手机">
<el-input v-model="form.phone"
placeholder="请输入手机号" placeholder="请输入手机号"
maxlength="11" maxlength="11"></el-input>
></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="email" label="邮箱"> <el-form-item prop="email"
<el-input label="邮箱">
v-model="form.email" <el-input v-model="form.email"
placeholder="请输入邮箱" placeholder="请输入邮箱"
maxlength="11" maxlength="11"></el-input>
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6" :offset="2"> <el-col :span="6"
:offset="2">
<el-form-item label="唯一识别码"> <el-form-item label="唯一识别码">
<el-input v-model="form.uniqueIdentification" disabled></el-input> <el-input v-model="form.uniqueIdentification"
disabled></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-col> </el-col>
@ -60,7 +62,8 @@
</el-card> </el-card>
<!-- 个人信息 --> <!-- 个人信息 -->
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover"
class="mgb20">
<div> <div>
<div class="flex-between mgb20 user_header"> <div class="flex-between mgb20 user_header">
<div class="flex-center"> <div class="flex-center">
@ -70,48 +73,45 @@
</div> </div>
<div> <div>
<el-form <el-form ref="form"
ref="form"
:model="form" :model="form"
:rules="rules" :rules="rules"
label-width="120px" label-width="120px"
:disabled="isDetail" :disabled="isDetail">
> <el-col :span="6"
<el-col :span="6" :offset="5"> :offset="5">
<el-form-item prop="userName" label="用户姓名"> <el-form-item prop="userName"
<el-input v-model="form.userName" placeholder="请输入"></el-input> label="用户姓名">
<el-input v-model="form.userName"
placeholder="请输入"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="证件类型" prop="documentType"> <el-form-item label="证件类型"
<el-select prop="documentType">
value="1" <el-select value="1"
clearable clearable
placeholder="请选择证件类型" placeholder="请选择证件类型"
style="width: 100%" style="width: 100%">
> <el-option label="身份证"
<el-option value="1"></el-option>
label="身份证"
value="1"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6" :offset="2"> <el-col :span="6"
<el-form-item prop="phone" label="手机号"> :offset="2">
<el-input <el-form-item prop="phone"
v-model="form.phone" label="手机号">
<el-input v-model="form.phone"
placeholder="请输入手机号" placeholder="请输入手机号"
maxlength="11" maxlength="11"></el-input>
></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="idNumber" label="证件号码"> <el-form-item prop="idNumber"
<el-input label="证件号码">
v-model="form.idNumber" <el-input v-model="form.idNumber"
placeholder="请输入证件号码" placeholder="请输入证件号码"
maxlength="18" maxlength="18"></el-input>
></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
@ -120,7 +120,8 @@
</el-card> </el-card>
<!-- 已绑定系统 --> <!-- 已绑定系统 -->
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover"
class="mgb20">
<div class="flex-between mgb20"> <div class="flex-between mgb20">
<div class="flex-center"> <div class="flex-center">
<p class="addhr_tag"></p> <p class="addhr_tag"></p>
@ -128,27 +129,54 @@
</div> </div>
</div> </div>
<el-table <el-table :data="platformList"
:data="platformList"
class="table" class="table"
stripe stripe
header-align="center" header-align="center"
row-key="accountId" row-key="accountId">
> <el-table-column type="index"
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column> width="100"
<el-table-column prop="platformName" label="平台名称" align="center"></el-table-column> label="序号"
<el-table-column prop="schoolName" label="绑定组织名称" align="center"></el-table-column> align="center"></el-table-column>
<el-table-column prop="userName" label="姓名" align="center"></el-table-column> <el-table-column prop="platformName"
<el-table-column prop="workNumber" label="工号/学号" align="center"></el-table-column> label="平台名称"
<el-table-column prop="roleName" label="角色" align="center"></el-table-column> align="center"></el-table-column>
<el-table-column prop="phoneBindingTime" label="绑定时间" align="center"></el-table-column> <el-table-column prop="schoolName"
<el-table-column prop="logInNumber" label="登录次数" align="center"></el-table-column> label="绑定组织名称"
<el-table-column prop="lastLoginTime" label="上一次的登录时间" align="center"></el-table-column> align="center"></el-table-column>
<el-table-column label="操作" align="center"> <el-table-column prop="userName"
label="姓名"
align="center"></el-table-column>
<el-table-column prop="workNumber"
label="工号/学号"
align="center"></el-table-column>
<el-table-column prop="roleName"
label="角色"
align="center"></el-table-column>
<el-table-column prop="phoneBindingTime"
label="绑定时间"
align="center"></el-table-column>
<el-table-column prop="logInNumber"
label="登录次数"
align="center"></el-table-column>
<el-table-column prop="lastLoginTime"
label="上一次的登录时间"
align="center"></el-table-column>
<el-table-column label="操作"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="show(scope.row)">查看</el-button> <el-button type="text"
<el-button type="text" @click="del(scope.row)">删除</el-button> @click="show(scope.row)">查看</el-button>
<el-switch v-if="scope.row.userId!==1" v-model="scope.row.isEnable" :active-value="1" :inactive-value="0" style="margin: 0 10px 0 5px" :active-text="scope.row.isEnable ? '启用' : '禁用'" @change="switchUser($event,scope.row,scope.$index)" v-auth="'/user:启用'"></el-switch> <el-button type="text"
@click="del(scope.row)">删除</el-button>
<el-switch v-if="scope.row.userId!==1"
v-model="scope.row.isEnable"
:active-value="1"
:inactive-value="0"
style="margin: 0 10px 0 5px"
:active-text="scope.row.isEnable ? '启用' : '禁用'"
@change="switchUser($event,scope.row,scope.$index)"
v-auth="'/user:启用'"></el-switch>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -162,7 +190,7 @@
import * as md5 from 'blueimp-md5' import * as md5 from 'blueimp-md5'
export default { export default {
name: 'baseform', name: 'baseform',
data() { data () {
return { return {
userId: this.$route.query.userId, userId: this.$route.query.userId,
isDetail: this.$route.query.show === '1', // isDetail: this.$route.query.show === '1', //
@ -181,11 +209,11 @@ export default {
platformList: [], // platformList: [], //
}; };
}, },
mounted() { mounted () {
this.userId && this.getdata() this.userId && this.getdata()
}, },
methods: { methods: {
getdata() { getdata () {
this.$get(this.api.viewUserDetailsforNakadai, { userId: this.userId }).then(({ result }) => { this.$get(this.api.viewUserDetailsforNakadai, { userId: this.userId }).then(({ result }) => {
const info = result.hrUserInfo const info = result.hrUserInfo
info.phone = result.userAccount.phone info.phone = result.userAccount.phone
@ -193,13 +221,13 @@ export default {
if (info.phone) info.uniqueIdentification = md5(info.phone).slice(0, 13) if (info.phone) info.uniqueIdentification = md5(info.phone).slice(0, 13)
this.form = info this.form = info
this.platformList = result.bindingPlatformAndUserList this.platformList = result.bindingPlatformAndUserList
}).catch((res) => {}) }).catch((res) => { })
}, },
goback(){ goback () {
this.$router.back() this.$router.push(this.$store.state.referrer || '/user')
}, },
// //
switchUser(val,row) { switchUser (val, row) {
this.$get(this.api.updateAccountEnable, { this.$get(this.api.updateAccountEnable, {
id: row.accountId, id: row.accountId,
isEnable: val isEnable: val
@ -209,19 +237,19 @@ export default {
row.isEnable = 0 row.isEnable = 0
}) })
}, },
show(row) { show (row) {
this.$router.push(`/info?userId=${row.userId}&platformName=${row.platformName}`) this.$router.push(`/info?userId=${row.userId}&platformName=${row.platformName}`)
}, },
// //
del(row) { del (row) {
this.$confirm('确定要删除吗?', '提示', { this.$confirm('确定要删除吗?', '提示', {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
this.$post(this.api.delUserAccounts, [row.userId]).then(res => { this.$post(this.api.delUserAccounts, [row.userId]).then(res => {
this.$message.success('删除成功') this.$message.success('删除成功')
this.getData() this.getData()
}).catch(res => {}) }).catch(res => { })
}).catch(() => {}) }).catch(() => { })
}, },
} }
}; };
@ -229,22 +257,22 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.fold{ .fold {
margin-top: 20px; margin-top: 20px;
text-align: center; text-align: center;
img{ img {
cursor: pointer; cursor: pointer;
&:hover{ &:hover {
opacity: .8; opacity: 0.8;
} }
} }
} }
.arrowTransform{ .arrowTransform {
transition: 0.5s; transition: 0.5s;
transform-origin: center; transform-origin: center;
transform: rotateZ(180deg); transform: rotateZ(180deg);
} }
.arrowTransformReturn{ .arrowTransformReturn {
transition: 0.5s; transition: 0.5s;
transform-origin: center; transform-origin: center;
transform: rotateZ(0deg); transform: rotateZ(0deg);
@ -265,10 +293,10 @@ export default {
.region ::v-deep .el-input { .region ::v-deep .el-input {
width: 30%; width: 30%;
} }
.numberInput{ .numberInput {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
span{ span {
white-space: nowrap; white-space: nowrap;
} }
} }
@ -323,30 +351,30 @@ export default {
color: rgb(155, 179, 245); color: rgb(155, 179, 245);
font-size: 14px; font-size: 14px;
} }
.school-item{ .school-item {
margin-bottom: 20px; margin-bottom: 20px;
.school-name{ .school-name {
font-size: 16px; font-size: 16px;
font-weight: bold; font-weight: bold;
} }
.port{ .port {
.port-name{ .port-name {
margin: 10px 0; margin: 10px 0;
font-size: 15px; font-size: 15px;
color: #9076FF; color: #9076ff;
} }
.fields{ .fields {
.line{ .line {
display: flex; display: flex;
margin-bottom: 10px; margin-bottom: 10px;
li{ li {
display: flex; display: flex;
align-items: center; align-items: center;
margin-right: 80px; margin-right: 80px;
.name{ .name {
font-size: 14px; font-size: 14px;
} }
.val{ .val {
font-size: 14px; font-size: 14px;
font-weight: bold; font-weight: bold;
} }
@ -373,7 +401,7 @@ export default {
border-radius: 0; border-radius: 0;
background: #dddddd; background: #dddddd;
} }
/deep/.el-input__inner{ /deep/.el-input__inner {
height: 40px !important; height: 40px !important;
} }
</style> </style>

@ -12,13 +12,6 @@
<el-form label-width="80px"> <el-form label-width="80px">
<el-row> <el-row>
<el-col :span="5"> <el-col :span="5">
<!--
<el-form-item label="国家">
<el-select v-model="form.countries" clearable placeholder="请选择国家">
<el-option v-for="(item,index) in countryList" :key="index" :label="item.name" :value="item.value"></el-option>
</el-select>
</el-form-item>
-->
<el-form-item label="省份"> <el-form-item label="省份">
<el-select v-model="form.provinces" <el-select v-model="form.provinces"
clearable clearable
@ -212,6 +205,7 @@
<script> <script>
import Setting from '@/setting' import Setting from '@/setting'
import qs from 'qs'
export default { export default {
name: 'user', name: 'user',
data () { data () {
@ -219,18 +213,17 @@ export default {
platformId: Setting.platformId, platformId: Setting.platformId,
searchTimer: null, searchTimer: null,
form: { form: {
name: '',
countries: '中国', countries: '中国',
provinces: '', provinces: +this.$route.query.provinces || '',
city: '', city: +this.$route.query.provinces || '',
platformId: '', platformId: +this.$route.query.platformId || '',
schoolId: '', schoolId: +this.$route.query.schoolId || '',
accountRole: '', accountRole: '',
keyword: '', keyword: this.$route.query.keyword || '',
date: '', date: this.$route.query.startTime ? [this.$route.query.startTime, this.$route.query.endTime] : [],
startTime: '', startTime: this.$route.query.startTime || '',
endTime: '', endTime: this.$route.query.endTime || '',
month: '' month: +this.$route.query.month || ''
}, },
accountRoleList: [{ accountRoleList: [{
name: '超级管理员', name: '超级管理员',
@ -323,6 +316,11 @@ export default {
} }
}, },
mounted () { mounted () {
const { query } = this.$route
if (query.page) {
this.$router.push('/user').catch(() => { })
}
this.getData() this.getData()
this.getSchoolData(); this.getSchoolData();
}, },
@ -418,6 +416,7 @@ export default {
this.getData() this.getData()
}, },
toDetail (row, detail) { toDetail (row, detail) {
this.$store.commit('setReferrer', `${this.$route.path}?${qs.stringify(this.form)}&page=${this.page}`)
this.$router.push(`/adduser?userId=${row.userId}${detail ? '&show=1' : ''}`) this.$router.push(`/adduser?userId=${row.userId}${detail ? '&show=1' : ''}`)
}, },
handleDelete (row) { handleDelete (row) {

Loading…
Cancel
Save