整体风格调整

dev_202412
yujialong 2 months ago
parent 36c1a45fe2
commit f508148177
  1. 3
      src/assets/css/main.css
  2. BIN
      src/assets/img/workbench/16.png
  3. 5
      src/components/Sidebar.vue
  4. 3
      src/utils/api.js
  5. 8
      src/views/course/AddCurriculum.vue
  6. 147
      src/views/course/Curriculum.vue
  7. 2
      src/views/course/contentSettings.vue
  8. 14
      src/views/customer/AddCustomer.vue
  9. 123
      src/views/customer/Order.vue
  10. 446
      src/views/customer/Permission.vue
  11. 2
      src/views/customer/customer.vue
  12. 1483
      src/views/data/Framework.vue
  13. 191
      src/views/data/Introduce.vue
  14. 1303
      src/views/data/Product.vue
  15. 116
      src/views/information/contentManage/contentList.vue
  16. 2
      src/views/market/index.vue
  17. 4
      src/views/match/add/set.vue
  18. 2
      src/views/match/add/step1.vue
  19. 2
      src/views/match/add/template.vue
  20. 4
      src/views/match/list/index.vue
  21. 4
      src/views/match/manage/abnormalTeam.vue
  22. 2
      src/views/match/manage/matchArch.vue
  23. 4
      src/views/match/manage/matchArchList.vue
  24. 2
      src/views/match/manage/matchInfo.vue
  25. 89
      src/views/match/manage/matchProgress.vue
  26. 6
      src/views/match/manage/matchRank.vue
  27. 6
      src/views/match/manage/matchSignup.vue
  28. 69
      src/views/match/manage/notice.vue
  29. 6
      src/views/match/manage/otherArchList.vue
  30. 4
      src/views/match/manage/theoryReport.vue
  31. 2
      src/views/match/manage/trialReport.vue
  32. 16
      src/views/order/AddOrder.vue
  33. 2
      src/views/order/Order.vue
  34. 537
      src/views/order/selectClient.vue
  35. 510
      src/views/parner/mobileRole.vue
  36. 508
      src/views/parner/pcRole.vue
  37. 310
      src/views/parner/rate.vue
  38. 2
      src/views/parner/staff.vue
  39. 4
      src/views/parnerOperation/schemeSet.vue
  40. 603
      src/views/serve/AddConfigure.vue
  41. 2
      src/views/serve/Configure.vue
  42. 139
      src/views/serve/backstage/model.vue
  43. 151
      src/views/serve/backstage/sourceModel.vue
  44. 4
      src/views/serve/projectAdd.vue
  45. 155
      src/views/serve/projectList.vue
  46. 2
      src/views/shop/add.vue
  47. 8
      src/views/shop/list.vue
  48. 503
      src/views/system/dic.vue
  49. 161
      src/views/system/log.vue
  50. 703
      src/views/system/role.vue
  51. 2
      src/views/system/staff.vue
  52. 66
      src/views/system/taskLog.vue
  53. 446
      src/views/theoreticalCourse/contentSettings/index.vue
  54. 4
      src/views/theoreticalCourse/list/buildPlatform/index.vue
  55. 150
      src/views/theoreticalCourse/list/courseManagement/index.vue
  56. 338
      src/views/theoreticalCourse/list/sortManagement/index.vue
  57. 2
      src/views/theoryExam/list/program.vue
  58. 2
      src/views/theoryExam/list/system.vue
  59. 2
      src/views/user/AddUser.vue
  60. 4
      src/views/user/User.vue
  61. 65
      src/views/workbench/index.vue

@ -329,9 +329,10 @@ li {
color: #fff; color: #fff;
} }
#app .el-table th { #app .el-table th {
background-color: #062c87 !important; background-color: #fafafc !important;
font-size: 16px; font-size: 16px;
font-weight: normal; font-weight: normal;
color: #000;
} }
.el-input__inner[type='number'] { .el-input__inner[type='number'] {

Binary file not shown.

After

Width:  |  Height:  |  Size: 702 B

@ -131,8 +131,9 @@ export default {
border-bottom: 0; border-bottom: 0;
&>.el-menu-item { &>.el-menu-item {
height: 36px; height: 56px;
line-height: 36px; padding: 0 30px;
line-height: 56px;
} }
&>.el-menu-item.is-active { &>.el-menu-item.is-active {

@ -90,7 +90,8 @@ export default {
oneClickEnableVerification: `users/users/userAccount/oneClickEnableVerification`, oneClickEnableVerification: `users/users/userAccount/oneClickEnableVerification`,
getValueModule: `nakadai/nakadai/valueModuleManagement/getValueModule`, getValueModule: `nakadai/nakadai/valueModuleManagement/getValueModule`,
queryServiceConfig: `nakadai/nakadai/serviceConfiguration/getAllService`, //查询服务配置 queryServiceConfig: `nakadai/nakadai/serviceConfiguration/getAllService`,
workbenchSystemDemonstration: `nakadai/nakadai/serviceConfiguration/workbenchSystemDemonstration`,
// 项目管理 // 项目管理
avgValues: `occupationlab/occupationlab/projectManage/avgValues`, // 平均分分配值 avgValues: `occupationlab/occupationlab/projectManage/avgValues`, // 平均分分配值
deleteProjectManage: `occupationlab/occupationlab/projectManage/deleteProjectManage`, // 新增项目管理 deleteProjectManage: `occupationlab/occupationlab/projectManage/deleteProjectManage`, // 新增项目管理

@ -102,7 +102,7 @@
</div> </div>
<div class="border-b-dashed"></div> <div class="border-b-dashed"></div>
<div> <div>
<el-table :data="practiceData" class="table" stripe header-align="center" max-height="400" <el-table :data="practiceData" class="table" header-align="center" max-height="400"
@selection-change="handleSelectionPractice"> @selection-change="handleSelectionPractice">
<el-table-column type="selection" width="55" align="center"></el-table-column> <el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column> <el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
@ -152,7 +152,7 @@
<div class="border-b-dashed"></div> <div class="border-b-dashed"></div>
<!-- 实训配置 --> <!-- 实训配置 -->
<div> <div>
<el-table :data="assessmentData" class="table" stripe header-align="center" max-height="400" <el-table :data="assessmentData" class="table" header-align="center" max-height="400"
@selection-change="handleSelectionAssessment"> @selection-change="handleSelectionAssessment">
<el-table-column type="selection" width="55" align="center"></el-table-column> <el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column> <el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
@ -201,7 +201,7 @@
<div class="border-b-dashed"></div> <div class="border-b-dashed"></div>
<!-- 实训配置 --> <!-- 实训配置 -->
<div> <div>
<el-table :data="matches" class="table" stripe header-align="center" max-height="400" <el-table :data="matches" class="table" header-align="center" max-height="400"
@selection-change="handleSelectionMatch"> @selection-change="handleSelectionMatch">
<el-table-column type="selection" width="55" align="center"></el-table-column> <el-table-column type="selection" width="55" align="center"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column> <el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
@ -285,7 +285,7 @@
</div> </div>
<el-input style="width: 200px;margin-bottom: 20px;" placeholder="请输入项目名称" prefix-icon="el-icon-search" <el-input style="width: 200px;margin-bottom: 20px;" placeholder="请输入项目名称" prefix-icon="el-icon-search"
v-model.trim="checkedKeyword" clearable></el-input> v-model.trim="checkedKeyword" clearable></el-input>
<el-table :data="checkeds" class="table" stripe header-align="center" max-height="470"> <el-table :data="checkeds" class="table" header-align="center" max-height="470">
<el-table-column type="index" width="55" label="序号" align="center"></el-table-column> <el-table-column type="index" width="55" label="序号" align="center"></el-table-column>
<el-table-column prop="systemName" label="系统名称" align="center"></el-table-column> <el-table-column prop="systemName" label="系统名称" align="center"></el-table-column>
<el-table-column prop="projectName" width="80" label="系统类型" align="center"> <el-table-column prop="projectName" width="80" label="系统类型" align="center">

@ -1,7 +1,6 @@
<template> <template>
<div> <div>
<el-card shadow="hover" <el-card shadow="hover" class="mgb20">
class="mgb20">
<div> <div>
<div class="flex-center mgb20"> <div class="flex-center mgb20">
<p class="hr_tag"></p> <p class="hr_tag"></p>
@ -11,63 +10,42 @@
<el-form label-width="80px"> <el-form label-width="80px">
<el-col :span="4"> <el-col :span="4">
<el-form-item label="学科类别"> <el-form-item label="学科类别">
<el-select v-model="form.categoryId" <el-select v-model="form.categoryId" clearable @change="getProfessionalClass()" @clear="clearClass()">
clearable <el-option v-for="(item, index) in subjectList" :key="index" :label="item.disciplineName"
@change="getProfessionalClass()" :value="item.disciplineId"></el-option>
@clear="clearClass()">
<el-option v-for="(item,index) in subjectList"
:key="index"
:label="item.disciplineName"
:value="item.disciplineId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item label="专业类"> <el-form-item label="专业类">
<el-select v-model="form.professionalCategoryId" <el-select v-model="form.professionalCategoryId" clearable :disabled="form.categoryId ? false : true"
clearable @change="getProfessional()" @clear="clearProfess()">
:disabled="form.categoryId ? false : true" <el-option v-for="(item, index) in ProfessionalClassList" :key="index"
@change="getProfessional()" :label="item.professionalClassName" :value="item.professionalClassId"></el-option>
@clear="clearProfess()">
<el-option v-for="(item,index) in ProfessionalClassList"
:key="index"
:label="item.professionalClassName"
:value="item.professionalClassId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item label="专业"> <el-form-item label="专业">
<el-select v-model="form.professionalId" <el-select v-model="form.professionalId" clearable
clearable :disabled="form.professionalCategoryId ? false : true" @change="getData()">
:disabled="form.professionalCategoryId ? false : true" <el-option v-for="(item, index) in ProfessionalList" :key="index" :label="item.professionalName"
@change="getData()"> :value="item.professionalId"></el-option>
<el-option v-for="(item,index) in ProfessionalList"
:key="index"
:label="item.professionalName"
:value="item.professionalId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item label="课程类别"> <el-form-item label="课程类别">
<el-select v-model="form.curriculumType" <el-select v-model="form.curriculumType" clearable @change="getData()">
clearable <el-option label="理论课程" :value="0"></el-option>
@change="getData()"> <el-option label="实训课程" :value="1"></el-option>
<el-option label="理论课程"
:value="0"></el-option>
<el-option label="实训课程"
:value="1"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item> <el-form-item>
<el-input placeholder="请输入课程名称" <el-input placeholder="请输入课程名称" prefix-icon="el-icon-search" v-model="form.curriculumName" clearable
prefix-icon="el-icon-search" @keyup.enter.native="onSearch"></el-input>
v-model="form.curriculumName"
clearable
@keyup.enter.native="onSearch"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
@ -75,97 +53,53 @@
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" <el-card shadow="hover" class="card">
class="card">
<div class="flex-between mgb20"> <div class="flex-between mgb20">
<div class="flex-center"> <div class="flex-center">
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>课程列表</span> <span>课程列表</span>
</div> </div>
<div> <div>
<el-button type="primary" <el-button type="primary" round @click="addcourse" v-auth>新增课程</el-button>
round <el-button type="primary" round @click="delAllSelection" v-auth>批量删除</el-button>
@click="addcourse"
v-auth>新增课程</el-button>
<el-button type="primary"
round
@click="delAllSelection"
v-auth>批量删除</el-button>
</div> </div>
</div> </div>
<el-table v-loading="loading" <el-table v-loading="loading" :data="courseData" class="table" ref="table" header-align="center"
:data="courseData" @selection-change="handleSelectionChange" :row-key="getRowKeys">
class="table" <el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
ref="table" <el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
stripe <el-table-column prop="curriculumName" label="课程名称" align="center"></el-table-column>
header-align="center" <el-table-column prop="curriculumType" label="课程类型" 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">
<template slot-scope="scope"> <template slot-scope="scope">
<span class="ellipsis">{{ courseTypeStatus[scope.row.curriculumType] }}</span> <span class="ellipsis">{{ courseTypeStatus[scope.row.curriculumType] }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="userName" <el-table-column prop="userName" label="创建人" align="center"></el-table-column>
label="创建人" <el-table-column label="配置的实训应用" align="center">
align="center"></el-table-column>
<el-table-column label="配置的实训应用"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span class="ellipsis">{{ scope.row.sysName }}</span> <span class="ellipsis">{{ scope.row.sysName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="orderVolume" <el-table-column prop="orderVolume" label="订单量" align="center"></el-table-column>
label="订单量" <el-table-column prop="expectedCourse" label="预计课时" align="center"></el-table-column>
align="center"></el-table-column> <el-table-column label="上架/下架" align="center">
<el-table-column prop="expectedCourse"
label="预计课时"
align="center"></el-table-column>
<el-table-column label="上架/下架"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch v-model="scope.row.isShelves" <el-switch v-model="scope.row.isShelves" :active-value="1" :inactive-value="0"
:active-value="1" @change="changeSwitch($event, scope.row)" v-auth="'/curriculum:上下架'">
:inactive-value="0"
@change="changeSwitch($event, scope.row)"
v-auth="'/curriculum:上下架'">
</el-switch> </el-switch>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" <el-table-column label="操作" align="center">
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" <el-button type="text" @click="edit(scope.row)" v-auth>编辑</el-button>
@click="edit(scope.row)" <el-button type="text" @click="config(scope.row)" v-auth>内容设置</el-button>
v-auth>编辑</el-button> <el-button type="text" @click="handleDelete(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> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background <el-pagination background @current-change="handleCurrentChange" :current-page="page"
@current-change="handleCurrentChange" layout="total, prev, pager, next" :total="totals"></el-pagination>
:current-page="page"
layout="total, prev, pager, next"
:total="totals"></el-pagination>
</div> </div>
</el-card> </el-card>
</div> </div>
@ -371,7 +305,6 @@ export default {
<style scoped> <style scoped>
.card { .card {
min-height: calc(100vh - 300px); min-height: calc(100vh - 300px);
} }
</style> </style>

@ -45,7 +45,7 @@
</div> </div>
</div> </div>
<el-table :data="chapter.subsectionList" class="table" stripe header-align="center" row-key="id"> <el-table :data="chapter.subsectionList" class="table" header-align="center" row-key="id">
<el-table-column v-if="sorting" width="55" align="center"> <el-table-column v-if="sorting" width="55" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox v-model="scope.row.check"></el-checkbox> <el-checkbox v-model="scope.row.check"></el-checkbox>

@ -130,8 +130,8 @@
<el-button type="primary" @click="exportList">导出列表</el-button> <el-button type="primary" @click="exportList">导出列表</el-button>
</div> </div>
</div> </div>
<el-table :data="products" class="orderTable" stripe header-align="center" <el-table :data="products" class="orderTable" header-align="center" @selection-change="handleSelectionChange"
@selection-change="handleSelectionChange" row-key="id"> row-key="id">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> <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>
@ -191,8 +191,8 @@
v-model="form3.keyword"></el-input> v-model="form3.keyword"></el-input>
</div> </div>
</div> </div>
<el-table :data="orders" class="orderTable" stripe header-align="center" <el-table :data="orders" class="orderTable" header-align="center" @selection-change="handleSelectionChange"
@selection-change="handleSelectionChange" row-key="orderId"> row-key="orderId">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> <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>
@ -234,7 +234,7 @@
clearable></el-input> clearable></el-input>
</div> </div>
</div> </div>
<el-table :data="contractInformations" class="table" stripe header-align="center"> <el-table :data="contractInformations" class="table" header-align="center">
<el-table-column type="index" width="100" label="序号" align="center"> <el-table-column type="index" width="100" label="序号" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="contractNumber" label="订单号" align="center"></el-table-column> <el-table-column prop="contractNumber" label="订单号" align="center"></el-table-column>
@ -270,7 +270,7 @@
v-model="bmsKeyword"></el-input> v-model="bmsKeyword"></el-input>
</div> </div>
</div> </div>
<el-table :data="bms" class="table" stripe header-align="center"> <el-table :data="bms" class="table" header-align="center">
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column> <el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="userName" label="姓名" width="200" align="center"> <el-table-column prop="userName" label="姓名" width="200" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
@ -336,7 +336,7 @@
clearable></el-input> clearable></el-input>
<i class="el-icon-circle-plus plus-cus" @click="addCustomer"></i> <i class="el-icon-circle-plus plus-cus" @click="addCustomer"></i>
</div> </div>
<el-table :data="customers" class="table" ref="table" stripe header-align="center" row-key="customerId"> <el-table :data="customers" class="table" ref="table" header-align="center" row-key="customerId">
<el-table-column type="index" width="100" label="序号" align="center"> <el-table-column type="index" width="100" label="序号" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.$index + (pageCustomer - 1) * pageSizeCustomer + 1 }} {{ scope.$index + (pageCustomer - 1) * pageSizeCustomer + 1 }}

@ -1,11 +1,8 @@
<template> <template>
<div> <div>
<el-card shadow="hover" <el-card shadow="hover" class="mgb20">
class="mgb20">
<div class="flex-between"> <div class="flex-between">
<div class="per_title" <div class="per_title" v-preventReClick @click="back">
v-preventReClick
@click="back">
<i class="el-icon-arrow-left"></i> <i class="el-icon-arrow-left"></i>
<span class="per_back">返回</span> <span class="per_back">返回</span>
<span class="per_school">{{ $route.query.userName }}的订单</span> <span class="per_school">{{ $route.query.userName }}的订单</span>
@ -13,80 +10,46 @@
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" <el-card shadow="hover" class="card">
class="card">
<div class="flex-between mgb20"> <div class="flex-between mgb20">
<div class="flex-center"> <div class="flex-center">
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>订单列表</span> <span>订单列表</span>
</div> </div>
<el-input style="width: 300px" <el-input style="width: 300px" placeholder="请输入订单编号/产品名称" prefix-icon="el-icon-search" v-model="keyword"
placeholder="请输入订单编号/产品名称" clearable></el-input>
prefix-icon="el-icon-search"
v-model="keyword"
clearable></el-input>
</div> </div>
<el-table :data="orderData" <el-table :data="orderData" class="table" ref="table" header-align="center"
class="table" @selection-change="handleSelectionChange" :row-key="getRowKeys">
ref="table" <el-table-column type="index" width="100" label="序号" align="center">
stripe
header-align="center"
@selection-change="handleSelectionChange"
:row-key="getRowKeys">
<el-table-column type="index"
width="100"
label="序号"
align="center">
</el-table-column> </el-table-column>
<el-table-column prop="orderNumber" <el-table-column prop="orderNumber" label="订单编号" align="center">
label="订单编号"
align="center">
</el-table-column> </el-table-column>
<el-table-column prop="customerName" <el-table-column prop="customerName" label="客户名称" align="center">
label="客户名称"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ customerName }} {{ customerName }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="productName" <el-table-column prop="productName" label="产品内容" align="center" show-overflow-tooltip></el-table-column>
label="产品内容" <el-table-column prop="orderAmount" label="订单金额(元)" align="center">
align="center"
show-overflow-tooltip></el-table-column>
<el-table-column prop="orderAmount"
label="订单金额(元)"
align="center">
</el-table-column> </el-table-column>
<el-table-column prop="createTime" <el-table-column prop="createTime" label="订单日期" align="center">
label="订单日期"
align="center">
</el-table-column> </el-table-column>
<el-table-column prop="orderType" <el-table-column prop="orderType" label="订单类型" align="center">
label="订单类型"
align="center">
</el-table-column> </el-table-column>
<el-table-column prop="orderStatus" <el-table-column prop="orderStatus" label="订单状态" align="center">
label="订单状态"
align="center">
</el-table-column> </el-table-column>
<el-table-column prop="orderNature" <el-table-column prop="orderNature" label="订单性质" align="center">
label="订单性质"
align="center">
</el-table-column> </el-table-column>
<el-table-column label="操作" <el-table-column label="操作" align="center">
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" <el-button type="text" @click="toDetail(scope.row)">查看</el-button>
@click="toDetail(scope.row)">查看</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background <el-pagination background layout="total, prev, pager, next" @current-change="handleCurrentChange"
layout="total, prev, pager, next" :current-page="page" :total="totals">
@current-change="handleCurrentChange"
:current-page="page"
:total="totals">
</el-pagination> </el-pagination>
</div> </div>
</el-card> </el-card>
@ -179,33 +142,35 @@ export default {
<style scoped> <style scoped>
.card { .card {
min-height: calc(100vh - 300px); min-height: calc(100vh - 300px);
} }
.mag { .mag {
margin-right: 20px; margin-right: 20px;
} }
.cell { .cell {
white-space: pre-wrap; white-space: pre-wrap;
width: 140px; width: 140px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
display: -webkit-box; display: -webkit-box;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
line-clamp: 2; line-clamp: 2;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} }
.tags { .tags {
border: none; border: none;
background: none; background: none;
color: #000; color: #000;
white-space: pre-wrap; white-space: pre-wrap;
width: 140px; width: 140px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
display: -webkit-box; display: -webkit-box;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
line-clamp: 2; line-clamp: 2;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} }
</style> </style>

@ -1,244 +1,248 @@
<template> <template>
<div> <div>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="24"> <el-col :span="24">
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="mgb20">
<div class="per_title" v-preventReClick @click="goback()"> <div class="per_title" v-preventReClick @click="goback()">
<i class="el-icon-arrow-left"></i> <i class="el-icon-arrow-left"></i>
<span class="per_back">返回</span> <span class="per_back">返回</span>
<span class="per_school">{{customerName}}</span> <span class="per_school">{{ customerName }}</span>
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="mgb20">
<div class="flex-center mgb20 user_header"> <div class="flex-center mgb20 user_header">
<p class="addhr_tag"></p> <p class="addhr_tag"></p>
<span>代理配置</span> <span>代理配置</span>
</div> </div>
<div class="flex-between"> <div class="flex-between">
<span>内网地址配置</span> <span>内网地址配置</span>
<div class="border_lf flex-column"> <div class="border_lf flex-column">
<p class="marb30">平台服务</p> <p class="marb30">平台服务</p>
<div class="flex-center"> <div class="flex-center">
<label>IP</label> <label>IP</label>
<el-input placeholder="请输入IP地址" class="mar_input"></el-input> <el-input placeholder="请输入IP地址" class="mar_input"></el-input>
<label>端口</label> <label>端口</label>
<el-input placeholder="请输入端口号"></el-input> <el-input placeholder="请输入端口号"></el-input>
</div> </div>
</div> </div>
<div class="border_lf pad_none flex-column"> <div class="border_lf pad_none flex-column">
<p class="marb30">流媒体服务</p> <p class="marb30">流媒体服务</p>
<div class="flex-center"> <div class="flex-center">
<label>IP</label> <label>IP</label>
<el-input placeholder="请输入IP地址" class="mar_input"></el-input> <el-input placeholder="请输入IP地址" class="mar_input"></el-input>
<label>端口</label> <label>端口</label>
<el-input placeholder="请输入端口号"></el-input> <el-input placeholder="请输入端口号"></el-input>
</div> </div>
</div> </div>
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="mgb20">
<div class="flex-center mgb20"> <div class="flex-center mgb20">
<p class="addhr_tag"></p> <p class="addhr_tag"></p>
<span>应用列表</span> <span>应用列表</span>
</div> </div>
<el-table :data="permissionData" class="table" stripe :span-method="SpanMethod" header-align="center"> <el-table :data="permissionData" class="table" :span-method="SpanMethod" header-align="center">
<el-table-column prop="id" label="序号" align="center"> <el-table-column prop="id" label="序号" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="age" label="应用名称" align="center"> <el-table-column prop="age" label="应用名称" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="storeName" label="使用期限" align="center"> <el-table-column prop="storeName" label="使用期限" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="total" label="启用时间" align="center"> <el-table-column prop="total" label="启用时间" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="payamount" label="结束时间" align="center"> <el-table-column prop="payamount" label="结束时间" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="payamount" label="剩余时间" align="center"> <el-table-column prop="payamount" label="剩余时间" align="center">
</el-table-column> </el-table-column>
<el-table-column label="IP" align="center"> <el-table-column label="IP" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="tab_temp" v-if="scope.row.Intranet != ''"> <div class="tab_temp" v-if="scope.row.Intranet != ''">
<div class="flex-center"> <div class="flex-center">
<label>内网:</label> <label>内网:</label>
<el-input v-model="scope.row.Intranet" placeholder="请输入IP地址"></el-input> <el-input v-model="scope.row.Intranet" placeholder="请输入IP地址"></el-input>
</div> </div>
<div class="flex-center mar10"> <div class="flex-center mar10">
<label>外网:</label> <label>外网:</label>
<el-input v-model="scope.row.extranet" placeholder="请输入端口号"></el-input> <el-input v-model="scope.row.extranet" placeholder="请输入端口号"></el-input>
</div> </div>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="端口" align="center"> <el-table-column label="端口" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="tab_temp" v-if="scope.row.Intranet != ''"> <div class="tab_temp" v-if="scope.row.Intranet != ''">
<div class="flex-center"> <div class="flex-center">
<label>内网:</label> <label>内网:</label>
<el-input v-model="scope.row.Intranet" placeholder="请输入内网IP地址"></el-input> <el-input v-model="scope.row.Intranet" placeholder="请输入内网IP地址"></el-input>
</div> </div>
<div class="flex-center mar10"> <div class="flex-center mar10">
<label>外网:</label> <label>外网:</label>
<el-input v-model="scope.row.extranet" placeholder="请输入外网IP地址"></el-input> <el-input v-model="scope.row.extranet" placeholder="请输入外网IP地址"></el-input>
</div> </div>
</div> </div>
<div v-else> <div v-else>
<el-button type="plain" @click="chooseIp">选择IP与端口</el-button> <el-button type="plain" @click="chooseIp">选择IP与端口</el-button>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch v-model="scope.row.swtich" active-text="开启" inactive-text="关闭"
v-model="scope.row.swtich" @change="changeSwitch(scope.row)">
active-text="开启" </el-switch>
inactive-text="关闭" </template>
@change="changeSwitch(scope.row)"> </el-table-column>
</el-switch> </el-table>
</template> <div class="pagination">
</el-table-column> <el-pagination background layout="total, prev, pager, next" :total="totals">
</el-table> </el-pagination>
<div class="pagination"> </div>
<el-pagination background layout="total, prev, pager, next" :total="totals"> </el-card>
</el-pagination> </el-col>
</div> </el-row>
</el-card>
</el-col>
</el-row>
<!-- 选择IP --> <!-- 选择IP -->
<el-dialog :visible.sync="ipVisible" width="70%" center> <el-dialog :visible.sync="ipVisible" width="70%" center>
<div class="flex-center mgb20"> <div class="flex-center mgb20">
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>客户列表</span> <span>客户列表</span>
</div>
<el-table :data="permissionData" class="table" header-align="center">
<el-table-column type="index" width="100" label="序号" align="center">
</el-table-column>
<el-table-column prop="age" label="服务器名称" align="center">
</el-table-column>
<el-table-column label="IP" align="center">
<template slot-scope="scope">
<div class="tab_temp">
<div class="flex-center">
<label>内网:</label>
<el-input v-model="scope.row.Intranet" placeholder="请输入IP地址"></el-input>
</div>
<div class="flex-center mar10">
<label>外网:</label>
<el-input v-model="scope.row.extranet" placeholder="请输入端口号"></el-input>
</div>
</div>
</template>
</el-table-column>
<el-table-column label="端口" align="center">
<template slot-scope="scope">
<div class="tab_temp">
<div class="flex-center">
<label>内网:</label>
<el-input v-model="scope.row.Intranet" placeholder="请输入内网IP地址"></el-input>
</div>
<div class="flex-center mar10">
<label>外网:</label>
<el-input v-model="scope.row.extranet" placeholder="请输入外网IP地址"></el-input>
</div>
</div> </div>
<el-table :data="permissionData" class="table" stripe header-align="center"> </template>
<el-table-column type="index" width="100" label="序号" align="center"> </el-table-column>
</el-table-column> <el-table-column label="选择" align="center">
<el-table-column prop="age" label="服务器名称" align="center"> <template slot-scope="scope">
</el-table-column> <i class="el-icon-success radio_icon"></i>
<el-table-column label="IP" align="center"> </template>
<template slot-scope="scope"> </el-table-column>
<div class="tab_temp"> </el-table>
<div class="flex-center"> <span slot="footer" class="dialog-footer">
<label>内网:</label> <el-button @click="teacherVisible = false"> </el-button>
<el-input v-model="scope.row.Intranet" placeholder="请输入IP地址"></el-input> <el-button type="primary" @click="editSure('teacherForm')"> </el-button>
</div> </span>
<div class="flex-center mar10"> </el-dialog>
<label>外网:</label> </div>
<el-input v-model="scope.row.extranet" placeholder="请输入端口号"></el-input>
</div>
</div>
</template>
</el-table-column>
<el-table-column label="端口" align="center">
<template slot-scope="scope">
<div class="tab_temp">
<div class="flex-center">
<label>内网:</label>
<el-input v-model="scope.row.Intranet" placeholder="请输入内网IP地址"></el-input>
</div>
<div class="flex-center mar10">
<label>外网:</label>
<el-input v-model="scope.row.extranet" placeholder="请输入外网IP地址"></el-input>
</div>
</div>
</template>
</el-table-column>
<el-table-column label="选择" align="center">
<template slot-scope="scope">
<i class="el-icon-success radio_icon"></i>
</template>
</el-table-column>
</el-table>
<span slot="footer" class="dialog-footer">
<el-button @click="teacherVisible = false"> </el-button>
<el-button type="primary" @click="editSure('teacherForm')"> </el-button>
</span>
</el-dialog>
</div>
</template> </template>
<script> <script>
export default { export default {
data (){ data () {
return { return {
customerName: this.$route.query.name, customerName: this.$route.query.name,
permissionData: [{ permissionData: [{
id: 1, id: 1,
age: '小额贷系统', age: '小额贷系统',
storeName: '1个月', storeName: '1个月',
total: '2019.01.02 11:00', total: '2019.01.02 11:00',
payamount: '2019.01.02 11:00', payamount: '2019.01.02 11:00',
payamount: '700d12h1min', payamount: '700d12h1min',
swtich: true, swtich: true,
Intranet: '10.20.202.1', Intranet: '10.20.202.1',
extranet: '10.20.202.1' extranet: '10.20.202.1'
}, },
{ {
id: 2, id: 2,
age: '小额贷系统', age: '小额贷系统',
storeName: '1个月', storeName: '1个月',
total: '2019.01.02 11:00', total: '2019.01.02 11:00',
payamount: '2019.01.02 11:00', payamount: '2019.01.02 11:00',
payamount: '700d12h1min', payamount: '700d12h1min',
swtich: true, swtich: true,
Intranet: '', Intranet: '',
extranet: '' extranet: ''
}], }],
totals: 1, totals: 1,
ipVisible: false ipVisible: false
} }
}, },
methods: { methods: {
SpanMethod({ row, column, rowIndex, columnIndex }) { SpanMethod ({ row, column, rowIndex, columnIndex }) {
if (rowIndex % 2 === 0) { if (rowIndex % 2 === 0) {
if (columnIndex === 6) { if (columnIndex === 6) {
if(!row.Intranet){ if (!row.Intranet) {
return [1, 2]; return [1, 2];
} }
}
// else if (columnIndex === 1) {
// return [0, 0];
// }
}
},
chooseIp(){
this.ipVisible = true
},
goback(){
this.$router.go(-1)
}
} }
// else if (columnIndex === 1) {
// return [0, 0];
// }
}
},
chooseIp () {
this.ipVisible = true
},
goback () {
this.$router.go(-1)
} }
}
}
</script> </script>
<style scoped> <style scoped>
.border_lf{ .border_lf {
border-left: 1px dashed #eee; border-left: 1px dashed #eee;
padding: 0 60px; padding: 0 60px;
} }
.border_lf label{
width: 120px; .border_lf label {
width: 120px;
} }
.pad_none{
padding: 0 0 0 60px; .pad_none {
padding: 0 0 0 60px;
} }
.mar_input{
margin-right: 80px; .mar_input {
margin-right: 80px;
} }
.marb30{
margin-bottom: 30px; .marb30 {
margin-bottom: 30px;
} }
.tab_temp label{
width: 60px; .tab_temp label {
width: 60px;
} }
.mar10{
margin-top: 10px; .mar10 {
margin-top: 10px;
} }
.radio_icon{
font-size: 26px; .radio_icon {
color: #9278FF; font-size: 26px;
color: #9278FF;
} }
</style> </style>

@ -57,7 +57,7 @@
<el-button type="primary" round @click="delAllSelection" v-auth>批量删除</el-button> <el-button type="primary" round @click="delAllSelection" v-auth>批量删除</el-button>
</div> </div>
</div> </div>
<el-table :data="listData" class="table" ref="table" stripe header-align="center" <el-table :data="listData" class="table" ref="table" header-align="center"
@selection-change="handleSelectionChange" row-key="customerId"> @selection-change="handleSelectionChange" row-key="customerId">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> <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">

File diff suppressed because it is too large Load Diff

@ -1,77 +1,51 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<div class="side"> <div class="side">
<el-tree ref="type" <el-tree ref="type" :data="typeList" node-key="id" accordion :default-expanded-keys="defaultActive"
:data="typeList" :current-node-key="categoryId" :props="defaultProps" :highlight-current="true"
node-key="id" @current-change="typeClick"></el-tree>
accordion
:default-expanded-keys="defaultActive"
:current-node-key="categoryId"
:props="defaultProps"
:highlight-current="true"
@current-change="typeClick"></el-tree>
</div> </div>
<div class="right"> <div class="right">
<div class="flex-between" <div class="flex-between" style="margin-bottom: 10px;">
style="margin-bottom: 10px;">
<p>数据简介</p> <p>数据简介</p>
<el-button v-if="introduceText && !editing" <el-button v-if="introduceText && !editing" type="primary" @click="editing = !editing"
type="primary" v-auth="'/data:数据简介:编辑'">编辑</el-button>
@click="editing = !editing"
v-auth="'/data:数据简介:编辑'">编辑</el-button>
</div> </div>
<div class="intro" <div class="intro" v-if="!introduceText && !editing">
v-if="!introduceText && !editing">
<p class="text">请添加简介</p> <p class="text">请添加简介</p>
<div class="btn"> <div class="btn">
<el-button type="primary" <el-button type="primary" @click="edit">添加</el-button>
@click="edit">添加</el-button>
</div> </div>
</div> </div>
<template v-if="introduceText || editing"> <template v-if="introduceText || editing">
<el-input placeholder="请输入简介" <el-input placeholder="请输入简介" v-model="introduce" type="textarea" rows="5" :disabled="!editing"></el-input>
v-model="introduce"
type="textarea"
rows="5"
:disabled="!editing"></el-input>
<div class="field"> <div class="field">
<p class="label">数据源</p> <p class="label">数据源</p>
<el-input style="width: 250px" <el-input style="width: 250px" placeholder="请输入数据源" v-model="dataSource" type="text"
placeholder="请输入数据源" :disabled="!editing"></el-input>
v-model="dataSource"
type="text"
:disabled="!editing"></el-input>
</div> </div>
</template> </template>
<div class="field"> <div class="field">
<p class="label">关键字</p> <p class="label">关键字</p>
<div class="tag-add" <div class="tag-add" v-if="editing">
v-if="editing"> <el-input placeholder="请输入关键字" size="small" v-model="newKeyword"></el-input>
<el-input placeholder="请输入关键字"
size="small"
v-model="newKeyword"></el-input>
<span v-if="editing"> <span v-if="editing">
<el-button @click="save" <el-button @click="save"
style="color: #9076FF;border: 1px solid #9076FF;border-radius:5px;height: 25px;line-height: 0px"> </el-button> style="color: #062c87;border: 1px solid #062c87;border-radius:5px;height: 25px;line-height: 0px">
</el-button>
</span> </span>
</div> </div>
<div class="tag-wrap"> <div class="tag-wrap">
<el-tag :key="tag.id" <el-tag :key="tag.id" :type="editing ? '' : 'info'" v-for="tag in keywordList" :closable="editing"
:type="editing ? '' : 'info'" :disable-transitions="false" @close="delKeyword(tag)">
v-for="tag in keywordList" {{ tag.keyword }}
:closable="editing"
:disable-transitions="false"
@close="delKeyword(tag)">
{{tag.keyword}}
</el-tag> </el-tag>
</div> </div>
</div> </div>
<div class="btns" <div class="btns" v-if="editing">
v-if="editing">
<el-button @click="editing = false"> </el-button> <el-button @click="editing = false"> </el-button>
<el-button type="primary" <el-button type="primary" @click="confirmData"> </el-button>
@click="confirmData"> </el-button>
</div> </div>
</div> </div>
</div> </div>
@ -242,71 +216,86 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.wrap { .wrap {
display: flex; display: flex;
height: calc(100vh - 223px); height: calc(100vh - 223px);
padding: 0 24px; padding: 0 24px;
.side {
width: 300px; .side {
padding: 24px 10px 24px 0; width: 300px;
margin-right: 24px; padding: 24px 10px 24px 0;
border-right: 1px solid rgba(0, 0, 0, 0.06); margin-right: 24px;
} border-right: 1px solid rgba(0, 0, 0, 0.06);
.right { }
width: calc(100% - 374px);
padding: 24px 0; .right {
} width: calc(100% - 374px);
.intro { padding: 24px 0;
padding: 20px; }
margin: 20px 0;
border: 1px solid #dcdcdc; .intro {
border-radius: 4px; padding: 20px;
.text { margin: 20px 0;
margin-bottom: 20px; border: 1px solid #dcdcdc;
} border-radius: 4px;
}
.field { .text {
margin-top: 20px; margin-bottom: 20px;
text-align: left;
.label {
margin-bottom: 10px;
}
}
.tag-wrap {
display: flex;
align-items: center;
} }
.btns { }
margin-top: 20px;
.field {
margin-top: 20px;
text-align: left;
.label {
margin-bottom: 10px;
} }
} }
.tag-add {
.tag-wrap {
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 10px; }
.el-input {
width: 200px; .btns {
} margin-top: 20px;
.el-button { }
margin-left: 5px; }
}
.tag-add {
display: flex;
align-items: center;
margin-bottom: 10px;
.el-input {
width: 200px;
}
.el-button {
margin-left: 5px;
}
} }
.mag { .mag {
margin-right: 20px; margin-right: 20px;
margin-left: 20px; margin-left: 20px;
} }
.el-tag + .el-tag {
margin-left: 10px; .el-tag+.el-tag {
margin-left: 10px;
} }
.button-new-tag { .button-new-tag {
margin-left: 10px; margin-left: 10px;
height: 32px; height: 32px;
line-height: 30px; line-height: 30px;
padding-top: 0; padding-top: 0;
padding-bottom: 0; padding-bottom: 0;
} }
.input-new-tag { .input-new-tag {
width: 90px; width: 90px;
margin-left: 10px; margin-left: 10px;
vertical-align: bottom; vertical-align: bottom;
} }
</style> </style>

File diff suppressed because it is too large Load Diff

@ -4,108 +4,54 @@
<!-- <a class="item" v-for="(item,index) in tabs" :key="index" :class="{active: index == activeName}" @click="tabChange(index)">{{item}}</a>--> <!-- <a class="item" v-for="(item,index) in tabs" :key="index" :class="{active: index == activeName}" @click="tabChange(index)">{{item}}</a>-->
<!-- </div>--> <!-- </div>-->
<div class="btn-wrap"> <div class="btn-wrap">
<el-button v-auth="'内容管理:保存排序'" <el-button v-auth="'内容管理:保存排序'" class="action-btn" type="primary" @click="sortSubmit">保存排序</el-button>
class="action-btn" <el-button v-auth="'内容管理:批量删除'" class="action-btn" type="primary" @click="delAllData">批量删除</el-button>
type="primary" <el-button v-auth="'内容管理:新增文章'" class="action-btn" type="primary" @click="addArticle">新增文章</el-button>
@click="sortSubmit">保存排序</el-button>
<el-button v-auth="'内容管理:批量删除'"
class="action-btn"
type="primary"
@click="delAllData">批量删除</el-button>
<el-button v-auth="'内容管理:新增文章'"
class="action-btn"
type="primary"
@click="addArticle">新增文章</el-button>
</div> </div>
<div class="page-content" <div class="page-content" style="padding-top: 24px">
style="padding-top: 24px"> <el-table ref="table" :data="list" class="table" header-align="center" @selection-change="handleSelectionChange"
<el-table ref="table" row-key="id">
:data="list" <el-table-column type="selection" width="80" align="center" :reserve-selection="true"></el-table-column>
class="table" <el-table-column type="index" width="60" label="序号" align="center">
stripe
header-align="center"
@selection-change="handleSelectionChange"
row-key="id">
<el-table-column type="selection"
width="80"
align="center"
:reserve-selection="true"></el-table-column>
<el-table-column type="index"
width="60"
label="序号"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.$index + (pageNo - 1) * pageSize + 1 }} {{ scope.$index + (pageNo - 1) * pageSize + 1 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="title" <el-table-column prop="title" label="标题" show-overflow-tooltip align="center">
label="标题"
show-overflow-tooltip
align="center">
</el-table-column> </el-table-column>
<el-table-column prop="title" <el-table-column prop="title" label="栏目" show-overflow-tooltip align="center">
label="栏目"
show-overflow-tooltip
align="center">
{{ columnName }} {{ columnName }}
</el-table-column> </el-table-column>
<el-table-column prop="name" <el-table-column prop="name" label="排序值" width="80" align="center">
label="排序值"
width="80"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input class="sort-input" <el-input class="sort-input" width="120" min="1" v-model.number="scope.row.sort" type="number"></el-input>
width="120"
min="1"
v-model.number="scope.row.sort"
type="number"></el-input>
<span>{{ scope.row.sort }}</span> <span>{{ scope.row.sort }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="date" <el-table-column prop="date" label="添加日期" align="center">
label="添加日期"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ transferDate(scope.row.date) }} {{ transferDate(scope.row.date) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" <el-table-column label="操作" align="center" width="170">
align="center"
width="170">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-auth="'内容管理:编辑'" <el-button v-auth="'内容管理:编辑'" type="text" @click="editArticle(scope)">编辑</el-button>
type="text" <el-divider v-auth="'内容管理:编辑'" direction="vertical"></el-divider>
@click="editArticle(scope)">编辑</el-button> <el-button v-auth="'内容管理:删除'" type="text" @click="delData(scope.row)">删除</el-button>
<el-divider v-auth="'内容管理:编辑'"
direction="vertical"></el-divider>
<el-button v-auth="'内容管理:删除'"
type="text"
@click="delData(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="name" <el-table-column prop="name" label="文章发布状态" width="120" align="center">
label="文章发布状态"
width="120"
align="center">
<template slot-scope="scope"> <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"
class="off" style="margin: 0 5px" :active-text="scope.row.status ? '关' : '开'"
v-model="scope.row.status" @change="switchOff($event, scope.row, scope.$index)"></el-switch>
:active-value="0"
:inactive-value="1"
style="margin: 0 5px"
:active-text="scope.row.status ? '关' : '开'"
@change="switchOff($event,scope.row,scope.$index)"></el-switch>
<span>{{ scope.row.status ? "禁用" : "启用" }}</span> <span>{{ scope.row.status ? "禁用" : "启用" }}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background <el-pagination background layout="total, prev, pager, next" :total="totals"
layout="total, prev, pager, next" @current-change="handleCurrentChange" :current-page="pageNo">
:total="totals"
@current-change="handleCurrentChange"
:current-page="pageNo">
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
@ -261,20 +207,20 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.btn-wrap { .btn-wrap {
text-align: right; text-align: right;
} }
.sort-input { .sort-input {
/deep/ .el-input__inner { /deep/ .el-input__inner {
padding: 0 0 0 10px; padding: 0 0 0 10px;
} }
} }
.sort-input + span { .sort-input+span {
display: none; display: none;
} }
.off + span { .off+span {
display: none; display: none;
} }
</style> </style>

@ -3,7 +3,7 @@
<div style="margin-bottom: 10px;text-align: right;"> <div style="margin-bottom: 10px;text-align: right;">
<el-button v-auth="'/shop:营销推广管理:新增'" type="primary" round @click="add">新增</el-button> <el-button v-auth="'/shop:营销推广管理:新增'" type="primary" round @click="add">新增</el-button>
</div> </div>
<el-table :data="list" class="table" ref="table" stripe header-align="center" row-key="id"> <el-table :data="list" class="table" ref="table" header-align="center" row-key="id">
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column> <el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="courseName" label="图片" min-width="150" align="center"> <el-table-column prop="courseName" label="图片" min-width="150" align="center">
<template slot-scope="scope"> <template slot-scope="scope">

@ -53,7 +53,7 @@
已选试卷{{ form.paperName }} 已选试卷{{ form.paperName }}
<el-button type="primary" size="mini" @click="previewPaper(form)">预览</el-button> <el-button type="primary" size="mini" @click="previewPaper(form)">预览</el-button>
</p> </p>
<el-table :data="projects" class="table" stripe header-align="center"> <el-table :data="projects" class="table" header-align="center">
<el-table-column width="60" label="选择" align="center"> <el-table-column width="60" label="选择" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-radio v-model="form.paperId" :label="scope.row.paperId" @change="paperChange">&nbsp;</el-radio> <el-radio v-model="form.paperId" :label="scope.row.paperId" @change="paperChange">&nbsp;</el-radio>
@ -114,7 +114,7 @@
</div> </div>
</div> </div>
<!-- 实训项目表格 --> <!-- 实训项目表格 -->
<el-table :data="projects" class="table" stripe header-align="center"> <el-table :data="projects" class="table" header-align="center">
<el-table-column width="60" label="选择" align="center"> <el-table-column width="60" label="选择" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-radio v-model="form.projectId" :label="scope.row.projectId">&nbsp;</el-radio> <el-radio v-model="form.projectId" :label="scope.row.projectId">&nbsp;</el-radio>

@ -151,7 +151,7 @@
</el-form-item> </el-form-item>
<el-form-item label="比赛内容"> <el-form-item label="比赛内容">
<el-button style="margin-bottom: 10px;" size="small" type="primary">选择理论试卷</el-button> <el-button style="margin-bottom: 10px;" size="small" type="primary">选择理论试卷</el-button>
<el-table :data="list" class="table" ref="table" stripe header-align="center" row-key="id"> <el-table :data="list" class="table" ref="table" header-align="center" row-key="id">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> <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 type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="name" label="试卷名称" align="center" min-width="100"></el-table-column> <el-table-column prop="name" label="试卷名称" align="center" min-width="100"></el-table-column>

@ -41,7 +41,7 @@
</div> </div>
</div> </div>
<el-table :data="papers" class="table" stripe header-align="center" @sort-change="sortChange"> <el-table :data="papers" class="table" header-align="center" @sort-change="sortChange">
<el-table-column width="60" label="选择" align="center"> <el-table-column width="60" label="选择" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-radio v-model="form.paperId" :label="scope.row.paperId">&nbsp;</el-radio> <el-radio v-model="form.paperId" :label="scope.row.paperId">&nbsp;</el-radio>

@ -65,7 +65,7 @@
</div> </div>
</div> </div>
<el-table ref="table" :data="matchData" class="table" stripe header-align="center" <el-table ref="table" :data="matchData" class="table" header-align="center"
@selection-change="handleSelectionChange" row-key="id"> @selection-change="handleSelectionChange" row-key="id">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> <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 type="index" width="60" label="序号" align="center">
@ -127,7 +127,7 @@
</div> </div>
<el-dialog title="修改当前阶段结束时间" :visible.sync="modifyVisible" width="900px" :close-on-click-modal="false"> <el-dialog title="修改当前阶段结束时间" :visible.sync="modifyVisible" width="900px" :close-on-click-modal="false">
<el-table :data="curRow.playingStages" class="table" ref="table" stripe header-align="center"> <el-table :data="curRow.playingStages" class="table" ref="table" header-align="center">
<el-table-column prop="stageName" label="阶段名称" min-width="100" align="center"></el-table-column> <el-table-column prop="stageName" label="阶段名称" min-width="100" align="center"></el-table-column>
<el-table-column label="竞赛起止时间" width="300" align="center"> <el-table-column label="竞赛起止时间" width="300" align="center">
<template slot-scope="scope"> <template slot-scope="scope">

@ -23,8 +23,8 @@
</div> </div>
</div> </div>
<el-table ref="table" :data="listData" class="table" stripe header-align="center" <el-table ref="table" :data="listData" class="table" header-align="center" @selection-change="handleSelectionChange"
@selection-change="handleSelectionChange" row-key="id" v-loading="loading" @sort-change="sortChange"> row-key="id" v-loading="loading" @sort-change="sortChange">
<el-table-column type="selection" width="80" align="center" :reserve-selection="true"></el-table-column> <el-table-column type="selection" width="80" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center"> <el-table-column type="index" width="60" label="序号" align="center">
<template slot-scope="scope"> <template slot-scope="scope">

@ -1,7 +1,7 @@
<template> <template>
<!-- 报名人员 --> <!-- 报名人员 -->
<div class="page-content" style="padding: 24px"> <div class="page-content" style="padding: 24px">
<el-table ref="table" :data="list" class="table" stripe header-align="center" row-key="stageId"> <el-table ref="table" :data="list" class="table" header-align="center" row-key="stageId">
<el-table-column type="index" width="60" label="序号" align="center"> <el-table-column type="index" width="60" label="序号" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.$index + 1 }} {{ scope.$index + 1 }}

@ -97,7 +97,7 @@
</template> </template>
</div> </div>
</div> </div>
<el-table :data="list" class="table" :key="1" ref="table" stripe header-align="center" <el-table :data="list" class="table" :key="1" ref="table" header-align="center"
@selection-change="handleSelectionChange" row-key="id" @sort-change="sortChange"> @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="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center"> <el-table-column type="index" width="60" label="序号" align="center">
@ -191,7 +191,7 @@
<template v-else> <template v-else>
<p style="margin: -10px 0 13px;font-size: 14px;color: #e90000;">{{ faildData.tip }}</p> <p style="margin: -10px 0 13px;font-size: 14px;color: #e90000;">{{ faildData.tip }}</p>
<p type="primary" <p type="primary"
style="margin-bottom: 10px;font-size: 14px;color: #9076FF;text-decoration: underline;cursor: pointer;" style="margin-bottom: 10px;font-size: 14px;color: #062c87;text-decoration: underline;cursor: pointer;"
@click="showFaild">部分数据导入失败查看失败原因</p> @click="showFaild">部分数据导入失败查看失败原因</p>
</template> </template>
</div> </div>

@ -147,7 +147,7 @@
<p>队长{{ info.captain.userName }}</p> <p>队长{{ info.captain.userName }}</p>
<el-button type="primary" @click="transfer">转让队长</el-button> <el-button type="primary" @click="transfer">转让队长</el-button>
</div> </div>
<el-table :data="info.teamDetail" stripe header-align="center"> <el-table :data="info.teamDetail" header-align="center">
<el-table-column prop="userName" label="成员姓名" min-width="100" align="center"></el-table-column> <el-table-column prop="userName" label="成员姓名" min-width="100" align="center"></el-table-column>
<el-table-column prop="realSchool" label="学校" min-width="100" align="center"></el-table-column> <el-table-column prop="realSchool" label="学校" min-width="100" align="center"></el-table-column>
<el-table-column prop="phone" label="手机号" min-width="100" align="center"></el-table-column> <el-table-column prop="phone" label="手机号" min-width="100" align="center"></el-table-column>

@ -1,74 +1,43 @@
<template> <template>
<!-- 竞赛进展 --> <!-- 竞赛进展 -->
<div class="page-content" <div class="page-content" style="padding: 24px">
style="padding: 24px"> <el-table ref="table" :data="listData" class="table" header-align="center" @selection-change="handleSelectionChange"
<el-table ref="table" row-key="id">
:data="listData" <el-table-column type="index" width="60" label="序号" align="center">
class="table"
stripe
header-align="center"
@selection-change="handleSelectionChange"
row-key="id">
<el-table-column type="index"
width="60"
label="序号"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.$index + (pageNo - 1) * pageSize + 1 }} {{ scope.$index + (pageNo - 1) * pageSize + 1 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="name" <el-table-column prop="name" label="标题">
label="标题">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input placeholder="请输入标题" <el-input placeholder="请输入标题" :disabled="!scope.row.operate" v-model="scope.row.title"></el-input>
:disabled="!scope.row.operate"
v-model="scope.row.title"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="name" <el-table-column prop="name" label="详情描述">
label="详情描述">
<template slot-scope="scope"> <template slot-scope="scope">
<el-input placeholder="请输入详情描述" <el-input placeholder="请输入详情描述" :disabled="!scope.row.operate" type="textarea"
:disabled="!scope.row.operate" v-model="scope.row.description"></el-input>
type="textarea"
v-model="scope.row.description"></el-input>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="name" <el-table-column prop="name" label="状态" width="150">
label="状态"
width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-select v-model="scope.row.status" <el-select v-model="scope.row.status" :disabled="!scope.row.operate" clearable placeholder="请选择状态">
:disabled="!scope.row.operate" <el-option v-for="(item, index) in statusList" :key="index" :label="item.name"
clearable :value="item.value"></el-option>
placeholder="请选择状态">
<el-option v-for="(item,index) in statusList"
:key="index"
:label="item.name"
:value="item.value"></el-option>
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" <el-table-column label="操作" align="center" width="170">
align="center"
width="170">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="!scope.row.operate" <el-button v-if="!scope.row.operate" type="text" @click="operateIt(scope.row)"
type="text" v-auth="'/match:管理:竞赛进展:编辑'">编辑</el-button>
@click="operateIt(scope.row)" <el-button v-else type="text" @click="saveData(scope.row)">保存</el-button>
v-auth="'/match:管理:竞赛进展:编辑'">编辑</el-button> <el-button type="text" @click="handleDelete(scope.row, scope.$index)"
<el-button v-else v-auth="'/match:管理:竞赛进展:删除'">删除</el-button>
type="text"
@click="saveData(scope.row)">保存</el-button>
<el-button type="text"
@click="handleDelete(scope.row, scope.$index)"
v-auth="'/match:管理:竞赛进展:删除'">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="plus" <div class="plus" @click="addData" v-auth="'/match:管理:竞赛进展:新增'">
@click="addData"
v-auth="'/match:管理:竞赛进展:新增'">
<i class="el-icon-circle-plus-outline"></i> <i class="el-icon-circle-plus-outline"></i>
</div> </div>
</div> </div>
@ -260,18 +229,18 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.box { .box {
height: calc(100vh - 100px); height: calc(100vh - 100px);
overflow: auto; overflow: auto;
} }
.plus { .plus {
padding: 15px 0 0; padding: 15px 0 0;
text-align: center; text-align: center;
cursor: pointer; cursor: pointer;
i { i {
font-size: 24px; font-size: 24px;
color: #cb221c; color: #cb221c;
} }
} }
</style> </style>

@ -60,8 +60,8 @@
</ul> </ul>
</div> </div>
<el-table :data="list" class="table" ref="table" stripe row-key="scoreId" <el-table :data="list" class="table" ref="table" row-key="scoreId" @selection-change="handleSelectionChange"
@selection-change="handleSelectionChange" header-align="center"> header-align="center">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> <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 type="index" width="60" label="排名" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
@ -176,7 +176,7 @@
<template v-else> <template v-else>
<p style="margin: -10px 0 13px;font-size: 14px;color: #e90000;">{{ faildData.tip }}</p> <p style="margin: -10px 0 13px;font-size: 14px;color: #e90000;">{{ faildData.tip }}</p>
<p type="primary" <p type="primary"
style="margin-bottom: 10px;font-size: 14px;color: #9076FF;text-decoration: underline;cursor: pointer;" style="margin-bottom: 10px;font-size: 14px;color: #062c87;text-decoration: underline;cursor: pointer;"
@click="showFaild">部分数据导入失败查看失败原因</p> @click="showFaild">部分数据导入失败查看失败原因</p>
</template> </template>
</div> </div>

@ -41,8 +41,8 @@
</div> </div>
</div> </div>
<el-table ref="table" :data="listData" class="table" stripe header-align="center" <el-table ref="table" :data="listData" class="table" header-align="center" @selection-change="handleSelectionChange"
@selection-change="handleSelectionChange" row-key="id" v-loading="loading" @sort-change="sortChange"> row-key="id" v-loading="loading" @sort-change="sortChange">
<el-table-column type="selection" width="80" align="center" :reserve-selection="true"></el-table-column> <el-table-column type="selection" width="80" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center"> <el-table-column type="index" width="60" label="序号" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
@ -187,7 +187,7 @@
<template v-else> <template v-else>
<p style="margin: -10px 0 13px;font-size: 14px;color: #e90000;">{{ uploadTips }}</p> <p style="margin: -10px 0 13px;font-size: 14px;color: #e90000;">{{ uploadTips }}</p>
<p type="primary" <p type="primary"
style="margin-bottom: 10px;font-size: 14px;color: #9076FF;text-decoration: underline;cursor: pointer;" style="margin-bottom: 10px;font-size: 14px;color: #062c87;text-decoration: underline;cursor: pointer;"
@click="showFaild">部分数据导入失败查看失败原因</p> @click="showFaild">部分数据导入失败查看失败原因</p>
</template> </template>
</div> </div>

@ -1,71 +1,41 @@
<template> <template>
<!-- 报名人员 --> <!-- 报名人员 -->
<div class="page-content" <div class="page-content" style="padding: 24px">
style="padding: 24px"> <div class="tool" style="justify-content: flex-end">
<div class="tool" <el-button type="primary" round @click="add" v-auth="'/match:管理:公告通知:新增'">新增</el-button>
style="justify-content: flex-end">
<el-button type="primary"
round
@click="add"
v-auth="'/match:管理:公告通知:新增'">新增</el-button>
</div> </div>
<el-table ref="table" <el-table ref="table" :data="listData" class="table" header-align="center" @selection-change="handleSelectionChange"
:data="listData" row-key="id">
class="table" <el-table-column type="index" width="60" label="序号" align="center">
stripe
header-align="center"
@selection-change="handleSelectionChange"
row-key="id">
<el-table-column type="index"
width="60"
label="序号"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.$index + (pageNo - 1) * pageSize + 1 }} {{ scope.$index + (pageNo - 1) * pageSize + 1 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="announcementTitle" <el-table-column prop="announcementTitle" label="标题名称">
label="标题名称">
</el-table-column> </el-table-column>
<el-table-column prop="createTime" <el-table-column prop="createTime" label="创建时间">
label="创建时间">
</el-table-column> </el-table-column>
<el-table-column prop="updateTime" <el-table-column prop="updateTime" label="发布时间">
label="发布时间">
</el-table-column> </el-table-column>
<el-table-column prop="phone" <el-table-column prop="phone" label="状态">
label="状态">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.status ? '已发布' : '草稿' }} {{ scope.row.status ? '已发布' : '草稿' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" <el-table-column label="操作" align="center" width="250">
align="center"
width="250">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" <el-button type="text" @click="edit(scope.row)" v-auth="'/match:管理:公告通知:编辑'">编辑</el-button>
@click="edit(scope.row)" <el-button type="text" @click="del(scope.row)" v-auth="'/match:管理:公告通知:删除'">删除</el-button>
v-auth="'/match:管理:公告通知:编辑'">编辑</el-button> <el-switch v-auth="'/match:管理:公告通知:启用'" v-model="scope.row.isOpen" :active-text="scope.row.isOpen ? '' : ''"
<el-button type="text" :active-value="0" :inactive-value="1" style="margin: 0 10px 0 5px"
@click="del(scope.row)" @change="switchOff($event, scope.row, scope.$index)"></el-switch>
v-auth="'/match:管理:公告通知:删除'">删除</el-button>
<el-switch v-auth="'/match:管理:公告通知:启用'"
v-model="scope.row.isOpen"
:active-text="scope.row.isOpen ? '关' : '开'"
:active-value="0"
:inactive-value="1"
style="margin: 0 10px 0 5px"
@change="switchOff($event,scope.row,scope.$index)"></el-switch>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background <el-pagination background layout="total, prev, pager, next" :total="totals" @current-change="handleCurrentChange"
layout="total, prev, pager, next" :current-page="pageNo">
:total="totals"
@current-change="handleCurrentChange"
:current-page="pageNo">
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
@ -162,5 +132,4 @@ export default {
}; };
</script> </script>
<style scoped> <style scoped></style>
</style>

@ -74,7 +74,7 @@
</div> </div>
</div> </div>
<template v-if="!active"> <template v-if="!active">
<el-table :data="list" class="table" :key="1" ref="table" stripe header-align="center" <el-table :data="list" class="table" :key="1" ref="table" header-align="center"
@selection-change="handleSelectionChange" row-key="id"> @selection-change="handleSelectionChange" row-key="id">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> <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 type="index" width="60" label="序号" align="center">
@ -125,7 +125,7 @@
</div> </div>
</template> </template>
<template v-else> <template v-else>
<el-table :data="list1" class="table" :key="2" stripe header-align="center" <el-table :data="list1" class="table" :key="2" header-align="center"
@selection-change="handleSelectionChange1" row-key="id"> @selection-change="handleSelectionChange1" row-key="id">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> <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 type="index" width="60" label="序号" align="center">
@ -185,7 +185,7 @@
<template v-else> <template v-else>
<p style="margin: -10px 0 13px;font-size: 14px;color: #e90000;">{{ faildData.tip }}</p> <p style="margin: -10px 0 13px;font-size: 14px;color: #e90000;">{{ faildData.tip }}</p>
<p type="primary" <p type="primary"
style="margin-bottom: 10px;font-size: 14px;color: #9076FF;text-decoration: underline;cursor: pointer;" style="margin-bottom: 10px;font-size: 14px;color: #062c87;text-decoration: underline;cursor: pointer;"
@click="showFaild">部分数据导入失败查看失败原因</p> @click="showFaild">部分数据导入失败查看失败原因</p>
</template> </template>
</div> </div>

@ -88,7 +88,7 @@
<img src="@/assets/img/report4.png" alt=""> <img src="@/assets/img/report4.png" alt="">
得分情况 得分情况
</h6> </h6>
<el-table :data="outlines" class="table" border stripe header-align="center"> <el-table :data="outlines" class="table" border header-align="center">
<el-table-column prop="outlineName" label="大题名称" align="center"></el-table-column> <el-table-column prop="outlineName" label="大题名称" align="center"></el-table-column>
<el-table-column prop="questionNum" label="小题总数" align="center"></el-table-column> <el-table-column prop="questionNum" label="小题总数" align="center"></el-table-column>
<el-table-column prop="targetScore" label="总分" align="center"> <el-table-column prop="targetScore" label="总分" align="center">
@ -915,7 +915,7 @@ samp {
margin-right: 10px; margin-right: 10px;
font-size: 12px; font-size: 12px;
line-height: 1; line-height: 1;
color: #9076FF; color: #062c87;
white-space: nowrap; white-space: nowrap;
border: 1px solid; border: 1px solid;
border-radius: 2px; border-radius: 2px;

@ -74,7 +74,7 @@
<img src="@/assets/img/report4.png" alt=""> <img src="@/assets/img/report4.png" alt="">
实验数据 实验数据
</h6> </h6>
<el-table :data="expData" class="table" border stripe header-align="center"> <el-table :data="expData" class="table" border header-align="center">
<el-table-column type="index" label="序号" align="center" width="60"> <el-table-column type="index" label="序号" align="center" width="60">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.$index + 1 }} {{ scope.$index + 1 }}

@ -123,7 +123,7 @@
</div> </div>
</div> </div>
<el-table :data="coursePermissions" class="orderTable" stripe header-align="center"> <el-table :data="coursePermissions" class="orderTable" header-align="center">
<el-table-column type="index" width="60" label="序号" align="center"> <el-table-column type="index" width="60" label="序号" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="productName" label="产品名称" align="center" min-width="150" show-overflow-tooltip> <el-table-column prop="productName" label="产品名称" align="center" min-width="150" show-overflow-tooltip>
@ -272,7 +272,7 @@
</div> </div>
</div> </div>
<el-table :data="theoryCourseList" class="orderTable" stripe header-align="center"> <el-table :data="theoryCourseList" class="orderTable" header-align="center">
<el-table-column type="index" width="60" label="序号" align="center"> <el-table-column type="index" width="60" label="序号" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="productName" label="产品名称" align="center" min-width="150" show-overflow-tooltip> <el-table-column prop="productName" label="产品名称" align="center" min-width="150" show-overflow-tooltip>
@ -422,7 +422,7 @@
</div> </div>
<!--:summary-method="getSummaries"--> <!--:summary-method="getSummaries"-->
<el-table :data="dataPlatformPermissions" class="orderTable orderTables" stripe header-align="center"> <el-table :data="dataPlatformPermissions" class="orderTable orderTables" header-align="center">
<el-table-column type="index" width="60" label="序号" align="center"> <el-table-column type="index" width="60" label="序号" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="productName" label="产品名称" align="center" min-width="100"> <el-table-column prop="productName" label="产品名称" align="center" min-width="100">
@ -593,7 +593,7 @@
</div> </div>
<!--:summary-method="getSummaries"--> <!--:summary-method="getSummaries"-->
<el-table :data="valuePermissions" class="orderTable orderTables" stripe header-align="center"> <el-table :data="valuePermissions" class="orderTable orderTables" header-align="center">
<el-table-column type="index" width="60" label="序号" align="center"> <el-table-column type="index" width="60" label="序号" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="productName" label="产品名称" align="center" min-width="100"> <el-table-column prop="productName" label="产品名称" align="center" min-width="100">
@ -732,7 +732,7 @@
</div> </div>
</div> </div>
<el-table :data="practicalCourses" class="orderTable orderTables" stripe header-align="center"> <el-table :data="practicalCourses" class="orderTable orderTables" header-align="center">
<el-table-column type="index" width="60" label="序号" align="center"> <el-table-column type="index" width="60" label="序号" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="productName" label="产品名称" align="center" min-width="150" show-overflow-tooltip> <el-table-column prop="productName" label="产品名称" align="center" min-width="150" show-overflow-tooltip>
@ -879,7 +879,7 @@
</div> </div>
<!--:summary-method="getSummaries"--> <!--:summary-method="getSummaries"-->
<el-table :data="expTools" class="orderTable orderTables" stripe header-align="center"> <el-table :data="expTools" class="orderTable orderTables" header-align="center">
<el-table-column type="index" width="60" label="序号" align="center"> <el-table-column type="index" width="60" label="序号" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="productName" label="产品名称" align="center" min-width="150" show-overflow-tooltip> <el-table-column prop="productName" label="产品名称" align="center" min-width="150" show-overflow-tooltip>
@ -1067,7 +1067,7 @@
clearable></el-input> clearable></el-input>
</div> </div>
</div> </div>
<el-table v-loading="dataLoading" :data="practicalCourseList" stripe header-align="center" <el-table v-loading="dataLoading" :data="practicalCourseList" header-align="center"
@selection-change="practicalCoursesSelection" row-key="mallId"> @selection-change="practicalCoursesSelection" row-key="mallId">
<el-table-column type="selection" :selectable="practicalCoursesSelectable" width="55" <el-table-column type="selection" :selectable="practicalCoursesSelectable" width="55"
align="center"></el-table-column> align="center"></el-table-column>
@ -1096,7 +1096,7 @@
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>地址列表</span> <span>地址列表</span>
</div> </div>
<el-table :data="IPData" stripe header-align="center"> <el-table :data="IPData" header-align="center">
<el-table-column type="index" width="100" label="序号" align="center"> <el-table-column type="index" width="100" label="序号" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="age" label="服务器名称" align="center"> <el-table-column prop="age" label="服务器名称" align="center">

@ -64,7 +64,7 @@
<el-button type="primary" round @click="delAllSelection" v-auth>批量删除</el-button> <el-button type="primary" round @click="delAllSelection" v-auth>批量删除</el-button>
</div> </div>
</div> </div>
<el-table :data="orderData" class="table" ref="table" stripe header-align="center" <el-table :data="orderData" class="table" ref="table" header-align="center"
@selection-change="handleSelectionChange" row-key="orderId"> @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="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">

@ -1,307 +1,306 @@
<template> <template>
<div> <div>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="24"> <el-col :span="24">
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="mgb20">
<div class="flex-between"> <div class="flex-between">
<div class="per_title" v-preventReClick @click="goback('back')"> <div class="per_title" v-preventReClick @click="goback('back')">
<i class="el-icon-arrow-left"></i> <i class="el-icon-arrow-left"></i>
<span class="per_back">返回</span> <span class="per_back">返回</span>
<span class="per_school">选择客户</span> <span class="per_school">选择客户</span>
</div> </div>
<el-button type="primary" round class="mag" v-preventReClick @click="goback()">确定 <el-button type="primary" round class="mag" v-preventReClick @click="goback()">确定
</el-button> </el-button>
</div> </div>
</el-card> </el-card>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="mgb20">
<div> <div>
<div class="flex-center mgb20"> <div class="flex-center mgb20">
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>筛选</span> <span>筛选</span>
</div> </div>
<div> <div>
<el-form label-width="80px"> <el-form label-width="80px">
<el-col :span="6"> <el-col :span="6">
<el-form-item label="国家"> <el-form-item label="国家">
<el-select v-model="form.countries" placeholder="请选择国家"> <el-select v-model="form.countries" placeholder="请选择国家">
<el-option v-for="(item,index) in countryList" :key="index" <el-option v-for="(item, index) in countryList" :key="index" :label="item.name"
:label="item.name" :value="item.name"></el-option> :value="item.name"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="省份"> <el-form-item label="省份">
<el-select v-model="form.provinces" clearable placeholder="请选择省份" <el-select v-model="form.provinces" clearable placeholder="请选择省份" @change="getCity"
@change="getCity" @clear="clearprovince"> @clear="clearprovince">
<el-option v-for="(item,index) in provinceList" :key="index" <el-option v-for="(item, index) in provinceList" :key="index" :label="item.provinceName"
:label="item.provinceName" :value="item.provinceId"></el-option> :value="item.provinceId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item label="城市"> <el-form-item label="城市">
<el-select v-model="form.city" clearable placeholder="请选择城市" <el-select v-model="form.city" clearable placeholder="请选择城市"
:disabled="form.provinces ? false : true" @change="initData"> :disabled="form.provinces ? false : true" @change="initData">
<el-option v-for="(item,index) in cityList" :key="index" <el-option v-for="(item, index) in cityList" :key="index" :label="item.cityName"
:label="item.cityName" :value="item.cityId"></el-option> :value="item.cityId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item> <el-form-item>
<el-input placeholder="请输入客户名称/联系人姓名/账号" @clear="clearSearch" <el-input placeholder="请输入客户名称/联系人姓名/账号" @clear="clearSearch" @input="getData"
@input="getData" prefix-icon="el-icon-search" prefix-icon="el-icon-search" v-model="form.keyword" clearable></el-input>
v-model="form.keyword" clearable></el-input> </el-form-item>
</el-form-item> </el-col>
</el-col> </el-form>
</el-form> </div>
</div> </div>
</div> </el-card>
</el-card> </el-col>
</el-col>
<el-col :span="24"> <el-col :span="24">
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="mgb20">
<div class="flex-between mgb20"> <div class="flex-between mgb20">
<div class="flex-center"> <div class="flex-center">
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>客户列表</span> <span>客户列表</span>
</div> </div>
<div> <div>
</div> </div>
</div> </div>
<el-table :data="listData" class="table" stripe header-align="center" row-key="customerId"> <el-table :data="listData" class="table" header-align="center" row-key="customerId">
<!-- <el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> --> <!-- <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">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.$index + (page - 1) * pageSize + 1 }} {{ scope.$index + (page - 1) * pageSize + 1 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="customerName" label="客户名称" align="center"> <el-table-column prop="customerName" label="客户名称" align="center">
</el-table-column> </el-table-column>
<el-table-column label="行业" align="center"> <el-table-column label="行业" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span class="ellipsis">{{ scope.row.industryName }}</span> <span class="ellipsis">{{ scope.row.industryName }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="countries" label="国家" align="center"> <el-table-column prop="countries" label="国家" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="provinceName" label="省份" align="center"> <el-table-column prop="provinceName" label="省份" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="cityName" label="城市" align="center"> <el-table-column prop="cityName" label="城市" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="name" label="联系人" align="center"> <el-table-column prop="name" label="联系人" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="account" label="账号" align="center"> <el-table-column prop="account" label="账号" align="center">
</el-table-column> </el-table-column>
<el-table-column label="操作" width="270" align="center"> <el-table-column label="操作" width="270" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox @change="checkboxChenge(scope.row)" <el-checkbox @change="checkboxChenge(scope.row)" v-model="scope.row.checked"></el-checkbox>
v-model="scope.row.checked"></el-checkbox> </template>
</template> </el-table-column>
</el-table-column> </el-table>
</el-table> <div class="pagination">
<div class="pagination"> <el-pagination background layout="total, prev, pager, next" :total="total"
<el-pagination background layout="total, prev, pager, next" :total="total" @current-change="handleCurrentChange" :current-page="page">
@current-change="handleCurrentChange" :current-page="page"> </el-pagination>
</el-pagination> </div>
</div> </el-card>
</el-card> </el-col>
</el-col>
</el-row> </el-row>
</div> </div>
</template> </template>
<script> <script>
export default { export default {
props: { props: {
refresh: { refresh: {
type: Boolean, type: Boolean,
default: false default: false
} }
}, },
data() { data () {
return { return {
page: 1, page: 1,
pageSize: 10, pageSize: 10,
total: 1, total: 1,
countryList: [{ countryList: [{
name: "中国" name: "中国"
}], }],
listData: [], listData: [],
form: { form: {
countries: "中国", countries: "中国",
provinces: "", provinces: "",
city: "", city: "",
keyword: "" keyword: ""
}, },
provinceList: [], provinceList: [],
cityList: [], cityList: [],
checkedID: "",// ID checkedID: "",// ID
checkedName: "",// checkedName: "",//
data:{}, data: {},
}; };
}, },
created() { created () {
this.getData();
this.getProvince();
},
watch: {
refresh: function (val, val2) {
if (val) {
this.getData(); this.getData();
this.getProvince(); this.getProvince();
},
watch: {
refresh: function(val, val2) {
if (val) {
this.getData();
this.getProvince();
}
}
},
methods: {
//
getData () {
// const sid = this.$store.state.dataPer.find(e => e.permissionName === '')
this.$post(this.api.queryCustomer, {
countries: this.form.countries,
provinceId: this.form.provinces,
cityId: this.form.city,
searchContent: this.form.keyword,
page: this.page,
size: this.pageSize,
// supplierId: sid ? sid.supplierId : ''
}).then(res => {
res.message.list.map(e => {
e.checked = false;
if (this.checkedID) {
if (e.customerId === this.checkedID) {
e.checked = true;
} }
} }
});
this.listData = res.message.list;
this.total = res.message.totalCount;
}).catch(res => {
});
},
//
getProvince () {
this.$get(this.api.queryProvince).then(res => {
this.provinceList = res.list;
this.$store.commit("provinceData", { provinceList: this.provinceList });
}).catch(res => {
});
},
clearprovince () {
this.form.city = "";
}, },
methods: { getCity () {
// this.clearprovince();
getData() { this.getCityData();
// const sid = this.$store.state.dataPer.find(e => e.permissionName === '') this.page = 1;
this.$post(this.api.queryCustomer, { this.initData();
countries: this.form.countries, },
provinceId: this.form.provinces, getCityData () {
cityId: this.form.city, let data = {
searchContent: this.form.keyword, provinceId: this.form.provinces
page: this.page, };
size: this.pageSize, this.$get(this.api.queryCity, data).then(res => {
// supplierId: sid ? sid.supplierId : '' this.cityList = res.list;
}).then(res => { }).catch(res => {
res.message.list.map(e => { });
e.checked = false; },
if (this.checkedID) { async goback (val) {
if (e.customerId === this.checkedID) { if (val) {
e.checked = true; this.$emit("back", { show: true });
} } else {
} if (!this.checkedName) {
}); return this.$message("请选择客户后再确定!");
this.listData = res.message.list; }
this.total = res.message.totalCount; let param = {
}).catch(res => { show: true,
}); id: this.checkedID,
}, name: this.checkedName
// };
getProvince() { await this.$get(this.api.queryCustomerDetails, { customerId: this.checkedID }).then(res => {
this.$get(this.api.queryProvince).then(res => { console.log(res, "当前的res");
this.provinceList = res.list; this.data = res.result.customer;
this.$store.commit("provinceData", { provinceList: this.provinceList }); param.email = this.data.email;
}).catch(res => { param.phone = this.data.phone;
}); param.name = this.data.customerName;
},
clearprovince() {
this.form.city = "";
},
getCity() {
this.clearprovince();
this.getCityData();
this.page = 1;
this.initData();
},
getCityData() {
let data = {
provinceId: this.form.provinces
};
this.$get(this.api.queryCity, data).then(res => {
this.cityList = res.list;
}).catch(res => {
});
},
async goback(val) {
if (val) {
this.$emit("back", { show: true });
} else {
if (!this.checkedName) {
return this.$message("请选择客户后再确定!");
}
let param = {
show: true,
id: this.checkedID,
name: this.checkedName
};
await this.$get(this.api.queryCustomerDetails, { customerId: this.checkedID }).then(res => {
console.log(res, "当前的res");
this.data = res.result.customer;
param.email = this.data.email;
param.phone = this.data.phone;
param.name = this.data.customerName;
}); });
this.$emit("back", this.data); this.$emit("back", this.data);
} }
}, },
initData() { initData () {
this.page = 1; this.page = 1;
this.getData(); this.getData();
}, },
handleCurrentChange(val) { handleCurrentChange (val) {
this.page = val; this.page = val;
this.getData(); this.getData();
}, },
// checkbox // checkbox
checkboxChenge(row) { checkboxChenge (row) {
this.listData.map(e => { this.listData.map(e => {
e.checked = false; e.checked = false;
}); });
row.checked = true; row.checked = true;
this.checkedName = row.customerName; this.checkedName = row.customerName;
this.checkedID = row.customerId; this.checkedID = row.customerId;
}, },
clearSearch() { clearSearch () {
this.getData(); this.getData();
}
} }
}
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.mag { .mag {
margin-right: 20px; margin-right: 20px;
} }
/deep/ .el-checkbox__inner { /deep/ .el-checkbox__inner {
border-radius: 50%; border-radius: 50%;
width: 19px; width: 19px;
height: 19px; height: 19px;
} }
/deep/ .el-checkbox__input.is-checked .el-checkbox__inner, .el-checkbox__input.is-indeterminate .el-checkbox__inner { /deep/ .el-checkbox__input.is-checked .el-checkbox__inner,
background: #FFF; .el-checkbox__input.is-indeterminate .el-checkbox__inner {
background: #FFF;
} }
/deep/ .el-checkbox__inner::after { /deep/ .el-checkbox__inner::after {
transform: none; transform: none;
transition: all .3s ease-in; transition: all .3s ease-in;
width: 0; width: 0;
height: 0; height: 0;
position: relative; position: relative;
top: 50%; top: 50%;
left: 50%; left: 50%;
transform: translate(-46%, -48%); transform: translate(-46%, -48%);
border-radius: 50%; border-radius: 50%;
} }
/deep/ .el-checkbox__input.is-checked .el-checkbox__inner::after { /deep/ .el-checkbox__input.is-checked .el-checkbox__inner::after {
width: 13px; width: 13px;
height: 13px; height: 13px;
background: #9278FF; background: #9278FF;
position: relative; position: relative;
top: 50%; top: 50%;
left: 50%; left: 50%;
transform: translate(-46%, -48%); transform: translate(-46%, -48%);
display: block; display: block;
border-radius: 50%; border-radius: 50%;
transition: all .3s ease-in; transition: all .3s ease-in;
border: 0; border: 0;
} }
/deep/ .el-checkbox__input { /deep/ .el-checkbox__input {
line-height: 0; line-height: 0;
} }
</style> </style>

@ -1,273 +1,271 @@
<template> <template>
<div class="page"> <div class="page">
<h6 class="p-title">筛选</h6> <h6 class="p-title">筛选</h6>
<div class="tool"> <div class="tool">
<ul class="filter"> <ul class="filter">
<li> <li>
<el-input placeholder="请输入角色名称" prefix-icon="el-icon-search" v-model.trim="keyword" clearable></el-input> <el-input placeholder="请输入角色名称" prefix-icon="el-icon-search" v-model.trim="keyword" clearable></el-input>
</li> </li>
</ul> </ul>
<div> <div>
<el-button type="primary" round @click="addRole" v-auth="'/parner:小程序角色权限:新增角色'">新增角色</el-button> <el-button type="primary" round @click="addRole" v-auth="'/parner:小程序角色权限:新增角色'">新增角色</el-button>
<el-button type="primary" round @click="delAllSelection" v-auth="'/parner:小程序角色权限:批量删除'">批量删除</el-button> <el-button type="primary" round @click="delAllSelection" v-auth="'/parner:小程序角色权限:批量删除'">批量删除</el-button>
</div> </div>
</div> </div>
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" :row-key="getRowKeys">
<el-table-column type="selection" width="55" align="center" :selectable="practiceSelectable" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="roleName" label="角色名称" align="center" min-width="250" show-overflow-tooltip></el-table-column>
<el-table-column label="角色描述" min-width="400" align="center">
<template slot-scope="scope">
<el-input placeholder="该角色用于管理全部功能权限" v-model="scope.row.remark" disabled></el-input>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200">
<template slot-scope="scope">
<el-button type="text" @click="showRole(scope.row)" v-auth="'/parner:小程序角色权限:查看'">查看</el-button>
<el-button v-if="scope.row.roleName !== '超级管理员'" type="text" @click="editRole(scope.row)" v-auth="'/parner:小程序角色权限:编辑'">编辑</el-button>
<el-button v-if="scope.row.roleName !== '超级管理员' && scope.row.roleName !== '管理员'" type="text" @click="handleDelete(scope.row)" v-auth="'/parner:小程序角色权限:删除'">删除</el-button>
</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>
<el-dialog :title="isDetail ? '查看角色' : (isAdd ? '新增角色' : '编辑角色')" :visible.sync="roleVisible" width="30%" @close="closeRole" class="dialog" :close-on-click-modal="false"> <el-table :data="listData" class="table" ref="table" header-align="center" @selection-change="handleSelectionChange"
<el-form ref="form" label-width="80px" :disabled="isDetail"> :row-key="getRowKeys">
<el-form-item label="角色名称"> <el-table-column type="selection" width="55" align="center" :selectable="practiceSelectable"
<el-input v-model="form.roleName" placeholder="请输入角色名称"></el-input> :reserve-selection="true"></el-table-column>
</el-form-item> <el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-form-item label="角色描述"> <el-table-column prop="roleName" label="角色名称" align="center" min-width="250"
<el-input v-model="form.remark" placeholder="请输入角色描述" type="textarea" rows="5"></el-input> show-overflow-tooltip></el-table-column>
</el-form-item> <el-table-column label="角色描述" min-width="400" align="center">
<el-form-item prop="role" label="角色权限"> <template slot-scope="scope">
<div style="max-height: 300px; overflow: auto"> <el-input placeholder="该角色用于管理全部功能权限" v-model="scope.row.remark" disabled></el-input>
<el-tree </template>
ref="per" </el-table-column>
:data="permissions" <el-table-column label="操作" align="center" width="200">
show-checkbox <template slot-scope="scope">
default-expand-all <el-button type="text" @click="showRole(scope.row)" v-auth="'/parner:小程序角色权限:查看'">查看</el-button>
node-key="id" <el-button v-if="scope.row.roleName !== '超级管理员'" type="text" @click="editRole(scope.row)"
:default-expanded-keys="checkedIds" v-auth="'/parner:小程序角色权限:编辑'">编辑</el-button>
:default-checked-keys="checkedIds" <el-button v-if="scope.row.roleName !== '超级管理员' && scope.row.roleName !== '管理员'" type="text"
:props="defaultProps"> @click="handleDelete(scope.row)" v-auth="'/parner:小程序角色权限:删除'">删除</el-button>
</el-tree> </template>
</div> </el-table-column>
</el-form-item> </el-table>
</el-form> <div class="pagination">
<span slot="footer" class="dialog-footer" v-if="!isDetail"> <el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next"
<el-button @click="roleVisible = false"> </el-button> :total="total"></el-pagination>
<el-button type="primary" @click="saveData"> </el-button>
</span>
</el-dialog>
</div> </div>
<el-dialog :title="isDetail ? '查看角色' : (isAdd ? '新增角色' : '编辑角色')" :visible.sync="roleVisible" width="30%"
@close="closeRole" class="dialog" :close-on-click-modal="false">
<el-form ref="form" label-width="80px" :disabled="isDetail">
<el-form-item label="角色名称">
<el-input v-model="form.roleName" placeholder="请输入角色名称"></el-input>
</el-form-item>
<el-form-item label="角色描述">
<el-input v-model="form.remark" placeholder="请输入角色描述" type="textarea" rows="5"></el-input>
</el-form-item>
<el-form-item prop="role" label="角色权限">
<div style="max-height: 300px; overflow: auto">
<el-tree ref="per" :data="permissions" show-checkbox default-expand-all node-key="id"
:default-expanded-keys="checkedIds" :default-checked-keys="checkedIds" :props="defaultProps">
</el-tree>
</div>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer" v-if="!isDetail">
<el-button @click="roleVisible = false"> </el-button>
<el-button type="primary" @click="saveData"> </el-button>
</span>
</el-dialog>
</div>
</template> </template>
<script> <script>
import Setting from "@/setting"; import Setting from "@/setting";
export default { export default {
data() { data () {
return { return {
platformId: 4, platformId: 4,
keyword: "", keyword: "",
searchTimer: null, searchTimer: null,
isDetail: false, isDetail: false,
form: { form: {
id: "", id: "",
roleName: "", roleName: "",
remark: "" remark: ""
}, },
listData: [], listData: [],
defaultProps: { defaultProps: {
children: "children", children: "children",
label: "name" label: "name"
}, },
page: 1, page: 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
multipleSelection: [], multipleSelection: [],
isAdd: true, isAdd: true,
roleVisible: false, roleVisible: false,
permissions: [], permissions: [],
checkedIds: [], checkedIds: [],
roleNameReapeat: false // roleNameReapeat: false //
}; };
},
watch: {
keyword: function (val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.getData();
}, 500);
}
},
mounted () {
this.getData()
},
methods: {
getData () {
// platformId 4setting.jsport: pc01
this.$get(`${this.api.roleList}?page=${this.page}&size=${this.pageSize}&name=${this.keyword}&platformId=${this.platformId}&port=1`).then(res => {
this.listData = res.rolePage.records;
this.total = res.rolePage.total;
}).catch(res => { });
},
currentChange (val) {
this.page = val;
this.getData();
}, },
watch: { handleDelete (row) {
keyword: function(val) { this.$confirm("确定要删除吗?", "提示", {
clearTimeout(this.searchTimer); type: "warning"
this.searchTimer = setTimeout(() => { }).then(() => {
this.getData(); this.$post(`${this.api.batchRemove}?roleIds=${row.id}`).then(res => {
}, 500); this.$message.success("删除成功");
} this.getData();
}).catch(res => { });
}).catch(() => { });
}, },
mounted() { getRowKeys (row) {
this.getData() return row.id;
}, },
methods: { handleSelectionChange (val) {
getData() { this.multipleSelection = val;
// platformId 4setting.jsport: pc01 },
this.$get(`${this.api.roleList}?page=${this.page}&size=${this.pageSize}&name=${this.keyword}&platformId=${this.platformId}&port=1`).then(res => { delAllSelection () {
this.listData = res.rolePage.records; if (this.multipleSelection.length) {
this.total = res.rolePage.total; this.$confirm("确定要删除吗?", "提示", {
}).catch(res => {}); type: "warning"
}, }).then(() => {
currentChange(val) { let ids = this.multipleSelection.map(item => {
this.page = val; return item.id;
});
this.$post(`${this.api.batchRemove}?roleIds=${ids.toString()}`).then(res => {
this.$refs.table.clearSelection();
this.$message.success("删除成功");
this.getData(); this.getData();
}, }).catch(res => { });
handleDelete(row) { if (this.multipleSelection.length === this.listData.length && this.page > 1) {
this.$confirm("确定要删除吗?", "提示", { this.handleCurrentChange(this.page - 1)
type: "warning" }
}).then(() => { }).catch(() => { });
this.$post(`${this.api.batchRemove}?roleIds=${row.id}`).then(res => { } else {
this.$message.success("删除成功"); this.$message.error("请先选择数据!");
this.getData(); }
}).catch(res => {}); },
}).catch(() => {}); practiceSelectable (row, index) {
}, let boolean = true;
getRowKeys(row) { if (row.roleName == '超级管理员') {
return row.id; boolean = false
}, } else {
handleSelectionChange(val) { boolean = true
this.multipleSelection = val; }
}, return boolean;
delAllSelection() { },
if (this.multipleSelection.length) { closeRole () {
this.$confirm("确定要删除吗?", "提示", { this.isDetail = false;
type: "warning" this.form = {
}).then(() => { id: "",
let ids = this.multipleSelection.map(item => { roleName: "",
return item.id; remark: ""
}); };
this.$post(`${this.api.batchRemove}?roleIds=${ids.toString()}`).then(res => { this.checkedIds = [];
this.$refs.table.clearSelection(); this.permissions = [];
this.$message.success("删除成功"); },
this.getData(); //
}).catch(res => {}); getPer (row) {
if(this.multipleSelection.length === this.listData.length && this.page>1) { if (!this.permissions.length) {
this.handleCurrentChange(this.page - 1) this.$get(`${this.api.queryAllMenus}?platformId=${this.platformId}&port=1`).then(res => {
} let data = res.children;
}).catch(() => {}); //
} else { let yw = data.findIndex(n => n.name == "业务后台");
this.$message.error("请先选择数据!"); yw != -1 && data.splice(yw, 1);
} try {
}, let system = data.findIndex(n => n.name == "系统设置");
practiceSelectable(row, index){
let boolean = true;
if(row.roleName == '超级管理员'){
boolean = false
}else{
boolean = true
}
return boolean;
},
closeRole() {
this.isDetail = false;
this.form = {
id: "",
roleName: "",
remark: ""
};
this.checkedIds = [];
this.permissions = [];
},
//
getPer(row) {
if (!this.permissions.length) {
this.$get(`${this.api.queryAllMenus}?platformId=${this.platformId}&port=1`).then(res => {
let data = res.children;
//
let yw = data.findIndex(n => n.name == "业务后台");
yw != -1 && data.splice(yw, 1);
try {
let system = data.findIndex(n => n.name == "系统设置");
if (system != -1) { if (system != -1) {
data[system].children[1].children.splice(4, 1); data[system].children[1].children.splice(4, 1);
data[system].children[1].children.splice(1, 1); data[system].children[1].children.splice(1, 1);
data[system].children[1].children.splice(0, 1); data[system].children[1].children.splice(0, 1);
}
} catch (error) {
}
this.permissions = data;
if (row) {
this.getDetail(row);
}
}).catch(res => {
});
}
},
addRole() {
this.isAdd = true;
this.getPer();
this.checkedIds = [];
this.permissions.length && this.$refs.per.setCheckedNodes([]);
this.roleVisible = true;
},
//
handleRolePer(data, permissions) {
let result = data;
if (permissions.length) {
permissions.map(e => {
if (result.includes(e.id) && e.children) {
// ,idid,,,
e.children.every(n => result.includes(n)) || result.splice(result.indexOf(e.id), 1);
}
e.children && e.children.length && this.handleRolePer(data, e.children);
});
}
return result;
},
async getDetail(row) { //
let res = await this.$get(`${this.api.obtainDetails}?id=${row.id}`);
this.form = res.role;
this.form.id = row.id;
this.checkedIds = this.handleRolePer(res.permissionList, this.permissions);
this.$refs.per.setCheckedNodes(this.checkedIds);
},
showRole(row) {
this.isDetail = true;
this.isAdd = false;
this.getPer(row);
this.roleVisible = true;
},
editRole(row) {
this.isAdd = false;
this.getPer(row);
this.roleVisible = true;
},
async saveData() {
if (!this.form.roleName) return this.$message.warning("请填写角色名称");
if (!this.form.remark) return this.$message.warning("请填写角色描述");
if (!this.$refs.per.getCheckedKeys().length) return this.$message.warning("请选择角色权限");
// ,(),
let permissionId = [...this.$refs.per.getHalfCheckedKeys(), ...this.$refs.per.getCheckedKeys()];
let data = {
...this.form,
permissionId,
platformId: this.platformId,
port: 1
};
if (this.form.id) {
this.$post(this.api.saveOrUpdate, data).then(res => {
this.$message.success("修改成功");
this.getData();
this.roleVisible = false;
}).catch(res => {});
} else {
this.$post(this.api.saveOrUpdate, data).then(res => {
this.$message.success("新增成功");
this.getData();
this.roleVisible = false;
}).catch(res => {});
} }
} } catch (error) {
}
this.permissions = data;
if (row) {
this.getDetail(row);
}
}).catch(res => {
});
}
},
addRole () {
this.isAdd = true;
this.getPer();
this.checkedIds = [];
this.permissions.length && this.$refs.per.setCheckedNodes([]);
this.roleVisible = true;
},
//
handleRolePer (data, permissions) {
let result = data;
if (permissions.length) {
permissions.map(e => {
if (result.includes(e.id) && e.children) {
// ,idid,,,
e.children.every(n => result.includes(n)) || result.splice(result.indexOf(e.id), 1);
}
e.children && e.children.length && this.handleRolePer(data, e.children);
});
}
return result;
},
async getDetail (row) { //
let res = await this.$get(`${this.api.obtainDetails}?id=${row.id}`);
this.form = res.role;
this.form.id = row.id;
this.checkedIds = this.handleRolePer(res.permissionList, this.permissions);
this.$refs.per.setCheckedNodes(this.checkedIds);
},
showRole (row) {
this.isDetail = true;
this.isAdd = false;
this.getPer(row);
this.roleVisible = true;
},
editRole (row) {
this.isAdd = false;
this.getPer(row);
this.roleVisible = true;
},
async saveData () {
if (!this.form.roleName) return this.$message.warning("请填写角色名称");
if (!this.form.remark) return this.$message.warning("请填写角色描述");
if (!this.$refs.per.getCheckedKeys().length) return this.$message.warning("请选择角色权限");
// ,(),
let permissionId = [...this.$refs.per.getHalfCheckedKeys(), ...this.$refs.per.getCheckedKeys()];
let data = {
...this.form,
permissionId,
platformId: this.platformId,
port: 1
};
if (this.form.id) {
this.$post(this.api.saveOrUpdate, data).then(res => {
this.$message.success("修改成功");
this.getData();
this.roleVisible = false;
}).catch(res => { });
} else {
this.$post(this.api.saveOrUpdate, data).then(res => {
this.$message.success("新增成功");
this.getData();
this.roleVisible = false;
}).catch(res => { });
}
} }
}
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped></style>
</style>

@ -1,272 +1,270 @@
<template> <template>
<div class="page"> <div class="page">
<h6 class="p-title">筛选</h6> <h6 class="p-title">筛选</h6>
<div class="tool"> <div class="tool">
<ul class="filter"> <ul class="filter">
<li> <li>
<el-input placeholder="请输入角色名称" prefix-icon="el-icon-search" v-model.trim="keyword" clearable></el-input> <el-input placeholder="请输入角色名称" prefix-icon="el-icon-search" v-model.trim="keyword" clearable></el-input>
</li> </li>
</ul> </ul>
<div> <div>
<el-button type="primary" round @click="addRole" v-auth="'/parner:pc角色权限:新增角色'">新增角色</el-button> <el-button type="primary" round @click="addRole" v-auth="'/parner:pc角色权限:新增角色'">新增角色</el-button>
<el-button type="primary" round @click="delAllSelection" v-auth="'/parner:pc角色权限:批量删除'">批量删除</el-button> <el-button type="primary" round @click="delAllSelection" v-auth="'/parner:pc角色权限:批量删除'">批量删除</el-button>
</div> </div>
</div> </div>
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" :row-key="getRowKeys">
<el-table-column type="selection" width="55" align="center" :selectable="practiceSelectable" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="roleName" label="角色名称" align="center" min-width="250" show-overflow-tooltip></el-table-column>
<el-table-column label="角色描述" min-width="400" align="center">
<template slot-scope="scope">
<el-input placeholder="该角色用于管理全部功能权限" v-model="scope.row.remark" disabled></el-input>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200">
<template slot-scope="scope">
<el-button type="text" @click="showRole(scope.row)" v-auth="'/parner:pc角色权限:查看'">查看</el-button>
<el-button v-if="scope.row.roleName !== '超级管理员'" type="text" @click="editRole(scope.row)" v-auth="'/parner:pc角色权限:编辑'">编辑</el-button>
<el-button v-if="scope.row.roleName !== '超级管理员' && scope.row.roleName !== '管理员'" type="text" @click="handleDelete(scope.row)" v-auth="'/parner:pc角色权限:删除'">删除</el-button>
</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>
<el-dialog :title="isDetail ? '查看角色' : (isAdd ? '新增角色' : '编辑角色')" :visible.sync="roleVisible" width="30%" @close="closeRole" class="dialog" :close-on-click-modal="false"> <el-table :data="listData" class="table" ref="table" header-align="center" @selection-change="handleSelectionChange"
<el-form ref="form" label-width="80px" :disabled="isDetail"> :row-key="getRowKeys">
<el-form-item label="角色名称"> <el-table-column type="selection" width="55" align="center" :selectable="practiceSelectable"
<el-input v-model="form.roleName" placeholder="请输入角色名称"></el-input> :reserve-selection="true"></el-table-column>
</el-form-item> <el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-form-item label="角色描述"> <el-table-column prop="roleName" label="角色名称" align="center" min-width="250"
<el-input v-model="form.remark" placeholder="请输入角色描述" type="textarea" rows="5"></el-input> show-overflow-tooltip></el-table-column>
</el-form-item> <el-table-column label="角色描述" min-width="400" align="center">
<el-form-item prop="role" label="角色权限"> <template slot-scope="scope">
<div style="max-height: 300px; overflow: auto"> <el-input placeholder="该角色用于管理全部功能权限" v-model="scope.row.remark" disabled></el-input>
<el-tree </template>
ref="per" </el-table-column>
:data="permissions" <el-table-column label="操作" align="center" width="200">
show-checkbox <template slot-scope="scope">
default-expand-all <el-button type="text" @click="showRole(scope.row)" v-auth="'/parner:pc角色权限:查看'">查看</el-button>
node-key="id" <el-button v-if="scope.row.roleName !== '超级管理员'" type="text" @click="editRole(scope.row)"
:default-expanded-keys="checkedIds" v-auth="'/parner:pc角色权限:编辑'">编辑</el-button>
:default-checked-keys="checkedIds" <el-button v-if="scope.row.roleName !== '超级管理员' && scope.row.roleName !== '管理员'" type="text"
:props="defaultProps"> @click="handleDelete(scope.row)" v-auth="'/parner:pc角色权限:删除'">删除</el-button>
</el-tree> </template>
</div> </el-table-column>
</el-form-item> </el-table>
</el-form> <div class="pagination">
<span slot="footer" class="dialog-footer" v-if="!isDetail"> <el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next"
<el-button @click="roleVisible = false"> </el-button> :total="total"></el-pagination>
<el-button type="primary" @click="saveData"> </el-button>
</span>
</el-dialog>
</div> </div>
<el-dialog :title="isDetail ? '查看角色' : (isAdd ? '新增角色' : '编辑角色')" :visible.sync="roleVisible" width="30%"
@close="closeRole" class="dialog" :close-on-click-modal="false">
<el-form ref="form" label-width="80px" :disabled="isDetail">
<el-form-item label="角色名称">
<el-input v-model="form.roleName" placeholder="请输入角色名称"></el-input>
</el-form-item>
<el-form-item label="角色描述">
<el-input v-model="form.remark" placeholder="请输入角色描述" type="textarea" rows="5"></el-input>
</el-form-item>
<el-form-item prop="role" label="角色权限">
<div style="max-height: 300px; overflow: auto">
<el-tree ref="per" :data="permissions" show-checkbox default-expand-all node-key="id"
:default-expanded-keys="checkedIds" :default-checked-keys="checkedIds" :props="defaultProps">
</el-tree>
</div>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer" v-if="!isDetail">
<el-button @click="roleVisible = false"> </el-button>
<el-button type="primary" @click="saveData"> </el-button>
</span>
</el-dialog>
</div>
</template> </template>
<script> <script>
import Setting from "@/setting"; import Setting from "@/setting";
export default { export default {
data() { data () {
return { return {
platformId: 4, platformId: 4,
keyword: "", keyword: "",
searchTimer: null, searchTimer: null,
isDetail: false, isDetail: false,
form: { form: {
id: "", id: "",
roleName: "", roleName: "",
remark: "" remark: ""
}, },
listData: [], listData: [],
defaultProps: { defaultProps: {
children: "children", children: "children",
label: "name" label: "name"
}, },
page: 1, page: 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
multipleSelection: [], multipleSelection: [],
isAdd: true, isAdd: true,
roleVisible: false, roleVisible: false,
permissions: [], permissions: [],
checkedIds: [], checkedIds: [],
roleNameReapeat: false // roleNameReapeat: false //
}; };
},
watch: {
keyword: function (val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.getData();
}, 500);
}
},
mounted () {
this.getData()
},
methods: {
getData () {
// platformId 4setting.js
this.$get(`${this.api.roleList}?page=${this.page}&size=${this.pageSize}&name=${this.keyword}&platformId=${this.platformId}&port=0`).then(res => {
this.listData = res.rolePage.records;
this.total = res.rolePage.total;
}).catch(res => { });
},
currentChange (val) {
this.page = val;
this.getData();
}, },
watch: { handleDelete (row) {
keyword: function(val) { this.$confirm("确定要删除吗?", "提示", {
clearTimeout(this.searchTimer); type: "warning"
this.searchTimer = setTimeout(() => { }).then(() => {
this.getData(); this.$post(`${this.api.batchRemove}?roleIds=${row.id}`).then(res => {
}, 500); this.$message.success("删除成功");
} this.getData();
}).catch(res => { });
}).catch(() => { });
}, },
mounted() { getRowKeys (row) {
this.getData() return row.id;
}, },
methods: { handleSelectionChange (val) {
getData() { this.multipleSelection = val;
// platformId 4setting.js },
this.$get(`${this.api.roleList}?page=${this.page}&size=${this.pageSize}&name=${this.keyword}&platformId=${this.platformId}&port=0`).then(res => { delAllSelection () {
this.listData = res.rolePage.records; if (this.multipleSelection.length) {
this.total = res.rolePage.total; this.$confirm("确定要删除吗?", "提示", {
}).catch(res => {}); type: "warning"
}, }).then(() => {
currentChange(val) { let ids = this.multipleSelection.map(item => {
this.page = val; return item.id;
});
this.$post(`${this.api.batchRemove}?roleIds=${ids.toString()}`).then(res => {
this.$refs.table.clearSelection();
this.$message.success("删除成功");
this.getData(); this.getData();
}, }).catch(res => { });
handleDelete(row) { if (this.multipleSelection.length === this.listData.length && this.page > 1) {
this.$confirm("确定要删除吗?", "提示", { this.handleCurrentChange(this.page - 1)
type: "warning" }
}).then(() => { }).catch(() => { });
this.$post(`${this.api.batchRemove}?roleIds=${row.id}`).then(res => { } else {
this.$message.success("删除成功"); this.$message.error("请先选择数据!");
this.getData(); }
}).catch(res => {}); },
}).catch(() => {}); practiceSelectable (row, index) {
}, let boolean = true;
getRowKeys(row) { if (row.roleName == '超级管理员') {
return row.id; boolean = false
}, } else {
handleSelectionChange(val) { boolean = true
this.multipleSelection = val; }
}, return boolean;
delAllSelection() { },
if (this.multipleSelection.length) { closeRole () {
this.$confirm("确定要删除吗?", "提示", { this.isDetail = false;
type: "warning" this.form = {
}).then(() => { id: "",
let ids = this.multipleSelection.map(item => { roleName: "",
return item.id; remark: ""
}); };
this.$post(`${this.api.batchRemove}?roleIds=${ids.toString()}`).then(res => { this.checkedIds = [];
this.$refs.table.clearSelection(); this.permissions = [];
this.$message.success("删除成功"); },
this.getData(); //
}).catch(res => {}); getPer (row) {
if(this.multipleSelection.length === this.listData.length && this.page>1) { if (!this.permissions.length) {
this.handleCurrentChange(this.page - 1) this.$get(`${this.api.queryAllMenus}?platformId=${this.platformId}`).then(res => {
} let data = res.children;
}).catch(() => {}); //
} else { let yw = data.findIndex(n => n.name == "业务后台");
this.$message.error("请先选择数据!"); yw != -1 && data.splice(yw, 1);
} try {
}, let system = data.findIndex(n => n.name == "系统设置");
practiceSelectable(row, index){
let boolean = true;
if(row.roleName == '超级管理员'){
boolean = false
}else{
boolean = true
}
return boolean;
},
closeRole() {
this.isDetail = false;
this.form = {
id: "",
roleName: "",
remark: ""
};
this.checkedIds = [];
this.permissions = [];
},
//
getPer(row) {
if (!this.permissions.length) {
this.$get(`${this.api.queryAllMenus}?platformId=${this.platformId}`).then(res => {
let data = res.children;
//
let yw = data.findIndex(n => n.name == "业务后台");
yw != -1 && data.splice(yw, 1);
try {
let system = data.findIndex(n => n.name == "系统设置");
if (system != -1) { if (system != -1) {
data[system].children[1].children.splice(4, 1); data[system].children[1].children.splice(4, 1);
data[system].children[1].children.splice(1, 1); data[system].children[1].children.splice(1, 1);
data[system].children[1].children.splice(0, 1); data[system].children[1].children.splice(0, 1);
}
} catch (error) {
}
this.permissions = data;
if (row) {
this.getDetail(row);
}
}).catch(res => {
});
}
},
addRole() {
this.isAdd = true;
this.getPer();
this.checkedIds = [];
this.permissions.length && this.$refs.per.setCheckedNodes([]);
this.roleVisible = true;
},
//
handleRolePer(data, permissions) {
let result = data;
if (permissions.length) {
permissions.map(e => {
if (result.includes(e.id) && e.children) {
// ,idid,,,
e.children.every(n => result.includes(n)) || result.splice(result.indexOf(e.id), 1);
}
e.children && e.children.length && this.handleRolePer(data, e.children);
});
}
return result;
},
async getDetail(row) { //
let res = await this.$get(`${this.api.obtainDetails}?id=${row.id}`);
this.form = res.role;
this.form.id = row.id;
this.checkedIds = this.handleRolePer(res.permissionList, this.permissions);
this.$refs.per.setCheckedNodes(this.checkedIds);
},
showRole(row) {
this.isDetail = true;
this.isAdd = false;
this.getPer(row);
this.roleVisible = true;
},
editRole(row) {
this.isAdd = false;
this.getPer(row);
this.roleVisible = true;
},
async saveData() {
if (!this.form.roleName) return this.$message.warning("请填写角色名称");
if (!this.form.remark) return this.$message.warning("请填写角色描述");
if (!this.$refs.per.getCheckedKeys().length) return this.$message.warning("请选择角色权限");
// ,(),
let permissionId = [...this.$refs.per.getHalfCheckedKeys(), ...this.$refs.per.getCheckedKeys()];
let data = {
...this.form,
permissionId,
platformId: this.platformId,
};
if (this.form.id) {
this.$post(this.api.saveOrUpdate, data).then(res => {
this.$message.success("修改成功");
this.getData();
this.roleVisible = false;
}).catch(res => {});
} else {
this.$post(this.api.saveOrUpdate, data).then(res => {
this.$message.success("新增成功");
this.getData();
this.roleVisible = false;
}).catch(res => {});
} }
} } catch (error) {
}
this.permissions = data;
if (row) {
this.getDetail(row);
}
}).catch(res => {
});
}
},
addRole () {
this.isAdd = true;
this.getPer();
this.checkedIds = [];
this.permissions.length && this.$refs.per.setCheckedNodes([]);
this.roleVisible = true;
},
//
handleRolePer (data, permissions) {
let result = data;
if (permissions.length) {
permissions.map(e => {
if (result.includes(e.id) && e.children) {
// ,idid,,,
e.children.every(n => result.includes(n)) || result.splice(result.indexOf(e.id), 1);
}
e.children && e.children.length && this.handleRolePer(data, e.children);
});
}
return result;
},
async getDetail (row) { //
let res = await this.$get(`${this.api.obtainDetails}?id=${row.id}`);
this.form = res.role;
this.form.id = row.id;
this.checkedIds = this.handleRolePer(res.permissionList, this.permissions);
this.$refs.per.setCheckedNodes(this.checkedIds);
},
showRole (row) {
this.isDetail = true;
this.isAdd = false;
this.getPer(row);
this.roleVisible = true;
},
editRole (row) {
this.isAdd = false;
this.getPer(row);
this.roleVisible = true;
},
async saveData () {
if (!this.form.roleName) return this.$message.warning("请填写角色名称");
if (!this.form.remark) return this.$message.warning("请填写角色描述");
if (!this.$refs.per.getCheckedKeys().length) return this.$message.warning("请选择角色权限");
// ,(),
let permissionId = [...this.$refs.per.getHalfCheckedKeys(), ...this.$refs.per.getCheckedKeys()];
let data = {
...this.form,
permissionId,
platformId: this.platformId,
};
if (this.form.id) {
this.$post(this.api.saveOrUpdate, data).then(res => {
this.$message.success("修改成功");
this.getData();
this.roleVisible = false;
}).catch(res => { });
} else {
this.$post(this.api.saveOrUpdate, data).then(res => {
this.$message.success("新增成功");
this.getData();
this.roleVisible = false;
}).catch(res => { });
}
} }
}
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped></style>
</style>

@ -4,58 +4,36 @@
<div class="side"> <div class="side">
<div> <div>
<div class="flex-between"> <div class="flex-between">
<h6 class="p-title" <h6 class="p-title" style="margin-bottom: 0">城市合伙人区域管理</h6>
style="margin-bottom: 0">城市合伙人区域管理</h6>
</div> </div>
<div style="height: 504px; max-height: 504px; overflow: auto"> <div style="height: 504px; max-height: 504px; overflow: auto">
<el-tree :data="orgList" <el-tree :data="orgList" default-expand-all ref="orgTree" node-key="id" highlight-current
default-expand-all :expand-on-click-node="false" @node-click="handleNodeClick"
ref="orgTree" :props="{ children: 'children', label: 'partnerClassificationName', isLeaf: 'leaf' }">
node-key="id" <span class="custom-tree-node" slot-scope="{ node, data }">
highlight-current
:expand-on-click-node="false"
@node-click="handleNodeClick"
:props="{children: 'children', label: 'partnerClassificationName', isLeaf: 'leaf'}">
<span class="custom-tree-node"
slot-scope="{ node, data }">
<span class="org-name">{{ node.label }}</span> <span class="org-name">{{ node.label }}</span>
</span> </span>
</el-tree> </el-tree>
</div> </div>
</div> </div>
<el-dialog :title="typeForm.id ? '编辑' : '新增' + '分类'" <el-dialog :title="typeForm.id ? '编辑' : '新增' + '分类'" :visible.sync="orgVisible" :close-on-click-modal="false"
:visible.sync="orgVisible" width="50%" @close="closeType">
:close-on-click-modal="false" <el-form v-if="orgVisible" ref="typeForm" :model="typeForm" :rules="orgRules" label-width="100px">
width="50%" <el-form-item label="分类名称" prop="partnerClassificationName">
@close="closeType"> <el-input v-model.trim="typeForm.partnerClassificationName" placeholder="请输入"></el-input>
<el-form v-if="orgVisible"
ref="typeForm"
:model="typeForm"
:rules="orgRules"
label-width="100px">
<el-form-item label="分类名称"
prop="partnerClassificationName">
<el-input v-model.trim="typeForm.partnerClassificationName"
placeholder="请输入"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="上级部门"> <el-form-item label="上级部门">
<span v-if="typeForm.parentName">{{ typeForm.parentName }}</span> <span v-if="typeForm.parentName">{{ typeForm.parentName }}</span>
<el-cascader v-else <el-cascader v-else :options="orgListDia" v-model="cascaderValue" :props="cascaderProps" clearable
:options="orgListDia" style="width: 100%">
v-model="cascaderValue"
:props="cascaderProps"
clearable
style="width: 100%">
</el-cascader> </el-cascader>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" <span slot="footer" class="dialog-footer">
class="dialog-footer">
<el-button @click="closeOrg"> </el-button> <el-button @click="closeOrg"> </el-button>
<el-button type="primary" <el-button type="primary" @click="orgSubmit"> </el-button>
@click="orgSubmit"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
@ -70,117 +48,61 @@
</ul> </ul>
</div> --> </div> -->
<el-table :data="listData" <el-table :data="listData" class="table" ref="table" header-align="center"
class="table" @selection-change="handleSelectionChange" row-key="id">
ref="table" <el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
stripe <el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
header-align="center" <el-table-column prop="teamName" label="团队名称" align="center" min-width="120"
@selection-change="handleSelectionChange" show-overflow-tooltip></el-table-column>
row-key="id"> <el-table-column prop="userName" label="团队负责人" align="center" min-width="100"></el-table-column>
<el-table-column type="selection" <el-table-column prop="phone" label="手机号" align="center" min-width="120"></el-table-column>
width="55" <el-table-column prop="account" label="账号" align="center" min-width="100"></el-table-column>
align="center" <el-table-column prop="invitationAccount" label="邀请人" align="center" min-width="120"></el-table-column>
:reserve-selection="true"></el-table-column> <el-table-column prop="phone" label="团队年费" align="center" min-width="120">
<el-table-column type="index"
width="60"
label="序号"
align="center"></el-table-column>
<el-table-column prop="teamName"
label="团队名称"
align="center"
min-width="120"
show-overflow-tooltip></el-table-column>
<el-table-column prop="userName"
label="团队负责人"
align="center"
min-width="100"></el-table-column>
<el-table-column prop="phone"
label="手机号"
align="center"
min-width="120"></el-table-column>
<el-table-column prop="account"
label="账号"
align="center"
min-width="100"></el-table-column>
<el-table-column prop="invitationAccount"
label="邀请人"
align="center"
min-width="120"></el-table-column>
<el-table-column prop="phone"
label="团队年费"
align="center"
min-width="120">
<template slot-scope="scope"> <template slot-scope="scope">
固定年费{{ scope.row.annualTeamFee !== underfined ? scope.row.annualTeamFee + '元' : '' }} 固定年费{{ scope.row.annualTeamFee !== underfined ? scope.row.annualTeamFee + '元' : '' }}
<el-button v-auth="'/parner:费率管理:修改固定年费'" <el-button v-auth="'/parner:费率管理:修改固定年费'" type="primary" size="mini"
type="primary" @click="editAnnualTeamFee(scope.row)">修改</el-button>
size="mini"
@click="editAnnualTeamFee(scope.row)">修改</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="phone" <el-table-column prop="phone" label="市场服务年费" align="center" min-width="120">
label="市场服务年费"
align="center"
min-width="120">
<template slot-scope="scope"> <template slot-scope="scope">
项目抽成{{ scope.row.annualMarketingFee !== underfined ? scope.row.annualMarketingFee + '%' : '' }} 项目抽成{{ scope.row.annualMarketingFee !== underfined ? scope.row.annualMarketingFee + '%' : '' }}
<el-button v-auth="'/parner:费率管理:修改项目抽成'" <el-button v-auth="'/parner:费率管理:修改项目抽成'" type="primary" size="mini"
type="primary" @click="editAnnualMarketingFee(scope.row)">修改</el-button>
size="mini"
@click="editAnnualMarketingFee(scope.row)">修改</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background <el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next"
@current-change="currentChange" :total="total"></el-pagination>
:current-page="page"
layout="total, prev, pager, next"
:total="total"></el-pagination>
</div> </div>
<el-dialog title="请设置团队年费" <el-dialog title="请设置团队年费" :visible.sync="annualTeamFeeVisible" width="300px" class="dialog"
:visible.sync="annualTeamFeeVisible" :close-on-click-modal="false">
width="300px" <el-form ref="form" label-width="75px" style='margin-right: 0;'>
class="dialog"
:close-on-click-modal="false">
<el-form ref="form"
label-width="75px"
style='margin-right: 0;'>
<el-form-item label="固定年费"> <el-form-item label="固定年费">
<el-input style="width: 150px;" <el-input style="width: 150px;" type="number" v-model.number="annualTeamFee" placeholder="请输入数字"></el-input>
type="number"
v-model.number="annualTeamFee"
placeholder="请输入数字"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" <span slot="footer" class="dialog-footer">
class="dialog-footer">
<el-button @click="annualTeamFeeVisible = false">取消</el-button> <el-button @click="annualTeamFeeVisible = false">取消</el-button>
<el-button type="primary" <el-button type="primary" @click="submitAnnualTeamFee">确定</el-button>
@click="submitAnnualTeamFee">确定</el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-dialog title="请设置市场服务年费" <el-dialog title="请设置市场服务年费" :visible.sync="annualMarketingFeeVisible" width="300px" class="dialog"
:visible.sync="annualMarketingFeeVisible" :close-on-click-modal="false">
width="300px" <el-form ref="form" label-width="75px" style='margin-right: 0;'>
class="dialog"
:close-on-click-modal="false">
<el-form ref="form"
label-width="75px"
style='margin-right: 0;'>
<el-form-item label="项目抽成"> <el-form-item label="项目抽成">
<el-input style="width: 150px;" <el-input style="width: 150px;" type="number" v-model.number="annualMarketingFee"
type="number" placeholder="请输入数字"></el-input>
v-model.number="annualMarketingFee" %
placeholder="请输入数字"></el-input> %
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" <span slot="footer" class="dialog-footer">
class="dialog-footer">
<el-button @click="annualMarketingFeeVisible = false">取消</el-button> <el-button @click="annualMarketingFeeVisible = false">取消</el-button>
<el-button type="primary" <el-button type="primary" @click="submitAnnualMarketingFee">确定</el-button>
@click="submitAnnualMarketingFee">确定</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
@ -496,78 +418,94 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.m-b-20 { .m-b-20 {
margin-bottom: 20px; margin-bottom: 20px;
} }
.org-name { .org-name {
margin-right: 20px; margin-right: 20px;
} }
.w-100 { .w-100 {
width: 100%; width: 100%;
} }
.wrap { .wrap {
display: flex; display: flex;
padding: 0 24px; padding: 0 24px;
.side {
width: 300px; .side {
padding: 24px 10px 24px 0; width: 300px;
margin-right: 24px; padding: 24px 10px 24px 0;
border-right: 1px solid rgba(0, 0, 0, 0.06); margin-right: 24px;
} border-right: 1px solid rgba(0, 0, 0, 0.06);
.right { }
width: calc(100% - 324px);
padding: 24px 0; .right {
} width: calc(100% - 324px);
padding: 24px 0;
}
} }
.add-dia { .add-dia {
.tips { .tips {
font-size: 12px; font-size: 12px;
color: #f00; color: #f00;
}
.title {
margin: 10px 0;
font-size: 14px;
em {
font-style: normal;
} }
.title { }
margin: 10px 0;
font-size: 14px; .des {
em { font-size: 13px;
font-style: normal; color: #7a7a7a;
} }
.link-wrap {
display: flex;
align-items: center;
margin: 10px 0 20px;
}
.link {
padding: 10px;
margin-right: 15px;
background-color: #e7f5ff;
border-radius: 4px;
}
}
/deep/.choose-dia {
.member-list {
li {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
} }
.des {
font-size: 13px; .info {
color: #7a7a7a; display: inline-flex;
align-items: center;
} }
.link-wrap {
display: flex; img {
align-items: center; width: 40px;
margin: 10px 0 20px; height: 40px;
} }
.link {
padding: 10px; .name {
margin-right: 15px; margin-left: 10px;
background-color: #e7f5ff;
border-radius: 4px;
} }
}
/deep/.choose-dia { .el-radio__label {
.member-list { display: none;
li {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
}
.info {
display: inline-flex;
align-items: center;
}
img {
width: 40px;
height: 40px;
}
.name {
margin-left: 10px;
}
.el-radio__label {
display: none;
}
} }
}
} }
</style> </style>

@ -77,7 +77,7 @@
</div> </div>
</div> </div>
<el-table :data="listData" class="table" ref="table" stripe header-align="center" <el-table :data="listData" class="table" ref="table" header-align="center"
@selection-change="handleSelectionChange" row-key="id"> @selection-change="handleSelectionChange" row-key="id">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> <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 type="index" width="60" label="序号" align="center"></el-table-column>

@ -104,7 +104,7 @@
</div> </div>
<el-input class="mgb10" placeholder="请输入产品名称" prefix-icon="el-icon-search" v-model.trim="keyword" <el-input class="mgb10" placeholder="请输入产品名称" prefix-icon="el-icon-search" v-model.trim="keyword"
clearable></el-input> clearable></el-input>
<el-table :data="products" class="table" ref="table" stripe header-align="center" max-height="470" <el-table :data="products" class="table" ref="table" header-align="center" max-height="470"
@selection-change="handleSelectionChange" row-key="mallId"> @selection-change="handleSelectionChange" row-key="mallId">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> <el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="55" label="序号" align="center"></el-table-column> <el-table-column type="index" width="55" label="序号" align="center"></el-table-column>
@ -123,7 +123,7 @@
<p class="addhr_tag"></p> <p class="addhr_tag"></p>
<span>已选择产品{{ checkeds.length }}</span> <span>已选择产品{{ checkeds.length }}</span>
</div> </div>
<el-table :data="checkeds" class="table" stripe header-align="center" max-height="470"> <el-table :data="checkeds" class="table" header-align="center" max-height="470">
<el-table-column type="index" width="55" label="序号" align="center"></el-table-column> <el-table-column type="index" width="55" label="序号" align="center"></el-table-column>
<el-table-column prop="productName" label="产品名称" align="center"></el-table-column> <el-table-column prop="productName" label="产品名称" align="center"></el-table-column>
<el-table-column prop="supplierName" label="厂商" align="center"></el-table-column> <el-table-column prop="supplierName" label="厂商" align="center"></el-table-column>

@ -1,323 +1,332 @@
<template> <template>
<div> <div>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="24"> <el-col :span="24">
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="mgb20">
<div class="flex-between"> <div class="flex-between">
<div class="per_title" v-preventReClick @click="goback()"> <div class="per_title" v-preventReClick @click="goback()">
<i class="el-icon-arrow-left"></i> <i class="el-icon-arrow-left"></i>
<span class="per_back">返回</span> <span class="per_back">返回</span>
<span class="per_school">系统服务器地址配置</span> <span class="per_school">系统服务器地址配置</span>
</div> </div>
<div> <div>
<el-button type="primary" round class="mag" v-preventReClick @click="saveAdd('form')">确定</el-button> <el-button type="primary" round class="mag" v-preventReClick @click="saveAdd('form')">确定</el-button>
</div> </div>
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="mgb20">
<div class="flex-center mgb20 user_header"> <div class="flex-center mgb20 user_header">
<p class="addhr_tag"></p> <p class="addhr_tag"></p>
<span>系统信息</span> <span>系统信息</span>
</div> </div>
<div> <div>
<el-form ref="form" :model="form" :rules="rules" label-width="80px" class="flex-end-around"> <el-form ref="form" :model="form" :rules="rules" label-width="80px" class="flex-end-around">
<el-col :span="6"> <el-col :span="6">
<el-form-item prop="systemName" label="系统名称"> <el-form-item prop="systemName" label="系统名称">
<el-input v-model="form.systemName" placeholder="请输入系统名称"></el-input> <el-input v-model="form.systemName" placeholder="请输入系统名称"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="systemType" label="系统类型"> <el-form-item prop="systemType" label="系统类型">
<el-select v-model="form.systemType" clearable placeholder="请选择系统类型"> <el-select v-model="form.systemType" clearable placeholder="请选择系统类型">
<el-option v-for="(item,index) in systemTypeList" :key="index" :label="item.name" :value="item.value"></el-option> <el-option v-for="(item, index) in systemTypeList" :key="index" :label="item.name"
</el-select> :value="item.value"></el-option>
</el-form-item> </el-select>
</el-col> </el-form-item>
</el-col>
<el-col :span="6" style="margin-left: 60px;"> <el-col :span="6" style="margin-left: 60px;">
<el-form-item prop="systemAttribution" label="系统归属"> <el-form-item prop="systemAttribution" label="系统归属">
<el-select v-model="form.systemAttribution" clearable placeholder="请选择系统归属"> <el-select v-model="form.systemAttribution" clearable placeholder="请选择系统归属">
<el-option v-for="(item,index) in systemList" :key="index" :label="item.name" :value="item.value"></el-option> <el-option v-for="(item, index) in systemList" :key="index" :label="item.name"
</el-select> :value="item.value"></el-option>
</el-form-item> </el-select>
</el-col> </el-form-item>
</el-form> </el-col>
</div> </el-form>
</el-card> </div>
</el-card>
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="mgb20">
<div class="mgb20 flex-between"> <div class="mgb20 flex-between">
<div class="flex-center"> <div class="flex-center">
<p class="addhr_tag"></p> <p class="addhr_tag"></p>
<span>地址列表</span> <span>地址列表</span>
</div> </div>
<div> <div>
<el-input placeholder="请输入系统名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input> <el-input placeholder="请输入系统名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
</div> </div>
</div> </div>
<el-table :data="permissionData" class="table" stripe :span-method="SpanMethod" header-align="center"> <el-table :data="permissionData" class="table" :span-method="SpanMethod" header-align="center">
<el-table-column prop="id" label="序号" align="center"> <el-table-column prop="id" label="序号" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="age" label="服务器名称" align="center"> <el-table-column prop="age" label="服务器名称" align="center">
</el-table-column> </el-table-column>
<el-table-column label="IP" align="center"> <el-table-column label="IP" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="tab_temp"> <div class="tab_temp">
<div class="flex-center"> <div class="flex-center">
<label>内网:</label> <label>内网:</label>
<el-input v-model="scope.row.Intranet" placeholder="请输入IP地址"></el-input> <el-input v-model="scope.row.Intranet" placeholder="请输入IP地址"></el-input>
</div> </div>
<div class="flex-center mar10"> <div class="flex-center mar10">
<label>外网:</label> <label>外网:</label>
<el-input v-model="scope.row.extranet" placeholder="请输入端口号"></el-input> <el-input v-model="scope.row.extranet" placeholder="请输入端口号"></el-input>
</div> </div>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="端口" align="center"> <el-table-column label="端口" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="tab_temp"> <div class="tab_temp">
<div class="flex-center"> <div class="flex-center">
<label>内网:</label> <label>内网:</label>
<el-input v-model="scope.row.Intranet" placeholder="请输入内网IP地址"></el-input> <el-input v-model="scope.row.Intranet" placeholder="请输入内网IP地址"></el-input>
</div> </div>
<div class="flex-center mar10"> <div class="flex-center mar10">
<label>外网:</label> <label>外网:</label>
<el-input v-model="scope.row.extranet" placeholder="请输入外网IP地址"></el-input> <el-input v-model="scope.row.extranet" placeholder="请输入外网IP地址"></el-input>
</div> </div>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="storeName" label="后台" align="center"> <el-table-column prop="storeName" label="后台" align="center">
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text">编辑</el-button> <el-button type="text">编辑</el-button>
<el-button type="text">删除</el-button> <el-button type="text">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background layout="total, prev, pager, next" :total="pages"> <el-pagination background layout="total, prev, pager, next" :total="pages">
</el-pagination> </el-pagination>
</div> </div>
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
<!-- 选择IP --> <!-- 选择IP -->
<el-dialog :visible.sync="ipVisible" width="50%" center> <el-dialog :visible.sync="ipVisible" width="50%" center>
<div class="flex-center mgb20"> <div class="flex-center mgb20">
<p class="addhr_tag"></p> <p class="addhr_tag"></p>
<span>客户列表</span> <span>客户列表</span>
</div>
<el-table :data="permissionData" class="table" header-align="center">
<el-table-column prop="id" label="序号" align="center">
</el-table-column>
<el-table-column prop="age" label="服务器名称" align="center">
</el-table-column>
<el-table-column label="IP" align="center">
<template slot-scope="scope">
<div class="tab_temp">
<div class="flex-center">
<label>内网:</label>
<el-input v-model="scope.row.Intranet" placeholder="请输入IP地址"></el-input>
</div>
<div class="flex-center mar10">
<label>外网:</label>
<el-input v-model="scope.row.extranet" placeholder="请输入端口号"></el-input>
</div>
</div> </div>
<el-table :data="permissionData" class="table" stripe header-align="center"> </template>
<el-table-column prop="id" label="序号" align="center"> </el-table-column>
</el-table-column> <el-table-column label="端口" align="center">
<el-table-column prop="age" label="服务器名称" align="center"> <template slot-scope="scope">
</el-table-column> <div class="tab_temp">
<el-table-column label="IP" align="center"> <div class="flex-center">
<template slot-scope="scope"> <label>内网:</label>
<div class="tab_temp"> <el-input v-model="scope.row.Intranet" placeholder="请输入内网IP地址"></el-input>
<div class="flex-center"> </div>
<label>内网:</label> <div class="flex-center mar10">
<el-input v-model="scope.row.Intranet" placeholder="请输入IP地址"></el-input> <label>外网:</label>
</div> <el-input v-model="scope.row.extranet" placeholder="请输入外网IP地址"></el-input>
<div class="flex-center mar10"> </div>
<label>外网:</label> </div>
<el-input v-model="scope.row.extranet" placeholder="请输入端口号"></el-input> </template>
</div> </el-table-column>
</div> <el-table-column label="选择" align="center">
</template> <template slot-scope="scope">
</el-table-column> <i class="el-icon-success radio_icon"></i>
<el-table-column label="端口" align="center"> </template>
<template slot-scope="scope"> </el-table-column>
<div class="tab_temp"> </el-table>
<div class="flex-center"> <span slot="footer" class="dialog-footer">
<label>内网:</label> <el-button @click="ipVisible = false"> </el-button>
<el-input v-model="scope.row.Intranet" placeholder="请输入内网IP地址"></el-input> <el-button type="primary" @click="editSure('teacherForm')"> </el-button>
</div> </span>
<div class="flex-center mar10"> </el-dialog>
<label>外网:</label> </div>
<el-input v-model="scope.row.extranet" placeholder="请输入外网IP地址"></el-input>
</div>
</div>
</template>
</el-table-column>
<el-table-column label="选择" align="center">
<template slot-scope="scope">
<i class="el-icon-success radio_icon"></i>
</template>
</el-table-column>
</el-table>
<span slot="footer" class="dialog-footer">
<el-button @click="ipVisible = false"> </el-button>
<el-button type="primary" @click="editSure('teacherForm')"> </el-button>
</span>
</el-dialog>
</div>
</template> </template>
<script> <script>
export default { export default {
data (){ data () {
return { return {
form: { form: {
systemName: '', systemName: '',
systemType: '', systemType: '',
systemAttribution: '' systemAttribution: ''
}, },
rules: { rules: {
systemName:[ systemName: [
{ required: true, message: '请输入系统名称', trigger: 'blur' } { required: true, message: '请输入系统名称', trigger: 'blur' }
], ],
systemType:[ systemType: [
{ required: true, message: '请选择系统类型', trigger: 'change' } { required: true, message: '请选择系统类型', trigger: 'change' }
], ],
systemAttribution:[ systemAttribution: [
{ required: true, message: '请选择系统归属', trigger: 'change' } { required: true, message: '请选择系统归属', trigger: 'change' }
] ]
}, },
permissionData: [{ permissionData: [{
id: 1, id: 1,
age: '小额贷系统', age: '小额贷系统',
storeName: '1个月', storeName: '1个月',
total: '2019.01.02 11:00', total: '2019.01.02 11:00',
payamount: '2019.01.02 11:00', payamount: '2019.01.02 11:00',
payamount: '700d12h1min', payamount: '700d12h1min',
swtich: true, swtich: true,
Intranet: '10.20.202.1', Intranet: '10.20.202.1',
extranet: '10.20.202.1' extranet: '10.20.202.1'
}, },
{ {
id: 2, id: 2,
age: '小额贷系统', age: '小额贷系统',
storeName: '1个月', storeName: '1个月',
total: '2019.01.02 11:00', total: '2019.01.02 11:00',
payamount: '2019.01.02 11:00', payamount: '2019.01.02 11:00',
swtich: true, swtich: true,
Intranet: '', Intranet: '',
extranet: '' extranet: ''
}], }],
pages: 1, pages: 1,
ipVisible: false, ipVisible: false,
educationDegreeList: [{ educationDegreeList: [{
name: '研究生及以上', name: '研究生及以上',
value: 1 value: 1
}], }],
systemList: [{ systemList: [{
name: '外部产品', name: '外部产品',
value: 1 value: 1
}, },
{ {
name: '内部系统', name: '内部系统',
value: 0 value: 0
}], }],
systemTypeList: [{ systemTypeList: [{
name: '工具', name: '工具',
value: 1 value: 1
}, },
{ {
name: '实训', name: '实训',
value: 2 value: 2
}, },
{ {
name: '网站', name: '网站',
value: 3 value: 3
}], }],
configId : this.$store.state.configId, configId: this.$store.state.configId,
keyword: '' keyword: ''
} }
}, },
mounted(){ mounted () {
if(this.configId){ if (this.configId) {
this.getData() this.getData()
} }
}, },
methods: { methods: {
getData(){ getData () {
let data = { let data = {
systemId: this.configId systemId: this.configId
} }
this.$get(this.api.queryServiceConfigDetails,data).then((res) => { this.$get(this.api.queryServiceConfigDetails, data).then((res) => {
this.form = { this.form = {
systemName: res.message[0].systemName, systemName: res.message[0].systemName,
systemType: res.message[0].systemType, systemType: res.message[0].systemType,
systemAttribution: res.message[0].systemAttribution, systemAttribution: res.message[0].systemAttribution,
} }
}).catch((res) => { }).catch((res) => {
}) })
}, },
saveAdd(){ saveAdd () {
let data = { let data = {
systemId: this.configId, systemId: this.configId,
systemName: this.form.systemName, systemName: this.form.systemName,
systemType: this.form.systemType, systemType: this.form.systemType,
systemAttribution: this.form.systemAttribution, systemAttribution: this.form.systemAttribution,
} }
if(this.configId){ if (this.configId) {
this.$post(this.api.updateServiceConfig,data).then((res) => { this.$post(this.api.updateServiceConfig, data).then((res) => {
this.$message.success('编辑成功'); this.$message.success('编辑成功');
this.goback() this.goback()
}).catch((res) => { }).catch((res) => {
}) })
}else{ } else {
this.$post(this.api.updateServiceConfig,data).then((res) => { this.$post(this.api.updateServiceConfig, data).then((res) => {
this.$message.success('添加成功'); this.$message.success('添加成功');
this.goback() this.goback()
}).catch((res) => { }).catch((res) => {
}) })
} }
}, },
SpanMethod({ row, column, rowIndex, columnIndex }) { SpanMethod ({ row, column, rowIndex, columnIndex }) {
if (rowIndex % 2 === 0) { if (rowIndex % 2 === 0) {
if (columnIndex === 6) { if (columnIndex === 6) {
if(!row.Intranet){ if (!row.Intranet) {
return [1, 2]; return [1, 2];
} }
}
// else if (columnIndex === 1) {
// return [0, 0];
// }
}
},
chooseIp(){
this.ipVisible = true
},
goback(){
this.$router.go(-1)
}
} }
// else if (columnIndex === 1) {
// return [0, 0];
// }
}
},
chooseIp () {
this.ipVisible = true
},
goback () {
this.$router.go(-1)
} }
}
}
</script> </script>
<style scoped> <style scoped>
.border_lf{ .border_lf {
border-left: 1px dashed #eee; border-left: 1px dashed #eee;
padding: 0 60px; padding: 0 60px;
} }
.border_lf label{
width: 120px; .border_lf label {
width: 120px;
} }
.pad_none{
padding: 0 0 0 60px; .pad_none {
padding: 0 0 0 60px;
} }
.mar_input{
margin-right: 80px; .mar_input {
margin-right: 80px;
} }
.marb30{
margin-bottom: 30px; .marb30 {
margin-bottom: 30px;
} }
.tab_temp label{
width: 60px; .tab_temp label {
width: 60px;
} }
.mar10{
margin-top: 10px; .mar10 {
margin-top: 10px;
} }
.radio_icon{
font-size: 26px; .radio_icon {
color: #9278FF; font-size: 26px;
color: #9278FF;
} }
</style> </style>

@ -40,7 +40,7 @@
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>服务列表</span> <span>服务列表</span>
</div> </div>
<el-table :data="list" class="table" stripe header-align="center"> <el-table :data="list" class="table" header-align="center">
<!-- <el-table-column type="selection" width="55" align="center"></el-table-column> --> <!-- <el-table-column type="selection" width="55" align="center"></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>

@ -1,9 +1,7 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<div class="side"> <div class="side">
<org ref="tree" <org ref="tree" @initData="initData" @getData="getData"></org>
@initData="initData"
@getData="getData"></org>
</div> </div>
<div class="right"> <div class="right">
@ -11,95 +9,51 @@
<div class="tool"> <div class="tool">
<ul class="filter"> <ul class="filter">
<li> <li>
<el-input placeholder="请输入模型名称" <el-input placeholder="请输入模型名称" prefix-icon="el-icon-search" v-model.trim="keyword" clearable></el-input>
prefix-icon="el-icon-search"
v-model.trim="keyword"
clearable></el-input>
</li> </li>
</ul> </ul>
<div> <div>
<el-button type="primary" <el-button type="primary" round @click="add">导入模型</el-button>
round <el-button type="primary" round @click="batchDel">批量移除</el-button>
@click="add">导入模型</el-button>
<el-button type="primary"
round
@click="batchDel">批量移除</el-button>
</div> </div>
</div> </div>
<el-table :data="listData" <el-table :data="listData" class="table" ref="table" header-align="center"
class="table" @selection-change="handleSelectionChange">
ref="table" <el-table-column type="selection" width="55" align="center"></el-table-column>
stripe <el-table-column type="index" label="序号" width="55" align="center"></el-table-column>
header-align="center" <el-table-column prop="modelName" label="模型名称" align="center"></el-table-column>
@selection-change="handleSelectionChange"> <el-table-column v-if="isTopLevel" prop="categoryName" label="分类" width="150" align="center"></el-table-column>
<el-table-column type="selection" <el-table-column prop="createTime" label="导入时间" align="center"></el-table-column>
width="55" <el-table-column label="状态" align="center">
align="center"></el-table-column>
<el-table-column type="index"
label="序号"
width="55"
align="center"></el-table-column>
<el-table-column prop="modelName"
label="模型名称"
align="center"></el-table-column>
<el-table-column v-if="isTopLevel"
prop="categoryName"
label="分类"
width="150"
align="center"></el-table-column>
<el-table-column prop="createTime"
label="导入时间"
align="center"></el-table-column>
<el-table-column label="状态"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.ztOpen ? '禁用' : '启用' }} {{ scope.row.ztOpen ? '禁用' : '启用' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" <el-table-column label="操作" width="200" align="center">
width="200"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" <el-button type="text" @click="show(scope.row)">查看</el-button>
@click="show(scope.row)">查看</el-button> <el-button type="text" @click="del(scope.row)">移除</el-button>
<el-button type="text"
@click="del(scope.row)">移除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background <el-pagination background layout="total, prev, pager, next" :current-page="page"
layout="total, prev, pager, next" @current-change="handleCurrentChange" :total="total"></el-pagination>
:current-page="page"
@current-change="handleCurrentChange"
:total="total"></el-pagination>
</div> </div>
</div> </div>
<el-dialog title="请选择需要导入的模型" <el-dialog title="请选择需要导入的模型" :visible.sync="modelVisible" width="500px" class="dialog"
:visible.sync="modelVisible" :close-on-click-modal="false">
width="500px"
class="dialog"
:close-on-click-modal="false">
<div class="model-wrap"> <div class="model-wrap">
<el-tree v-if="modelData.length" <el-tree v-if="modelData.length" :data="modelData" v-loading="modelLoading" ref="model" default-expand-all
:data="modelData" show-checkbox node-key="id" :props="{ children: 'children', label: 'categoryName', isLeaf: 'leaf' }">
v-loading="modelLoading"
ref="model"
default-expand-all
show-checkbox
node-key="id"
:props="{children: 'children', label: 'categoryName', isLeaf: 'leaf'}">
</el-tree> </el-tree>
<div class="none" <div class="none" v-else>暂无可导入的模型</div>
v-else>暂无可导入的模型</div>
</div> </div>
<span slot="footer" <span slot="footer" class="dialog-footer">
class="dialog-footer">
<el-button @click="modelVisible = false"> </el-button> <el-button @click="modelVisible = false"> </el-button>
<el-button type="primary" <el-button type="primary" @click="submit"> </el-button>
@click="submit"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
@ -341,29 +295,34 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.wrap { .wrap {
display: flex; display: flex;
min-height: calc(100vh - 310px); min-height: calc(100vh - 310px);
padding: 0 24px; padding: 0 24px;
.side {
width: 300px; .side {
padding: 24px 10px 24px 0; width: 300px;
margin-right: 24px; padding: 24px 10px 24px 0;
border-right: 1px solid rgba(0, 0, 0, 0.06); margin-right: 24px;
} border-right: 1px solid rgba(0, 0, 0, 0.06);
.right { }
width: calc(100% - 374px);
padding: 24px; .right {
} width: calc(100% - 374px);
padding: 24px;
}
} }
.el-input__inner { .el-input__inner {
height: 32px; height: 32px;
} }
.model-wrap { .model-wrap {
max-height: 400px; max-height: 400px;
overflow: auto; overflow: auto;
.none {
text-align: center; .none {
color: #8b8b8b; text-align: center;
} color: #8b8b8b;
}
} }
</style> </style>

@ -1,9 +1,7 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<div class="side"> <div class="side">
<org ref="tree" <org ref="tree" @initData="catetoryClick" @getData="getData"></org>
@initData="catetoryClick"
@getData="getData"></org>
</div> </div>
<div class="right"> <div class="right">
@ -11,125 +9,67 @@
<div class="tool"> <div class="tool">
<ul class="filter"> <ul class="filter">
<li> <li>
<el-input placeholder="请输入模型名称" <el-input placeholder="请输入模型名称" prefix-icon="el-icon-search" v-model.trim="keyword" clearable></el-input>
prefix-icon="el-icon-search"
v-model.trim="keyword"
clearable></el-input>
</li> </li>
</ul> </ul>
<div> <div>
<el-button type="primary" <el-button type="primary" round @click="add">新增模型</el-button>
round <el-button type="primary" round @click="batchDel">批量删除</el-button>
@click="add">新增模型</el-button> <el-button type="primary" round @click="batchOff(1)">批量禁用</el-button>
<el-button type="primary" <el-button type="primary" round @click="batchOff(0)">批量开启</el-button>
round
@click="batchDel">批量删除</el-button>
<el-button type="primary"
round
@click="batchOff(1)">批量禁用</el-button>
<el-button type="primary"
round
@click="batchOff(0)">批量开启</el-button>
</div> </div>
</div> </div>
<el-table :data="listData" <el-table :data="listData" class="table" ref="table" header-align="center"
class="table" @selection-change="handleSelectionChange">
ref="table" <el-table-column type="selection" width="55" align="center"></el-table-column>
stripe <el-table-column type="index" label="序号" width="55" align="center"></el-table-column>
header-align="center" <el-table-column prop="modelName" label="模型名称" align="center"></el-table-column>
@selection-change="handleSelectionChange"> <el-table-column v-if="isTopLevel" prop="categoryName" label="分类" width="150" align="center"></el-table-column>
<el-table-column type="selection" <el-table-column prop="modifyName" label="编辑人" align="center">
width="55"
align="center"></el-table-column>
<el-table-column type="index"
label="序号"
width="55"
align="center"></el-table-column>
<el-table-column prop="modelName"
label="模型名称"
align="center"></el-table-column>
<el-table-column v-if="isTopLevel"
prop="categoryName"
label="分类"
width="150"
align="center"></el-table-column>
<el-table-column prop="modifyName"
label="编辑人"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.schoolName || scope.row.modifyName }} {{ scope.row.schoolName || scope.row.modifyName }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="updateTime" <el-table-column prop="updateTime" label="最新编辑时间" width="150" align="center"></el-table-column>
label="最新编辑时间" <el-table-column prop="workNumber" label="状态" width="100" align="center">
width="150"
align="center"></el-table-column>
<el-table-column prop="workNumber"
label="状态"
width="100"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.postStatus ? '已发布' : '草稿' }} {{ scope.row.postStatus ? '已发布' : '草稿' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" <el-table-column label="操作" width="260">
width="260">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" <el-button type="text" @click="show(scope.row)">查看</el-button>
@click="show(scope.row)">查看</el-button> <el-button type="text" @click="edit(scope.row)">编辑</el-button>
<el-button type="text" <el-button type="text" @click="del(scope.row)">删除</el-button>
@click="edit(scope.row)">编辑</el-button> <el-button v-if="isSchool" type="text" @click="copy(scope.row)">复制</el-button>
<el-button type="text" <el-switch v-if="scope.row.postStatus" v-model="scope.row.ztOpen" :active-value="0" :inactive-value="1"
@click="del(scope.row)">删除</el-button> style="margin: 0 10px 0 5px" :active-text="scope.row.ztOpen ? '禁用' : '启用'"
<el-button v-if="isSchool" @change="switchOff($event, scope.row, scope.$index)"></el-switch>
type="text"
@click="copy(scope.row)">复制</el-button>
<el-switch v-if="scope.row.postStatus"
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>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background <el-pagination background layout="total, prev, pager, next" :current-page="page"
layout="total, prev, pager, next" @current-change="handleCurrentChange" :total="total"></el-pagination>
:current-page="page"
@current-change="handleCurrentChange"
:total="total"></el-pagination>
</div> </div>
</div> </div>
<el-dialog title="复制" <el-dialog title="复制" :visible.sync="copyVisible" width="400px" center :close-on-click-modal="false">
:visible.sync="copyVisible"
width="400px"
center
:close-on-click-modal="false">
<el-form label-position="left"> <el-form label-position="left">
<el-form-item label="模型名称"> <el-form-item label="模型名称">
<el-input placeholder="请输入模型名称" <el-input placeholder="请输入模型名称" v-model="curRow.modelName" style="width: 280px"></el-input>
v-model="curRow.modelName"
style="width: 280px"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="模型分类"> <el-form-item label="模型分类">
<el-cascader :options="categories" <el-cascader :options="categories" v-model="categoryIdCus" :props="categoryProps" clearable
v-model="categoryIdCus" style="width: 280px">
:props="categoryProps"
clearable
style="width: 280px">
</el-cascader> </el-cascader>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" <span slot="footer" class="dialog-footer">
class="dialog-footer">
<el-button @click="copyVisible = false"> </el-button> <el-button @click="copyVisible = false"> </el-button>
<el-button type="primary" <el-button type="primary" @click="copySubmit"> </el-button>
@click="copySubmit"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
@ -334,20 +274,23 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.wrap { .wrap {
display: flex; display: flex;
padding: 0 24px; padding: 0 24px;
.side {
width: 300px; .side {
padding: 24px 10px 24px 0; width: 300px;
margin-right: 24px; padding: 24px 10px 24px 0;
border-right: 1px solid rgba(0, 0, 0, 0.06); margin-right: 24px;
} border-right: 1px solid rgba(0, 0, 0, 0.06);
.right { }
width: calc(100% - 374px);
padding: 24px; .right {
} width: calc(100% - 374px);
padding: 24px;
}
} }
.el-input__inner { .el-input__inner {
height: 32px; height: 32px;
} }
</style> </style>

@ -113,7 +113,7 @@
style="margin-bottom: 10px">批量删除 style="margin-bottom: 10px">批量删除
</el-button> </el-button>
<div class="draggable"> <div class="draggable">
<el-table ref="projectJudgementTable" :data="projectJudgmentData" class="table" stripe header-align="center" <el-table ref="projectJudgementTable" :data="projectJudgmentData" class="table" header-align="center"
:use-virtual="isLc" :max-height="600" :row-height="60" :border="false" :use-virtual="isLc" :max-height="600" :row-height="60" :border="false"
@selection-change="handleSelectionProjectJudgment" row-key="judgmentId" v-loading="listLoading"> @selection-change="handleSelectionProjectJudgment" row-key="judgmentId" v-loading="listLoading">
<el-table-column type="selection" width="55" align="center"></el-table-column> <el-table-column type="selection" width="55" align="center"></el-table-column>
@ -187,7 +187,7 @@
</div> </div>
</div> </div>
<el-table v-loading="visibleLoading" :data="judgementData" ref="judgementTable" class="table" stripe <el-table v-loading="visibleLoading" :data="judgementData" ref="judgementTable" class="table"
header-align="center" use-virtual :row-height="45" :max-height="400" :border="false" header-align="center" use-virtual :row-height="45" :max-height="400" :border="false"
@selection-change="handleSelectionJudgment" :row-key="rowKey"> @selection-change="handleSelectionJudgment" :row-key="rowKey">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> <el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>

@ -1,14 +1,10 @@
<template> <template>
<div> <div>
<el-card v-if="showBack" <el-card v-if="showBack" shadow="hover" class="mgb20">
shadow="hover" <el-page-header :content="'实验项目管理 / ' + titleName" @back="back"></el-page-header>
class="mgb20">
<el-page-header :content="'实验项目管理 / '+titleName"
@back="back"></el-page-header>
</el-card> </el-card>
<el-card shadow="hover" <el-card shadow="hover" class="mgb20">
class="mgb20">
<div> <div>
<div class="flex-center mgb20"> <div class="flex-center mgb20">
<p class="hr_tag"></p> <p class="hr_tag"></p>
@ -19,177 +15,109 @@
<el-form label-width="80px"> <el-form label-width="80px">
<el-col :span="4"> <el-col :span="4">
<el-form-item label="来源"> <el-form-item label="来源">
<el-select v-model="form.founder" <el-select v-model="form.founder" clearable placeholder="请选择创建人" @change="initData">
clearable <el-option v-for="(item, index) in founderList" :key="index" :label="item.label"
placeholder="请选择创建人" :value="item.value"></el-option>
@change="initData">
<el-option v-for="(item,index) in founderList"
:key="index"
:label="item.label"
:value="item.value"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item label="状态"> <el-form-item label="状态">
<el-select v-model="form.state" <el-select v-model="form.state" clearable placeholder="请选择状态" @change="initData">
clearable <el-option v-for="(item, index) in stateList" :key="index" :label="item.label"
placeholder="请选择状态" :value="item.value"></el-option>
@change="initData">
<el-option v-for="(item,index) in stateList"
:key="index"
:label="item.label"
:value="item.value"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item label="用途"> <el-form-item label="用途">
<el-select v-model="form.permissions" <el-select v-model="form.permissions" placeholder="请选择" @change="initData">
placeholder="请选择" <el-option v-for="item in permissionsList" :key="item.value" :label="item.label"
@change="initData"> :value="item.value"></el-option>
<el-option v-for="item in permissionsList"
:key="item.value"
:label="item.label"
:value="item.value"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-form-item> <el-form-item>
<el-input placeholder="请输入项目名称" <el-input placeholder="请输入项目名称" prefix-icon="el-icon-search" v-model="form.projectName"
prefix-icon="el-icon-search" clearable></el-input>
v-model="form.projectName"
clearable></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-form> </el-form>
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" <el-card shadow="hover" class="mgb20">
class="mgb20">
<div class="flex-between mgb20"> <div class="flex-between mgb20">
<div class="flex-center"> <div class="flex-center">
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>项目列表</span> <span>项目列表</span>
</div> </div>
<div> <div>
<el-button type="primary" <el-button type="primary" round @click="add" class="mag">新增项目</el-button>
round <el-button type="primary" round @click="delAllData">批量删除</el-button>
@click="add"
class="mag">新增项目</el-button>
<el-button type="primary"
round
@click="delAllData">批量删除</el-button>
</div> </div>
</div> </div>
<el-table :data="list" <el-table :data="list" class="table" ref="table" header-align="center" row-key="projectId"
class="table" @selection-change="handleSelectionChange">
ref="table" <el-table-column type="selection" width="55" align="center"></el-table-column>
stripe <el-table-column type="index" width="100" label="序号" align="center">
header-align="center"
row-key="projectId"
@selection-change="handleSelectionChange">
<el-table-column type="selection"
width="55"
align="center"></el-table-column>
<el-table-column type="index"
width="100"
label="序号"
align="center">
<template slot-scope="scope">{{ scope.$index + (page - 1) * pageSize + 1 }}</template> <template slot-scope="scope">{{ scope.$index + (page - 1) * pageSize + 1 }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="projectName" <el-table-column prop="projectName" label="实验项目名称" min-width="400" align="center"></el-table-column>
label="实验项目名称" <el-table-column prop="founder" label="来源" min-width="150" align="center">
min-width="400"
align="center"></el-table-column>
<el-table-column prop="founder"
label="来源"
min-width="150"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ founderKeys[scope.row.founder] }} {{ founderKeys[scope.row.founder] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="creator" <el-table-column prop="creator" label="创建人" min-width="140" align="center">
label="创建人"
min-width="140"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ form.founder == 1 ? scope.row.schoolName : scope.row.creator }} {{ form.founder == 1 ? scope.row.schoolName : scope.row.creator }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="用途" <el-table-column label="用途" min-width="120" align="center">
min-width="120"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ permissionsKeys[scope.row.permissions] }} {{ permissionsKeys[scope.row.permissions] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createTime" <el-table-column prop="createTime" label="创建时间" min-width="150" align="center"></el-table-column>
label="创建时间" <el-table-column prop="status" label="状态" min-width="100" align="center">
min-width="150"
align="center"></el-table-column>
<el-table-column prop="status"
label="状态"
min-width="100"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ stateKeys[scope.row.state] }} {{ stateKeys[scope.row.state] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" <el-table-column label="操作" width="300" align="center">
width="300"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" <el-button type="text" @click="edit(scope.row)">
@click="edit(scope.row)">
编辑 编辑
</el-button> </el-button>
<el-button type="text" <el-button type="text" @click="handleDelete(scope.row.projectId)">
@click="handleDelete(scope.row.projectId)">
删除 删除
</el-button> </el-button>
<el-button type="text" <el-button type="text" @click="copyData(scope.row.projectId)">复制</el-button>
@click="copyData(scope.row.projectId)">复制</el-button> <el-switch v-if="scope.row.state" v-model="scope.row.ztOpen" :active-text="scope.row.ztOpen ? '关闭' : '启用'"
<el-switch v-if="scope.row.state" :active-value="0" :inactive-value="1" style="margin: 0 10px 0 10px"
v-model="scope.row.ztOpen" @change="switchOff(scope.row)"></el-switch>
:active-text="scope.row.ztOpen ? '关闭' : '启用'"
:active-value="0"
:inactive-value="1"
style="margin: 0 10px 0 10px"
@change="switchOff(scope.row)"></el-switch>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background <el-pagination background @current-change="handleCurrentChange" :current-page="page"
@current-change="handleCurrentChange" layout="total, prev, pager, next" :total="total"></el-pagination>
:current-page="page"
layout="total, prev, pager, next"
:total="total"></el-pagination>
</div> </div>
</el-card> </el-card>
<!--复制对话框--> <!--复制对话框-->
<el-dialog title="复制" <el-dialog title="复制" :visible.sync="copyVisible" width="24%" center :close-on-click-modal="false">
:visible.sync="copyVisible"
width="24%"
center
:close-on-click-modal="false">
<el-form> <el-form>
<el-form-item> <el-form-item>
<!--前端不用做名称判重了@change='projectNameExistis'--> <!--前端不用做名称判重了@change='projectNameExistis'-->
<el-input placeholder="请输入项目名称" <el-input placeholder="请输入项目名称" v-model="projectName"></el-input>
v-model="projectName"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" <span slot="footer" class="dialog-footer">
class="dialog-footer">
<el-button @click="copyVisible = false"> </el-button> <el-button @click="copyVisible = false"> </el-button>
<el-button type="primary" <el-button type="primary" @click="copySubmit"> </el-button>
@click="copySubmit"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
@ -439,5 +367,4 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped></style>
</style>

@ -404,7 +404,7 @@
</div> </div>
<el-input placeholder="请输入产品名称" prefix-icon="el-icon-search" v-model="productKeyword" clearable <el-input placeholder="请输入产品名称" prefix-icon="el-icon-search" v-model="productKeyword" clearable
style="width: 200px;margin-bottom: 10px;"></el-input> style="width: 200px;margin-bottom: 10px;"></el-input>
<el-table :data="products" class="table" ref="table" stripe header-align="center" row-key="id"> <el-table :data="products" class="table" ref="table" header-align="center" row-key="id">
<el-table-column width="80" align="center"> <el-table-column width="80" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-radio class="product-radio" v-model="selectProduct" :label="scope.row.cid"></el-radio> <el-radio class="product-radio" v-model="selectProduct" :label="scope.row.cid"></el-radio>

@ -43,8 +43,8 @@
</div> </div>
</div> </div>
<el-table :data="list" class="table" ref="table" stripe header-align="center" <el-table :data="list" class="table" ref="table" header-align="center" @selection-change="handleSelectionChange"
@selection-change="handleSelectionChange" row-key="id" @sort-change="sortChange"> row-key="id" @sort-change="sortChange">
<el-table-column type="selection" width="80" align="center" :reserve-selection="true"></el-table-column> <el-table-column type="selection" width="80" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"> <el-table-column type="index" width="100" label="序号" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
@ -216,11 +216,11 @@ export default {
}, },
addCourse () { addCourse () {
this.setReferrer() this.setReferrer()
this.$router.push("/shop/addProduct"); this.$router.push("/shop/add");
}, },
edit (row, show = 0) { edit (row, show = 0) {
this.setReferrer() this.setReferrer()
this.$router.push(`/shop/addProduct?id=${row.mallId}&show=${show}`) this.$router.push(`/shop/add?id=${row.mallId}&show=${show}`)
}, },
handleDelete (row) { handleDelete (row) {
this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", { this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", {

@ -1,270 +1,267 @@
<template> <template>
<div class="page"> <div class="page">
<h6 class="p-title">筛选</h6> <h6 class="p-title">筛选</h6>
<div class="tool"> <div class="tool">
<ul class="filter"> <ul class="filter">
<li> <li>
<el-input placeholder="请输入字典名称" prefix-icon="el-icon-search" v-model.trim="keyword" clearable></el-input> <el-input placeholder="请输入字典名称" prefix-icon="el-icon-search" v-model.trim="keyword" clearable></el-input>
</li> </li>
</ul> </ul>
<div> <div>
<el-button type="primary" round @click="addRole">新增角色</el-button> <el-button type="primary" round @click="addRole">新增角色</el-button>
<el-button type="primary" round @click="delAllSelection">批量删除</el-button> <el-button type="primary" round @click="delAllSelection">批量删除</el-button>
</div> </div>
</div> </div>
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" :row-key="getRowKeys">
<el-table-column type="selection" width="55" align="center" :selectable="practiceSelectable" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="roleName" label="角色名称" align="center" min-width="250" show-overflow-tooltip></el-table-column>
<el-table-column label="角色描述" min-width="400" align="center">
<template slot-scope="scope">
<el-input placeholder="该角色用于管理全部功能权限" v-model="scope.row.remark" disabled></el-input>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200">
<template slot-scope="scope">
<el-button type="text" @click="showRole(scope.row)">查看</el-button>
<el-button v-if="scope.row.roleName !== '超级管理员'" type="text" @click="editRole(scope.row)">编辑</el-button>
<el-button v-if="scope.row.roleName !== '超级管理员' && scope.row.roleName !== '管理员'" type="text" @click="handleDelete(scope.row)">删除</el-button>
</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>
<el-dialog :title="isDetail ? '查看角色' : (isAdd ? '新增角色' : '编辑角色')" :visible.sync="roleVisible" width="30%" @close="closeRole" class="dialog" :close-on-click-modal="false"> <el-table :data="listData" class="table" ref="table" header-align="center" @selection-change="handleSelectionChange"
<el-form ref="form" label-width="80px" :disabled="isDetail"> :row-key="getRowKeys">
<el-form-item label="角色名称"> <el-table-column type="selection" width="55" align="center" :selectable="practiceSelectable"
<el-input v-model="form.roleName" placeholder="请输入角色名称"></el-input> :reserve-selection="true"></el-table-column>
</el-form-item> <el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-form-item label="角色描述"> <el-table-column prop="roleName" label="角色名称" align="center" min-width="250"
<el-input v-model="form.remark" placeholder="请输入角色描述" type="textarea" rows="5"></el-input> show-overflow-tooltip></el-table-column>
</el-form-item> <el-table-column label="角色描述" min-width="400" align="center">
<el-form-item prop="role" label="角色权限"> <template slot-scope="scope">
<div style="max-height: 300px; overflow: auto"> <el-input placeholder="该角色用于管理全部功能权限" v-model="scope.row.remark" disabled></el-input>
<el-tree </template>
ref="per" </el-table-column>
:data="permissions" <el-table-column label="操作" align="center" width="200">
show-checkbox <template slot-scope="scope">
default-expand-all <el-button type="text" @click="showRole(scope.row)">查看</el-button>
node-key="id" <el-button v-if="scope.row.roleName !== '超级管理员'" type="text" @click="editRole(scope.row)">编辑</el-button>
:default-expanded-keys="checkedIds" <el-button v-if="scope.row.roleName !== '超级管理员' && scope.row.roleName !== '管理员'" type="text"
:default-checked-keys="checkedIds" @click="handleDelete(scope.row)">删除</el-button>
:props="defaultProps"> </template>
</el-tree> </el-table-column>
</div> </el-table>
</el-form-item> <div class="pagination">
</el-form> <el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next"
<span slot="footer" class="dialog-footer" v-if="!isDetail"> :total="total"></el-pagination>
<el-button @click="roleVisible = false"> </el-button>
<el-button type="primary" @click="saveData"> </el-button>
</span>
</el-dialog>
</div> </div>
<el-dialog :title="isDetail ? '查看角色' : (isAdd ? '新增角色' : '编辑角色')" :visible.sync="roleVisible" width="30%"
@close="closeRole" class="dialog" :close-on-click-modal="false">
<el-form ref="form" label-width="80px" :disabled="isDetail">
<el-form-item label="角色名称">
<el-input v-model="form.roleName" placeholder="请输入角色名称"></el-input>
</el-form-item>
<el-form-item label="角色描述">
<el-input v-model="form.remark" placeholder="请输入角色描述" type="textarea" rows="5"></el-input>
</el-form-item>
<el-form-item prop="role" label="角色权限">
<div style="max-height: 300px; overflow: auto">
<el-tree ref="per" :data="permissions" show-checkbox default-expand-all node-key="id"
:default-expanded-keys="checkedIds" :default-checked-keys="checkedIds" :props="defaultProps">
</el-tree>
</div>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer" v-if="!isDetail">
<el-button @click="roleVisible = false"> </el-button>
<el-button type="primary" @click="saveData"> </el-button>
</span>
</el-dialog>
</div>
</template> </template>
<script> <script>
import Setting from "@/setting"; import Setting from "@/setting";
export default { export default {
data() { data () {
return { return {
keyword: "", keyword: "",
searchTimer: null, searchTimer: null,
isDetail: false, isDetail: false,
form: { form: {
id: "", id: "",
roleName: "", roleName: "",
remark: "" remark: ""
}, },
listData: [], listData: [],
defaultProps: { defaultProps: {
children: "children", children: "children",
label: "name" label: "name"
}, },
page: 1, page: 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
multipleSelection: [], multipleSelection: [],
isAdd: true, isAdd: true,
roleVisible: false, roleVisible: false,
permissions: [], permissions: [],
checkedIds: [], checkedIds: [],
roleNameReapeat: false // roleNameReapeat: false //
}; };
},
watch: {
keyword: function (val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.getData();
}, 500);
}
},
mounted () {
// this.getData();
},
methods: {
getData () {
this.$get(`${this.api.roleList}?page=${this.page}&size=${this.pageSize}&name=${this.keyword}&platformId=1`).then(res => {
this.listData = res.rolePage.records;
this.total = res.rolePage.total;
}).catch(res => { });
},
currentChange (val) {
this.page = val;
this.getData();
}, },
watch: { handleDelete (row) {
keyword: function(val) { this.$confirm("确定要删除吗?", "提示", {
clearTimeout(this.searchTimer); type: "warning"
this.searchTimer = setTimeout(() => { }).then(() => {
this.getData(); this.$post(`${this.api.batchRemove}?roleIds=${row.id}`).then(res => {
}, 500); this.$message.success("删除成功");
} this.getData();
}).catch(res => { });
}).catch(() => { });
}, },
mounted() { getRowKeys (row) {
// this.getData(); return row.id;
}, },
methods: { handleSelectionChange (val) {
getData() { this.multipleSelection = val;
this.$get(`${this.api.roleList}?page=${this.page}&size=${this.pageSize}&name=${this.keyword}&platformId=1`).then(res => { },
this.listData = res.rolePage.records; delAllSelection () {
this.total = res.rolePage.total; if (this.multipleSelection.length) {
}).catch(res => {}); this.$confirm("确定要删除吗?", "提示", {
}, type: "warning"
currentChange(val) { }).then(() => {
this.page = val; let ids = this.multipleSelection.map(item => {
return item.id;
});
this.$post(`${this.api.batchRemove}?roleIds=${ids.toString()}`).then(res => {
this.$refs.table.clearSelection();
this.$message.success("删除成功");
this.getData(); this.getData();
}, }).catch(res => { });
handleDelete(row) { if (this.multipleSelection.length === this.listData.length && this.page > 1) {
this.$confirm("确定要删除吗?", "提示", { this.handleCurrentChange(this.page - 1)
type: "warning" }
}).then(() => { }).catch(() => { });
this.$post(`${this.api.batchRemove}?roleIds=${row.id}`).then(res => { } else {
this.$message.success("删除成功"); this.$message.error("请先选择数据!");
this.getData(); }
}).catch(res => {}); },
}).catch(() => {}); practiceSelectable (row, index) {
}, let boolean = true;
getRowKeys(row) { if (row.roleName == '超级管理员') {
return row.id; boolean = false
}, } else {
handleSelectionChange(val) { boolean = true
this.multipleSelection = val; }
}, return boolean;
delAllSelection() { },
if (this.multipleSelection.length) { closeRole () {
this.$confirm("确定要删除吗?", "提示", { this.isDetail = false;
type: "warning" this.form = {
}).then(() => { id: "",
let ids = this.multipleSelection.map(item => { roleName: "",
return item.id; remark: ""
}); };
this.$post(`${this.api.batchRemove}?roleIds=${ids.toString()}`).then(res => { this.checkedIds = [];
this.$refs.table.clearSelection(); this.permissions = [];
this.$message.success("删除成功"); },
this.getData(); //
}).catch(res => {}); getPer (row) {
if(this.multipleSelection.length === this.listData.length && this.page>1) { if (!this.permissions.length) {
this.handleCurrentChange(this.page - 1) this.$get(`${this.api.queryAllMenus}?platformId=${Setting.platformId}`).then(res => {
} let data = res.children;
}).catch(() => {}); //
} else { let yw = data.findIndex(n => n.name == "业务后台");
this.$message.error("请先选择数据!"); yw != -1 && data.splice(yw, 1);
} try {
}, let system = data.findIndex(n => n.name == "系统设置");
practiceSelectable(row, index){
let boolean = true;
if(row.roleName == '超级管理员'){
boolean = false
}else{
boolean = true
}
return boolean;
},
closeRole() {
this.isDetail = false;
this.form = {
id: "",
roleName: "",
remark: ""
};
this.checkedIds = [];
this.permissions = [];
},
//
getPer(row) {
if (!this.permissions.length) {
this.$get(`${this.api.queryAllMenus}?platformId=${Setting.platformId}`).then(res => {
let data = res.children;
//
let yw = data.findIndex(n => n.name == "业务后台");
yw != -1 && data.splice(yw, 1);
try {
let system = data.findIndex(n => n.name == "系统设置");
if (system != -1) { if (system != -1) {
data[system].children[1].children.splice(4, 1); data[system].children[1].children.splice(4, 1);
data[system].children[1].children.splice(1, 1); data[system].children[1].children.splice(1, 1);
data[system].children[1].children.splice(0, 1); data[system].children[1].children.splice(0, 1);
}
} catch (error) {
}
this.permissions = data;
if (row) {
this.getDetail(row);
}
}).catch(res => {
});
}
},
addRole() {
this.isAdd = true;
this.getPer();
this.checkedIds = [];
this.permissions.length && this.$refs.per.setCheckedNodes([]);
this.roleVisible = true;
},
//
handleRolePer(data, permissions) {
let result = data;
if (permissions.length) {
permissions.map(e => {
if (result.includes(e.id) && e.children) {
// ,idid,,,
e.children.every(n => result.includes(n)) || result.splice(result.indexOf(e.id), 1);
}
e.children && e.children.length && this.handleRolePer(data, e.children);
});
}
return result;
},
async getDetail(row) { //
let res = await this.$get(`${this.api.obtainDetails}?id=${row.id}`);
this.form = res.role;
this.form.id = row.id;
this.checkedIds = this.handleRolePer(res.permissionList, this.permissions);
this.$refs.per.setCheckedNodes(this.checkedIds);
},
showRole(row) {
this.isDetail = true;
this.isAdd = false;
this.getPer(row);
this.roleVisible = true;
},
editRole(row) {
this.isAdd = false;
this.getPer(row);
this.roleVisible = true;
},
async saveData() {
if (!this.form.roleName) return this.$message.warning("请填写角色名称");
if (!this.form.remark) return this.$message.warning("请填写角色描述");
if (!this.$refs.per.getCheckedKeys().length) return this.$message.warning("请选择角色权限");
// ,(),
let permissionId = [...this.$refs.per.getHalfCheckedKeys(), ...this.$refs.per.getCheckedKeys()];
let data = {
...this.form,
permissionId,
platformId:1,
};
if (this.form.id) {
this.$post(this.api.saveOrUpdate, data).then(res => {
this.$message.success("修改成功");
this.getData();
this.roleVisible = false;
}).catch(res => {});
} else {
this.$post(this.api.saveOrUpdate, data).then(res => {
this.$message.success("新增成功");
this.getData();
this.roleVisible = false;
}).catch(res => {});
} }
} } catch (error) {
}
this.permissions = data;
if (row) {
this.getDetail(row);
}
}).catch(res => {
});
}
},
addRole () {
this.isAdd = true;
this.getPer();
this.checkedIds = [];
this.permissions.length && this.$refs.per.setCheckedNodes([]);
this.roleVisible = true;
},
//
handleRolePer (data, permissions) {
let result = data;
if (permissions.length) {
permissions.map(e => {
if (result.includes(e.id) && e.children) {
// ,idid,,,
e.children.every(n => result.includes(n)) || result.splice(result.indexOf(e.id), 1);
}
e.children && e.children.length && this.handleRolePer(data, e.children);
});
}
return result;
},
async getDetail (row) { //
let res = await this.$get(`${this.api.obtainDetails}?id=${row.id}`);
this.form = res.role;
this.form.id = row.id;
this.checkedIds = this.handleRolePer(res.permissionList, this.permissions);
this.$refs.per.setCheckedNodes(this.checkedIds);
},
showRole (row) {
this.isDetail = true;
this.isAdd = false;
this.getPer(row);
this.roleVisible = true;
},
editRole (row) {
this.isAdd = false;
this.getPer(row);
this.roleVisible = true;
},
async saveData () {
if (!this.form.roleName) return this.$message.warning("请填写角色名称");
if (!this.form.remark) return this.$message.warning("请填写角色描述");
if (!this.$refs.per.getCheckedKeys().length) return this.$message.warning("请选择角色权限");
// ,(),
let permissionId = [...this.$refs.per.getHalfCheckedKeys(), ...this.$refs.per.getCheckedKeys()];
let data = {
...this.form,
permissionId,
platformId: 1,
};
if (this.form.id) {
this.$post(this.api.saveOrUpdate, data).then(res => {
this.$message.success("修改成功");
this.getData();
this.roleVisible = false;
}).catch(res => { });
} else {
this.$post(this.api.saveOrUpdate, data).then(res => {
this.$message.success("新增成功");
this.getData();
this.roleVisible = false;
}).catch(res => { });
}
} }
}
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped></style>
</style>

@ -1,94 +1,93 @@
<template> <template>
<div class="page"> <div class="page">
<h6 class="p-title">筛选</h6> <h6 class="p-title">筛选</h6>
<div class="tool"> <div class="tool">
<ul class="filter"> <ul class="filter">
<li> <li>
<el-input placeholder="请输入平台名称" prefix-icon="el-icon-search" v-model.trim="keyword" clearable></el-input> <el-input placeholder="请输入平台名称" prefix-icon="el-icon-search" v-model.trim="keyword" clearable></el-input>
</li> </li>
</ul> </ul>
</div> </div>
<el-table :data="listData" class="table" ref="table" stripe header-align="center" row-key="id"> <el-table :data="listData" class="table" ref="table" header-align="center" row-key="id">
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column> <el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="name" label="平台名称" align="center" min-width="250" show-overflow-tooltip></el-table-column> <el-table-column prop="name" label="平台名称" align="center" min-width="250" show-overflow-tooltip></el-table-column>
<el-table-column prop="versionName" label="最新版本名称" align="center"></el-table-column> <el-table-column prop="versionName" label="最新版本名称" align="center"></el-table-column>
<el-table-column prop="roleName" label="最新版本状态" align="center"> <el-table-column prop="roleName" label="最新版本状态" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.draft ? '草稿箱' : '已发布' }} {{ scope.row.draft ? '草稿箱' : '已发布' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="updateTime" label="最近编辑" align="center"></el-table-column> <el-table-column prop="updateTime" label="最近编辑" align="center"></el-table-column>
<el-table-column prop="versionNum" label="版本数" align="center"></el-table-column> <el-table-column prop="versionNum" label="版本数" align="center"></el-table-column>
<el-table-column label="操作" align="center" width="200"> <el-table-column label="操作" align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="toManage(scope.row)" v-auth="'/system:日志更新:管理'">管理</el-button> <el-button type="text" @click="toManage(scope.row)" v-auth="'/system:日志更新:管理'">管理</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next" :total="total"></el-pagination> <el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next"
</div> :total="total"></el-pagination>
</div> </div>
</div>
</template> </template>
<script> <script>
import Setting from '@/setting' import Setting from '@/setting'
export default { export default {
data() { data () {
return { return {
keyword: "", keyword: "",
searchTimer: null, searchTimer: null,
platformList: Setting.platformList, platformList: Setting.platformList,
form: { form: {
id: "", id: "",
roleName: "", roleName: "",
remark: "" remark: ""
}, },
listDataAll: [], listDataAll: [],
listData: [], listData: [],
page: 1, page: 1,
pageSize: 10, pageSize: 10,
total: 0 total: 0
}; };
}, },
watch: { watch: {
keyword: function(val) { keyword: function (val) {
clearTimeout(this.searchTimer); clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
const list = this.listData const list = this.listData
this.listData = val ? list.filter(e => e.name.includes(val)) : this.listDataAll this.listData = val ? list.filter(e => e.name.includes(val)) : this.listDataAll
this.total = this.listData.length this.total = this.listData.length
}, 500); }, 500);
} }
},
mounted () {
this.getData()
},
methods: {
getData () {
this.$get(`${this.api.logManagementList}?search=${this.keyword}`).then(res => {
const list = res.logManagementListVo
const platformList = this.platformList
list.map(e => {
const item = platformList.find(n => n.id === e.platformId)
if (item) e.name = item.name
})
this.listDataAll = res.logManagementListVo
this.listData = res.logManagementListVo
this.total = this.listData.length
}).catch(res => { })
}, },
mounted() { currentChange (val) {
this.getData() this.page = val;
this.getData();
}, },
methods: { toManage (row) {
getData() { this.$router.push(`/manageLog?platformId=${row.platformId}`)
this.$get(`${this.api.logManagementList}?search=${this.keyword}`).then(res => {
const list = res.logManagementListVo
const platformList = this.platformList
list.map(e => {
const item = platformList.find(n => n.id === e.platformId)
if (item) e.name = item.name
})
this.listDataAll = res.logManagementListVo
this.listData = res.logManagementListVo
this.total = this.listData.length
}).catch(res => {})
},
currentChange(val) {
this.page = val;
this.getData();
},
toManage(row) {
this.$router.push(`/manageLog?platformId=${row.platformId}`)
}
} }
}
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped></style>
</style>

@ -1,379 +1,382 @@
<template> <template>
<div class="page"> <div class="page">
<h6 class="p-title">筛选</h6> <h6 class="p-title">筛选</h6>
<div class="tool"> <div class="tool">
<ul class="filter"> <ul class="filter">
<li> <li>
<el-input placeholder="请输入角色名称" prefix-icon="el-icon-search" v-model.trim="keyword" clearable></el-input> <el-input placeholder="请输入角色名称" prefix-icon="el-icon-search" v-model.trim="keyword" clearable></el-input>
</li> </li>
</ul> </ul>
<div> <div>
<el-button type="primary" round @click="addRole" v-auth="'/system:角色权限:新增角色'">新增角色</el-button> <el-button type="primary" round @click="addRole" v-auth="'/system:角色权限:新增角色'">新增角色</el-button>
<el-button type="primary" round @click="delAllSelection" v-auth="'/system:角色权限:批量删除'">批量删除</el-button> <el-button type="primary" round @click="delAllSelection" v-auth="'/system:角色权限:批量删除'">批量删除</el-button>
</div> </div>
</div> </div>
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" :row-key="getRowKeys">
<el-table-column type="selection" width="55" align="center" :selectable="practiceSelectable" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="roleName" label="角色名称" align="center" min-width="250" show-overflow-tooltip></el-table-column>
<el-table-column label="角色描述" min-width="400" align="center">
<template slot-scope="scope">
<el-input placeholder="该角色用于管理全部功能权限" v-model="scope.row.remark" disabled></el-input>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="200">
<template slot-scope="scope">
<el-button type="text" @click="showRole(scope.row)" v-auth="'/system:角色权限:查看'">查看</el-button>
<el-button v-if="scope.row.roleName !== '超级管理员'" type="text" @click="editRole(scope.row)" v-auth="'/system:角色权限:编辑'">编辑</el-button>
<el-button v-if="scope.row.roleName !== '超级管理员' && scope.row.roleName !== '管理员'" type="text" @click="handleDelete(scope.row)" v-auth="'/system:角色权限:删除'">删除</el-button>
</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>
<el-dialog :title="isDetail ? '查看角色' : (isAdd ? '新增角色' : '编辑角色')" :visible.sync="roleVisible" width="30%" @close="closeRole" class="dialog" :close-on-click-modal="false"> <el-table :data="listData" class="table" ref="table" header-align="center" @selection-change="handleSelectionChange"
<el-form ref="form" label-width="80px" :disabled="isDetail"> :row-key="getRowKeys">
<el-form-item label="角色名称"> <el-table-column type="selection" width="55" align="center" :selectable="practiceSelectable"
<el-input v-model="form.roleName" placeholder="请输入角色名称"></el-input> :reserve-selection="true"></el-table-column>
</el-form-item> <el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-form-item label="角色描述"> <el-table-column prop="roleName" label="角色名称" align="center" min-width="250"
<el-input v-model="form.remark" placeholder="请输入角色描述" type="textarea" rows="5"></el-input> show-overflow-tooltip></el-table-column>
</el-form-item> <el-table-column label="角色描述" min-width="400" align="center">
<el-form-item prop="role" label="角色权限"> <template slot-scope="scope">
<div style="max-height: 300px; overflow: auto"> <el-input placeholder="该角色用于管理全部功能权限" v-model="scope.row.remark" disabled></el-input>
<el-tree </template>
ref="per" </el-table-column>
:data="permissions" <el-table-column label="操作" align="center" width="200">
show-checkbox <template slot-scope="scope">
default-expand-all <el-button type="text" @click="showRole(scope.row)" v-auth="'/system:角色权限:查看'">查看</el-button>
node-key="id" <el-button v-if="scope.row.roleName !== '超级管理员'" type="text" @click="editRole(scope.row)"
:default-expanded-keys="checkedIds" v-auth="'/system:角色权限:编辑'">编辑</el-button>
:default-checked-keys="checkedIds" <el-button v-if="scope.row.roleName !== '超级管理员' && scope.row.roleName !== '管理员'" type="text"
:props="defaultProps"> @click="handleDelete(scope.row)" v-auth="'/system:角色权限:删除'">删除</el-button>
<span class="custom-tree-node" slot-scope="{ node, data }"> </template>
<span>{{ node.label }}</span> </el-table-column>
<span v-if="datas.includes(node.label)" class="data" @click.stop="showData(data, node)">数据权限</span> </el-table>
<span v-if="data.supplierNames">({{ data.supplierNames }})</span> <div class="pagination">
</span> <el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next"
</el-tree> :total="total"></el-pagination>
</div>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer" v-if="!isDetail">
<el-button @click="roleVisible = false"> </el-button>
<el-button type="primary" @click="saveData"> </el-button>
</span>
</el-dialog>
<el-dialog title="数据权限设置" :visible.sync="dataVisible" width="500px" class="data-dia" :close-on-click-modal="false">
<p class="title">请选择要关联的供应商系统</p>
<div class="checks">
<el-checkbox v-model="dataCheckAll" @change="checkAll">全部</el-checkbox>
<el-checkbox v-for="(item, i) in suppliers" :key="i" v-model="item.check" @change="supChange">{{ item.supplierName }}</el-checkbox>
</div>
<span slot="footer" class="dialog-footer" v-if="!isDetail">
<el-button @click="dataVisible = false"> </el-button>
<el-button type="primary" @click="dataSubmit"> </el-button>
</span>
</el-dialog>
</div> </div>
<el-dialog :title="isDetail ? '查看角色' : (isAdd ? '新增角色' : '编辑角色')" :visible.sync="roleVisible" width="30%"
@close="closeRole" class="dialog" :close-on-click-modal="false">
<el-form ref="form" label-width="80px" :disabled="isDetail">
<el-form-item label="角色名称">
<el-input v-model="form.roleName" placeholder="请输入角色名称"></el-input>
</el-form-item>
<el-form-item label="角色描述">
<el-input v-model="form.remark" placeholder="请输入角色描述" type="textarea" rows="5"></el-input>
</el-form-item>
<el-form-item prop="role" label="角色权限">
<div style="max-height: 300px; overflow: auto">
<el-tree ref="per" :data="permissions" show-checkbox default-expand-all node-key="id"
:default-expanded-keys="checkedIds" :default-checked-keys="checkedIds" :props="defaultProps">
<span class="custom-tree-node" slot-scope="{ node, data }">
<span>{{ node.label }}</span>
<span v-if="datas.includes(node.label)" class="data" @click.stop="showData(data, node)">数据权限</span>
<span v-if="data.supplierNames">({{ data.supplierNames }})</span>
</span>
</el-tree>
</div>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer" v-if="!isDetail">
<el-button @click="roleVisible = false"> </el-button>
<el-button type="primary" @click="saveData"> </el-button>
</span>
</el-dialog>
<el-dialog title="数据权限设置" :visible.sync="dataVisible" width="500px" class="data-dia" :close-on-click-modal="false">
<p class="title">请选择要关联的供应商系统</p>
<div class="checks">
<el-checkbox v-model="dataCheckAll" @change="checkAll">全部</el-checkbox>
<el-checkbox v-for="(item, i) in suppliers" :key="i" v-model="item.check" @change="supChange">{{
item.supplierName
}}</el-checkbox>
</div>
<span slot="footer" class="dialog-footer" v-if="!isDetail">
<el-button @click="dataVisible = false"> </el-button>
<el-button type="primary" @click="dataSubmit"> </el-button>
</span>
</el-dialog>
</div>
</template> </template>
<script> <script>
import Setting from "@/setting"; import Setting from "@/setting";
export default { export default {
data() { data () {
return { return {
keyword: "", keyword: "",
searchTimer: null, searchTimer: null,
isDetail: false, isDetail: false,
form: { form: {
id: "", id: "",
roleName: "", roleName: "",
remark: "" remark: ""
}, },
listData: [], listData: [],
defaultProps: { defaultProps: {
children: "children", children: "children",
label: "name" label: "name"
}, },
page: 1, page: 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
multipleSelection: [], multipleSelection: [],
isAdd: true, isAdd: true,
roleVisible: false, roleVisible: false,
permissions: [], permissions: [],
checkedIds: [], checkedIds: [],
roleNameReapeat: false, // roleNameReapeat: false, //
datas: ['客户管理', '订单管理', '课程管理', '服务配置'], // datas: ['客户管理', '订单管理', '课程管理', '服务配置'], //
dataVisible: false, dataVisible: false,
suppliers: [], suppliers: [],
dataCheckAll: false, dataCheckAll: false,
curData: {}, curData: {},
}; };
},
watch: {
keyword: function (val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.getData();
}, 500);
}
},
mounted () {
this.getData()
this.getSupplier()
},
methods: {
getData () {
this.$get(`${this.api.roleList}?page=${this.page}&size=${this.pageSize}&name=${this.keyword}&platformId=${Setting.platformId}&port=0`).then(res => {
this.listData = res.rolePage.records;
this.total = res.rolePage.total;
}).catch(res => { });
}, },
watch: { //
keyword: function(val) { getSupplier (data) {
clearTimeout(this.searchTimer); this.$get(this.api.getSupplierList).then(res => {
this.searchTimer = setTimeout(() => { this.suppliers = res.supplierList
this.getData(); }).catch(res => { })
}, 500); },
} currentChange (val) {
this.page = val;
this.getData();
},
handleDelete (row) {
this.$confirm("确定要删除吗?", "提示", {
type: "warning"
}).then(() => {
this.$post(`${this.api.batchRemove}?roleIds=${row.id}`).then(res => {
this.$message.success("删除成功");
this.getData();
}).catch(res => { });
}).catch(() => { });
},
getRowKeys (row) {
return row.id;
}, },
mounted() { handleSelectionChange (val) {
this.getData() this.multipleSelection = val;
this.getSupplier()
}, },
methods: { delAllSelection () {
getData() { if (this.multipleSelection.length) {
this.$get(`${this.api.roleList}?page=${this.page}&size=${this.pageSize}&name=${this.keyword}&platformId=${Setting.platformId}&port=0`).then(res => { this.$confirm("确定要删除吗?", "提示", {
this.listData = res.rolePage.records; type: "warning"
this.total = res.rolePage.total; }).then(() => {
}).catch(res => {}); let ids = this.multipleSelection.map(item => {
}, return item.id;
// });
getSupplier(data) { this.$post(`${this.api.batchRemove}?roleIds=${ids.toString()}`).then(res => {
this.$get(this.api.getSupplierList).then(res => { this.$refs.table.clearSelection();
this.suppliers = res.supplierList this.$message.success("删除成功");
}).catch(res => {})
},
currentChange(val) {
this.page = val;
this.getData(); this.getData();
}, }).catch(res => { });
handleDelete(row) { if (this.multipleSelection.length === this.listData.length && this.page > 1) {
this.$confirm("确定要删除吗?", "提示", { this.handleCurrentChange(this.page - 1)
type: "warning" }
}).then(() => { }).catch(() => { });
this.$post(`${this.api.batchRemove}?roleIds=${row.id}`).then(res => { } else {
this.$message.success("删除成功"); this.$message.error("请先选择数据!");
this.getData(); }
}).catch(res => {}); },
}).catch(() => {}); practiceSelectable (row, index) {
}, let boolean = true;
getRowKeys(row) { if (row.roleName == '超级管理员') {
return row.id; boolean = false
}, } else {
handleSelectionChange(val) { boolean = true
this.multipleSelection = val; }
}, return boolean;
delAllSelection() { },
if (this.multipleSelection.length) { closeRole () {
this.$confirm("确定要删除吗?", "提示", { this.isDetail = false;
type: "warning" this.form = {
}).then(() => { id: "",
let ids = this.multipleSelection.map(item => { roleName: "",
return item.id; remark: ""
}); };
this.$post(`${this.api.batchRemove}?roleIds=${ids.toString()}`).then(res => { this.checkedIds = [];
this.$refs.table.clearSelection(); this.permissions = [];
this.$message.success("删除成功"); },
this.getData(); //
}).catch(res => {}); getPer (row) {
if(this.multipleSelection.length === this.listData.length && this.page>1) { if (!this.permissions.length) {
this.handleCurrentChange(this.page - 1) this.$get(`${this.api.queryAllMenus}?platformId=${Setting.platformId}`).then(res => {
} let data = res.children;
}).catch(() => {}); //
} else { let yw = data.findIndex(n => n.name == "业务后台");
this.$message.error("请先选择数据!"); yw != -1 && data.splice(yw, 1);
} try {
}, let system = data.findIndex(n => n.name == "系统设置");
practiceSelectable(row, index){
let boolean = true;
if(row.roleName == '超级管理员'){
boolean = false
}else{
boolean = true
}
return boolean;
},
closeRole() {
this.isDetail = false;
this.form = {
id: "",
roleName: "",
remark: ""
};
this.checkedIds = [];
this.permissions = [];
},
//
getPer(row) {
if (!this.permissions.length) {
this.$get(`${this.api.queryAllMenus}?platformId=${Setting.platformId}`).then(res => {
let data = res.children;
//
let yw = data.findIndex(n => n.name == "业务后台");
yw != -1 && data.splice(yw, 1);
try {
let system = data.findIndex(n => n.name == "系统设置");
if (system != -1) { if (system != -1) {
data[system].children[1].children.splice(4, 1); data[system].children[1].children.splice(4, 1);
data[system].children[1].children.splice(1, 1); data[system].children[1].children.splice(1, 1);
data[system].children[1].children.splice(0, 1); data[system].children[1].children.splice(0, 1);
}
} catch (error) {
}
//
const { datas, suppliers } = this
const ids = suppliers.map(e => e.supplierId)
data[0].children.map(e => {
if (datas.includes(e.name)) {
e.supplierNames = ''
if (!row) {
e.supplierIds = ids
}
}
})
this.permissions = data;
if (row) {
this.getDetail(row);
}
}).catch(res => {
});
}
},
addRole() {
this.isAdd = true;
this.getPer();
this.checkedIds = [];
this.permissions.length && this.$refs.per.setCheckedNodes([]);
this.roleVisible = true;
},
//
checkAll(val) {
this.suppliers.map(e => e.check = val)
},
//
supChange(val) {
this.dataCheckAll = !this.suppliers.find(e => !e.check)
},
//
showData(data, node) {
this.curData = data
this.dataVisible = true
const list = this.suppliers
let ids = data.supplierIds
list.map(e => this.$set(e, 'check', ids ? ids.includes(e.supplierId) : false))
this.suppliers = list
this.dataCheckAll = !list.find(e => !e.check)
},
//
dataSubmit() {
const ids = []
let names = []
this.suppliers.filter(e => e.check).map(e => {
ids.push(e.supplierId)
names.push(e.supplierName)
})
names = this.dataCheckAll ? '全部' : names.join()
if (!ids.length) return this.$message.warning('请至少勾选一个供应商')
const { id } = this.curData
this.permissions[0].children.map(e => {
// id
if (e.id == id) {
e.supplierIds = ids
e.supplierNames = names
}
})
this.dataVisible = false
},
//
handleRolePer(data, permissions) {
let result = data;
if (permissions.length) {
permissions.map(e => {
if (result.includes(e.id) && e.children) {
// ,idid,,,
e.children.every(n => result.includes(n)) || result.splice(result.indexOf(e.id), 1);
}
e.children && e.children.length && this.handleRolePer(data, e.children);
});
} }
return result; } catch (error) {
}, }
async getDetail(row) { // //
let res = await this.$get(`${this.api.obtainDetails}?id=${row.id}`); const { datas, suppliers } = this
this.form = res.role; const ids = suppliers.map(e => e.supplierId)
this.form.id = row.id data[0].children.map(e => {
const checked = res.permissionList if (datas.includes(e.name)) {
const per = res.permissionVoList e.supplierNames = ''
const ids = this.suppliers.map(e => e.supplierId) if (!row) {
const len = ids.length
// supplierIds
this.permissions[0].children.map(e => {
const sup = per.find(n => n.permissionId == e.id)
//
if (sup) {
e.supplierIds = sup.supplierId.split(',').map(e => +e)
e.supplierNames = sup.supplierName.split(',').length === len ? '全部' : sup.supplierName
} else if (!checked.includes(e.id)) {
e.supplierIds = ids e.supplierIds = ids
} }
})
console.log(33, this.permissions)
this.checkedIds = this.handleRolePer(res.permissionList, this.permissions);
this.$refs.per.setCheckedNodes(this.checkedIds);
},
showRole(row) {
this.isDetail = true;
this.isAdd = false;
this.getPer(row);
this.roleVisible = true;
},
editRole(row) {
this.isAdd = false;
this.getPer(row);
this.roleVisible = true;
},
async saveData() {
const { form, datas } = this
if (!form.roleName) return this.$message.warning("请填写角色名称");
if (!form.remark) return this.$message.warning("请填写角色描述");
const tree = this.$refs.per
if (!tree.getCheckedKeys().length) return this.$message.warning("请选择角色权限");
// ,(),
const checks = [...this.$refs.per.getHalfCheckedNodes(), ...this.$refs.per.getCheckedNodes()];
const ids = []
const roleId = form.id
// id
checks.map(e => {
//
if (datas.includes(e.name) && e.supplierIds) {
e.supplierIds.map(n => {
ids.push({
permissionId: e.id,
roleId,
supplierId: n
})
})
} }
}) })
this.$post(this.api.saveOrUpdate, { this.permissions = data;
...this.form, if (row) {
permissionId: [...tree.getHalfCheckedKeys(), ...tree.getCheckedKeys()], this.getDetail(row);
dataPermissionList: ids, }
platformId: Setting.platformId, }).catch(res => {
}).then(res => { });
this.$message.success(form.id ? "修改成功" : "新增成功"); }
this.getData(); },
this.roleVisible = false; addRole () {
}).catch(res => {}); this.isAdd = true;
this.getPer();
this.checkedIds = [];
this.permissions.length && this.$refs.per.setCheckedNodes([]);
this.roleVisible = true;
},
//
checkAll (val) {
this.suppliers.map(e => e.check = val)
},
//
supChange (val) {
this.dataCheckAll = !this.suppliers.find(e => !e.check)
},
//
showData (data, node) {
this.curData = data
this.dataVisible = true
const list = this.suppliers
let ids = data.supplierIds
list.map(e => this.$set(e, 'check', ids ? ids.includes(e.supplierId) : false))
this.suppliers = list
this.dataCheckAll = !list.find(e => !e.check)
},
//
dataSubmit () {
const ids = []
let names = []
this.suppliers.filter(e => e.check).map(e => {
ids.push(e.supplierId)
names.push(e.supplierName)
})
names = this.dataCheckAll ? '全部' : names.join()
if (!ids.length) return this.$message.warning('请至少勾选一个供应商')
const { id } = this.curData
this.permissions[0].children.map(e => {
// id
if (e.id == id) {
e.supplierIds = ids
e.supplierNames = names
}
})
this.dataVisible = false
},
//
handleRolePer (data, permissions) {
let result = data;
if (permissions.length) {
permissions.map(e => {
if (result.includes(e.id) && e.children) {
// ,idid,,,
e.children.every(n => result.includes(n)) || result.splice(result.indexOf(e.id), 1);
}
e.children && e.children.length && this.handleRolePer(data, e.children);
});
}
return result;
},
async getDetail (row) { //
let res = await this.$get(`${this.api.obtainDetails}?id=${row.id}`);
this.form = res.role;
this.form.id = row.id
const checked = res.permissionList
const per = res.permissionVoList
const ids = this.suppliers.map(e => e.supplierId)
const len = ids.length
// supplierIds
this.permissions[0].children.map(e => {
const sup = per.find(n => n.permissionId == e.id)
//
if (sup) {
e.supplierIds = sup.supplierId.split(',').map(e => +e)
e.supplierNames = sup.supplierName.split(',').length === len ? '全部' : sup.supplierName
} else if (!checked.includes(e.id)) {
e.supplierIds = ids
}
})
console.log(33, this.permissions)
this.checkedIds = this.handleRolePer(res.permissionList, this.permissions);
this.$refs.per.setCheckedNodes(this.checkedIds);
},
showRole (row) {
this.isDetail = true;
this.isAdd = false;
this.getPer(row);
this.roleVisible = true;
},
editRole (row) {
this.isAdd = false;
this.getPer(row);
this.roleVisible = true;
},
async saveData () {
const { form, datas } = this
if (!form.roleName) return this.$message.warning("请填写角色名称");
if (!form.remark) return this.$message.warning("请填写角色描述");
const tree = this.$refs.per
if (!tree.getCheckedKeys().length) return this.$message.warning("请选择角色权限");
// ,(),
const checks = [...this.$refs.per.getHalfCheckedNodes(), ...this.$refs.per.getCheckedNodes()];
const ids = []
const roleId = form.id
// id
checks.map(e => {
//
if (datas.includes(e.name) && e.supplierIds) {
e.supplierIds.map(n => {
ids.push({
permissionId: e.id,
roleId,
supplierId: n
})
})
} }
})
this.$post(this.api.saveOrUpdate, {
...this.form,
permissionId: [...tree.getHalfCheckedKeys(), ...tree.getCheckedKeys()],
dataPermissionList: ids,
platformId: Setting.platformId,
}).then(res => {
this.$message.success(form.id ? "修改成功" : "新增成功");
this.getData();
this.roleVisible = false;
}).catch(res => { });
} }
}
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.data { .data {
margin: 0 5px 0 50px; margin: 0 5px 0 50px;
color: #9076FF; color: #062c87;
} }
.data-dia { .data-dia {
.title { .title {
margin-bottom: 10px; margin-bottom: 10px;

@ -77,7 +77,7 @@
</div> </div>
</div> </div>
<el-table :data="listData" class="table" ref="table" stripe header-align="center" <el-table :data="listData" class="table" ref="table" header-align="center"
@selection-change="handleSelectionChange" row-key="accountId"> @selection-change="handleSelectionChange" row-key="accountId">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> <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 type="index" width="60" label="序号" align="center"></el-table-column>

@ -1,57 +1,20 @@
<template> <template>
<div class="page"> <div class="page">
<el-table :data="listData" <el-table :data="listData" class="table" ref="table" header-align="center" row-key="id">
class="table" <el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
ref="table" <el-table-column prop="operation" label="操作" align="center" min-width="150"
stripe show-overflow-tooltip></el-table-column>
header-align="center" <el-table-column prop="ip" label="ip" min-width="90" align="center"></el-table-column>
row-key="id"> <el-table-column prop="userId" label="userId" min-width="60" align="center"></el-table-column>
<el-table-column type="index" <el-table-column prop="userName" label="用户名" min-width="60" align="center"></el-table-column>
width="60" <el-table-column prop="schoolName" label="学校" min-width="90" align="center"></el-table-column>
label="序号" <el-table-column prop="method" label="路径" min-width="90" align="center" show-overflow-tooltip></el-table-column>
align="center"></el-table-column> <el-table-column prop="params" label="参数" min-width="300" align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="operation" <el-table-column prop="createTime" label="操作时间" width="150" align="center"></el-table-column>
label="操作"
align="center"
min-width="150"
show-overflow-tooltip></el-table-column>
<el-table-column prop="ip"
label="ip"
min-width="90"
align="center"></el-table-column>
<el-table-column prop="userId"
label="userId"
min-width="60"
align="center"></el-table-column>
<el-table-column prop="userName"
label="用户名"
min-width="60"
align="center"></el-table-column>
<el-table-column prop="schoolName"
label="学校"
min-width="90"
align="center"></el-table-column>
<el-table-column prop="method"
label="路径"
min-width="90"
align="center"
show-overflow-tooltip></el-table-column>
<el-table-column prop="params"
label="参数"
min-width="300"
align="center"
show-overflow-tooltip></el-table-column>
<el-table-column prop="createTime"
label="操作时间"
width="150"
align="center"></el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background <el-pagination background @current-change="currentChange" :current-page="page" layout="total, prev, pager, next"
@current-change="currentChange" :total="total"></el-pagination>
:current-page="page"
layout="total, prev, pager, next"
:total="total"></el-pagination>
</div> </div>
</div> </div>
</template> </template>
@ -96,5 +59,4 @@ export default {
} }
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped></style>
</style>

@ -1,334 +1,208 @@
<template> <template>
<div> <div>
<el-card shadow="hover" <el-card shadow="hover" class="m-b-20">
class="m-b-20">
<div class="flex-between"> <div class="flex-between">
<el-page-header @back="back" <el-page-header @back="back" :content="'课程内容/' + (sorting ? '更改排序' : '内容设置')"></el-page-header>
:content="'课程内容/' + (sorting ? '更改排序' : '内容设置')"></el-page-header>
</div> </div>
</el-card> </el-card>
<!--内容设置--> <!--内容设置-->
<el-card shadow="hover" <el-card shadow="hover" class="m-b-20">
class="m-b-20">
<div class="page"> <div class="page">
<div class="relative"> <div class="relative">
<div class="p-title">内容设置</div> <div class="p-title">内容设置</div>
<div class="btns" <div class="btns" style="top: -10px">
style="top: -10px">
<template v-if="!sorting"> <template v-if="!sorting">
<el-button type="primary" <el-button type="primary" round @click="addChapter">添加章节</el-button>
round <el-button type="primary" round @click="sort">编辑顺序</el-button>
@click="addChapter">添加章节</el-button>
<el-button type="primary"
round
@click="sort">编辑顺序</el-button>
</template> </template>
<template v-else> <template v-else>
<el-button type="primary" <el-button type="primary" round @click="move">批量移动</el-button>
round <el-button type="primary" round @click="cancelSort">取消</el-button>
@click="move">批量移动</el-button> <el-button type="primary" round @click="saveSort">保存</el-button>
<el-button type="primary"
round
@click="cancelSort">取消</el-button>
<el-button type="primary"
round
@click="saveSort">保存</el-button>
</template> </template>
</div> </div>
</div> </div>
<el-divider></el-divider> <el-divider></el-divider>
<div class="page-content"> <div class="page-content">
<div class="m-b-20" <div class="m-b-20" v-for="(chapter, index) in chapters" :key="chapter.id">
v-for="(chapter,index) in chapters"
:key="chapter.id">
<div class="flex j-between a-center m-b-10"> <div class="flex j-between a-center m-b-10">
<div>{{ chapter.name }}</div> <div>{{ chapter.name }}</div>
<div> <div>
<template v-if="!sorting"> <template v-if="!sorting">
<el-button class="action-btn" <el-button class="action-btn" type="primary" round @click="editChapter(chapter)">修改章节名称</el-button>
type="primary" <el-button class="action-btn" type="primary" round @click="addSection(chapter.id)">添加小节</el-button>
round <el-button class="action-btn" type="primary" round @click="delChapter(chapter.id)">删除</el-button>
@click="editChapter(chapter)">修改章节名称</el-button>
<el-button class="action-btn"
type="primary"
round
@click="addSection(chapter.id)">添加小节</el-button>
<el-button class="action-btn"
type="primary"
round
@click="delChapter(chapter.id)">删除</el-button>
</template> </template>
<template v-else> <template v-else>
<i class="el-icon-top sort-icon" <i class="el-icon-top sort-icon" :class="{ disabled: index == 0 }" style="margin-right: 5px"
:class="{disabled: index == 0}" @click="sortChapter(chapter, 'up', index == 0, index)"></i>
style="margin-right: 5px" <i class="el-icon-bottom sort-icon" :class="{ disabled: index == chapters.length - 1 }"
@click="sortChapter(chapter,'up',index == 0,index)"></i> @click="sortChapter(chapter, 'down', index == chapter.length - 1, index)"></i>
<i class="el-icon-bottom sort-icon"
:class="{disabled: index == chapters.length-1}"
@click="sortChapter(chapter,'down',index == chapter.length-1,index)"></i>
</template> </template>
</div> </div>
</div> </div>
<el-table :data="chapter.subsectionList" <el-table :data="chapter.subsectionList" class="table" header-align="center">
class="table" <el-table-column v-if="sorting" width="55" align="center">
stripe
header-align="center">
<el-table-column v-if="sorting"
width="55"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox v-model="scope.row.check"></el-checkbox> <el-checkbox v-model="scope.row.check"></el-checkbox>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column type="index" <el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
width="100" <el-table-column prop="name" label="资源名称" min-width="200">
label="序号"
align="center"></el-table-column>
<el-table-column prop="name"
label="资源名称"
min-width="200">
</el-table-column> </el-table-column>
<el-table-column prop="fileType" <el-table-column prop="fileType" label="资源类型" min-width="120" align="center">
label="资源类型"
min-width="120"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ transferType(scope.row.fileType) }} {{ transferType(scope.row.fileType) }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="fileType" <el-table-column prop="fileType" label="格式" min-width="120" align="center">
label="格式"
min-width="120"
align="center">
</el-table-column> </el-table-column>
<el-table-column label="操作" <el-table-column label="操作" align="center" width="300">
align="center"
width="300">
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if="!sorting"> <template v-if="!sorting">
<el-button type="text" <el-button type="text" @click="preview(scope.row)">查看</el-button>
@click="preview(scope.row)">查看</el-button> <el-button type="text" @click="delSection(scope.row)">删除</el-button>
<el-button type="text" <el-button type="text" @click="editSectionName(scope.row, chapter.id)">修改小节名称</el-button>
@click="delSection(scope.row)">删除</el-button> <el-button type="text" @click="switchFile(scope.row, chapter.id)">更换文件</el-button>
<el-button type="text"
@click="editSectionName(scope.row,chapter.id)">修改小节名称</el-button>
<el-button type="text"
@click="switchFile(scope.row,chapter.id)">更换文件</el-button>
</template> </template>
<template v-else> <template v-else>
<i class="el-icon-top sort-icon" <i class="el-icon-top sort-icon" :class="{ disabled: scope.$index == 0 }" style="margin-right: 5px"
:class="{disabled: scope.$index == 0}" @click="sortSection(index, 'up', scope.$index == 0, scope.$index)"></i>
style="margin-right: 5px"
@click="sortSection(index,'up',scope.$index == 0,scope.$index)"></i>
<i class="el-icon-bottom sort-icon" <i class="el-icon-bottom sort-icon"
:class="{disabled: scope.$index == chapter.subsectionList.length-1}" :class="{ disabled: scope.$index == chapter.subsectionList.length - 1 }"
@click="sortSection(index,'down',scope.$index == chapter.subsectionList.length-1,scope.$index)"></i> @click="sortSection(index, 'down', scope.$index == chapter.subsectionList.length - 1, scope.$index)"></i>
</template> </template>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<el-dialog :title="chapterId ? '编辑章节' : '新增章节'" <el-dialog :title="chapterId ? '编辑章节' : '新增章节'" :visible.sync="chapterVisible" width="540px"
:visible.sync="chapterVisible" :close-on-click-modal="false">
width="540px"
:close-on-click-modal="false">
<el-form> <el-form>
<el-form-item> <el-form-item>
<el-input placeholder="请输入章节名称,便于对小节归类" <el-input placeholder="请输入章节名称,便于对小节归类" v-model="chapterName" maxlength="50"></el-input>
v-model="chapterName"
maxlength="50"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" <span slot="footer" class="dialog-footer">
class="dialog-footer">
<el-button @click="chapterVisible = false">取消</el-button> <el-button @click="chapterVisible = false">取消</el-button>
<el-button type="primary" <el-button type="primary" @click="chapterSubmit">确定</el-button>
@click="chapterSubmit">确定</el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-dialog title="添加小节" <el-dialog title="添加小节" :visible.sync="sectionVisible" width="540px" @close="closeSection"
:visible.sync="sectionVisible" :close-on-click-modal="false">
width="540px"
@close="closeSection"
:close-on-click-modal="false">
<el-form label-width="80px"> <el-form label-width="80px">
<el-form-item label="资源添加"> <el-form-item label="资源添加">
<Upload :max-size="100000" <Upload :max-size="100000" :file-list="uploadList" @beforeUpload="beforeUpload"
:file-list="uploadList" @onSuccess="uploadSuccess">
@beforeUpload="beforeUpload"
@onSuccess="uploadSuccess">
<template slot="tip"> <template slot="tip">
<p>视频请上传MP4格式</p> <p>视频请上传MP4格式</p>
</template> </template>
</Upload> </Upload>
</el-form-item> </el-form-item>
<el-form-item label="小节名称"> <el-form-item label="小节名称">
<el-input placeholder="请输入小节名称" <el-input placeholder="请输入小节名称" v-model="sectionName" maxlength="50"></el-input>
v-model="sectionName"
maxlength="50"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" <span slot="footer" class="dialog-footer">
class="dialog-footer">
<el-button @click="sectionVisible = false">取消</el-button> <el-button @click="sectionVisible = false">取消</el-button>
<el-button type="primary" <el-button type="primary" @click="sectionSubmit">确定</el-button>
@click="sectionSubmit">确定</el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-dialog title="更换文件" <el-dialog title="更换文件" :visible.sync="switchVisible" width="540px" :close-on-click-modal="false"
:visible.sync="switchVisible" @close="closeSwitch">
width="540px"
:close-on-click-modal="false"
@close="closeSwitch">
<div style="text-align: center"> <div style="text-align: center">
<Upload :max-size="100000" <Upload :max-size="100000" :file-list="uploadList" @beforeUpload="beforeUpload"
:file-list="uploadList" @onSuccess="uploadSuccess">
@beforeUpload="beforeUpload"
@onSuccess="uploadSuccess">
<template slot="tip"> <template slot="tip">
<p>视频请上传MP4格式</p> <p>视频请上传MP4格式</p>
</template> </template>
</Upload> </Upload>
</div> </div>
<span slot="footer" <span slot="footer" class="dialog-footer">
class="dialog-footer">
<el-button @click="switchVisible = false">取消</el-button> <el-button @click="switchVisible = false">取消</el-button>
<el-button type="primary" <el-button type="primary" @click="switchSubmit">确定</el-button>
@click="switchSubmit">确定</el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-dialog title="修改小节名称" <el-dialog title="修改小节名称" :visible.sync="sectionNameVisible" width="540px" :close-on-click-modal="false">
:visible.sync="sectionNameVisible"
width="540px"
:close-on-click-modal="false">
<el-form> <el-form>
<el-form-item> <el-form-item>
<el-input placeholder="请输入小节名称" <el-input placeholder="请输入小节名称" v-model="sectionName" maxlength="50"></el-input>
v-model="sectionName"
maxlength="50"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" <span slot="footer" class="dialog-footer">
class="dialog-footer">
<el-button @click="sectionNameVisible = false">取消</el-button> <el-button @click="sectionNameVisible = false">取消</el-button>
<el-button type="primary" <el-button type="primary" @click="sectionNameSubmit">确定</el-button>
@click="sectionNameSubmit">确定</el-button>
</span> </span>
</el-dialog> </el-dialog>
<div v-show="previewImg" <div v-show="previewImg" class="el-image-viewer__wrapper" :class="{ active: previewImg }" style="z-index: 2000">
class="el-image-viewer__wrapper"
:class="{active: previewImg}"
style="z-index: 2000">
<div class="el-image-viewer__mask"></div> <div class="el-image-viewer__mask"></div>
<span class="el-image-viewer__btn el-image-viewer__close" <span class="el-image-viewer__btn el-image-viewer__close" @click="previewImg = ''"><i
@click="previewImg = ''"><i class="el-icon-circle-close" class="el-icon-circle-close" style="color: #fff"></i></span>
style="color: #fff"></i></span>
<div class="el-image-viewer__canvas"> <div class="el-image-viewer__canvas">
<img :src="previewImg" <img :src="previewImg" class="el-image-viewer__img"
class="el-image-viewer__img" style="transform: scale(1) rotate(0deg);margin-top: -1px; max-height: 100%; max-width: 100%;">
style="transform: scale(1) rotate(0deg);margin-top: -1px; max-height: 100%; max-width: 100%;">
</div> </div>
</div> </div>
<div v-show="iframeSrc || videoSrc" <div v-show="iframeSrc || videoSrc" class="el-image-viewer__wrapper" :class="{ active: iframeSrc }"
class="el-image-viewer__wrapper" style="z-index: 2000">
:class="{active: iframeSrc}"
style="z-index: 2000">
<div class="el-image-viewer__mask"></div> <div class="el-image-viewer__mask"></div>
<span class="el-image-viewer__btn el-image-viewer__close" <span class="el-image-viewer__btn el-image-viewer__close" :class="{ 'doc-close': isWord }"
:class="{'doc-close': isWord}" :style="{ top: isWord ? '50px' : '5px' }" @click="closeIframe"><i class="el-icon-circle-close"
:style="{top: isWord ? '50px' : '5px'}" style="color: #fff"></i></span>
@click="closeIframe"><i class="el-icon-circle-close"
style="color: #fff"></i></span>
<div class="el-image-viewer__canvas"> <div class="el-image-viewer__canvas">
<iframe v-if="iframeSrc" <iframe v-if="iframeSrc" class="fileIframe" id="fileIframe" :src="iframeSrc" frameborder="0"></iframe>
class="fileIframe" <video v-if="videoSrc" class="video" width="1200" height="600" autoplay controls>
id="fileIframe" <source :src="videoSrc" type="video/mp4">
:src="iframeSrc"
frameborder="0"></iframe>
<video v-if="videoSrc"
class="video"
width="1200"
height="600"
autoplay
controls>
<source :src="videoSrc"
type="video/mp4">
您的浏览器不支持 video 标签 您的浏览器不支持 video 标签
</video> </video>
<template v-if="showMask"> <template v-if="showMask">
<div class="mask" <div class="mask" style="width: 200px;height: 30px;top: 53px;right: 320px"></div>
style="width: 200px;height: 30px;top: 53px;right: 320px"></div> <div class="mask" style="width: 175px;height: 30px;top: 53px;right: 5px"></div>
<div class="mask"
style="width: 175px;height: 30px;top: 53px;right: 5px"></div>
</template> </template>
<template v-if="showMask1"> <template v-if="showMask1">
<div class="word-mask1" <div class="word-mask1" style="width: 200px;height: 50px;"></div>
style="width: 200px;height: 50px;"></div> <div class="word-mask" style="height: 40px;top: 48px;"></div>
<div class="word-mask" <div class="word-mask2" style="top: 55px;left: 28%;width: 44%;height: calc(100% - 80px);"></div>
style="height: 40px;top: 48px;"></div>
<div class="word-mask2"
style="top: 55px;left: 28%;width: 44%;height: calc(100% - 80px);"></div>
</template> </template>
<template v-if="showMask2 && iframeSrc"> <template v-if="showMask2 && iframeSrc">
<div class="excel-mask1" <div class="excel-mask1" style="height: 48px;"></div>
style="height: 48px;"></div>
</template> </template>
</div> </div>
</div> </div>
<div v-show="playAuth" <div v-show="playAuth" class="el-image-viewer__wrapper" :class="{ active: playAuth }" style="z-index: 2000">
class="el-image-viewer__wrapper"
:class="{active: playAuth}"
style="z-index: 2000">
<div class="el-image-viewer__mask"></div> <div class="el-image-viewer__mask"></div>
<span class="el-image-viewer__btn el-image-viewer__close" <span class="el-image-viewer__btn el-image-viewer__close" @click="closePlayer"><i
@click="closePlayer"><i class="el-icon-circle-close" class="el-icon-circle-close" style="color: #fff"></i></span>
style="color: #fff"></i></span> <div class="player" id="player"></div>
<div class="player"
id="player"></div>
</div> </div>
<pdf :visible.sync="pdfVisible" <pdf :visible.sync="pdfVisible" :src.sync="pdfSrc"></pdf>
:src.sync="pdfSrc"></pdf>
</div> </div>
</div> </div>
</el-card> </el-card>
<el-dialog title="资源移动" <el-dialog title="资源移动" :visible.sync="moveVisible" :close-on-click-modal="false" width="330px">
:visible.sync="moveVisible"
:close-on-click-modal="false"
width="330px">
<el-form> <el-form>
<el-form-item label="目标章节"> <el-form-item label="目标章节">
<el-select v-model="moveForm.id" <el-select v-model="moveForm.id" placeholder="请选择目标章节" @change="chapterChange">
placeholder="请选择目标章节" <el-option v-for="(item, i) in chapters" :key="i" :label="item.name" :value="item.id"></el-option>
@change="chapterChange">
<el-option v-for="(item, i) in chapters"
:key="i"
:label="item.name"
:value="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="目标排序"> <el-form-item label="目标排序">
<el-select v-model="moveForm.sort" <el-select v-model="moveForm.sort" placeholder="请选择目标排序">
placeholder="请选择目标排序"> <el-option v-for="(item, i) in sortList" :key="i" :label="item.name" :value="item.id"></el-option>
<el-option v-for="(item, i) in sortList"
:key="i"
:label="item.name"
:value="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" <span slot="footer" class="dialog-footer">
class="dialog-footer">
<el-button @click="moveVisible = false">取消</el-button> <el-button @click="moveVisible = false">取消</el-button>
<el-button type="primary" <el-button type="primary" @click="moveConfirm">确定</el-button>
@click="moveConfirm">确定</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
@ -878,118 +752,124 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.relative { .relative {
position: relative; position: relative;
} }
.btns { .btns {
position: absolute; position: absolute;
top: 12px; top: 12px;
right: 24px; right: 24px;
.el-button { .el-button {
font-size: 12px; font-size: 12px;
} }
} }
/deep/.el-progress-bar { /deep/.el-progress-bar {
padding-right: 70px; padding-right: 70px;
margin-right: -70px; margin-right: -70px;
} }
.el-upload__tip { .el-upload__tip {
position: absolute; position: absolute;
top: 4px; top: 4px;
right: 0; right: 0;
width: 300px; width: 300px;
line-height: 1.4; line-height: 1.4;
} }
.sort-icon { .sort-icon {
font-size: 24px; font-size: 24px;
cursor: pointer; cursor: pointer;
&.disabled { &.disabled {
color: #ccc; color: #ccc;
cursor: not-allowed; cursor: not-allowed;
} }
} }
.el-image-viewer__wrapper { .el-image-viewer__wrapper {
transform: translateY(-10px); transform: translateY(-10px);
transition: transform 0.5s; transition: transform 0.5s;
&.active { &.active {
transform: translateY(0); transform: translateY(0);
} }
} }
.el-image-viewer__close { .el-image-viewer__close {
z-index: 10000; z-index: 10000;
top: 15px; top: 15px;
right: 15px; right: 15px;
&.doc-close { &.doc-close {
i { i {
color: #000 !important; color: #000 !important;
}
} }
}
} }
.player { .player {
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
width: 1200px !important; width: 1200px !important;
height: 600px !important; height: 600px !important;
} }
.fileIframe { .fileIframe {
z-index: 1; z-index: 1;
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
bottom: 0; bottom: 0;
right: 0; right: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.mask { .mask {
z-index: 1000; z-index: 1000;
position: fixed; position: fixed;
background-color: rgb(57, 58, 61); background-color: rgb(57, 58, 61);
} }
.word-mask { .word-mask {
z-index: 1000; z-index: 1000;
position: fixed; position: fixed;
right: 0; right: 0;
width: 100%; width: 100%;
background-color: rgb(243, 242, 241); background-color: rgb(243, 242, 241);
} }
.word-mask1 { .word-mask1 {
z-index: 1000; z-index: 1000;
position: fixed; position: fixed;
top: 0; top: 0;
right: 0; right: 0;
background-color: #2b579a; background-color: #2b579a;
} }
.word-mask2 { .word-mask2 {
z-index: 1000; z-index: 1000;
position: fixed; position: fixed;
background-color: transparent; background-color: transparent;
} }
.excel-mask1 { .excel-mask1 {
z-index: 9; z-index: 9;
position: absolute; position: absolute;
top: 0; top: 0;
left: 20%; left: 20%;
width: 80%; width: 80%;
background-color: #107c41; background-color: #107c41;
} }
.el-button--primary.action-btn { .el-button--primary.action-btn {
color: #9076ff !important; color: #9076ff !important;
font-size: 14px !important; font-size: 14px !important;
background-color: #fff !important; background-color: #fff !important;
border-radius: 4px !important; border-radius: 4px !important;
} }
</style> </style>

@ -36,8 +36,8 @@
</div> </div>
</div> </div>
<el-table :data="list" class="table" ref="table" stripe header-align="center" <el-table :data="list" class="table" ref="table" header-align="center" @selection-change="handleSelectionChange"
@selection-change="handleSelectionChange" row-key="id"> row-key="id">
<el-table-column type="selection" width="80" align="center" :reserve-selection="true"></el-table-column> <el-table-column type="selection" width="80" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"> <el-table-column type="index" width="100" label="序号" align="center">
<template slot-scope="scope"> <template slot-scope="scope">

@ -2,157 +2,87 @@
<!-- 院校创建 --> <!-- 院校创建 -->
<div style="padding-top: 24px"> <div style="padding-top: 24px">
<div class="tool"> <div class="tool">
<ul class="filter" <ul class="filter" style="align-items: flex-start">
style="align-items: flex-start">
<li> <li>
<label>可见范围</label> <label>可见范围</label>
<el-select v-model="form.visibleRange" <el-select v-model="form.visibleRange" clearable placeholder="请选择可见范围" @change="getData">
clearable <el-option v-for="(item, index) in regions" :key="index" :label="item.name" :value="item.id"></el-option>
placeholder="请选择可见范围"
@change="getData">
<el-option v-for="(item,index) in regions"
:key="index"
:label="item.name"
:value="item.id"></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<label>课程分类</label> <label>课程分类</label>
<el-select v-model="form.categoryId" <el-select v-model="form.categoryId" clearable placeholder="请选择课程分类" @change="getData">
clearable <el-option label="不限" value=""></el-option>
placeholder="请选择课程分类" <el-option v-for="(item, index) in classificationList" :key="index" :label="item.typeName"
@change="getData"> :value="item.id"></el-option>
<el-option label="不限"
value=""></el-option>
<el-option v-for="(item,index) in classificationList"
:key="index"
:label="item.typeName"
:value="item.id"></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<label>课程类型</label> <label>课程类型</label>
<el-select v-model="form.courseType" <el-select v-model="form.courseType" clearable placeholder="请选择课程类型" @change="getData">
clearable <el-option v-for="(item, index) in types" :key="index" :label="item.name" :value="item.id"></el-option>
placeholder="请选择课程类型"
@change="getData">
<el-option v-for="(item,index) in types"
:key="index"
:label="item.name"
:value="item.id"></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<label>搜索</label> <label>搜索</label>
<el-input placeholder="请输入理论课程名称/创建人" <el-input placeholder="请输入理论课程名称/创建人" suffix-icon="el-icon-search" v-model="form.keyWord" clearable
suffix-icon="el-icon-search" size="small"></el-input>
v-model="form.keyWord"
clearable
size="small"></el-input>
</li> </li>
</ul> </ul>
<div> <div>
<!-- <el-button v-auth="'院校创建:新增'" type="primary" round @click="addCourse">新增</el-button> --> <!-- <el-button v-auth="'院校创建:新增'" type="primary" round @click="addCourse">新增</el-button> -->
<el-button v-auth="'院校创建:批量删除'" <el-button v-auth="'院校创建:批量删除'" type="primary" round @click="delAllData">批量删除</el-button>
type="primary"
round
@click="delAllData">批量删除</el-button>
</div> </div>
</div> </div>
<el-table :data="list" <el-table :data="list" class="table" ref="table" header-align="center" @selection-change="handleSelectionChange"
class="table" row-key="id">
ref="table" <el-table-column type="selection" width="80" align="center" :reserve-selection="true"></el-table-column>
stripe <el-table-column type="index" width="100" label="序号" align="center">
header-align="center"
@selection-change="handleSelectionChange"
row-key="id">
<el-table-column type="selection"
width="80"
align="center"
:reserve-selection="true"></el-table-column>
<el-table-column type="index"
width="100"
label="序号"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.$index + (page - 1) * pageSize + 1 }} {{ scope.$index + (page - 1) * pageSize + 1 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="courseName" <el-table-column prop="courseName" label="课程名称" align="center">
label="课程名称"
align="center">
</el-table-column> </el-table-column>
<el-table-column label="可见范围" <el-table-column label="可见范围" align="center">
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ regionName[scope.row.visibleRange] }} {{ regionName[scope.row.visibleRange] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createTime" <el-table-column prop="createTime" label="创建时间" align="center">
label="创建时间"
align="center">
</el-table-column> </el-table-column>
<el-table-column prop="courseClassification" <el-table-column prop="courseClassification" label="课程类型" align="center">
label="课程类型"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.courseType == 1 ? '付费' : '免费' }} {{ scope.row.courseType == 1 ? '付费' : '免费' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="founder" <el-table-column prop="founder" label="创建人" align="center">
label="创建人"
align="center">
</el-table-column> </el-table-column>
<el-table-column prop="courseClassification" <el-table-column prop="courseClassification" label="课程分类" align="center" show-overflow-tooltip>
label="课程分类"
align="center"
show-overflow-tooltip>
</el-table-column> </el-table-column>
<el-table-column label="操作" <el-table-column label="操作" align="center" width="250">
align="center"
width="250">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-auth="'院校创建:编辑信息'" <el-button v-auth="'院校创建:编辑信息'" type="text" @click="editCourse(scope.row)">编辑信息</el-button>
type="text" <el-divider v-auth="'院校创建:编辑信息'" direction="vertical"></el-divider>
@click="editCourse(scope.row)">编辑信息</el-button> <el-button v-auth="'院校创建:内容设置'" type="text" @click="config(scope.row)">内容设置</el-button>
<el-divider v-auth="'院校创建:编辑信息'" <el-divider v-auth="'院校创建:内容设置'" direction="vertical"></el-divider>
direction="vertical"></el-divider> <el-button v-auth="'院校创建:预览'" type="text" @click="preview(scope.row)">预览</el-button>
<el-button v-auth="'院校创建:内容设置'" <el-divider v-auth="'院校创建:预览'" direction="vertical"></el-divider>
type="text" <el-button v-auth="'院校创建:删除'" type="text" @click="handleDelete(scope.row)">删除</el-button>
@click="config(scope.row)">内容设置</el-button>
<el-divider v-auth="'院校创建:内容设置'"
direction="vertical"></el-divider>
<el-button v-auth="'院校创建:预览'"
type="text"
@click="preview(scope.row)">预览</el-button>
<el-divider v-auth="'院校创建:预览'"
direction="vertical"></el-divider>
<el-button v-auth="'院校创建:删除'"
type="text"
@click="handleDelete(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="可授权状态" <el-table-column label="可授权状态" align="center" width="120">
align="center"
width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch v-auth="'院校创建:禁用'" <el-switch v-auth="'院校创建:禁用'" v-model="scope.row.ztOpen" :active-value="0" :inactive-value="1"
v-model="scope.row.ztOpen" style="margin: 0 10px 0 5px" :active-text="scope.row.ztOpen ? '关' : '开'"
:active-value="0" @change="switchOff($event, scope.row, scope.$index)"></el-switch>
:inactive-value="1"
style="margin: 0 10px 0 5px"
:active-text="scope.row.ztOpen ? '关' : '开'"
@change="switchOff($event,scope.row,scope.$index)"></el-switch>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background <el-pagination background layout="total, prev, pager, next" :total="total" @current-change="handleCurrentChange"
layout="total, prev, pager, next" :current-page="page">
:total="total"
@current-change="handleCurrentChange"
:current-page="page">
</el-pagination> </el-pagination>
</div> </div>
</div> </div>
@ -349,10 +279,10 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/ .tool { /deep/ .tool {
.filter { .filter {
.el-input { .el-input {
min-width: 215px; min-width: 215px;
}
} }
}
} }
</style> </style>

@ -1,187 +1,187 @@
<template> <template>
<!-- 分类管理 --> <!-- 分类管理 -->
<div> <div>
<div class="tool"> <div class="tool">
<ul class="filter"> <ul class="filter">
</ul> </ul>
<div style="margin-top: 24px"> <div style="margin-top: 24px">
<el-button v-auth="'分类管理:新增'" type="primary" round @click="addClass">新增</el-button> <el-button v-auth="'分类管理:新增'" type="primary" round @click="addClass">新增</el-button>
</div> </div>
</div> </div>
<el-table :data="list" class="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id"> <el-table :data="list" class="table" header-align="center" @selection-change="handleSelectionChange" row-key="id">
<el-table-column type="index" width="100" label="序号" align="center"> <el-table-column type="index" width="100" label="序号" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.$index + (page - 1) * pageSize + 1 }} {{ scope.$index + (page - 1) * pageSize + 1 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="classificationName" label="课程分类名称"> <el-table-column prop="classificationName" label="课程分类名称">
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="300"> <el-table-column label="操作" align="center" width="300">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-auth="'分类管理:修改'" type="text" @click="editClass(scope.row)">修改</el-button> <el-button v-auth="'分类管理:修改'" type="text" @click="editClass(scope.row)">修改</el-button>
<el-divider v-auth="'分类管理:修改'" direction="vertical"></el-divider> <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="handleDelete(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background layout="total, prev, pager, next" :total="total" @current-change="handleCurrentChange" :current-page="page"> <el-pagination background layout="total, prev, pager, next" :total="total" @current-change="handleCurrentChange"
</el-pagination> :current-page="page">
</div> </el-pagination>
<el-dialog :title="!curRow.id ? '添加分类' : '编辑分类'" :visible.sync="classVisible" width="400px" :close-on-click-modal="false" @close="closeColumn">
<el-form>
<el-form-item>
<el-input placeholder="分类名称" v-model="classificationName"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="classVisible = false"> </el-button>
<el-button type="primary" @click="classSubmit"> </el-button>
</span>
</el-dialog>
</div> </div>
<el-dialog :title="!curRow.id ? '添加分类' : '编辑分类'" :visible.sync="classVisible" width="400px"
:close-on-click-modal="false" @close="closeColumn">
<el-form>
<el-form-item>
<el-input placeholder="分类名称" v-model="classificationName"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="classVisible = false"> </el-button>
<el-button type="primary" @click="classSubmit"> </el-button>
</span>
</el-dialog>
</div>
</template> </template>
<script> <script>
import util from "@/libs/util"; import util from "@/libs/util";
import Setting from '@/setting' import Setting from '@/setting'
export default { export default {
name: "sortManagement", name: "sortManagement",
data() { data () {
return { return {
list: [], list: [],
multipleSelection: [], multipleSelection: [],
page: 1, page: 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
classVisible: false, classVisible: false,
curRow: {}, curRow: {},
classificationName: "", classificationName: "",
nameRepeat: false nameRepeat: false
}; };
},
watch: {
classificationName: function (val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.nameChange();
}, 100);
}
},
mounted () {
this.getData();
},
methods: {
getData () {
this.$post(this.api.listClassification, {
pageNum: this.page,
pageSize: this.pageSize,
platformSource: Setting.platformSource
}).then(({ page }) => {
this.list = page.records
this.total = page.total
}).catch(res => {
});
}, },
watch: { handleDelete (row) {
classificationName: function(val) { this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", {
clearTimeout(this.searchTimer); type: "warning"
this.searchTimer = setTimeout(() => { })
this.nameChange(); .then(() => {
}, 100); this.$post(this.api.delClassification, [row.id]).then(res => {
} util.successMsg("删除成功");
this.getData();
}).catch(res => {
});
})
.catch(() => {
});
}, },
mounted() { handleSelectionChange (val) {
this.getData(); this.multipleSelection = val;
}, },
methods: { closeColumn () {
getData() { this.classificationName = "";
this.$post(this.api.listClassification, { this.curRow = {};
pageNum: this.page, },
pageSize: this.pageSize, delAllData () {
platformSource: Setting.platformSource if (this.multipleSelection.length != "") {
}).then(({ page }) => { let newArr = this.multipleSelection;
this.list = page.records let delList = newArr.map(item => {
this.total = page.total return item.id;
});
//
this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", {
type: "warning"
})
.then(() => {
let data = delList.join();
this.$del(this.api.deleteClassification, data).then(res => {
this.multipleSelection = [];
util.successMsg("删除成功");
this.getData();
}).catch(res => { }).catch(res => {
}); });
}, }).catch(() => {
handleDelete(row) { });
this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", { } else {
type: "warning" util.errorMsg("请先选择数据 !");
}) }
.then(() => { },
this.$post(this.api.delClassification, [row.id]).then(res => { handleCurrentChange (val) {
util.successMsg("删除成功"); this.page = val;
this.getData(); this.getData();
}).catch(res => { },
}); addClass () {
}) this.classVisible = true;
.catch(() => { },
}); editClass (row) {
}, this.curRow = row;
handleSelectionChange(val) { this.classificationName = row.classificationName;
this.multipleSelection = val; this.classVisible = true;
}, },
closeColumn() { nameChange (val) {
this.classificationName = ""; const row = this.curRow
this.curRow = {}; this.$post(this.api.checkRepeatClassification, {
}, id: row.id,
delAllData() { platformSource: Setting.platformSource,
if (this.multipleSelection.length != "") { classificationName: this.classificationName
let newArr = this.multipleSelection; }).then(res => {
let delList = newArr.map(item => { this.nameRepeat = false
return item.id; }).catch(res => {
}); this.nameRepeat = true
// })
this.$confirm("此删除操作不可逆,是否确认删除选中项?", "提示", { },
type: "warning" classSubmit () {
}) if (!this.classificationName) return util.errorMsg("请填写分类名称");
.then(() => { if (this.nameRepeat) return util.errorMsg("当前分类已存在!");
let data = delList.join(); let data = {
this.$del(this.api.deleteClassification, data).then(res => { classificationName: this.classificationName,
this.multipleSelection = []; platformSource: Setting.platformSource
util.successMsg("删除成功"); };
this.getData(); if (this.curRow.id) {
}).catch(res => { data.id = this.curRow.id;
}); this.$post(this.api.updateClassification, data).then(res => {
}).catch(() => { util.successMsg("修改成功");
}); this.classVisible = false;
} else { this.getData();
util.errorMsg("请先选择数据 !"); }).catch(res => {
} });
}, } else {
handleCurrentChange(val) { this.$post(this.api.saveClassification, data).then(res => {
this.page = val; util.successMsg("添加成功");
this.getData(); this.classVisible = false;
}, this.getData();
addClass() { }).catch(res => {
this.classVisible = true; });
}, }
editClass(row) {
this.curRow = row;
this.classificationName = row.classificationName;
this.classVisible = true;
},
nameChange(val) {
const row = this.curRow
this.$post(this.api.checkRepeatClassification, {
id: row.id,
platformSource: Setting.platformSource,
classificationName: this.classificationName
}).then(res => {
this.nameRepeat = false
}).catch(res => {
this.nameRepeat = true
})
},
classSubmit() {
if (!this.classificationName) return util.errorMsg("请填写分类名称");
if (this.nameRepeat) return util.errorMsg("当前分类已存在!");
let data = {
classificationName: this.classificationName,
platformSource: Setting.platformSource
};
if (this.curRow.id) {
data.id = this.curRow.id;
this.$post(this.api.updateClassification, data).then(res => {
util.successMsg("修改成功");
this.classVisible = false;
this.getData();
}).catch(res => {
});
} else {
this.$post(this.api.saveClassification, data).then(res => {
util.successMsg("添加成功");
this.classVisible = false;
this.getData();
}).catch(res => {
});
}
}
} }
}
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped></style>
</style>

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<el-table v-loading="loading" :data="list" class="table" ref="table" stripe header-align="center" row-key="id"> <el-table v-loading="loading" :data="list" class="table" ref="table" header-align="center" row-key="id">
<el-table-column type="index" width="100" label="序号" align="center"></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="curriculumName" label="程序名称" align="center"></el-table-column>
<el-table-column prop="curriculumType" label="供应商" align="center"></el-table-column> <el-table-column prop="curriculumType" label="供应商" align="center"></el-table-column>

@ -12,7 +12,7 @@
<el-button type="primary" round @click="add">新增系统</el-button> <el-button type="primary" round @click="add">新增系统</el-button>
</div> </div>
</div> </div>
<el-table v-loading="loading" :data="list" class="table" ref="table" stripe header-align="center" row-key="id"> <el-table v-loading="loading" :data="list" class="table" ref="table" header-align="center" row-key="id">
<el-table-column type="index" width="100" label="序号" align="center"></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="curriculumName" label="系统名称" align="center"></el-table-column>
<el-table-column prop="curriculumType" label="系统分类" align="center"></el-table-column> <el-table-column prop="curriculumType" label="系统分类" align="center"></el-table-column>

@ -92,7 +92,7 @@
</div> </div>
</div> </div>
<el-table :data="platformList" class="table" stripe header-align="center" row-key="accountId"> <el-table :data="platformList" class="table" header-align="center" row-key="accountId">
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column> <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="platformName" label="平台名称" align="center"></el-table-column>
<el-table-column prop="schoolName" label="绑定组织名称" align="center"></el-table-column> <el-table-column prop="schoolName" label="绑定组织名称" align="center"></el-table-column>

@ -90,7 +90,7 @@
<el-button type="primary" round @click="delAllSelection" v-auth>批量删除</el-button> <el-button type="primary" round @click="delAllSelection" v-auth>批量删除</el-button>
</div> </div>
</div> </div>
<el-table :data="userData" class="table" ref="table" stripe header-align="center" <el-table :data="userData" class="table" ref="table" header-align="center"
@selection-change="handleSelectionChange" row-key="userId"> @selection-change="handleSelectionChange" row-key="userId">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> <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 type="index" width="100" label="序号" align="center"></el-table-column>
@ -110,7 +110,7 @@
<el-switch v-if="scope.row.userId !== 1" :key="loading" v-model="scope.row.enable" :active-value="1" <el-switch v-if="scope.row.userId !== 1" :key="loading" v-model="scope.row.enable" :active-value="1"
:inactive-value="0" :class="{ error: scope.row.displayState === 2 }" style="margin: 0 10px 0 5px" :inactive-value="0" :class="{ error: scope.row.displayState === 2 }" style="margin: 0 10px 0 5px"
:active-text="scope.row.enable ? '启用' : '禁用'" :active-text="scope.row.enable ? '启用' : '禁用'"
:active-color="scope.row.displayState === 2 ? '#ff552c' : '#9076FF'" :active-color="scope.row.displayState === 2 ? '#ff552c' : '#062c87'"
:inactive-color="scope.row.displayState === 2 ? '#ff552c' : '#dcdfe6'" :inactive-color="scope.row.displayState === 2 ? '#ff552c' : '#dcdfe6'"
@change="switchOff($event, scope.row, scope.$index)" v-auth="'/user:启用'"></el-switch> @change="switchOff($event, scope.row, scope.$index)" v-auth="'/user:启用'"></el-switch>
</template> </template>

@ -3,25 +3,9 @@
<div class="block block1"> <div class="block block1">
<div class="title">系统后台</div> <div class="title">系统后台</div>
<div class="apps"> <div class="apps">
<div class="app"> <div v-for="(item, i) in systems" :key="i" class="app" @click="toSystem()">
<img src="@/assets/img/workbench/1.png" alt=""> <img :src="require(`@/assets/img/workbench/${i + 1}.png`)" alt="">
<p class="name">Python系统</p> <p class="name">{{ item.systemTypeName }}</p>
</div>
<div class="app">
<img src="@/assets/img/workbench/2.png" alt="">
<p class="name">理论考试系统</p>
</div>
<div class="app">
<img src="@/assets/img/workbench/3.png" alt="">
<p class="name">金融产品设计及数字化营销沙盘系统</p>
</div>
<div class="app">
<img src="@/assets/img/workbench/4.png" alt="">
<p class="name">银行综合系统</p>
</div>
<div class="app">
<img src="@/assets/img/workbench/5.png" alt="">
<p class="name">众筹系统</p>
</div> </div>
</div> </div>
</div> </div>
@ -75,6 +59,10 @@
<img src="@/assets/img/workbench/15.png" alt=""> <img src="@/assets/img/workbench/15.png" alt="">
<p class="name">数据管理</p> <p class="name">数据管理</p>
</div> </div>
<div class="app" @click="to('/review')">
<img src="@/assets/img/workbench/16.png" alt="">
<p class="name">评阅管理</p>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -85,43 +73,20 @@ import Setting from '@/setting'
export default { export default {
data () { data () {
return { return {
systems: [],
}; };
}, },
mounted () { mounted () {
this.getData()
}, },
methods: { methods: {
getData () { async getData () {
this.loading = true const res = await this.$get(this.api.workbenchSystemDemonstration)
this.$post(this.api.userManagementList, { this.systems = res.serviceConfigurationList
countries: this.form.countries, },
provinceId: this.form.provinces, toSystem (item) {
cityId: this.form.city, this.$router.push(`/configure`)
platformId: this.form.platformId,
schoolId: this.form.schoolId,
month: this.form.month,
creationTime: this.form.startTime,
endTime: this.form.endTime,
roleId: this.form.accountRole,
searchContent: this.form.keyword,
pageNum: this.page,
pageSize: this.pageSize
}).then(({ page }) => {
const { records, total } = page
records.map(e => {
e.enable = e.displayState
if (e.enable === 2) {
e.enable = 1
}
})
this.userData = records
this.totals = total
this.loading = false
}).catch(res => {
this.loading = false
})
}, },
to (path) { to (path) {
this.$router.push(path) this.$router.push(path)

Loading…
Cancel
Save