|
@@ -11,7 +11,7 @@
|
|
</Dropdown>
|
|
</Dropdown>
|
|
</div>-->
|
|
</div>-->
|
|
<div class='legend-library-top'>
|
|
<div class='legend-library-top'>
|
|
- 图例库管理
|
|
|
|
|
|
+ <span style='display:inline-block;font-size:16px'>图例库管理</span>
|
|
<span class='library-btn'>
|
|
<span class='library-btn'>
|
|
<el-button size='small' @click='dumpRules'>图例绘制规则</el-button>
|
|
<el-button size='small' @click='dumpRules'>图例绘制规则</el-button>
|
|
<el-button size='small' type='primary' @click='add'>添加图例</el-button>
|
|
<el-button size='small' type='primary' @click='add'>添加图例</el-button>
|
|
@@ -31,17 +31,17 @@
|
|
></Select>
|
|
></Select>
|
|
|
|
|
|
<TreeSelect
|
|
<TreeSelect
|
|
|
|
+ title='已选项'
|
|
caption='说明书位置:'
|
|
caption='说明书位置:'
|
|
tipPlace='top'
|
|
tipPlace='top'
|
|
- width='180'
|
|
|
|
- style='margin:0 12px'
|
|
|
|
|
|
+ width='200'
|
|
|
|
+ style='margin:0 0 0 12px'
|
|
:returnParentNode='false'
|
|
:returnParentNode='false'
|
|
:isShowAllChoice='true'
|
|
:isShowAllChoice='true'
|
|
:choseArea='true'
|
|
:choseArea='true'
|
|
:lastStage='true'
|
|
:lastStage='true'
|
|
:data='positionSelect'
|
|
:data='positionSelect'
|
|
@change='treeConfirmPosition'
|
|
@change='treeConfirmPosition'
|
|
- :hideClear='true'
|
|
|
|
/>
|
|
/>
|
|
<span class='device-position'>
|
|
<span class='device-position'>
|
|
<TreeSelect
|
|
<TreeSelect
|
|
@@ -54,7 +54,6 @@
|
|
:choseArea='true'
|
|
:choseArea='true'
|
|
:data='deviceList'
|
|
:data='deviceList'
|
|
:lastStage='true'
|
|
:lastStage='true'
|
|
- :hideClear='true'
|
|
|
|
@change='treeConfirmDevice'
|
|
@change='treeConfirmDevice'
|
|
/>
|
|
/>
|
|
</span>
|
|
</span>
|
|
@@ -83,7 +82,6 @@
|
|
@change='treeConfirm'
|
|
@change='treeConfirm'
|
|
:lastStage='true'
|
|
:lastStage='true'
|
|
@focusChange='focusChange'
|
|
@focusChange='focusChange'
|
|
- :hideClear='true'
|
|
|
|
/>
|
|
/>
|
|
<Select
|
|
<Select
|
|
width='180'
|
|
width='180'
|
|
@@ -96,7 +94,15 @@
|
|
style='margin:0 12px'
|
|
style='margin:0 12px'
|
|
:hideClear='true'
|
|
:hideClear='true'
|
|
></Select>
|
|
></Select>
|
|
- <el-input size='small' @change='getTableList' prefix-icon='el-icon-search' v-model='keyword' style='width:192px;margin-right:12px;'></el-input>
|
|
|
|
|
|
+ <el-input
|
|
|
|
+ size='small'
|
|
|
|
+ @change='getTableList'
|
|
|
|
+ prefix-icon='el-icon-search'
|
|
|
|
+ v-model='keyword'
|
|
|
|
+ clearable
|
|
|
|
+ style='width:180px;margin-right:12px;float:right;position: absolute;right: 0; top: 45px;'
|
|
|
|
+ @clear='keyword = ""'
|
|
|
|
+ ></el-input>
|
|
</div>
|
|
</div>
|
|
<el-table :data='tableData' :key='key' :border='true' style='width: 100%'>
|
|
<el-table :data='tableData' :key='key' :border='true' style='width: 100%'>
|
|
<el-table-column prop='Name' label='图例名称' width='120'>
|
|
<el-table-column prop='Name' label='图例名称' width='120'>
|
|
@@ -134,8 +140,8 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label='操作' width='100' v-if='state==1'>
|
|
<el-table-column label='操作' width='100' v-if='state==1'>
|
|
<template slot-scope='scope' v-if='state==1'>
|
|
<template slot-scope='scope' v-if='state==1'>
|
|
- <el-button @click='modifyClick(scope.row)' type='text' size='small'>修改</el-button>
|
|
|
|
- <el-button @click='deleteClick(scope.row)' type='text' size='small'>做废</el-button>
|
|
|
|
|
|
+ <el-button @click='modifyClick(scope.row)' type='text'>修改</el-button>
|
|
|
|
+ <el-button @click='deleteClick(scope.row)' type='text'>作废</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column v-if='state==0' prop='DeleteTime' label='作废时间' width='180'>
|
|
<el-table-column v-if='state==0' prop='DeleteTime' label='作废时间' width='180'>
|
|
@@ -155,6 +161,13 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<add-legend ref='addLegend' @updateSuccess='updateSuccess' @addSuccess='addSuccess'></add-legend>
|
|
<add-legend ref='addLegend' @updateSuccess='updateSuccess' @addSuccess='addSuccess'></add-legend>
|
|
|
|
+ <Modal :show='modalStatusTip' title='确定要作废图例吗?' mode='tip' type='error' @close='modalStatusTip=false'>
|
|
|
|
+ <template #content>作废后则不可更改</template>
|
|
|
|
+ <template #handle>
|
|
|
|
+ <Button @click='modalStatusTip=false' type='default'>取消</Button>
|
|
|
|
+ <Button @click='modalConfirm' type='error'>作废</Button>
|
|
|
|
+ </template>
|
|
|
|
+ </Modal>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
@@ -254,6 +267,8 @@ export default {
|
|
components: { addLegend, Select },
|
|
components: { addLegend, Select },
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ deleteObject: {},
|
|
|
|
+ modalStatusTip: false,
|
|
tableData: [],
|
|
tableData: [],
|
|
key: 1,
|
|
key: 1,
|
|
dataSelect2: [
|
|
dataSelect2: [
|
|
@@ -310,10 +325,10 @@ export default {
|
|
visualizationList: [], //已选铺位可视化
|
|
visualizationList: [], //已选铺位可视化
|
|
// majorList: [], //专业
|
|
// majorList: [], //专业
|
|
deviceList: [],
|
|
deviceList: [],
|
|
- GraphCategoryIds: undefined, //说明书位置勾选集合
|
|
|
|
- InfoLocals: undefined, //工程信息化
|
|
|
|
- InfoSystems: undefined, //工程信息化专业/系统
|
|
|
|
- InfoTypeIds: undefined //铺位可视化typeid
|
|
|
|
|
|
+ GraphCategoryIds: [], //说明书位置勾选集合
|
|
|
|
+ InfoLocals: [], //工程信息化
|
|
|
|
+ InfoSystems: [], //工程信息化专业/系统
|
|
|
|
+ InfoTypeIds: [] //铺位可视化typeid
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -387,28 +402,22 @@ export default {
|
|
modifyClick(row) {
|
|
modifyClick(row) {
|
|
this.$refs.addLegend.open(row, '修改图例库')
|
|
this.$refs.addLegend.open(row, '修改图例库')
|
|
},
|
|
},
|
|
- deleteClick(row) {
|
|
|
|
- this.$confirm('作废后则不可更改', '确定要作废图例吗?', {
|
|
|
|
- confirmButtonText: '作废',
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
- type: 'warning',
|
|
|
|
- center: true
|
|
|
|
- })
|
|
|
|
- .then(() => {
|
|
|
|
- let postParams = [
|
|
|
|
- {
|
|
|
|
- Id: row.Id
|
|
|
|
- }
|
|
|
|
- ]
|
|
|
|
- deleteLegend({ postParams }).then(res => {
|
|
|
|
- if (res.Result == 'success') {
|
|
|
|
- this.$message({
|
|
|
|
- type: 'success',
|
|
|
|
- message: '作废成功!'
|
|
|
|
- })
|
|
|
|
- this.getTableList()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ modalConfirm() {
|
|
|
|
+ let postParams = [
|
|
|
|
+ {
|
|
|
|
+ Id: this.deleteObject.Id
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
|
|
+ deleteLegend({ postParams })
|
|
|
|
+ .then(res => {
|
|
|
|
+ if (res.Result == 'success') {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'success',
|
|
|
|
+ message: '作废成功!'
|
|
|
|
+ })
|
|
|
|
+ this.modalStatusTip = false
|
|
|
|
+ this.getTableList()
|
|
|
|
+ }
|
|
})
|
|
})
|
|
.catch(() => {
|
|
.catch(() => {
|
|
this.$message({
|
|
this.$message({
|
|
@@ -417,6 +426,38 @@ export default {
|
|
})
|
|
})
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ deleteClick(row) {
|
|
|
|
+ this.deleteObject = row
|
|
|
|
+ this.modalStatusTip = true
|
|
|
|
+ // this.$confirm('作废后则不可更改', '确定要作废图例吗?', {
|
|
|
|
+ // confirmButtonText: '作废',
|
|
|
|
+ // cancelButtonText: '取消',
|
|
|
|
+ // type: 'warning',
|
|
|
|
+ // center: true
|
|
|
|
+ // })
|
|
|
|
+ // .then(() => {
|
|
|
|
+ // let postParams = [
|
|
|
|
+ // {
|
|
|
|
+ // Id: row.Id
|
|
|
|
+ // }
|
|
|
|
+ // ]
|
|
|
|
+ // deleteLegend({ postParams }).then(res => {
|
|
|
|
+ // if (res.Result == 'success') {
|
|
|
|
+ // this.$message({
|
|
|
|
+ // type: 'success',
|
|
|
|
+ // message: '作废成功!'
|
|
|
|
+ // })
|
|
|
|
+ // this.getTableList()
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
|
|
+ // })
|
|
|
|
+ // .catch(() => {
|
|
|
|
+ // this.$message({
|
|
|
|
+ // type: 'info',
|
|
|
|
+ // message: '已取消删除'
|
|
|
|
+ // })
|
|
|
|
+ // })
|
|
|
|
+ },
|
|
pageChanged(page, size) {
|
|
pageChanged(page, size) {
|
|
this.currentPage = page
|
|
this.currentPage = page
|
|
this.getTableList()
|
|
this.getTableList()
|
|
@@ -432,10 +473,10 @@ export default {
|
|
getTableList() {
|
|
getTableList() {
|
|
let postParams = {
|
|
let postParams = {
|
|
Deleted: this.state == 1 ? false : true,
|
|
Deleted: this.state == 1 ? false : true,
|
|
- GraphCategoryIds: this.GraphCategoryIds, //说明书位置
|
|
|
|
- InfoLocals: this.InfoLocals, //工程信息化位置与设备分类
|
|
|
|
- InfoSystems: this.InfoSystems, //工程信息化专业/系统
|
|
|
|
- InfoTypeIds: this.InfoTypeIds, //铺位可视化typeid
|
|
|
|
|
|
+ GraphCategoryIds: this.GraphCategoryIds.length ? this.GraphCategoryIds : undefined, //说明书位置
|
|
|
|
+ InfoLocals: this.InfoLocals.length ? this.InfoLocals : undefined, //工程信息化位置与设备分类
|
|
|
|
+ InfoSystems: this.InfoSystems.length ? this.InfoSystems : undefined, //工程信息化专业/系统
|
|
|
|
+ InfoTypeIds: this.InfoTypeIds.length ? this.InfoTypeIds : undefined, //铺位可视化typeid
|
|
Name: this.keyword,
|
|
Name: this.keyword,
|
|
PageNumber: this.currentPage,
|
|
PageNumber: this.currentPage,
|
|
PageSize: this.size,
|
|
PageSize: this.size,
|
|
@@ -477,13 +518,18 @@ export default {
|
|
treeConfirmDevice(id, info) {
|
|
treeConfirmDevice(id, info) {
|
|
this.InfoSystems = []
|
|
this.InfoSystems = []
|
|
this.InfoLocals = []
|
|
this.InfoLocals = []
|
|
- for (let i = 0; i < info.length; i++) {
|
|
|
|
- let type = info[i]
|
|
|
|
- if (type.name.includes('/')) {
|
|
|
|
- this.InfoLocals.push(type.id)
|
|
|
|
- } else {
|
|
|
|
- this.InfoSystems.push(type.id)
|
|
|
|
|
|
+ if (info) {
|
|
|
|
+ for (let i = 0; i < info.length; i++) {
|
|
|
|
+ let type = info[i]
|
|
|
|
+ if (type.name.includes('/')) {
|
|
|
|
+ this.InfoLocals.push(type.id)
|
|
|
|
+ } else {
|
|
|
|
+ this.InfoSystems.push(type.id)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+ } else {
|
|
|
|
+ this.InfoSystems = []
|
|
|
|
+ this.InfoLocals = []
|
|
}
|
|
}
|
|
this.getTableList()
|
|
this.getTableList()
|
|
},
|
|
},
|