Merge branch 'dev-yjl' into 'shenzhen-dev'

演示平台新增(标准七参数版)

See merge request !110
This commit is contained in:
袁晶琳 2023-03-01 09:47:24 +08:00
commit b49d182c7f
4 changed files with 886 additions and 681 deletions

View File

@ -18,7 +18,7 @@ var PROJECT = {
} }
var PROJECT_TYPE = PROJECT.online_zjsj var PROJECT_TYPE = PROJECT.local_test
var headerShow = true; // 是否显示头部 var headerShow = true; // 是否显示头部
var tabsShow = true; // 是否显示tabs var tabsShow = true; // 是否显示tabs

View File

@ -46,8 +46,8 @@ if (process.env.NODE_ENV == 'development') {
// axios.defaults.baseURL = 'http://192.168.34.117:6023/' // 杨杰本地 // axios.defaults.baseURL = 'http://192.168.34.117:6023/' // 杨杰本地
// axios.defaults.baseURL = 'http://ue6a4s.natappfree.cc' // 邱平毅vpn本地 // axios.defaults.baseURL = 'http://ue6a4s.natappfree.cc' // 邱平毅vpn本地
// axios.defaults.baseURL = 'http://139.9.66.234:6324/' // 河南春笋 // axios.defaults.baseURL = 'http://139.9.66.234:6324/' // 河南春笋
axios.defaults.baseURL ='http://124.71.67.160:8088/' //中建四局线上 // axios.defaults.baseURL ='http://124.71.67.160:8088/' //中建四局线上
// axios.defaults.baseURL ='http://182.90.224.147:100/' //演示平台/ axios.defaults.baseURL ='http://182.90.224.147:100/' //演示平台/
// axios.defaults.baseURL = 'http://192.168.34.125:6023/' //杨意本地 http/1.1 // axios.defaults.baseURL = 'http://192.168.34.125:6023/' //杨意本地 http/1.1
// axios.defaults.baseURL ='http://47.97.202.104:6023/' //金林湾线上 // axios.defaults.baseURL ='http://47.97.202.104:6023/' //金林湾线上
// axios.defaults.baseURL = 'http://192.168.34.231:6023/'; //杨思瑞本地 // axios.defaults.baseURL = 'http://192.168.34.231:6023/'; //杨思瑞本地

View File

@ -1,17 +1,35 @@
<template> <template>
<div class="fullHeight"> <div class="fullHeight">
<div class="searchBox whiteBlock"> <div class="searchBox whiteBlock">
<el-select size="medium" style="margin-right: 20px" <el-select
size="medium"
style="margin-right: 20px"
v-model="searchStyleType" v-model="searchStyleType"
:placeholder="$t('message.alarmValueSet.placeholder_select')" @change="refresh" :placeholder="$t('message.alarmValueSet.placeholder_select')"
@change="refresh"
> >
<el-option :label="item" :value="index+1" v-for="(item,index) in styleTypeArr" :key="index"> </el-option> <el-option
:label="item"
:value="index + 1"
v-for="(item, index) in styleTypeArr"
:key="index"
>
</el-option>
</el-select> </el-select>
<el-select size="medium" style="margin-right: 20px" <el-select
size="medium"
style="margin-right: 20px"
v-model="searchModuleType" v-model="searchModuleType"
:placeholder="$t('message.alarmValueSet.placeholder_select')" @change="refresh" :placeholder="$t('message.alarmValueSet.placeholder_select')"
@change="refresh"
> >
<el-option :label="item" :value="index+1" v-for="(item,index) in moudleTypeArr" :key="index"> </el-option> <el-option
:label="item"
:value="index + 1"
v-for="(item, index) in moudleTypeArr"
:key="index"
>
</el-option>
</el-select> </el-select>
<!-- <el-button type="primary" plain size="medium" @click="refresh">查询</el-button> --> <!-- <el-button type="primary" plain size="medium" @click="refresh">查询</el-button> -->
<el-button type="primary" size="medium" @click="add">新增</el-button> <el-button type="primary" size="medium" @click="add">新增</el-button>
@ -55,24 +73,36 @@
moudleTypeArr[scope.row.moduleType - 1] moudleTypeArr[scope.row.moduleType - 1]
}}</template> }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="moduleEquipment" label="是否在设备中台显示" align="center"> <el-table-column
prop="moduleEquipment"
label="是否在设备中台显示"
align="center"
>
<template slot-scope="scope">{{ <template slot-scope="scope">{{
scope.row.moduleEquipment === 1 ? "是" : "" scope.row.moduleEquipment === 1 ? '是' : ''
}}</template> }}</template>
</el-table-column> </el-table-column>
<el-table-column prop="appShow" label="是否app端显示" align="center"> <el-table-column prop="appShow" label="是否app端显示" align="center">
<template slot-scope="scope">{{ <template slot-scope="scope">{{
scope.row.appShow === 1 ? "是" : "" scope.row.appShow === 1 ? '是' : ''
}}</template> }}</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
:label="$t('message.alarmValueSet.operation')" :label="$t('message.alarmValueSet.operation')"
align="center" width="300" align="center"
width="300"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<div class="tableBtns"> <div class="tableBtns">
<!-- v-show="scope.row.moduleType==2||scope.row.moduleType==3" --> <!-- v-show="scope.row.moduleType==2||scope.row.moduleType==3" -->
<div class="operationText" @click="addEditForm=scope.row;menuManageDialog=true;getMenuList()"> <div
class="operationText"
@click="
addEditForm = scope.row
menuManageDialog = true
getMenuList()
"
>
菜单管理 菜单管理
</div> </div>
<div @click="edit(scope.row)" class="operationText"> <div @click="edit(scope.row)" class="operationText">
@ -81,7 +111,7 @@
width="15px" width="15px"
height="15px" height="15px"
/> />
<span>{{ $t("message.alarmValueSet.edit") }}</span> <span>{{ $t('message.alarmValueSet.edit') }}</span>
</div> </div>
<div @click="deleteDev(scope.row)" class="operationText"> <div @click="deleteDev(scope.row)" class="operationText">
<img <img
@ -168,10 +198,20 @@
v-model="addEditForm.moduleType" v-model="addEditForm.moduleType"
:placeholder="$t('message.alarmValueSet.placeholder_select')" :placeholder="$t('message.alarmValueSet.placeholder_select')"
> >
<el-option :label="item" :value="index+1" v-for="(item,index) in moudleTypeArr" :key="index"> </el-option> <el-option
:label="item"
:value="index + 1"
v-for="(item, index) in moudleTypeArr"
:key="index"
>
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-show="addEditForm.moduleType==2" label="项目模块类型" prop="moduleEquipment"> <el-form-item
v-show="addEditForm.moduleType == 2"
label="项目模块类型"
prop="moduleEquipment"
>
<el-select <el-select
v-model="addEditForm.moduleEquipment" v-model="addEditForm.moduleEquipment"
:placeholder="$t('message.alarmValueSet.placeholder_select')" :placeholder="$t('message.alarmValueSet.placeholder_select')"
@ -215,14 +255,14 @@
@click="Popup.show = false" @click="Popup.show = false"
icon="el-icon-circle-close" icon="el-icon-circle-close"
size="medium" size="medium"
>{{ $t("message.alarmValueSet.cancel") }} >{{ $t('message.alarmValueSet.cancel') }}
</el-button> </el-button>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-circle-check" icon="el-icon-circle-check"
@click="submit" @click="submit"
size="medium" size="medium"
>{{ $t("message.alarmValueSet.save") }} >{{ $t('message.alarmValueSet.save') }}
</el-button> </el-button>
</div> </div>
</div> </div>
@ -234,10 +274,18 @@
width="1167px" width="1167px"
> >
<el-button type="primary" size="medium" @click="addMenu">新增</el-button> <el-button type="primary" size="medium" @click="addMenu">新增</el-button>
<el-table class="tables" :data="menuList" height="500" default-expand-all row-key="menuId" :tree-props="{children: 'children', hasChildren: 'hasChildren'}"> <el-table
class="tables"
:data="menuList"
height="500"
default-expand-all
row-key="menuId"
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
>
<el-table-column <el-table-column
prop="menuName" prop="menuName"
label="菜单名称" width="200" label="菜单名称"
width="200"
></el-table-column> ></el-table-column>
<el-table-column prop="path" label="菜单路径" align="center"> <el-table-column prop="path" label="菜单路径" align="center">
</el-table-column> </el-table-column>
@ -248,23 +296,33 @@
></el-table-column> --> ></el-table-column> -->
<el-table-column prop="status" width="80" label="状态" align="center"> <el-table-column prop="status" width="80" label="状态" align="center">
<template slot-scope="scope">{{ <template slot-scope="scope">{{
scope.row.status === 1 ? "启用" : "禁用" scope.row.status === 1 ? '启用' : '禁用'
}}</template> }}</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
:label="$t('message.alarmValueSet.operation')" :label="$t('message.alarmValueSet.operation')"
align="center" width="250" align="center"
width="250"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<div class="tableBtns"> <div class="tableBtns">
<div class="operationText" @click="btnManageDialog=true;addEditMenuForm=scope.row;getBtnList()">按钮管理</div> <div
class="operationText"
@click="
btnManageDialog = true
addEditMenuForm = scope.row
getBtnList()
"
>
按钮管理
</div>
<div @click="editMenu(scope.row)" class="operationText"> <div @click="editMenu(scope.row)" class="operationText">
<img <img
src="@/assets/images/icon-edit.png" src="@/assets/images/icon-edit.png"
width="15px" width="15px"
height="15px" height="15px"
/> />
<span>{{ $t("message.alarmValueSet.edit") }}</span> <span>{{ $t('message.alarmValueSet.edit') }}</span>
</div> </div>
<div @click="deleteMenu(scope.row)" class="operationText"> <div @click="deleteMenu(scope.row)" class="operationText">
<img <img
@ -300,15 +358,28 @@
v-model="addEditMenuForm.moduleId" v-model="addEditMenuForm.moduleId"
:placeholder="$t('message.alarmValueSet.placeholder_select')" :placeholder="$t('message.alarmValueSet.placeholder_select')"
> >
<el-option :label="item.moduleName" :value="item.moduleId" v-for="(item,index) in List" :key="index"> </el-option> <el-option
:label="item.moduleName"
:value="item.moduleId"
v-for="(item, index) in List"
:key="index"
>
</el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="父级菜单" prop="parentId"> <el-form-item label="父级菜单" prop="parentId">
<el-select clearable <el-select
clearable
v-model="addEditMenuForm.parentId" v-model="addEditMenuForm.parentId"
:placeholder="$t('message.alarmValueSet.placeholder_select')" filterable :placeholder="$t('message.alarmValueSet.placeholder_select')"
filterable
> >
<el-option :label="item.menuName" :value="item.menuId" v-for="(item,index) in allMenuList" :key="index"></el-option> <el-option
:label="item.menuName"
:value="item.menuId"
v-for="(item, index) in allMenuList"
:key="index"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="菜单名称" prop="menuName"> <el-form-item label="菜单名称" prop="menuName">
@ -387,14 +458,14 @@
@click="PopupMenu.show = false" @click="PopupMenu.show = false"
icon="el-icon-circle-close" icon="el-icon-circle-close"
size="medium" size="medium"
>{{ $t("message.alarmValueSet.cancel") }} >{{ $t('message.alarmValueSet.cancel') }}
</el-button> </el-button>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-circle-check" icon="el-icon-circle-check"
@click="submitMenuData" @click="submitMenuData"
size="medium" size="medium"
>{{ $t("message.alarmValueSet.save") }} >{{ $t('message.alarmValueSet.save') }}
</el-button> </el-button>
</div> </div>
</el-form> </el-form>
@ -417,12 +488,13 @@
</el-table-column> </el-table-column>
<el-table-column prop="status" width="80" label="状态" align="center"> <el-table-column prop="status" width="80" label="状态" align="center">
<template slot-scope="scope">{{ <template slot-scope="scope">{{
scope.row.status === 1 ? "启用" : "禁用" scope.row.status === 1 ? '启用' : '禁用'
}}</template> }}</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
:label="$t('message.alarmValueSet.operation')" :label="$t('message.alarmValueSet.operation')"
align="center" width="200" align="center"
width="200"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<div class="tableBtns"> <div class="tableBtns">
@ -432,7 +504,7 @@
width="15px" width="15px"
height="15px" height="15px"
/> />
<span>{{ $t("message.alarmValueSet.edit") }}</span> <span>{{ $t('message.alarmValueSet.edit') }}</span>
</div> </div>
<div @click="deleteBtn(scope.row)" class="operationText"> <div @click="deleteBtn(scope.row)" class="operationText">
<img <img
@ -490,14 +562,14 @@
@click="PopupBtn.show = false" @click="PopupBtn.show = false"
icon="el-icon-circle-close" icon="el-icon-circle-close"
size="medium" size="medium"
>{{ $t("message.alarmValueSet.cancel") }} >{{ $t('message.alarmValueSet.cancel') }}
</el-button> </el-button>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-circle-check" icon="el-icon-circle-check"
@click="submitBtnData" @click="submitBtnData"
size="medium" size="medium"
>{{ $t("message.alarmValueSet.save") }} >{{ $t('message.alarmValueSet.save') }}
</el-button> </el-button>
</div> </div>
</el-form> </el-form>
@ -518,41 +590,42 @@ import {
addBtnApi, addBtnApi,
deleteBtnApi, deleteBtnApi,
editBtnApi, editBtnApi,
getAllBtnApi,getAllMenuByGroupApi getAllBtnApi,
} from "@/assets/js/api/jxjadmin"; getAllMenuByGroupApi
} from '@/assets/js/api/jxjadmin'
export default { export default {
mounted() { mounted() {
this.getList(); this.getList()
}, },
data() { data() {
return { return {
Popup_title: { Popup_title: {
edit: '编辑模块', edit: '编辑模块',
add: '新增模块', add: '新增模块'
}, },
Popup_title_menu: { Popup_title_menu: {
edit: '编辑菜单', edit: '编辑菜单',
add: '新增菜单', add: '新增菜单'
}, },
Popup_title_btn: { Popup_title_btn: {
edit: '编辑按钮', edit: '编辑按钮',
add: '新增按钮', add: '新增按钮'
}, },
addEditForm: { addEditForm: {
moduleIcon: "", moduleIcon: '',
moduleName: "", moduleName: '',
modulePath: "", modulePath: '',
moduleDesc: "", moduleDesc: '',
moduleIcon2:"", moduleIcon2: '',
moduleType: 1, moduleType: 1,
plugin: '', plugin: '',
moduleEquipment:"", moduleEquipment: '',
appName: '', appName: '',
labelName: '', labelName: '',
labelSortNum: 0, labelSortNum: 0,
disableModuleIcon: "", disableModuleIcon: '',
bigModuleIcon: "" bigModuleIcon: ''
}, },
formRules: { formRules: {
// modulePath: [ // modulePath: [
@ -565,130 +638,135 @@ export default {
moduleName: [ moduleName: [
{ {
required: true, required: true,
message: this.$t("message.personnelPosition.required"), message: this.$t('message.personnelPosition.required'),
trigger: "blur", trigger: 'blur'
}, }
], ]
}, },
List: [], List: [],
Popup: { Popup: {
type: "add", type: 'add',
show: false, show: false
}, },
menuManageDialog: false, menuManageDialog: false,
menuList: [], menuList: [],
addEditMenuForm: { addEditMenuForm: {
icon:"", icon: '',
menuDesc:"", menuDesc: '',
menuName:"", menuName: '',
moduleId:"", moduleId: '',
parentId:"", parentId: '',
path:"", path: '',
appPath: "", appPath: '',
priority:"", priority: '',
scheme:"", scheme: '',
status: 1, status: 1,
target: '_self', target: '_self',
menuEquipment:"", menuEquipment: '',
companyPath: '' companyPath: ''
}, },
menuFormRules: { menuFormRules: {
menuName: [ menuName: [
{ {
required: true, required: true,
message: this.$t("message.personnelPosition.required"), message: this.$t('message.personnelPosition.required'),
trigger: "blur", trigger: 'blur'
}, }
], ]
}, },
PopupMenu: { PopupMenu: {
type: "add", type: 'add',
show: false, show: false
}, },
PopupBtn: { PopupBtn: {
type: "add", type: 'add',
show: false, show: false
}, },
checkOperateArr: [], checkOperateArr: [],
btnManageDialog: false, btnManageDialog: false,
addEditBtnForm: { addEditBtnForm: {
menuId:"", menuId: '',
actionCode:"", actionCode: '',
actionName:"", actionName: '',
status: 1 status: 1
}, },
btnFormRules: { btnFormRules: {
actionCode: [ actionCode: [
{ {
required: true, required: true,
message: this.$t("message.personnelPosition.required"), message: this.$t('message.personnelPosition.required'),
trigger: "blur", trigger: 'blur'
}, }
], ],
actionName: [ actionName: [
{ {
required: true, required: true,
message: this.$t("message.personnelPosition.required"), message: this.$t('message.personnelPosition.required'),
trigger: "blur", trigger: 'blur'
}, }
], ]
}, },
btnList: [], btnList: [],
moudleTypeArr: ['企业模块', '项目后台', '企业后台', '项目看板'], moudleTypeArr: ['企业模块', '项目后台', '企业后台', '项目看板'],
searchModuleType: 2, searchModuleType: 2,
styleTypeArr:['普通项目级版本','精益建造版本','衢州版','三江版'], styleTypeArr: [
'普通项目级版本',
'精益建造版本',
'衢州版',
'三江版',
'标准七参数版'
],
searchStyleType: 1, searchStyleType: 1,
allMenuList: [] allMenuList: []
}; }
}, },
methods: { methods: {
handle(type, show) { handle(type, show) {
// //
this.Popup = { this.Popup = {
type: type, type: type,
show: show, show: show
}; }
}, },
handleMenu(type, show) { handleMenu(type, show) {
// //
this.PopupMenu = { this.PopupMenu = {
type: type, type: type,
show: show, show: show
}; }
getAllMenuApi({ moduleId: this.addEditForm.moduleId }).then((result) => { getAllMenuApi({ moduleId: this.addEditForm.moduleId }).then((result) => {
if (result.success) { if (result.success) {
this.allMenuList = result.result; this.allMenuList = result.result
// console.log("", result); // console.log("", result);
} }
}); })
}, },
handleBtn(type, show) { handleBtn(type, show) {
// //
this.PopupBtn = { this.PopupBtn = {
type: type, type: type,
show: show, show: show
}; }
}, },
add() { add() {
this.addEditForm.moduleType = this.searchModuleType this.addEditForm.moduleType = this.searchModuleType
this.handle("add", true); this.handle('add', true)
}, },
addMenu() { addMenu() {
this.addEditMenuForm.moduleId = this.addEditForm.moduleId this.addEditMenuForm.moduleId = this.addEditForm.moduleId
this.handleMenu("add", true); this.handleMenu('add', true)
}, },
addBtn() { addBtn() {
this.handleBtn("add", true); this.handleBtn('add', true)
}, },
edit(obj) { edit(obj) {
// console.log("", obj); // console.log("", obj);
this.addEditForm = JSON.parse(JSON.stringify(obj)); this.addEditForm = JSON.parse(JSON.stringify(obj))
this.handle("edit", true); this.handle('edit', true)
}, },
editMenu(obj) { editMenu(obj) {
// console.log("", obj); // console.log("", obj);
this.addEditMenuForm = JSON.parse(JSON.stringify(obj)); this.addEditMenuForm = JSON.parse(JSON.stringify(obj))
if (obj.operateCode) { if (obj.operateCode) {
if (obj.operateCode.indexOf(',') != -1) { if (obj.operateCode.indexOf(',') != -1) {
this.checkOperateArr = obj.operateCode.split(',') this.checkOperateArr = obj.operateCode.split(',')
@ -699,251 +777,255 @@ export default {
this.checkOperateArr = [] this.checkOperateArr = []
} }
this.handleMenu("edit", true); this.handleMenu('edit', true)
}, },
editBtn(obj) { editBtn(obj) {
// console.log("", obj); // console.log("", obj);
this.addEditBtnForm = JSON.parse(JSON.stringify(obj)); this.addEditBtnForm = JSON.parse(JSON.stringify(obj))
this.handleBtn("edit", true); this.handleBtn('edit', true)
}, },
deleteDev(obj) { deleteDev(obj) {
console.log("删除", obj); console.log('删除', obj)
this.$confirm( this.$confirm(
this.$t("message.personnelPosition.beaconManage.table.confirmText") + this.$t('message.personnelPosition.beaconManage.table.confirmText') +
"【" + '【' +
obj.moduleName + obj.moduleName +
"】?", '】?',
this.$t("message.personnelPosition.beaconManage.table.Tips"), this.$t('message.personnelPosition.beaconManage.table.Tips'),
{ {
confirmButtonText: this.$t( confirmButtonText: this.$t(
"message.personnelPosition.confirmButtonText" 'message.personnelPosition.confirmButtonText'
), ),
cancelButtonText: this.$t( cancelButtonText: this.$t(
"message.personnelPosition.cancelButtonText" 'message.personnelPosition.cancelButtonText'
), ),
type: "warning", type: 'warning'
} }
) )
.then(() => { .then(() => {
deleteModuleApi({ moduleId: obj.moduleId }).then((result) => { deleteModuleApi({ moduleId: obj.moduleId }).then((result) => {
if (result.success) { if (result.success) {
this.$message.success(result.message); this.$message.success(result.message)
this.getList(); this.getList()
} }
});
}) })
.catch(() => {}); })
.catch(() => {})
}, },
deleteMenu(obj) { deleteMenu(obj) {
console.log("删除", obj); console.log('删除', obj)
this.$confirm( this.$confirm(
this.$t("message.personnelPosition.beaconManage.table.confirmText") + this.$t('message.personnelPosition.beaconManage.table.confirmText') +
"【" + '【' +
obj.menuName + obj.menuName +
"】?", '】?',
this.$t("message.personnelPosition.beaconManage.table.Tips"), this.$t('message.personnelPosition.beaconManage.table.Tips'),
{ {
confirmButtonText: this.$t( confirmButtonText: this.$t(
"message.personnelPosition.confirmButtonText" 'message.personnelPosition.confirmButtonText'
), ),
cancelButtonText: this.$t( cancelButtonText: this.$t(
"message.personnelPosition.cancelButtonText" 'message.personnelPosition.cancelButtonText'
), ),
type: "warning", type: 'warning'
} }
) )
.then(() => { .then(() => {
deleteMenuApi({ menuId: obj.menuId }).then((result) => { deleteMenuApi({ menuId: obj.menuId }).then((result) => {
if (result.success) { if (result.success) {
this.$message.success(result.message); this.$message.success(result.message)
this.getMenuList(); this.getMenuList()
} }
});
}) })
.catch(() => {}); })
.catch(() => {})
}, },
deleteBtn(obj) { deleteBtn(obj) {
console.log("删除", obj); console.log('删除', obj)
this.$confirm( this.$confirm(
this.$t("message.personnelPosition.beaconManage.table.confirmText") + this.$t('message.personnelPosition.beaconManage.table.confirmText') +
"【" + '【' +
obj.actionName + obj.actionName +
"】?", '】?',
this.$t("message.personnelPosition.beaconManage.table.Tips"), this.$t('message.personnelPosition.beaconManage.table.Tips'),
{ {
confirmButtonText: this.$t( confirmButtonText: this.$t(
"message.personnelPosition.confirmButtonText" 'message.personnelPosition.confirmButtonText'
), ),
cancelButtonText: this.$t( cancelButtonText: this.$t(
"message.personnelPosition.cancelButtonText" 'message.personnelPosition.cancelButtonText'
), ),
type: "warning", type: 'warning'
} }
) ).then(() => {
.then(() => {
deleteBtnApi({ actionId: obj.actionId }).then((result) => { deleteBtnApi({ actionId: obj.actionId }).then((result) => {
if (result.success) { if (result.success) {
this.$message.success(result.message); this.$message.success(result.message)
this.getMenuList(); this.getMenuList()
} }
}); })
}) })
}, },
submit() { submit() {
this.$refs["addEditForm"].validate((valid) => { this.$refs['addEditForm'].validate((valid) => {
if (valid) { if (valid) {
let params = this.addEditForm; let params = this.addEditForm
params.styleType = this.searchStyleType params.styleType = this.searchStyleType
console.log("params", params); console.log('params', params)
console.log("添加信息", this.addEditForm); console.log('添加信息', this.addEditForm)
if (this.Popup.type === "add") { if (this.Popup.type === 'add') {
console.log('添加成功的参数', params) console.log('添加成功的参数', params)
addModuleApi(params).then((result) => { addModuleApi(params).then((result) => {
console.log('添加成功的返回值', result) console.log('添加成功的返回值', result)
if (result.success) { if (result.success) {
this.$message.success(result.message); this.$message.success(result.message)
this.getList(); this.getList()
} }
}); })
} else if (this.Popup.type === "edit") { } else if (this.Popup.type === 'edit') {
console.log("编辑信息", this.addEditForm); console.log('编辑信息', this.addEditForm)
editModuleApi(params).then((result) => { editModuleApi(params).then((result) => {
if (result.success) { if (result.success) {
this.$message.success(result.message); this.$message.success(result.message)
this.getList(); this.getList()
} }
}); })
} }
this.Popup.show = false; this.Popup.show = false
} else { } else {
console.log("error submit!!"); console.log('error submit!!')
return false; return false
} }
}); })
}, },
submitMenuData() { submitMenuData() {
this.$refs["addEditMenuForm"].validate((valid) => { this.$refs['addEditMenuForm'].validate((valid) => {
if (valid) { if (valid) {
let params = this.addEditMenuForm; let params = this.addEditMenuForm
// params.moduleId=this.addEditForm.moduleId // params.moduleId=this.addEditForm.moduleId
params.operateCode = this.checkOperateArr.join(',') params.operateCode = this.checkOperateArr.join(',')
if (this.PopupMenu.type === "add") { if (this.PopupMenu.type === 'add') {
addMenuApi(params).then((result) => { addMenuApi(params).then((result) => {
if (result.success) { if (result.success) {
this.$message.success(result.message); this.$message.success(result.message)
this.getMenuList(); this.getMenuList()
} }
}); })
} else if (this.PopupMenu.type === "edit") { } else if (this.PopupMenu.type === 'edit') {
editMenuApi(params).then((result) => { editMenuApi(params).then((result) => {
if (result.success) { if (result.success) {
this.$message.success(result.message); this.$message.success(result.message)
this.getMenuList(); this.getMenuList()
} }
}); })
} }
this.PopupMenu.show = false; this.PopupMenu.show = false
} else { } else {
console.log("error submit!!"); console.log('error submit!!')
return false; return false
} }
}); })
}, },
submitBtnData() { submitBtnData() {
this.$refs["addEditBtnForm"].validate((valid) => { this.$refs['addEditBtnForm'].validate((valid) => {
if (valid) { if (valid) {
let params = this.addEditBtnForm; let params = this.addEditBtnForm
// params.moduleId=this.addEditForm.moduleId // params.moduleId=this.addEditForm.moduleId
params.menuId = this.addEditMenuForm.menuId params.menuId = this.addEditMenuForm.menuId
if (this.PopupBtn.type === "add") { if (this.PopupBtn.type === 'add') {
addBtnApi(params).then((result) => { addBtnApi(params).then((result) => {
if (result.success) { if (result.success) {
this.$message.success(result.message); this.$message.success(result.message)
this.getBtnList(); this.getBtnList()
} }
}); })
} else if (this.PopupBtn.type === "edit") { } else if (this.PopupBtn.type === 'edit') {
editBtnApi(params).then((result) => { editBtnApi(params).then((result) => {
if (result.success) { if (result.success) {
this.$message.success(result.message); this.$message.success(result.message)
this.getBtnList(); this.getBtnList()
} }
}); })
} }
this.PopupBtn.show = false; this.PopupBtn.show = false
} else { } else {
console.log("error submit!!"); console.log('error submit!!')
return false; return false
} }
}); })
}, },
refresh() { refresh() {
this.getList(); this.getList()
}, },
getList() { getList() {
getAllModuleApi({moduleType:this.searchModuleType,styleType:this.searchStyleType}).then((result) => { getAllModuleApi({
moduleType: this.searchModuleType,
styleType: this.searchStyleType
}).then((result) => {
if (result.success) { if (result.success) {
this.List = result.result; this.List = result.result
// console.log("", result); // console.log("", result);
} }
}); })
}, },
getMenuList() { getMenuList() {
getAllMenuByGroupApi({moduleId:this.addEditForm.moduleId}).then((result) => { getAllMenuByGroupApi({ moduleId: this.addEditForm.moduleId }).then(
(result) => {
if (result.success) { if (result.success) {
this.menuList = result.result; this.menuList = result.result
// console.log("", result); // console.log("", result);
} }
}); }
)
}, },
getBtnList() { getBtnList() {
getAllBtnApi({ menuId: this.addEditMenuForm.menuId }).then((result) => { getAllBtnApi({ menuId: this.addEditMenuForm.menuId }).then((result) => {
if (result.success) { if (result.success) {
this.btnList = result.result; this.btnList = result.result
// console.log("", result); // console.log("", result);
} }
}); })
}, },
close() { close() {
this.addEditForm = { this.addEditForm = {
moduleIcon: "", moduleIcon: '',
moduleIcon2:"", moduleIcon2: '',
moduleName: "", moduleName: '',
modulePath: "", modulePath: '',
moduleDesc: "", moduleDesc: '',
moduleType: 1, moduleType: 1,
appName: '', appName: '',
labelName: '', labelName: '',
labelSortNum: 0, labelSortNum: 0,
disableModuleIcon: "", disableModuleIcon: '',
bigModuleIcon: "" bigModuleIcon: ''
}; }
}, },
closeMenu() { closeMenu() {
this.addEditMenuForm = { this.addEditMenuForm = {
icon:"", icon: '',
menuDesc:"", menuDesc: '',
menuName:"", menuName: '',
moduleId:"", moduleId: '',
parentId:"", parentId: '',
path:"", path: '',
appPath: "", appPath: '',
priority:"", priority: '',
scheme:"", scheme: '',
status: 1, status: 1,
companyPath: '' companyPath: ''
} }
}, },
closeBtn() { closeBtn() {
this.addEditBtnForm = { this.addEditBtnForm = {
menuId:"", menuId: '',
actionCode:"", actionCode: '',
actionName:"", actionName: '',
status: 1 status: 1
} }
}, }
}, }
}; }
</script> </script>
<style lang="less"> <style lang="less">
.tableBtns { .tableBtns {

View File

@ -1,7 +1,12 @@
<template> <template>
<div class="fullHeight"> <div class="fullHeight">
<div class="searchBox whiteBlock"> <div class="searchBox whiteBlock">
<el-form :inline="true" size="medium" :model="searchForm" ref="searchForm"> <el-form
:inline="true"
size="medium"
:model="searchForm"
ref="searchForm"
>
<el-form-item label="审核状态" prop="useState"> <el-form-item label="审核状态" prop="useState">
<el-select v-model="searchForm.useState" placeholder="请选择"> <el-select v-model="searchForm.useState" placeholder="请选择">
<el-option label="全部" value=""></el-option> <el-option label="全部" value=""></el-option>
@ -10,7 +15,11 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="企业名称" prop="companyName" class="last"> <el-form-item label="企业名称" prop="companyName" class="last">
<el-input v-model="searchForm.companyName" placeholder="请输入" clearable></el-input> <el-input
v-model="searchForm.companyName"
placeholder="请输入"
clearable
></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" plain @click="getListData">查询</el-button> <el-button type="primary" plain @click="getListData">查询</el-button>
@ -20,16 +29,40 @@
</div> </div>
<div class="table_wrap whiteBlock"> <div class="table_wrap whiteBlock">
<el-table class="tables" :data="tableData"> <el-table class="tables" :data="tableData">
<el-table-column type="index" width="50" align="center" label="序号"></el-table-column> <el-table-column
<el-table-column prop="companyName" label="企业名称" align="center" width="180"></el-table-column> type="index"
<el-table-column prop="createTime" label="注册时间" align="center" width="180"></el-table-column> width="50"
<el-table-column prop="companyTel" label="手机号码" align="center" width="180"></el-table-column> align="center"
label="序号"
></el-table-column>
<el-table-column
prop="companyName"
label="企业名称"
align="center"
width="180"
></el-table-column>
<el-table-column
prop="createTime"
label="注册时间"
align="center"
width="180"
></el-table-column>
<el-table-column
prop="companyTel"
label="手机号码"
align="center"
width="180"
></el-table-column>
<el-table-column prop="isEnable" label="使用状态" align="center"> <el-table-column prop="isEnable" label="使用状态" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.isEnable == 0 ? '禁用' : '启用' }} {{ scope.row.isEnable == 0 ? '禁用' : '启用' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="diffDay" label="剩余天数" align="center"></el-table-column> <el-table-column
prop="diffDay"
label="剩余天数"
align="center"
></el-table-column>
<el-table-column prop="diffDay" label="项目数" align="center"> <el-table-column prop="diffDay" label="项目数" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.createProjectNum }}/{{ scope.row.projectNum }} {{ scope.row.createProjectNum }}/{{ scope.row.projectNum }}
@ -38,7 +71,11 @@
<el-table-column prop="address" label="操作" align="center"> <el-table-column prop="address" label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div @click="configuration(scope.row)" class="operationText"> <div @click="configuration(scope.row)" class="operationText">
<img src="@/assets/images/accredit.png" width="15px" height="15px" /> <img
src="@/assets/images/accredit.png"
width="15px"
height="15px"
/>
<span>授权配置</span> <span>授权配置</span>
</div> </div>
</template> </template>
@ -56,10 +93,15 @@
background background
></el-pagination> ></el-pagination>
</div> </div>
<el-dialog :modal-append-to-body="false" title="授权配置" :visible.sync="authorizedDialog" width="767px"> <el-dialog
:modal-append-to-body="false"
title="授权配置"
:visible.sync="authorizedDialog"
width="767px"
>
<div class="dialog_content"> <div class="dialog_content">
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="11" style="margin:7px 0px 0 0;"> <el-col :span="11" style="margin: 7px 0px 0 0">
<span class="firstConlumLabel">授权状态</span> <span class="firstConlumLabel">授权状态</span>
<el-radio-group v-model="isEnable" size="medium"> <el-radio-group v-model="isEnable" size="medium">
<el-radio :label="1">启用</el-radio> <el-radio :label="1">启用</el-radio>
@ -71,12 +113,15 @@
<el-date-picker <el-date-picker
v-model="time" v-model="time"
type="date" type="date"
placeholder="选择日期" value-format="yyyy-MM-dd" size="medium"> placeholder="选择日期"
value-format="yyyy-MM-dd"
size="medium"
>
</el-date-picker> </el-date-picker>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24" style="margin-top: 20px"> <el-row :gutter="24" style="margin-top: 20px">
<el-col :span="11" style="margin:7px 0px 0 0;"> <el-col :span="11" style="margin: 7px 0px 0 0">
<span class="firstConlumLabel">是否显示未解锁模块</span> <span class="firstConlumLabel">是否显示未解锁模块</span>
<el-radio-group v-model="moduleShowType" size="medium"> <el-radio-group v-model="moduleShowType" size="medium">
<el-radio :label="0"></el-radio> <el-radio :label="0"></el-radio>
@ -85,11 +130,16 @@
</el-col> </el-col>
<el-col :span="13" style="text-align: right"> <el-col :span="13" style="text-align: right">
<span style="margin-right: 15px">授权项目数</span> <span style="margin-right: 15px">授权项目数</span>
<el-input-number v-model="projectNum" :min="1" size="medium" style="width: 220px"></el-input-number> <el-input-number
v-model="projectNum"
:min="1"
size="medium"
style="width: 220px"
></el-input-number>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24" style="margin-top: 20px"> <el-row :gutter="24" style="margin-top: 20px">
<el-col :span="11" style="margin:7px 0px 0 0;"> <el-col :span="11" style="margin: 7px 0px 0 0">
<span class="firstConlumLabel">是否显示企业大屏</span> <span class="firstConlumLabel">是否显示企业大屏</span>
<el-radio-group v-model="companyBigScreen" size="medium"> <el-radio-group v-model="companyBigScreen" size="medium">
<el-radio :label="0"></el-radio> <el-radio :label="0"></el-radio>
@ -98,14 +148,18 @@
</el-col> </el-col>
<el-col :span="13" style="text-align: right"> <el-col :span="13" style="text-align: right">
<span style="margin-right: 15px">是否显示项目看板</span> <span style="margin-right: 15px">是否显示项目看板</span>
<el-radio-group v-model="projectKanban" size="medium" style="width: 220px;text-align:left"> <el-radio-group
v-model="projectKanban"
size="medium"
style="width: 220px; text-align: left"
>
<el-radio :label="0"></el-radio> <el-radio :label="0"></el-radio>
<el-radio :label="1"></el-radio> <el-radio :label="1"></el-radio>
</el-radio-group> </el-radio-group>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24" style="margin-top: 20px"> <el-row :gutter="24" style="margin-top: 20px">
<el-col :span="11" style="margin:7px 0px 0 0;"> <el-col :span="11" style="margin: 7px 0px 0 0">
<span class="firstConlumLabel">是否启用人员录入二维码</span> <span class="firstConlumLabel">是否启用人员录入二维码</span>
<el-radio-group v-model="inputQrCode" size="medium"> <el-radio-group v-model="inputQrCode" size="medium">
<el-radio :label="0"></el-radio> <el-radio :label="0"></el-radio>
@ -114,14 +168,18 @@
</el-col> </el-col>
<el-col :span="13" style="text-align: right"> <el-col :span="13" style="text-align: right">
<span style="margin-right: 15px">是否启用移动考勤</span> <span style="margin-right: 15px">是否启用移动考勤</span>
<el-radio-group v-model="mobileAttendance" size="medium" style="width: 220px;text-align:left"> <el-radio-group
v-model="mobileAttendance"
size="medium"
style="width: 220px; text-align: left"
>
<el-radio :label="0"></el-radio> <el-radio :label="0"></el-radio>
<el-radio :label="1"></el-radio> <el-radio :label="1"></el-radio>
</el-radio-group> </el-radio-group>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24" style="margin-top: 20px"> <el-row :gutter="24" style="margin-top: 20px">
<el-col :span="16" style="margin:7px 0px 0 0;"> <el-col :span="16" style="margin: 7px 0px 0 0; width: 100%">
<!-- 此处注释是因为添加了一个菜单版本 20220706 --> <!-- 此处注释是因为添加了一个菜单版本 20220706 -->
<!-- <span class="firstConlumLabel">是否启用精益建造</span> <!-- <span class="firstConlumLabel">是否启用精益建造</span>
<el-radio-group v-model="styleType" size="medium" @change="getBaseModuleList"> <el-radio-group v-model="styleType" size="medium" @change="getBaseModuleList">
@ -129,18 +187,28 @@
<el-radio :label="1"></el-radio> <el-radio :label="1"></el-radio>
</el-radio-group> --> </el-radio-group> -->
<span class="firstConlumLabel">选择系统版本</span> <span class="firstConlumLabel">选择系统版本</span>
<el-radio-group v-model="styleType" size="medium" @change="getBaseModuleList"> <el-radio-group
v-model="styleType"
size="medium"
@change="getBaseModuleList"
>
<el-radio :label="1">标准版</el-radio> <el-radio :label="1">标准版</el-radio>
<el-radio :label="2">星璇版</el-radio> <el-radio :label="2">星璇版</el-radio>
<el-radio :label="3">衢州版</el-radio> <el-radio :label="3">衢州版</el-radio>
<el-radio :label="4">三江版</el-radio> <el-radio :label="4">三江版</el-radio>
<el-radio :label="4">标准七参数版</el-radio>
</el-radio-group> </el-radio-group>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24" style="margin-top: 20px"> <el-row :gutter="24" style="margin-top: 20px">
<el-col :span="16" style="margin:7px 0px 0 0;"> <el-col :span="16" style="margin: 7px 0px 0 0">
<span class="firstConlumLabel">客服电话</span> <span class="firstConlumLabel">客服电话</span>
<el-input v-model="customerServicePhone" size="medium" placeholder="请输入" style="display: inline-block; width: 200px;"></el-input> <el-input
v-model="customerServicePhone"
size="medium"
placeholder="请输入"
style="display: inline-block; width: 200px"
></el-input>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24" style="margin-top: 20px"> <el-row :gutter="24" style="margin-top: 20px">
@ -153,7 +221,11 @@
</el-col> </el-col>
<el-col :span="13" style="text-align: right"> <el-col :span="13" style="text-align: right">
<span style="margin-right: 15px">是否能添加项目</span> <span style="margin-right: 15px">是否能添加项目</span>
<el-radio-group v-model="canAddProject" size="medium" style="width: 220px;text-align:left"> <el-radio-group
v-model="canAddProject"
size="medium"
style="width: 220px; text-align: left"
>
<el-radio :label="0"></el-radio> <el-radio :label="0"></el-radio>
<el-radio :label="1"></el-radio> <el-radio :label="1"></el-radio>
</el-radio-group> </el-radio-group>
@ -162,42 +234,82 @@
<el-row :gutter="24" style="margin-top: 20px"> <el-row :gutter="24" style="margin-top: 20px">
<el-col :span="24"> <el-col :span="24">
<div>请勾选功能权限</div> <div>请勾选功能权限</div>
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange">全选</el-checkbox> <el-checkbox
<el-checkbox-group class="zdy-checkbox" v-model="moduleInfo.moduleId" @change="handleCheckedCitiesChange"> :indeterminate="isIndeterminate"
v-model="checkAll"
@change="handleCheckAllChange"
>全选</el-checkbox
>
<el-checkbox-group
class="zdy-checkbox"
v-model="moduleInfo.moduleId"
@change="handleCheckedCitiesChange"
>
<div class="CheckboxTitle">企业模块</div> <div class="CheckboxTitle">企业模块</div>
<el-checkbox v-if="i.moduleType===1" v-for="i in companyArr" :key="i.moduleId" :label="i.moduleId">{{i.moduleName}}</el-checkbox> <el-checkbox
v-if="i.moduleType === 1"
v-for="i in companyArr"
:key="i.moduleId"
:label="i.moduleId"
>{{ i.moduleName }}</el-checkbox
>
<div class="CheckboxTitle">企业后台模块</div> <div class="CheckboxTitle">企业后台模块</div>
<el-checkbox v-if="i.moduleType===3" v-for="i in companyArr" :key="i.moduleId" :label="i.moduleId">{{i.moduleName}}</el-checkbox> <el-checkbox
v-if="i.moduleType === 3"
v-for="i in companyArr"
:key="i.moduleId"
:label="i.moduleId"
>{{ i.moduleName }}</el-checkbox
>
<div class="CheckboxTitle">项目模块</div> <div class="CheckboxTitle">项目模块</div>
<el-checkbox v-if="i.moduleType===2" v-for="i in companyArr" :key="i.moduleId" :label="i.moduleId">{{i.moduleName}}</el-checkbox> <el-checkbox
v-if="i.moduleType === 2"
v-for="i in companyArr"
:key="i.moduleId"
:label="i.moduleId"
>{{ i.moduleName }}</el-checkbox
>
<div class="CheckboxTitle">项目看板模块</div> <div class="CheckboxTitle">项目看板模块</div>
<el-checkbox v-if="i.moduleType===4" v-for="i in companyArr" :key="i.moduleId" :label="i.moduleId">{{i.moduleName}}</el-checkbox> <el-checkbox
v-if="i.moduleType === 4"
v-for="i in companyArr"
:key="i.moduleId"
:label="i.moduleId"
>{{ i.moduleName }}</el-checkbox
>
</el-checkbox-group> </el-checkbox-group>
</el-col> </el-col>
</el-row> </el-row>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button class="cancleBtn" <el-button
class="cancleBtn"
@click="authorizedDialog = false" @click="authorizedDialog = false"
icon="el-icon-circle-close" icon="el-icon-circle-close"
size="medium" size="medium"
> </el-button> > </el-button
>
<el-button <el-button
type="primary" type="primary"
icon="el-icon-circle-check" icon="el-icon-circle-check"
@click="saveFn" @click="saveFn"
size="medium" size="medium"
> </el-button> > </el-button
>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import { getRegisterAuditList,editCompanyConfigApi,baseModuleList,getCompanyModuleList,baseModuleProjectEdit } from "@/assets/js/api/jxjadmin.js"; import {
getRegisterAuditList,
editCompanyConfigApi,
baseModuleList,
getCompanyModuleList,
baseModuleProjectEdit
} from '@/assets/js/api/jxjadmin.js'
export default { export default {
name: "registerAudit", name: 'registerAudit',
data() { data() {
return { return {
checkAll: false, checkAll: false,
@ -214,8 +326,8 @@ export default {
children: 'zones' children: 'zones'
},*/ },*/
searchForm: { searchForm: {
companyName: "", companyName: '',
useState: "", useState: ''
}, },
total: 0, total: 0,
pageNo: 1, pageNo: 1,
@ -225,23 +337,22 @@ export default {
checkList: [], checkList: [],
authorizedDialog: false, authorizedDialog: false,
isEnable: 0, isEnable: 0,
time: "", time: '',
detail: {}, detail: {},
projectNum: 1, projectNum: 1,
moduleShowType: 0, moduleShowType: 0,
"companyBigScreen": 0, companyBigScreen: 0,
"inputQrCode": 0, inputQrCode: 0,
"projectKanban": 0, projectKanban: 0,
"mobileAttendance": 0, mobileAttendance: 0,
customerServicePhone: '', customerServicePhone: '',
styleType: 1, styleType: 1,
canGoProjectEnd: 0, canGoProjectEnd: 0,
canAddProject: 0 canAddProject: 0
}; }
}, },
created() { created() {
this.getListData(); this.getListData()
}, },
methods: { methods: {
saveFn() { saveFn() {
@ -249,13 +360,13 @@ export default {
this.$message.error('请选择授权时长!') this.$message.error('请选择授权时长!')
} else { } else {
var json = { var json = {
"clientId": this.detail.clientId, clientId: this.detail.clientId,
"clientSecret": this.detail.clientSecret, clientSecret: this.detail.clientSecret,
"companySn": this.detail.companySn, companySn: this.detail.companySn,
// "effectiveTime": 0, // "effectiveTime": 0,
"expireTime": this.time, expireTime: this.time,
"headquartersSn": this.detail.headquartersSn, headquartersSn: this.detail.headquartersSn,
"isEnable": this.isEnable, isEnable: this.isEnable,
projectNum: this.projectNum, projectNum: this.projectNum,
moduleShowType: this.moduleShowType, moduleShowType: this.moduleShowType,
mobileAttendance: this.mobileAttendance, mobileAttendance: this.mobileAttendance,
@ -267,43 +378,50 @@ export default {
enterProjectBackType: this.canGoProjectEnd, enterProjectBackType: this.canGoProjectEnd,
addProjectType: this.canAddProject addProjectType: this.canAddProject
} }
editCompanyConfigApi(json).then(res=>{ editCompanyConfigApi(json).then((res) => {
let moduleIdStr=JSON.parse(JSON.stringify(this.moduleInfo)).moduleId.join(','); let moduleIdStr = JSON.parse(
console.log('查看form',moduleIdStr,this.moduleInfo); JSON.stringify(this.moduleInfo)
baseModuleProjectEdit({headquartersSn:this.moduleInfo.headquartersSn,moduleIdStr:moduleIdStr,sn:this.moduleInfo.companySn,type:'1'}).then(res=>{ ).moduleId.join(',')
console.log('查看form', moduleIdStr, this.moduleInfo)
baseModuleProjectEdit({
headquartersSn: this.moduleInfo.headquartersSn,
moduleIdStr: moduleIdStr,
sn: this.moduleInfo.companySn,
type: '1'
}).then((res) => {
// this.$message.success('') // this.$message.success('')
}) })
this.authorizedDialog=false; this.authorizedDialog = false
this.getListData(); this.getListData()
this.$message.success('配置成功!') this.$message.success('配置成功!')
}) })
} }
}, },
// //
getListData() { getListData() {
let data = this.searchForm; let data = this.searchForm
data.pageNo = this.pageNo; data.pageNo = this.pageNo
data.pageSize = this.pageSize; data.pageSize = this.pageSize
getRegisterAuditList(data).then((res) => { getRegisterAuditList(data).then((res) => {
console.log(res); console.log(res)
this.tableData = res.result.records this.tableData = res.result.records
this.total = res.result.total this.total = res.result.total
}); })
}, },
resetForm() { resetForm() {
this.$refs['searchForm'].resetFields(); this.$refs['searchForm'].resetFields()
this.getListData(); this.getListData()
}, },
// -- // --
configuration(item) { configuration(item) {
console.log('打印',item); console.log('打印', item)
item.moduleId=[]; item.moduleId = []
this.moduleInfo=JSON.parse(JSON.stringify(item)); this.moduleInfo = JSON.parse(JSON.stringify(item))
this.getCompanyList(item.headquartersSn); this.getCompanyList(item.headquartersSn)
this.authorizedDialog = true; this.authorizedDialog = true
this.time = item.expireTime this.time = item.expireTime
this.isEnable = item.isEnable this.isEnable = item.isEnable
this.detail = item this.detail = item
@ -316,55 +434,60 @@ export default {
this.canGoProjectEnd = item.enterProjectBackType this.canGoProjectEnd = item.enterProjectBackType
this.canAddProject = item.addProjectType this.canAddProject = item.addProjectType
this.getBaseModuleList(); this.getBaseModuleList()
}, },
// //
handleSizeChange(val) { handleSizeChange(val) {
this.pageSize = val; this.pageSize = val
this.getListData(); this.getListData()
}, },
// //
handleCurrentChange(val) { handleCurrentChange(val) {
this.pageNo = val; this.pageNo = val
this.getListData(); this.getListData()
}, },
getBaseModuleList() { getBaseModuleList() {
baseModuleList({moduleType:'',styleType:this.styleType}).then(result => { baseModuleList({ moduleType: '', styleType: this.styleType }).then(
(result) => {
if (result.success) { if (result.success) {
let brHtm={}; let brHtm = {}
this.companyArr=result.result; this.companyArr = result.result
this.companyArr.map(item =>{ this.companyArr.map((item) => {
this.cityOptions.push(item.moduleId); this.cityOptions.push(item.moduleId)
}) })
this.brHtm=brHtm; this.brHtm = brHtm
// console.log('',brHtm) // console.log('',brHtm)
// console.log('',this.companyArr) // console.log('',this.companyArr)
} }
}) }
)
}, },
getCompanyList(headquartersSn) { getCompanyList(headquartersSn) {
getCompanyModuleList({headquartersSn:headquartersSn}).then(result => { getCompanyModuleList({ headquartersSn: headquartersSn }).then(
(result) => {
if (result.success) { if (result.success) {
result.result.map(item =>{ result.result.map((item) => {
this.moduleInfo.moduleId.push(item.moduleId); this.moduleInfo.moduleId.push(item.moduleId)
}) })
// console.log('',result.result) // console.log('',result.result)
this.handleCheckedCitiesChange(this.moduleInfo.moduleId); this.handleCheckedCitiesChange(this.moduleInfo.moduleId)
} }
}) }
)
}, },
handleCheckAllChange(val) { handleCheckAllChange(val) {
this.moduleInfo.moduleId = val ? this.cityOptions : []; this.moduleInfo.moduleId = val ? this.cityOptions : []
this.isIndeterminate = false; this.isIndeterminate = false
}, },
handleCheckedCitiesChange(value) { handleCheckedCitiesChange(value) {
let checkedCount = value.length; let checkedCount = value.length
this.checkAll = checkedCount === this.cityOptions.length; this.checkAll = checkedCount === this.cityOptions.length
this.isIndeterminate = checkedCount > 0 && checkedCount < this.cityOptions.length; this.isIndeterminate =
checkedCount > 0 && checkedCount < this.cityOptions.length
}
} }
} }
};
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.dialogTable { .dialogTable {