全站添加筛选功能缓存

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: {
handleSelect (index) {
this.onRoutes = index
this.$store.commit('setOrderParam', null)
this.$store.commit('setInfoTab', '1')
this.$store.commit('setColumnId', '')
this.$store.commit('setCompetitionCache', null)

@ -21,14 +21,13 @@ const store = new Vuex.Store({
projectFields: {},
btns: [],
routes: [],
customerPage: 1,
matchPage: 1,
platformSource: 0,
columnId: '',
tabId: '1',
dataPer: [],
competitionCache: null,
referrer: '',
innerReferrer: '',
orderParam: null,
competitionCache: null
},
actions: {
setSystemId({ state,commit },systemId) {
@ -54,15 +53,6 @@ const store = new Vuex.Store({
SET_USERNAME (state, 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) {
state.courseId = payload.course_id
},
@ -75,10 +65,6 @@ const store = new Vuex.Store({
configData (state, payload) {
state.configId = payload.config_id
},
systemData (state, payload) {
state.systemId = payload.system_id
state.orderId = payload.order_id
},
userLoginData (state, payload) {
state.userLoginId = payload.userLogin_id
state.userName = payload.userName
@ -105,12 +91,18 @@ const store = new Vuex.Store({
setInfoTab: (state, tabId) => {
state.tabId = tabId
},
setOrderParam: (state, orderParam) => {
state.orderParam = orderParam
},
setCompetitionCache: (state, 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="per_title"
v-preventReClick
@click="goback()">
@click="back">
<i class="el-icon-arrow-left"></i>
<span class="per_back">返回</span>
<span class="per_school"
@ -1047,8 +1047,8 @@ export default {
}).then(() => {
this.$router.push(`/contentSettings?cid=${res.cid}`);
}).catch(() => {
this.backPage()
}) : this.backPage()
this.$router.push('/curriculum')
}) : this.$router.push('/curriculum')
}).catch((res) => {
this.submiting = false
this.loadIns.close()
@ -1059,7 +1059,7 @@ export default {
}
});
},
goback () {
back () {
const id = this.form.cid
const updateTime = this.updateTime
//
@ -1078,8 +1078,8 @@ export default {
},
//
backPage () {
this.$router.back()
this.loadIns.close()
this.loadIns && this.loadIns.close()
this.$router.push(this.$store.state.referrer || '/curriculum')
}
}
};

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

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

@ -643,6 +643,7 @@
import pdf from '../../components/pdf.vue'
import util from '@/utils/util'
import axios from 'axios'
import qs from 'qs'
export default {
components: { pdf },
data () {
@ -796,9 +797,9 @@ export default {
totalProduct: 0,
form3: {
orderType: '',
orderStatus: '',
keyword: ''
orderType: +this.$route.query.orderType || '',
orderStatus: +this.$route.query.orderStatus || '',
keyword: this.$route.query.keyword || ''
},
//
orderTypeList: [{
@ -1188,6 +1189,7 @@ export default {
},
//
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}`)
},
@ -1216,6 +1218,7 @@ export default {
},
//
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}`)
},
@ -1411,7 +1414,7 @@ export default {
}, 1500)
this.$store.commit('schoolIdData', { schoolId: this.form.schoolId })
this.$message.success('添加成功')
tab ? this.tabChange(tab, 1) : this.backPage()
tab ? this.tabChange(tab, 1) : this.router.push('list')
}).catch((res) => {
this.submiting = false
})
@ -1457,7 +1460,7 @@ export default {
}
},
backPage () {
this.$router.push(`customer?page=${this.$store.state.customerPage}`)
this.$router.push(this.$store.state.referrer || '/customer')
}
}
};

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

@ -176,6 +176,7 @@
import Setting from '@/setting'
import axios from 'axios';
import util from "@/libs/util";
import qs from 'qs'
export default {
name: 'customer',
data () {
@ -204,10 +205,10 @@ export default {
}],
listData: [],
form: {
customerType: '',
provinces: '',
city: '',
keyword: ''
customerType: +this.$route.query.customerType || '',
provinces: +this.$route.query.provinces || '',
city: +this.$route.query.city || '',
keyword: this.$route.query.keyword || ''
},
multipleSelection: [],
provinceList: [],
@ -227,6 +228,11 @@ export default {
},
},
mounted () {
const { query } = this.$route
if (query.page) {
this.$router.push('/customer').catch(() => { })
}
this.getData()
this.getProvince()
},
@ -258,6 +264,7 @@ export default {
this.$get(this.api.queryProvince).then(res => {
this.provinceList = res.list
this.$store.commit("provinceData", { provinceList: this.provinceList })
this.form.city && this.getCityData()
}).catch(res => { })
},
clearprovince () {
@ -307,13 +314,20 @@ export default {
util.downloadFileDirect(`客户列表.xlsx`, new Blob([res.data]))
}).catch(res => { })
},
// url
setReferrer () {
this.$store.commit('setReferrer', `${this.$route.path}?${qs.stringify(this.form)}&page=${this.page}`)
},
addcustomer () {
this.setReferrer()
this.$router.push('addcustomer')
},
edit (row) {
this.setReferrer()
this.$router.push(`addcustomer?id=${row.customerId}`)
},
show (row) {
this.setReferrer()
this.$router.push(`addcustomer?id=${row.customerId}&show=true`)
},
handleDelete (row) {
@ -363,7 +377,6 @@ export default {
},
handleCurrentChange (val) {
this.page = val
this.$store.commit('SET_C_PAGE', val)
this.$router.push(`customer?page=${val}`)
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>-->
<!-- </div>-->
<div class="btn-wrap">
<el-button v-auth="'内容管理:保存排序'" class="action-btn" 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>
<el-button v-auth="'内容管理:保存排序'"
class="action-btn"
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 class="page-content" style="padding-top: 24px">
<el-table ref="table" :data="list" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id">
<el-table-column type="selection" width="80" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center">
<div class="page-content"
style="padding-top: 24px">
<el-table ref="table"
:data="list"
class="table"
stripe
header-align="center"
@selection-change="handleSelectionChange"
row-key="id">
<el-table-column type="selection"
width="80"
align="center"
:reserve-selection="true"></el-table-column>
<el-table-column type="index"
width="60"
label="序号"
align="center">
<template slot-scope="scope">
{{ scope.$index + (pageNo - 1) * pageSize + 1 }}
</template>
</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 prop="title" label="栏目" show-overflow-tooltip align="center">
<el-table-column prop="title"
label="栏目"
show-overflow-tooltip
align="center">
{{ columnName }}
</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">
<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>
</template>
</el-table-column>
<el-table-column prop="date" label="添加日期" align="center">
<el-table-column prop="date"
label="添加日期"
align="center">
<template slot-scope="scope">
{{ transferDate(scope.row.date) }}
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="170">
<el-table-column label="操作"
align="center"
width="170">
<template slot-scope="scope">
<el-button v-auth="'内容管理:编辑'" type="text" @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>
<el-button v-auth="'内容管理:编辑'"
type="text"
@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>
</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">
<el-switch
v-auth="'内容管理:禁用'"
<el-switch v-auth="'内容管理:禁用'"
class="off"
v-model="scope.row.status"
:active-value="0"
:inactive-value="1"
style="margin: 0 5px"
:active-text="scope.row.status ? '关' : '开'"
@change="switchOff($event,scope.row,scope.$index)"
></el-switch>
@change="switchOff($event,scope.row,scope.$index)"></el-switch>
<span>{{ scope.row.status ? "禁用" : "启用" }}</span>
</template>
</el-table-column>
</el-table>
<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>
</div>
</div>
@ -67,7 +116,7 @@
import util from "@/libs/util";
export default {
data() {
data () {
return {
activeName: "first",
tabs: {
@ -87,17 +136,17 @@ export default {
columnId: ""
},
watch: {
columnId() {
columnId () {
this.getColumnName(this.$parent.menuList)
this.getData();
}
},
mounted() {
mounted () {
this.getColumnName(this.$parent.menuList)
this.getData();
},
methods: {
getData(id) {
getData (id) {
let data = {
columnId: this.columnId
};
@ -112,16 +161,16 @@ export default {
}).catch(res => {
});
},
handleSelectionChange(val) {
handleSelectionChange (val) {
this.multipleSelection = val;
},
handleCurrentChange(val) {
handleCurrentChange (val) {
this.pageNo = val;
this.$router.push(`list?page=${val}`)
this.$router.push(`/information?page=${val}`)
this.getData();
},
//
getColumnName(data) {
getColumnName (data) {
data.map(e => {
if (e.id == this.columnId) {
this.columnName = e.name
@ -130,13 +179,13 @@ export default {
}
})
},
addArticle() {
addArticle () {
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}`);
},
delData(row) {
delData (row) {
this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", {
type: "warning"
})
@ -150,10 +199,10 @@ export default {
.catch(() => {
});
},
transferDate(date) {
transferDate (date) {
return date.replace(" 00:00:00", "");
},
delAllData() {
delAllData () {
if (this.multipleSelection.length != "") {
let newArr = this.multipleSelection;
let delList = newArr.map(item => {
@ -174,7 +223,7 @@ export default {
this.getData();
}).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)
}
})
@ -184,7 +233,7 @@ export default {
util.errorMsg("请先选择数据 !");
}
},
switchOff(val, row, index) {
switchOff (val, row, index) {
this.$put(`${this.api.enableArticle}/${row.id}/${val}`)
.then(res => {
val == 1 ? util.errorMsg("该文章已隐藏,对学生端用户不可见") : util.successMsg("该文章已发布,对学生端用户可见");
@ -192,7 +241,7 @@ export default {
.catch(err => {
});
},
sortSubmit() {
sortSubmit () {
if (this.list.length) {
if (this.list.find(n => n.sort < 1)) return util.errorMsg("排序值最小为1");
let data = { articleList: this.list };

@ -220,7 +220,7 @@ export default {
this.editing = false
}
} else {
this.$router.push(`/match?page=${this.$store.state.matchPage}&platformSource=${this.$store.state.platformSource}`)
this.backPage()
}
},
back () {
@ -240,7 +240,7 @@ export default {
}
},
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>
<div class="wrap">
<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>
@ -9,7 +11,8 @@
</el-steps>
<h1>大赛已发布</h1>
<div class="btns">
<el-button type="primary" @click="back">确定</el-button>
<el-button type="primary"
@click="back">确定</el-button>
</div>
</div>
</div>
@ -17,17 +20,17 @@
<script>
export default {
data() {
data () {
return {
};
},
mounted() {
mounted () {
},
methods: {
back() {
this.$router.push(`/match?page=${this.$store.state.matchPage}`)
back () {
this.$router.push(this.$store.state.referrer || '/match')
}
}
};
@ -41,7 +44,7 @@ export default {
.modal {
width: 500px;
padding-top: 150px;
margin: 0 auto ;
margin: 0 auto;
h1 {
margin: 20px;
text-align: center;

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

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

@ -56,7 +56,6 @@
</template>
<script>
import util from "@/libs/util";
import Const from '@/const/match'
export default {
name: "matchArch",
@ -118,10 +117,12 @@ export default {
},
//
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}`)
},
//
toArch (row, i) {
this.$store.commit('setInnerReferrer', this.$route.fullPath)
const cur = this.form.competitionStage[i]
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}`)

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

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

@ -345,7 +345,7 @@ export default {
info: {
completeCompetitionSetup: {}
},
isDisable: '',
isDisable: this.$route.query.isDisable ? +this.$route.query.isDisable : '',
statusList: [
{
id: '',
@ -360,10 +360,10 @@ export default {
name: '未禁用'
}
],
keyword: "",
keyword: this.$route.query.keyword || '',
listData: [],
multipleSelection: [],
page: 1,
page: +this.$route.query.page || 1,
pageSize: 10,
total: 0,
schoolOrder: '',
@ -813,6 +813,7 @@ export default {
},
//
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}`)
},
exportAll () {

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

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

@ -1,59 +1,58 @@
<template>
<div class="page system" style="padding: 0">
<div class="page system"
style="padding: 0">
<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>
<staff v-if="active == 'staff'"></staff>
<pc-role v-if="active == 'pcRole'"></pc-role>
<mobile-role v-if="active == 'mobileRole'"></mobile-role>
<learn v-if="active == 'learn'" />
<info v-if="active == 'info'" />
<plan v-if="active == 'plan'" />
</div>
</template>
<script>
import Setting from "@/setting";
import staff from "./staff";
import pcRole from "./pcRole";
import mobileRole from "./mobileRole";
import learn from "./learn";
import info from "./info";
import plan from "./plan";
export default {
data() {
data () {
return {
active: this.$route.query.type || 'staff',
active: this.$route.query.type || 'learn',
tabs: {
staff: "合伙人学习管理",
pcRole: "合伙人资讯管理",
mobileRole: "方案管理"
learn: "合伙人学习管理",
info: "合伙人资讯管理",
plan: "方案管理"
}
};
},
components: {
staff,
pcRole,
mobileRole
learn,
info,
plan
},
created() {
created () {
Setting.dynamicRoute && this.initTabs();
},
methods: {
tabChange(index) {
tabChange (index) {
this.active = index
this.$router.push({
path: 'parnerOperation',
query: {
...this.$route.query,
type: index
}
})
this.$router.push(`/parnerOperation?type=${index}`)
},
initTabs() {
initTabs () {
const btns = this.$store.state.btns
const tab1 = btns.includes('/parnerOperation:合伙人学习管理')
const tab2 = btns.includes('/parnerOperation:合伙人资讯管理')
const tab3 = btns.includes('/parnerOperation:方案管理')
tab1 || delete this.tabs.staff
tab2 || delete this.tabs.pcRole
tab3 || delete this.tabs.mobileRole
tab1 || delete this.tabs.learn
tab2 || delete this.tabs.info
tab3 || delete this.tabs.plan
const type = this.$route.query.type
const keys = Object.keys(this.tabs)
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 () {
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 () {
this.pass = true
@ -671,17 +674,16 @@ export default {
}).then(() => {
this.submit(this.form.isRelease)
}).catch(() => {
this.$router.back()
this.backPage()
})
} else {
this.$router.back()
this.backPage()
}
},
//
submit (isRelease, next) {
if (this.submiting) return false
const form = JSON.parse(JSON.stringify(this.form))
console.log('form=>', form)
if (!form.title) return Util.errorMsg('请填写标题')
if (this.nameRepeat) return Util.errorMsg('该标题已重复!')
//
@ -702,7 +704,7 @@ export default {
delete form.children
this.$post(this.api.updateParnerArticle, form).then(res => {
Util.successMsg('修改成功')
next ? next() : this.$router.back()
next ? next() : this.backPage()
}).catch(err => {
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 个文件,如需更换,请删除上一个文件再重新选择!`
)
},
backPage () {
this.$router.push(this.$store.state.referrer || '/parnerOperation?type=plan')
},
//
back () {
this.pass = true
@ -585,10 +588,10 @@ export default {
}).then(() => {
this.submit(this.form.isRelease)
}).catch(() => {
this.$router.back()
this.backPage()
})
} else {
this.$router.back()
this.backPage()
}
},
//
@ -622,7 +625,7 @@ export default {
if (form.id) {
this.$post(this.api.updateScheme, form).then(res => {
Util.successMsg('修改成功')
next ? next() : this.$router.back()
next ? next() : this.backPage()
}).catch(err => {
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>
<el-col :span="4">
<el-form-item label="系统归属">
<el-select v-model="systemAttribution"
<el-select v-model="form.belong"
clearable
placeholder="请选择系统归属"
@change="initData">
<el-option v-for="(item,index) in systemBelongList"
:key="index"
:label="item.label"
:value="item.value"></el-option>
<el-option v-for="(item, i) in belongs"
:key="i"
:label="item"
:value="i"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="系统类型">
<el-select v-model="systemType"
<el-select v-model="form.type"
clearable
placeholder="请选择系统类型"
@change="initData">
<el-option v-for="(item,index) in systemTypeList"
:key="index"
:label="item.label"
:value="item.value"></el-option>
<el-option v-for="(item, i) in types"
:key="i"
:label="item"
:value="i"></el-option>
</el-select>
</el-form-item>
</el-col>
@ -41,7 +41,7 @@
<el-form-item>
<el-input placeholder="请输入系统名称"
prefix-icon="el-icon-search"
v-model.trim="systemSearch"
v-model.trim="form.systemName"
clearable></el-input>
</el-form-item>
</el-col>
@ -56,7 +56,7 @@
<p class="hr_tag"></p>
<span>服务列表</span>
</div>
<el-table :data="systemData"
<el-table :data="list"
class="table"
stripe
header-align="center">
@ -73,7 +73,7 @@
label="系统类型"
align="center">
<template slot-scope="scope">
{{ systemTypeKeys[scope.row.type] }}
{{ types[scope.row.type] }}
</template>
</el-table-column>
<el-table-column prop="supplierName"
@ -83,14 +83,14 @@
label="系统归属"
align="center">
<template slot-scope="scope">
{{ systemBelongKeys[scope.row.belong] }}
{{ belongs[scope.row.belong] }}
</template>
</el-table-column>
<el-table-column prop="state"
label="系统状态"
align="center">
<template slot-scope="scope">
{{ systemStatusKeys[scope.row.state] }}
{{ states[scope.row.state] }}
</template>
</el-table-column>
<el-table-column prop="payamount"
@ -126,8 +126,8 @@
<el-pagination background
@current-change="handleCurrentChange"
layout="total, prev, pager, next"
:current-page="pageNo"
:total="totals">
:current-page="page"
:total="total">
</el-pagination>
</div>
</el-card>
@ -136,56 +136,32 @@
<script>
import Setting from "@/setting";
import Cookie from 'js-cookie'
import qs from 'qs'
export default {
data () {
return {
userId: this.$store.state.userLoginId,
token: btoa(sessionStorage.getItem('token')),
systemAttribution: "",
systemType: "",
systemSearch: "",
searchTimer: null,
systemData: [],
totals: 0,
systemBelongList: [
{
label: "外部产品",
value: 1
form: {
belong: this.$route.query.belong || '',
type: this.$route.query.type ? +this.$route.query.type : '',
systemName: this.$route.query.systemName || ''
},
{
label: "内部系统",
value: 0
}
],
systemBelongKeys: {
searchTimer: null,
list: [],
total: 0,
belongs: {
1: '外部产品',
0: '内部系统'
},
systemTypeList: [
{
label: "编程类",
value: 0
},
{
label: "流程类",
value: 1
}
],
systemTypeKeys: {
0: '编程类',
1: '流程类'
},
systemStatusKeys: {
0: '运行中',
1: '默认'
},
pageNo: +this.$route.query.page || 1,
types: ['编程类', '流程类'],
states: ['运行中', '默认'],
page: +this.$route.query.page || 1,
pageSize: 10
};
},
watch: {
systemSearch: function (val) {
'form.systemName': function (val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.initData();
@ -193,40 +169,44 @@ export default {
}
},
mounted () {
const { query } = this.$route
if (query.page) {
this.$router.push('/configure').catch(() => { })
}
this.getData();
},
methods: {
initData () {
this.pageNum = 1;
this.page = 1;
this.getData();
},
getData () {
const sid = this.$store.state.dataPer.find(e => e.permissionName === '服务配置')
let data = {
belong: this.systemAttribution,
type: this.systemType,
systemName: this.systemSearch,
pageNum: this.pageNo,
...this.form,
pageNum: this.page,
pageSize: this.pageSize,
supplierId: sid ? sid.supplierId : ''
};
this.$post(this.api.queryServiceConfig, data).then(res => {
this.systemData = res.serviceList.records;
this.totals = res.serviceList.total;
this.list = res.serviceList.records;
this.total = res.serviceList.total;
}).catch(res => {
});
},
handleCurrentChange (val) {
this.pageNo = val;
this.page = val;
this.$router.push(`configure?page=${val}`)
this.getData();
},
edit (row) {
this.$store.commit("configData", { config_id: row.systemId });
this.$router.push("/addconfigure");
// url
setReferrer () {
this.$store.commit('setReferrer', `${this.$route.path}?${qs.stringify(this.form)}&page=${this.page}`)
},
//
toBackstage (row) {
this.setReferrer()
if (row.systemId == 19) {
location.href = `${Setting.sandPath}/#/config?token=${sessionStorage.getItem('token')}&admin=1&referrer=${encodeURIComponent(location.href)}`
} else {
@ -234,21 +214,13 @@ export default {
}
},
getIntoProject (row) {
this.setReferrer()
this.$router.push(`/projectList?systemId=${row.systemId}&show=1&name=${row.systemName}`)
},
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)}`;
},
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>

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

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

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

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

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

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

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

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

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

@ -3,7 +3,7 @@
<el-card shadow="hover"
class="m-b-20">
<div class="flex-between">
<el-page-header @back="goBack"
<el-page-header @back="back"
:content="'课程内容/' + (sorting ? '更改排序' : '内容设置')"></el-page-header>
</div>
</el-card>
@ -415,11 +415,11 @@ export default {
//
if (window.history && window.history.pushState) {
history.pushState(null, null, document.URL);
window.addEventListener("popstate", this.goBack, false);
window.addEventListener("popstate", this.back, false);
}
},
destroyed () {
window.removeEventListener("popstate", this.goBack, false);
window.removeEventListener("popstate", this.back, false);
},
methods: {
getData () {
@ -427,11 +427,9 @@ export default {
.then(res => {
this.chapters = res.chapterList;
})
.catch(err => {
});
.catch(err => { });
},
goBack () {
back () {
//
if (this.previewing) {
this.closeIframe();
@ -454,7 +452,7 @@ export default {
this.sorting = false
}
} 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.showProgress = true
},
handleExceed (files, fileList) {
util.warningMsg(
`当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!`
);
},
uploadSuccess (file) {
this.uploading = false;
this.fileId = ''
@ -509,31 +502,6 @@ export default {
this.fileUrl = file.url;
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) {
const suf = ext.toLowerCase()
if ("jpg,jpeg,png,gif,svg,psd".includes(suf)) return "图片";

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

@ -2,89 +2,157 @@
<!-- 院校创建 -->
<div style="padding-top: 24px">
<div class="tool">
<ul class="filter" style="align-items: flex-start">
<ul class="filter"
style="align-items: flex-start">
<li>
<label>可见范围</label>
<el-select v-model="form.visibleRange" clearable placeholder="请选择可见范围" @change="getData">
<el-option v-for="(item,index) in regions" :key="index" :label="item.name" :value="item.id"></el-option>
<el-select v-model="form.visibleRange"
clearable
placeholder="请选择可见范围"
@change="getData">
<el-option v-for="(item,index) in regions"
:key="index"
:label="item.name"
:value="item.id"></el-option>
</el-select>
</li>
<li>
<label>课程分类</label>
<el-select v-model="form.categoryId" clearable 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 v-model="form.categoryId"
clearable
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>
</li>
<li>
<label>课程类型</label>
<el-select v-model="form.courseType" clearable placeholder="请选择课程类型" @change="getData">
<el-option v-for="(item,index) in types" :key="index" :label="item.name" :value="item.id"></el-option>
<el-select v-model="form.courseType"
clearable
placeholder="请选择课程类型"
@change="getData">
<el-option v-for="(item,index) in types"
:key="index"
:label="item.name"
:value="item.id"></el-option>
</el-select>
</li>
<li>
<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>
</ul>
<div>
<!-- <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>
<el-table :data="list" class="table" 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">
<el-table :data="list"
class="table"
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">
{{ scope.$index + (page - 1) * pageSize + 1 }}
</template>
</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 label="可见范围" align="center">
<el-table-column label="可见范围"
align="center">
<template slot-scope="scope">
{{ regionName[scope.row.visibleRange] }}
</template>
</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 prop="courseClassification" label="课程类型" align="center">
<el-table-column prop="courseClassification"
label="课程类型"
align="center">
<template slot-scope="scope">
{{ scope.row.courseType == 1 ? '付费' : '免费' }}
</template>
</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 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 label="操作" align="center" width="250">
<el-table-column label="操作"
align="center"
width="250">
<template slot-scope="scope">
<el-button v-auth="'院校创建:编辑信息'" type="text" @click="editCourse(scope.row)">编辑信息</el-button>
<el-divider v-auth="'院校创建:编辑信息'" direction="vertical"></el-divider>
<el-button v-auth="'院校创建:内容设置'" 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>
<el-button v-auth="'院校创建:编辑信息'"
type="text"
@click="editCourse(scope.row)">编辑信息</el-button>
<el-divider v-auth="'院校创建:编辑信息'"
direction="vertical"></el-divider>
<el-button v-auth="'院校创建:内容设置'"
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>
</el-table-column>
<el-table-column label="可授权状态" align="center" width="120">
<el-table-column label="可授权状态"
align="center"
width="120">
<template slot-scope="scope">
<el-switch
v-auth="'院校创建:禁用'"
<el-switch v-auth="'院校创建:禁用'"
v-model="scope.row.ztOpen"
:active-value="0"
:inactive-value="1"
style="margin: 0 10px 0 5px"
:active-text="scope.row.ztOpen ? '关' : '开'"
@change="switchOff($event,scope.row,scope.$index)"
></el-switch>
@change="switchOff($event,scope.row,scope.$index)"></el-switch>
</template>
</el-table-column>
</el-table>
<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>
</div>
</div>
@ -93,10 +161,10 @@
<script>
import util from "@/libs/util";
import Setting from '@/setting'
import qs from 'qs'
export default {
data() {
data () {
return {
timer: null,
regionName: ['本校内', '全平台可见', '指定院校区域'],
regions: [
{
@ -131,11 +199,11 @@ export default {
}
],
form: {
visibleRange: '',
categoryId: '',
courseType: ''
keyWord: this.$route.query.keyWord || '',
visibleRange: this.$route.query.visibleRange ? +this.$route.query.visibleRange : '',
categoryId: +this.$route.query.categoryId || '',
courseType: this.$route.query.courseType ? +this.$route.query.courseType : '',
},
keyword: "",
classificationId: "",
list: [],
multipleSelection: [],
@ -146,30 +214,31 @@ export default {
};
},
watch: {
keyword: function(val) {
'form.keyWord': function (val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.initData();
}, 500);
}
},
mounted() {
mounted () {
const { query } = this.$route
if (query.page) {
this.$router.push('/theoreticalCourse').catch(() => { })
}
this.getClassification();
this.getData();
this.$once('hook:beforeDestroy', function() {
clearInterval(this.timer)
})
},
methods: {
//:
//
// 使
//1.
getList() {
getData () {
this.$post(this.api.listTheoreticalCourse, {
pageNum: this.page,
pageSize: this.pageSize,
keyWord: this.keyword,
createPlatform: 1,
platformSource: Setting.platformSource,
...this.form
@ -183,24 +252,11 @@ export default {
}).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.getData();
},
getClassification() {
getClassification () {
this.$post(this.api.queryAllCategoriesOfSchools).then(({ data }) => {
data.map((e, i) => {
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 + ')'
})
this.classificationList = data
}).catch(res => {})
}).catch(res => { })
},
changeType(type) {
changeType (type) {
this.classificationId = type;
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}`);
},
config(row) {
config (row) {
this.setReferrer()
this.$router.push(`/setTheoreticalCourse?id=${row.id}`);
},
addCourse() {
addCourse () {
this.setReferrer()
this.$router.push("/addTheoreticalCourse");
},
editCourse(row) {
editCourse (row) {
this.setReferrer()
this.$router.push(`/addTheoreticalCourse?id=${row.id}`);
},
handleDelete(row) {
handleDelete (row) {
this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", {
type: "warning"
})
@ -240,10 +304,10 @@ export default {
.catch(() => {
});
},
handleSelectionChange(val) {
handleSelectionChange (val) {
this.multipleSelection = val;
},
delAllData() {
delAllData () {
const list = this.multipleSelection
if (list.length != "") {
this.$confirm(`确定要删除吗?`, "提示", {
@ -266,18 +330,18 @@ export default {
util.errorMsg("请先选择数据 !");
}
},
handleCurrentChange(val) {
handleCurrentChange (val) {
this.page = val;
this.getData();
},
switchOff(val, row) {
switchOff (val, row) {
this.$post(this.api.disabledTheoreticalCourse, {
courseId: row.id,
isOpen: val,
type: 0 // (01)
}).then(res => {
val == 1 ? util.warningMsg('禁用成功') : util.successMsg('启用成功')
}).catch(err => {})
}).catch(err => { })
}
}
};

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

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

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

@ -12,13 +12,6 @@
<el-form label-width="80px">
<el-row>
<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-select v-model="form.provinces"
clearable
@ -212,6 +205,7 @@
<script>
import Setting from '@/setting'
import qs from 'qs'
export default {
name: 'user',
data () {
@ -219,18 +213,17 @@ export default {
platformId: Setting.platformId,
searchTimer: null,
form: {
name: '',
countries: '中国',
provinces: '',
city: '',
platformId: '',
schoolId: '',
provinces: +this.$route.query.provinces || '',
city: +this.$route.query.provinces || '',
platformId: +this.$route.query.platformId || '',
schoolId: +this.$route.query.schoolId || '',
accountRole: '',
keyword: '',
date: '',
startTime: '',
endTime: '',
month: ''
keyword: this.$route.query.keyword || '',
date: this.$route.query.startTime ? [this.$route.query.startTime, this.$route.query.endTime] : [],
startTime: this.$route.query.startTime || '',
endTime: this.$route.query.endTime || '',
month: +this.$route.query.month || ''
},
accountRoleList: [{
name: '超级管理员',
@ -323,6 +316,11 @@ export default {
}
},
mounted () {
const { query } = this.$route
if (query.page) {
this.$router.push('/user').catch(() => { })
}
this.getData()
this.getSchoolData();
},
@ -418,6 +416,7 @@ export default {
this.getData()
},
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' : ''}`)
},
handleDelete (row) {

Loading…
Cancel
Save