This commit is contained in:
lVAL 2021-01-25 17:30:27 +08:00
commit 78863b868c
14 changed files with 128 additions and 84 deletions

View File

@ -511,3 +511,12 @@ export function getRunLevelDetail(id) {
method: 'get' method: 'get'
}); });
} }
// 更新站间运行等级数据
export function updateRunlevelDistance(mapId) {
return request({
url: `/api/runPlan/userData/${mapId}/runlevelDistance`,
method: 'put'
});
}

View File

@ -241,7 +241,6 @@ class Jlmap {
const rect = {x: 0, y: 0, width: Number(splitList[i]) + 5, height: opts.height}; const rect = {x: 0, y: 0, width: Number(splitList[i]) + 5, height: opts.height};
rectList.push(rect); rectList.push(rect);
} }
console.log(screenList, rectList);
this.$painter.updateTransform1(screenList, rectList); this.$painter.updateTransform1(screenList, rectList);
} }
@ -386,6 +385,7 @@ class Jlmap {
} }
}); });
this.$painter.$transformHandle.revisibleAll(); this.$painter.$transformHandle.revisibleAll();
this.$painter.$transformHandle.setStationFlag(stationCode);
} }
showStationHandlePsd(oDevice, stationCode) { showStationHandlePsd(oDevice, stationCode) {
const standDevice = this.mapDevice[oDevice.standCode]; const standDevice = this.mapDevice[oDevice.standCode];

View File

@ -1,10 +1,12 @@
import store from '@/store/index';
import {createTransform, createBoundingRect} from './utils/parser'; import {createTransform, createBoundingRect} from './utils/parser';
class TransformHandle { class TransformHandle {
constructor(painter) { constructor(painter) {
this.$painter = painter; this.$painter = painter;
this.stationFlag = false;
this.parentLevel = painter.getParentLevel(); this.parentLevel = painter.getParentLevel();
this.rect = { x: 0, y: 0, width: 0, height: 0 }; this.rect = { x: 0, y: 0, width: 0, height: 0 };
@ -25,16 +27,46 @@ class TransformHandle {
} }
view.dirty(); view.dirty();
} }
setStationFlag(stationCode) {
this.stationFlag = !!stationCode;
}
// 视图进行缩放/平移 // 视图进行缩放/平移
transformView(view) { transformView(view) {
if (view) { if (view) {
view.transform = this.transform; view.transform = this.transform;
if (this.stationFlag) {
this.handleStationShow(view);
}
view.decomposeTransform(); view.decomposeTransform();
this.revisibleView(view); this.revisibleView(view);
} }
} }
handleStationShow(view) {
if (view.model && view.model._type === 'Station') {
const station = view.model;
this.handleStationViewTransform(view, station);
} else if (view.model && view.model._type === 'StationStand') {
const station = store.getters['map/getDeviceByCode'](view.model.stationCode);
this.handleStationViewTransform(view, station);
} else if (view.model && view.model._type === 'Psd') {
const stand = store.getters['map/getDeviceByCode'](view.model.standCode);
const station = store.getters['map/getDeviceByCode'](stand.stationCode);
this.handleStationViewTransform(view, station);
} else if (view.model && (view.model.belongStation || view.model.belongStationCode)) {
const belongStation = view.model.belongStation || view.model.belongStationCode;
const station = store.getters['map/getDeviceByCode'](belongStation);
this.handleStationViewTransform(view, station);
}
}
handleStationViewTransform(view, station) {
if (station.foldLine) {
view.transform = createTransform({
scaleRate: this.$painter.$jmap.$options.scaleRate,
offsetX: this.$painter.$jmap.$options.offsetX + station.foldLineOffset.x * this.$painter.$jmap.$options.scaleRate,
offsetY: this.$painter.$jmap.$options.offsetY - station.foldLineOffset.y * this.$painter.$jmap.$options.scaleRate
});
}
}
// 处理所有视图缩放/平移 // 处理所有视图缩放/平移
transformAll() { transformAll() {
this.traverse(this.transformView, this); this.traverse(this.transformView, this);

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="view-control"> <div class="view-control">
<div class="content-box"> <div class="content-box">
<el-tabs v-model="activeName" type="card" @tab-click="handleClick"> <el-tabs v-model="activeName" type="card">
<el-tab-pane label="批量设置集中站" name="first"> <el-tab-pane label="批量设置集中站" name="first">
<div class="select-box"> <div class="select-box">
<el-select v-model="stationCode" filterable size="mini"> <el-select v-model="stationCode" filterable size="mini">
@ -35,7 +35,7 @@
</div> </div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<div v-for="item in showList" :key="item.type" class="content-box-list" style="margin-top: 10px;"> <div v-for="item in modelList" :key="item.type" class="content-box-list" style="margin-top: 10px;">
<div class="title-box">{{ item.name }}</div> <div class="title-box">{{ item.name }}</div>
<div class="list-box"> <div class="list-box">
<div v-for="nor in item.list" :key="nor.code" class="list-content" @mouseenter="mouseenter(nor)" @mouseleave="mouseleave(nor)"> <div v-for="nor in item.list" :key="nor.code" class="list-content" @mouseenter="mouseenter(nor)" @mouseleave="mouseleave(nor)">
@ -69,7 +69,6 @@ export default {
stationCode: '', stationCode: '',
belongStationCode: '', belongStationCode: '',
activeName: 'first', activeName: 'first',
showList: [],
modelList: [ modelList: [
{ {
type: 'Section', type: 'Section',
@ -86,13 +85,6 @@ export default {
name: '信号机列表', name: '信号机列表',
list: [] list: []
} }
],
modelSignalList: [
{
type: 'Signal',
name: '信号机列表',
list: []
}
] ]
}; };
}, },
@ -116,13 +108,6 @@ export default {
// this.$emit('setCenter', code); // this.$emit('setCenter', code);
// this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code)); // this.deviceSelect(this.$store.getters['map/getDeviceByCode'](code));
// }, // },
handleClick() {
if (this.activeName === 'first') {
this.showList = this.modelList;
} else {
this.showList = this.modelSignalList;
}
},
deviceSelect(selected) { deviceSelect(selected) {
if (selected && selected._type.toUpperCase() == 'CheckBox'.toUpperCase()) { if (selected && selected._type.toUpperCase() == 'CheckBox'.toUpperCase()) {
this.activeName = 'first'; this.activeName = 'first';
@ -137,7 +122,6 @@ export default {
this.modelList[1].list.push(item); this.modelList[1].list.push(item);
} else if (item._type == 'Signal') { } else if (item._type == 'Signal') {
this.modelList[2].list.push(item); this.modelList[2].list.push(item);
this.modelSignalList[0].list.push(item);
} }
if (item.stationCode == this.seclectDeviceList[0].stationCode) { if (item.stationCode == this.seclectDeviceList[0].stationCode) {
count++; count++;
@ -149,15 +133,12 @@ export default {
this.stationCode = ''; this.stationCode = '';
} }
this.belongStationCode = this.stationList[0].code; this.belongStationCode = this.stationList[0].code;
this.showList = this.modelList;
} }
}, },
clearModelList() { clearModelList() {
this.showList = [];
this.modelList.forEach(item => { this.modelList.forEach(item => {
item.list = []; item.list = [];
}); });
this.modelSignalList[0].list = [];
}, },
// //
delList(model, list) { delList(model, list) {
@ -196,23 +177,35 @@ export default {
} }
}, },
handleBelongStationCode() { handleBelongStationCode() {
if (this.belongStationCode && this.modelSignalList[0].list.length) { if (this.belongStationCode && this.seclectDeviceList && this.seclectDeviceList.length > 0) {
const models = []; const models = [];
this.modelSignalList[0].list.forEach(item => { this.modelList.forEach(model => { //
const Model = deepAssign({}, this.$store.getters['map/getDeviceByCode'](item.code)); model.list.forEach(item => {
Model.belongStationCode = this.belongStationCode; const Model = deepAssign({}, this.$store.getters['map/getDeviceByCode'](item.code));
models.push(Model); if (Model._type == 'Section') {
Model.belongStation = this.belongStationCode;
} else {
Model.belongStationCode = this.belongStationCode;
}
if (Model._type == 'Section' && Model.logicSectionCodeList && Model.logicSectionCodeList.length) {
Model.logicSectionCodeList.forEach(children => {
const ModelChild = deepAssign({}, this.$store.getters['map/getDeviceByCode'](children));
ModelChild.belongStation = this.belongStationCode;
models.push(ModelChild);
});
}
models.push(Model);
});
}); });
this.$emit('updateMapModel', models); this.$emit('updateMapModel', models);
this.$message.success('设置所属车站成功!'); this.$message.success('设置所属车站成功');
this.belongStationCode = ''; this.stationCode = '';
} }
}, },
clearList() { // clearList() { //
this.stationCode = ''; this.stationCode = '';
this.belongStationCode = ''; this.belongStationCode = '';
this.$store.commit('map/setSeclectDeviceList', []); this.$store.commit('map/setSeclectDeviceList', []);
this.showList = [];
this.modelList = [ this.modelList = [
{ {
type: 'Section', type: 'Section',
@ -230,13 +223,6 @@ export default {
list: [] list: []
} }
]; ];
this.modelSignalList = [
{
type: 'Signal',
name: '信号机列表',
list: []
}
];
}, },
mouseenter(model) { mouseenter(model) {
if (model._type == 'Section') { if (model._type == 'Section') {

View File

@ -102,6 +102,7 @@ class Model {
this.sectionBCode = ''; this.sectionBCode = '';
this.sectionCCode = ''; this.sectionCCode = '';
this.tp = { x: 0, y: 0 }; this.tp = { x: 0, y: 0 };
this.belongStationCode = '';
} }
StationModel() { StationModel() {
this._type = 'Station'; this._type = 'Station';
@ -140,6 +141,8 @@ class Model {
this.createTurnBack = false; this.createTurnBack = false;
// this.turnBackPoint = {x: 0, y: 0}; // 按图折返坐标 // this.turnBackPoint = {x: 0, y: 0}; // 按图折返坐标
this.controlModePoint = { x: 0, y: 0 }; // 控制模式坐标 this.controlModePoint = { x: 0, y: 0 }; // 控制模式坐标
this.foldLine = false; // 现地显示是否折行
this.foldLineOffset = { x: 0, y: 0 }; // 折行显示偏移
} }
StationStandModel() { StationStandModel() {
this._type = 'StationStand'; this._type = 'StationStand';

View File

@ -205,7 +205,7 @@ export default {
name: this.$t('map.mapData'), name: this.$t('map.mapData'),
item: [ item: [
{ prop: 'stationCode', label: this.$t('map.equipmentStation') + ':', type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', disabled: this.isStationCodeDisabled, options: this.centralizedStationList, isHidden: this.isStationCodeDisabled }, { prop: 'stationCode', label: this.$t('map.equipmentStation') + ':', type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', disabled: this.isStationCodeDisabled, options: this.centralizedStationList, isHidden: this.isStationCodeDisabled },
{ prop: 'belongStation', label: '所属车站:', type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', options: this.stationList, isHidden: !this.editModel.standTrack && !this.editModel.reentryTrack && !this.editModel.transferTrack }, { prop: 'belongStation', label: '所属车站:', type: 'select', mode: true, optionLabel: 'name&&code', optionValue: 'code', options: this.stationList},
{ prop: 'lengthFact', label: this.$t('map.actualLength') + ':', type: 'number', min: 0, placeholder: this.$t('map.meter'), disabled: this.isStationCodeDisabled, isHidden: !this.isSwitchSectionType || !this.isCrossSectionType, button:true, clickFunction: this.divideLength, buttonText: '均分长度' }, { prop: 'lengthFact', label: this.$t('map.actualLength') + ':', type: 'number', min: 0, placeholder: this.$t('map.meter'), disabled: this.isStationCodeDisabled, isHidden: !this.isSwitchSectionType || !this.isCrossSectionType, button:true, clickFunction: this.divideLength, buttonText: '均分长度' },
{ prop: 'logicLengthList', label: '逻辑区段实际长度:', type: 'lengthFact', isHidden: !this.isHasLogicPhysicalSection, mergeLength: this.mergeLength, width: '160px'}, { prop: 'logicLengthList', label: '逻辑区段实际长度:', type: 'lengthFact', isHidden: !this.isHasLogicPhysicalSection, mergeLength: this.mergeLength, width: '160px'},
{ prop: 'leftStopPointOffset', label: this.$t('map.leftStopPointOffset'), type: 'number', min: 0, max: this.maxLengthFact, isHidden: !this.isStopPointOffset }, // { prop: 'leftStopPointOffset', label: this.$t('map.leftStopPointOffset'), type: 'number', min: 0, max: this.maxLengthFact, isHidden: !this.isStopPointOffset }, //
@ -228,6 +228,13 @@ export default {
callback(); callback();
} }
}; };
var validateBelongStation = (rule, value, callback) => {
if ((this.editModel.transferTrack || this.editModel.reentryTrack || this.editModel.standTrack) && !value) {
callback(new Error( '请选择所属车站' ));
} else {
callback();
}
};
const rules = { const rules = {
code: [ code: [
{ required: true, message: this.$t('rules.selectEquipment'), trigger: 'change' } { required: true, message: this.$t('rules.selectEquipment'), trigger: 'change' }
@ -263,7 +270,7 @@ export default {
{ required: true, message: this.$t('rules.sectionRelSwitchCode'), trigger: 'change' } { required: true, message: this.$t('rules.sectionRelSwitchCode'), trigger: 'change' }
], ],
belongStation: [ belongStation: [
{ required: true, message: '请选择所属车站', trigger: 'change' } { validator: validateBelongStation, trigger: 'change' }
], ],
leftSectionCode: [ leftSectionCode: [
{ validator: validateAssociatedSection, trigger: 'change' } { validator: validateAssociatedSection, trigger: 'change' }
@ -544,7 +551,6 @@ export default {
this.$message('还有属性未填写,修改未生效!'); this.$message('还有属性未填写,修改未生效!');
this.$emit('deviceSelect', ''); this.$emit('deviceSelect', '');
} }
// debugger;
}); });
}, },
handleRelevanceStand(model) { // handleRelevanceStand(model) { //
@ -570,6 +576,7 @@ export default {
if (section.parentCode == model.code && section.type == '02') { // if (section.parentCode == model.code && section.type == '02') { //
const copySection = deepAssign({}, section); const copySection = deepAssign({}, section);
copySection.stationCode = model.stationCode; // copySection.stationCode = model.stationCode; //
copySection.belongStation = model.belongStation;
copySection.lengthFact = logicLengthMap[copySection.code]; copySection.lengthFact = logicLengthMap[copySection.code];
if (this.checkPointsCoincide(this.oldPoint[0], copySection.points[0])) { if (this.checkPointsCoincide(this.oldPoint[0], copySection.points[0])) {
copySection.points[0] = model.points[0]; copySection.points[0] = model.points[0];

View File

@ -217,7 +217,12 @@ export default {
{ prop: 'relStationCodeList', label: '联锁站关联车站:', type: 'multiSelect', optionLabel: 'name', optionValue: 'code', options: this.relStationList, isHidden: !this.idCiStation}, { prop: 'relStationCodeList', label: '联锁站关联车站:', type: 'multiSelect', optionLabel: 'name', optionValue: 'code', options: this.relStationList, isHidden: !this.idCiStation},
{ prop: 'routingStationList', label: '生成交路的车站:', type: 'multiSelectHover', optionLabel: 'name', optionValue: 'code', options: this.stationList, hover: this.hover, buttonType: 'routingStation', buttonShowType: this.routingStationButtonShow }, { prop: 'routingStationList', label: '生成交路的车站:', type: 'multiSelectHover', optionLabel: 'name', optionValue: 'code', options: this.stationList, hover: this.hover, buttonType: 'routingStation', buttonShowType: this.routingStationButtonShow },
{ prop: 'runPlanName', label: this.$t('map.stationRunPlanName'), type: 'input' }, { prop: 'runPlanName', label: this.$t('map.stationRunPlanName'), type: 'input' },
{ prop: 'jp', label: '车站简称', type: 'input' } { prop: 'jp', label: '车站简称:', type: 'input' },
{ prop: 'foldLine', label: '现地显示是否折行:', type: 'checkbox' },
{ prop: 'foldLineOffset', label: '折行偏移:', type: 'coordinate', width: '120px', isHidden: !this.editModel.foldLine, children: [
{ prop: 'foldLineOffset.x', firstLevel: 'foldLineOffset', secondLevel: 'x', label: 'x:', type: 'number', labelWidth: '25px'},
{ prop: 'foldLineOffset.y', firstLevel: 'foldLineOffset', secondLevel: 'y', label: 'y:', type: 'number', labelWidth: '25px' }
] }
] ]
} }
} }

View File

@ -56,6 +56,7 @@ export default {
name: this.$t('map.mapData'), name: this.$t('map.mapData'),
item: [ item: [
{ prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.centralizedStationList }, { prop: 'stationCode', label: this.$t('map.equipmentStation'), type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.centralizedStationList },
{ prop: 'belongStationCode', label: '所属车站', type: 'select', optionLabel: 'name&&code', optionValue: 'code', options: this.stationList },
{ prop: 'turnTime', label: this.$t('map.turnTime'), type: 'number', min: 0, max: 1000, placeholder: 's' } { prop: 'turnTime', label: this.$t('map.turnTime'), type: 'number', min: 0, max: 1000, placeholder: 's' }
] ]
} }

View File

@ -71,8 +71,8 @@
</el-table-column> </el-table-column>
<el-table-column prop="distance" :label="$t('planMonitor.modifying.distance')" width="85"> <el-table-column prop="distance" :label="$t('planMonitor.modifying.distance')" width="85">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <span style="margin-left: 10px">{{ scope.row.distance }}</span> --> <span style="margin-left: 10px">{{ scope.row.distance }}</span>
<el-input v-model="scope.row.distance" class="input_text_box" /> <!-- <el-input v-model="scope.row.distance" class="input_text_box" /> -->
</template> </template>
</el-table-column> </el-table-column>
<div> <div>
@ -105,6 +105,7 @@
</el-table> </el-table>
</el-row> </el-row>
<div class="button-group" style="text-align: center; margin-top: 10px;"> <div class="button-group" style="text-align: center; margin-top: 10px;">
<el-button @click="handleStationDistance">更新距离</el-button>
<el-button @click="doClose">关闭</el-button> <el-button @click="doClose">关闭</el-button>
<el-button @click="handleStationTime">更新</el-button> <el-button @click="handleStationTime">更新</el-button>
</div> </div>
@ -112,7 +113,7 @@
</template> </template>
<script> <script>
import { formatName } from '@/utils/runPlan'; import { formatName } from '@/utils/runPlan';
import { setStationRunning, getMapStationRunUser } from '@/api/runplan'; import { setStationRunning, getMapStationRunUser, updateRunlevelDistance } from '@/api/runplan';
export default { export default {
name: 'ModifyingStationIntervalTime', name: 'ModifyingStationIntervalTime',
@ -189,6 +190,14 @@ export default {
this.$messageBox(this.$t('planMonitor.modifying.modifyFailed')); this.$messageBox(this.$t('planMonitor.modifying.modifyFailed'));
}); });
}, },
handleStationDistance() {
updateRunlevelDistance(this.$route.query.mapId).then(resp => {
this.loadInitData();
this.$message.success('更新成功');
}).catch(() => {
this.$messageBox('更新失败');
});
},
doShow(params) { doShow(params) {
this.params = params || {}; this.params = params || {};
this.loadInitData(); this.loadInitData();

View File

@ -23,8 +23,8 @@ export default {
dialogVisible: false, dialogVisible: false,
formModel: { formModel: {
address: '', address: '',
name: '', // name: '',
phone: '', // phone: '',
id: '', id: '',
projectCode: '' projectCode: ''
}, },
@ -37,8 +37,8 @@ export default {
labelWidth: '100px', labelWidth: '100px',
items: [ items: [
{ prop: 'name', label: '名称', type: 'text' }, { prop: 'name', label: '名称', type: 'text' },
{ prop: 'phone', label: '电话', type: 'text' }, // { prop: 'phone', label: '', type: 'text' },
{ prop: 'address', label: '地址', type: 'text' }, // { prop: 'address', label: '', type: 'text' },
{ prop: 'projectCode', label: '关联项目', type: 'select', options: this.projectListNew} { prop: 'projectCode', label: '关联项目', type: 'select', options: this.projectListNew}
] ]
}; };
@ -50,12 +50,12 @@ export default {
{ required: true, message: '请输入单位名称', trigger: 'blur' }, { required: true, message: '请输入单位名称', trigger: 'blur' },
{ min: 1, max: 25, message: this.$t('rules.strLength1To25'), trigger: 'blur' } { min: 1, max: 25, message: this.$t('rules.strLength1To25'), trigger: 'blur' }
], ],
phone: [ // phone: [
{ required: true, message: '请输入公司电话', trigger: 'blur' } // { required: true, message: '', trigger: 'blur' }
], // ],
address:[ // address:[
{ required: true, message: '请输入公司地址', trigger: 'blur'} // { required: true, message: '', trigger: 'blur'}
], // ],
projectCode: [ projectCode: [
{ required: true, message: '请选择关联项目', trigger: 'change'} { required: true, message: '请选择关联项目', trigger: 'change'}
] ]
@ -74,8 +74,6 @@ export default {
this.update = true; this.update = true;
this.formModel = { this.formModel = {
id: data.id, id: data.id,
name: data.name,
phone: data.phone,
address: data.address, address: data.address,
projectCode: data.projectCode projectCode: data.projectCode
}; };
@ -86,8 +84,6 @@ export default {
this.update = false; this.update = false;
this.formModel = { this.formModel = {
address: '', address: '',
name: '',
phone: '',
id: '', id: '',
projectCode: '' projectCode: ''
}; };

View File

@ -40,14 +40,14 @@ export default {
title: '单位名称', title: '单位名称',
prop: 'name' prop: 'name'
}, },
{ // {
title: '单位电话', // title: '',
prop: 'phone' // prop: 'phone'
}, // },
{ // {
title: '单位地址', // title: '',
prop: 'address' // prop: 'address'
}, // },
{ {
title: '关联项目', title: '关联项目',
prop: 'projectCode', prop: 'projectCode',
@ -55,13 +55,13 @@ export default {
columnValue: (row) => { return this.projectMap[row.projectCode]; }, columnValue: (row) => { return this.projectMap[row.projectCode]; },
tagType: (row) => { return 'success'; } tagType: (row) => { return 'success'; }
}, },
{ // {
title: '单位管理人员', // title: '',
prop: 'managerNames', // prop: 'managerNames',
type: 'tagMore', // type: 'tagMore',
columnValue: (row) => { return row.managerNames; }, // columnValue: (row) => { return row.managerNames; },
tagType: (row) => { return 'success'; } // tagType: (row) => { return 'success'; }
}, // },
{ {
type: 'button', type: 'button',
title: this.$t('global.operate'), title: this.$t('global.operate'),

View File

@ -1,5 +1,5 @@
<template> <template>
<el-dialog v-dialogDrag title="绑定单位" :visible.sync="dialogVisible" width="30%" :before-close="doClose" center :close-on-click-modal="false"> <el-dialog v-dialogDrag title="绑定单位管理员" :visible.sync="dialogVisible" width="30%" :before-close="doClose" center :close-on-click-modal="false">
<data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" /> <data-form ref="dataform" :form="form" :form-model="formModel" :rules="rules" />
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button type="primary" @click="doCreate">{{ $t('global.confirm') }}</el-button> <el-button type="primary" @click="doCreate">{{ $t('global.confirm') }}</el-button>
@ -72,7 +72,7 @@ export default {
this.doClose(); this.doClose();
this.$emit('create'); this.$emit('create');
}).catch((error) => { }).catch((error) => {
this.$message.error('绑定单位失败: ' + error.message); this.$message.error('绑定单位管理员失败: ' + error.message);
}); });
} }
} }

View File

@ -27,7 +27,6 @@ export default {
formModel: { formModel: {
id: '', id: '',
name: '', name: '',
companyId: '',
roles: [] roles: []
} }
}; };
@ -38,8 +37,7 @@ export default {
labelWidth: '100px', labelWidth: '100px',
items: [ items: [
{ prop: 'name', label: this.$t('system.name'), type: 'text', disabled: true }, { prop: 'name', label: this.$t('system.name'), type: 'text', disabled: true },
{ prop: 'roles', label: this.$t('system.permission'), type: 'select', required: true, options: this.$ConstSelect.roleList, multiple: true }, { prop: 'roles', label: this.$t('system.permission'), type: 'select', required: true, options: this.$ConstSelect.roleList, multiple: true }
{ prop: 'companyId', label: '单位', type: 'select', options: this.companyList, clearable: true }
] ]
}; };
return form; return form;
@ -66,7 +64,6 @@ export default {
this.formModel = { this.formModel = {
id: data.id, id: data.id,
name: data.name, name: data.name,
companyId: data.companyId,
roles: data.roles roles: data.roles
}; };
} }
@ -91,7 +88,6 @@ export default {
this.formModel = { this.formModel = {
id: '', id: '',
name: '', name: '',
companyId: '',
roles: [] roles: []
}; };
this.$refs.dataform.resetForm(); this.$refs.dataform.resetForm();

View File

@ -92,7 +92,7 @@ export default {
handleClick: this.handleUserEdit handleClick: this.handleUserEdit
}, },
{ {
name: '绑定单位', name: '绑定单位管理员',
handleClick: this.handleBind handleClick: this.handleBind
} }
] ]