Commit f5949104 by liuyong
2 parents 961f5e1f 6208408b
...@@ -157,10 +157,31 @@ ...@@ -157,10 +157,31 @@
align="center" align="center"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
prop="assetNumber"
label="资产编号"
width="140"
:show-overflow-tooltip="true"
align="center"
></el-table-column>
<el-table-column
prop="eleName" prop="eleName"
label="所属元素" label="所属元素"
align="center" align="center"
></el-table-column> ></el-table-column>
<el-table-column
prop="parentElement"
label="上级元素"
align="center"
:formatter="formatParentElement"
show-overflow-tooltip
></el-table-column>
<el-table-column
prop="parentAssetName"
label="上级资产"
align="center"
show-overflow-tooltip
></el-table-column>
<el-table-column width="100" label="图标" align="center"> <el-table-column width="100" label="图标" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<img <img
...@@ -170,6 +191,28 @@ ...@@ -170,6 +191,28 @@
/> />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
prop="version"
label="版本号"
align="center"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="状态"
align="center"
prop="state"
:formatter="
(row, column, cellValue, index) =>
formatterDept(
row,
column,
cellValue,
index,
'assetsStatusOptions',
)
"
>
</el-table-column>
<el-table-column label="来源" align="center"> <el-table-column label="来源" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.isExtend == 1">总体资产</span> <span v-if="scope.row.isExtend == 1">总体资产</span>
...@@ -184,9 +227,10 @@ ...@@ -184,9 +227,10 @@
<el-table-column <el-table-column
prop="createTime" prop="createTime"
label="创建时间" label="创建时间"
width="100"
align="center" align="center"
></el-table-column> ></el-table-column>
<el-table-column label="操作" width="360" align="center"> <el-table-column label="操作" width="440" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div <div
style=" style="
...@@ -196,11 +240,18 @@ ...@@ -196,11 +240,18 @@
" "
> >
<el-button <el-button
icon="el-icon-view"
type="primary"
size="mini"
@click="viewItem(scope.row)"
>查看</el-button
>
<el-button
icon="el-icon-edit" icon="el-icon-edit"
type="primary" type="primary"
size="mini" size="mini"
@click="editItem(scope.row)" @click="editItem(scope.row)"
:disabled="scope.row.state == 1" :disabled="scope.row.state == 1 || scope.row.isExtend == 1"
>编辑</el-button >编辑</el-button
> >
<el-button <el-button
...@@ -208,15 +259,15 @@ ...@@ -208,15 +259,15 @@
type="primary" type="primary"
size="mini" size="mini"
@click="releaseItem(scope.row)" @click="releaseItem(scope.row)"
:disabled="scope.row.state == 1" :disabled="scope.row.state == 1 || scope.row.isExtend == 1"
>发布</el-button >发布</el-button
> >
<el-button <el-button
class="tingYong_btn" type="primary"
icon="el-icon-remove-outline" icon="el-icon-remove-outline"
size="mini" size="mini"
@click="stopItem(scope.row)" @click="stopItem(scope.row)"
:disabled="scope.row.state != 1" :disabled="scope.row.state != 1 || scope.row.isExtend == 1"
>停用</el-button >停用</el-button
> >
<el-button <el-button
...@@ -224,7 +275,7 @@ ...@@ -224,7 +275,7 @@
icon="el-icon-delete" icon="el-icon-delete"
size="mini" size="mini"
@click="deleteItem(scope.row)" @click="deleteItem(scope.row)"
:disabled="scope.row.state == 1" :disabled="scope.row.state == 1 || scope.row.isExtend == 1"
>删除</el-button >删除</el-button
> >
</div> </div>
...@@ -638,6 +689,16 @@ ...@@ -638,6 +689,16 @@
placeholder="请输入内容" placeholder="请输入内容"
v-no-backslash v-no-backslash
v-model="ruleForm.let1" v-model="ruleForm.let1"
:disabled="is_add_edit == 'view' ? true : false"
maxlength="100"
></el-input>
</el-form-item>
<el-form-item label="资产编号:" prop="assetNumber">
<el-input
placeholder="请输入内容"
v-no-backslash
v-model="ruleForm.assetNumber"
:disabled="is_add_edit == 'view' ? true : false"
maxlength="100" maxlength="100"
></el-input> ></el-input>
</el-form-item> </el-form-item>
...@@ -645,11 +706,15 @@ ...@@ -645,11 +706,15 @@
<el-input-number <el-input-number
style="width: 200px" style="width: 200px"
v-model="ruleForm.let2" v-model="ruleForm.let2"
:disabled="is_add_edit == 'view' ? true : false"
:min="0" :min="0"
></el-input-number> ></el-input-number>
</el-form-item> </el-form-item>
<el-form-item label="是否首页展示:" prop="let3"> <el-form-item label="是否首页展示:" prop="let3">
<el-radio-group v-model="ruleForm.let3"> <el-radio-group
:disabled="is_add_edit == 'view' ? true : false"
v-model="ruleForm.let3"
>
<el-radio label="显示"></el-radio> <el-radio label="显示"></el-radio>
<el-radio label="隐藏"></el-radio> <el-radio label="隐藏"></el-radio>
</el-radio-group> </el-radio-group>
...@@ -658,6 +723,7 @@ ...@@ -658,6 +723,7 @@
<el-select <el-select
v-model="ruleForm.let4" v-model="ruleForm.let4"
@change="zuJianLeiXingSelectChange" @change="zuJianLeiXingSelectChange"
:disabled="is_add_edit == 'view' ? true : false"
filterable filterable
remote remote
:remote-method="queryZuJianLeiXingSelect" :remote-method="queryZuJianLeiXingSelect"
...@@ -672,7 +738,10 @@ ...@@ -672,7 +738,10 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<!-- <el-form-item label="上级元素:" v-if="ruleForm.let3 && preArcList.length"> <el-form-item
label="上级元素:"
v-if="ruleForm.let3 && preArcList.length"
>
<el-select <el-select
@change="handlePreEleChange" @change="handlePreEleChange"
:disabled="is_add_edit == 'view' ? true : false" :disabled="is_add_edit == 'view' ? true : false"
...@@ -688,7 +757,27 @@ ...@@ -688,7 +757,27 @@
:value="item.parentElement" :value="item.parentElement"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> --> </el-form-item>
<el-form-item label="上级节点:" prop="parentAssetName">
<el-cascader
:disabled="
is_add_edit == 'view' ||
(!ruleForm.preArc && !treeSelectData.length)
? true
: false
"
v-model="cascaderValue"
:options="treeSelectData"
filterable
:props="{
children: 'children',
label: 'assetName',
value: 'assetId',
checkStrictly: true,
}"
@change="handleChange"
></el-cascader>
</el-form-item>
<el-form-item label="图标设置:" prop="icon"> <el-form-item label="图标设置:" prop="icon">
<div class="flex"> <div class="flex">
<img <img
...@@ -708,7 +797,8 @@ ...@@ -708,7 +797,8 @@
> >
<el-color-picker <el-color-picker
v-model="ruleForm.color" v-model="ruleForm.color"
:predefine="predefineColors"> :predefine="predefineColors"
>
</el-color-picker> </el-color-picker>
</div> </div>
</div> </div>
...@@ -833,7 +923,8 @@ import { ...@@ -833,7 +923,8 @@ import {
systemArchiSaveFactor, systemArchiSaveFactor,
getQryByTree, getQryByTree,
getDeptOption, getDeptOption,
getOrgOption getOrgOption,
getPreArc,
} from '@/api/index.js' } from '@/api/index.js'
import $ from 'jquery' import $ from 'jquery'
import { MessageBox, Message } from 'element-ui' import { MessageBox, Message } from 'element-ui'
...@@ -924,17 +1015,20 @@ export default { ...@@ -924,17 +1015,20 @@ export default {
color: '', color: '',
icon: '', icon: '',
preArc: '', preArc: '',
assetNumber: '',
parentAssetName: '',
}, },
rules: { rules: {
let1: [ let1: [
{ required: true, message: '请输入架构组件名称', trigger: 'blur' }, { required: true, message: '请输入架构组件名称', trigger: 'blur' },
], ],
assetNumber: [
{ required: true, message: '请输入资产编号', trigger: 'blur' },
],
let4: [ let4: [
{ required: true, message: '请选择组件类型', trigger: 'change' }, { required: true, message: '请选择组件类型', trigger: 'change' },
], ],
icon: [ icon: [{ required: true, message: '请选择图形', trigger: 'change' }],
{ required: true, message: '请选择图形', trigger: 'change' },
]
}, },
zuJianLeiXingSelect: [], zuJianLeiXingSelect: [],
archiBelongId: null, archiBelongId: null,
...@@ -1002,6 +1096,24 @@ export default { ...@@ -1002,6 +1096,24 @@ export default {
} }
}) })
}, },
formatParentElement(row, column, cellValue, index) {
return cellValue?.replace(/\]|\[|\/?]/g, '').replace('null', '')
},
formatterDept(row, column, cellValue, index, options) {
const obj = this[options]?.find((v) => v.value == cellValue) || {}
return obj.label
},
// 获取上级元素
getPreArc(item) {
getPreArc({ eleName: item?.elementName }).then((res) => {
if (res.code === 200) {
this.preArcList = res.data
if (!this.preArcList.length) {
this.getShangJiJieDianSelect(item?.elementName)
}
}
})
},
handleDialogClose() { handleDialogClose() {
this.selectGraphSrc = '' this.selectGraphSrc = ''
this.selectGraphShape = '' this.selectGraphShape = ''
...@@ -1010,6 +1122,35 @@ export default { ...@@ -1010,6 +1122,35 @@ export default {
this.treeSelectData = [] this.treeSelectData = []
this.preArcList = [] this.preArcList = []
}, },
handleChange(value) {
// console.log('value', value)
// 当选中值变化时,更新绑定的对象
let selectedObject = {}
if (value && value.length) {
// 假设我们根据id来查询对象
selectedObject = this.findObjectById(this.treeSelectData, value[0])
} else {
selectedObject = null
}
this.selectValue = selectedObject.assetId
this.selectLabel = selectedObject.assetName
this.selectCode = selectedObject.assetCode
this.ruleForm.let2 = selectedObject.assetName
},
findObjectById(items, id) {
for (let i = 0; i < items.length; i++) {
if (items[i].assetId === id) {
return items[i]
}
if (items[i].children) {
const found = this.findObjectById(items[i].children, id)
if (found) {
return found
}
}
}
return null
},
handlePreEleChange(data) { handlePreEleChange(data) {
this.getShangJiJieDianSelect(data) this.getShangJiJieDianSelect(data)
}, },
...@@ -1019,7 +1160,7 @@ export default { ...@@ -1019,7 +1160,7 @@ export default {
archiType: this.archiType, archiType: this.archiType,
archiAssetState: this.searchParams.archiAssetState, archiAssetState: this.searchParams.archiAssetState,
archiStage: this.searchParams.archiStage, archiStage: this.searchParams.archiStage,
eleName eleName,
} }
getQryByTree(params).then((res) => { getQryByTree(params).then((res) => {
if (res.code == 200) { if (res.code == 200) {
...@@ -1051,7 +1192,8 @@ export default { ...@@ -1051,7 +1192,8 @@ export default {
if (res.code == 200) { if (res.code == 200) {
this.selectRow2 = [res.data.records[0]] this.selectRow2 = [res.data.records[0]]
this.showSelectTitle.title = this.selectRow2[0].appName this.showSelectTitle.title = this.selectRow2[0].appName
this.showSelectTitle.status = this.selectRow2[0].buildType == 1 ? '统推' : '自建' this.showSelectTitle.status =
this.selectRow2[0].buildType == 1 ? '统推' : '自建'
this.showSelectTitle.appId = this.selectRow2[0].appId this.showSelectTitle.appId = this.selectRow2[0].appId
this.showSelectTitle.appCode = this.selectRow2[0].appCode this.showSelectTitle.appCode = this.selectRow2[0].appCode
this.showSelectTitle.appName = this.selectRow2[0].appName this.showSelectTitle.appName = this.selectRow2[0].appName
...@@ -1062,6 +1204,10 @@ export default { ...@@ -1062,6 +1204,10 @@ export default {
return (this.pager.current - 1) * this.pager.size + index + 1 return (this.pager.current - 1) * this.pager.size + index + 1
}, },
zuJianLeiXingSelectChange(data) { zuJianLeiXingSelectChange(data) {
const currentItem = this.zuJianLeiXingSelect.find(
(item) => item.elementId == data,
)
this.getPreArc(currentItem)
//组件类型选择后 //组件类型选择后
if (data) { if (data) {
const params = { const params = {
...@@ -1105,6 +1251,7 @@ export default { ...@@ -1105,6 +1251,7 @@ export default {
this.archiBelongId = res.data[0].viewId this.archiBelongId = res.data[0].viewId
this.archiType = res.data[0].archiType this.archiType = res.data[0].archiType
this.get_table() this.get_table()
this.getZuJianLeiXingSelect(null) // 所属元素下拉
} else { } else {
Message({ Message({
type: 'error', type: 'error',
...@@ -1127,7 +1274,7 @@ export default { ...@@ -1127,7 +1274,7 @@ export default {
pageSize: this.pager.size, pageSize: this.pager.size,
prjId: this.showSelectTitle.prjId, prjId: this.showSelectTitle.prjId,
appId: this.showSelectTitle.appId, appId: this.showSelectTitle.appId,
archiBelongId: this.archiBelongId archiBelongId: this.archiBelongId,
} }
this.loading = true this.loading = true
getTotalZiChanJiaGouTable(params).then((res) => { getTotalZiChanJiaGouTable(params).then((res) => {
...@@ -1137,7 +1284,7 @@ export default { ...@@ -1137,7 +1284,7 @@ export default {
this.pager.total = res.data.total this.pager.total = res.data.total
this.pager.size = res.data.size this.pager.size = res.data.size
this.tableData = res.data.records this.tableData = res.data.records
if(this.tableData.length) { if (this.tableData.length) {
res.data.records.map((item) => { res.data.records.map((item) => {
if (item.icon?.includes('svg+xml')) { if (item.icon?.includes('svg+xml')) {
const item_icon = item.icon.split('base64,')[1] const item_icon = item.icon.split('base64,')[1]
...@@ -1158,7 +1305,7 @@ export default { ...@@ -1158,7 +1305,7 @@ export default {
Number(svgTag.getAttribute('height').split('px')[0]) / 2 Number(svgTag.getAttribute('height').split('px')[0]) / 2
item['width'] = svgWidth + 'px' item['width'] = svgWidth + 'px'
item['height'] = svgHeight + 'px' item['height'] = svgHeight + 'px'
if(item.color) { if (item.color) {
if (path) { if (path) {
path.setAttribute('fill', item.color) path.setAttribute('fill', item.color)
} }
...@@ -1212,20 +1359,24 @@ export default { ...@@ -1212,20 +1359,24 @@ export default {
type: '1', type: '1',
elementName: elementName, elementName: elementName,
archiBelongId: this.archiBelongId, archiBelongId: this.archiBelongId,
scopeList: [2],
} }
return new Promise((resolve, reject) => {
queryZiChanJiaGouZuJianLeiXing(params).then((res) => { queryZiChanJiaGouZuJianLeiXing(params).then((res) => {
if (res.code == 200) { if (res.code == 200) {
console.log('组件类型') // console.log('组件类型')
resolve(res.data)
console.log(res.data) // console.log(res.data)
this.zuJianLeiXingSelect = res.data this.zuJianLeiXingSelect = res.data
} else { } else {
Message({ Message({
type: 'error', type: 'error',
message: res.msg, message: res.msg,
}) })
reject(res.msg)
} }
}) })
})
}, },
get_table3() { get_table3() {
//查询表格数据 //查询表格数据
...@@ -1401,6 +1552,57 @@ export default { ...@@ -1401,6 +1552,57 @@ export default {
} }
}) })
}, },
viewItem(row) {
//查看架构
this.getZuJianLeiXingSelect(null)
this.add_dialog3 = true
this.is_add_edit = 'view'
this.ruleForm.let1 = row.assetName
this.ruleForm.let2 = row.sort
this.ruleForm.let3 = row.isShow == 0 ? '显示' : '隐藏'
this.ruleForm.preArc = row.parentElement?.replace(/\]|\[|\/?]/g, '')
this.getShangJiJieDianSelect(this.ruleForm.preArc)
this.cascaderValue = [row.parentAssetId + '']
this.ruleForm.assetNumber = row.assetNumber
this.ruleForm.let4 = row.archiEleId
this.editId = row.assetId
let fieldsValue = row.fieldsValue
this.ruleForm.color = row.color
this.selectGraphSrc = row.icon
this.selectGraphShape = row.iconName
this.ruleForm.icon = row.icon
this.selectCode = row.assetCode
this.selectLabel = row.parentAssetName
this.selectValue = row.parentAssetId
this.getZuJianLeiXingSelect(null).then((res) => {
this.zuJianLeiXingSelect = res
const currentItem = this.zuJianLeiXingSelect.find(
(item) => item.elementId == this.ruleForm.let3,
)
if (this.ruleForm.let3) {
this.zuJianLeiXingSelectChange(this.ruleForm.let3)
}
if (currentItem && currentItem.eaLevel == 1) {
this.disabled1 = true
} else {
this.disabled1 = false
}
})
if (fieldsValue && fieldsValue.length == 4) {
this.ruleForm.dynamicForm_ = []
} else {
if (!fieldsValue) return
let fieldsValue_ = JSON.parse(fieldsValue)
fieldsValue_.map((item) => {
if (item.dictKey) {
this.get_key(item.dictKey).then((res2) => {
this.$set(item, 'dictArray_', res2)
})
}
})
this.ruleForm.dynamicForm_ = fieldsValue_
}
},
editItem(row) { editItem(row) {
//编辑 //编辑
this.getZuJianLeiXingSelect(null) this.getZuJianLeiXingSelect(null)
...@@ -1411,6 +1613,8 @@ export default { ...@@ -1411,6 +1613,8 @@ export default {
this.ruleForm.let3 = row.isShow == 0 ? '显示' : '隐藏' this.ruleForm.let3 = row.isShow == 0 ? '显示' : '隐藏'
this.ruleForm.preArc = row.parentElement?.replace(/\]|\[|\/?]/g, '') this.ruleForm.preArc = row.parentElement?.replace(/\]|\[|\/?]/g, '')
this.getShangJiJieDianSelect(this.ruleForm.preArc) this.getShangJiJieDianSelect(this.ruleForm.preArc)
this.cascaderValue = [row.parentAssetId + '']
this.ruleForm.assetNumber = row.assetNumber
this.ruleForm.let4 = row.archiEleId this.ruleForm.let4 = row.archiEleId
this.editId = row.assetId this.editId = row.assetId
let fieldsValue = row.fieldsValue let fieldsValue = row.fieldsValue
...@@ -1418,11 +1622,27 @@ export default { ...@@ -1418,11 +1622,27 @@ export default {
this.selectGraphSrc = row.icon this.selectGraphSrc = row.icon
this.selectGraphShape = row.iconName this.selectGraphShape = row.iconName
this.ruleForm.icon = row.icon this.ruleForm.icon = row.icon
this.selectCode = row.assetCode
this.selectLabel = row.parentAssetName
this.selectValue = row.parentAssetId
this.getZuJianLeiXingSelect(null).then((res) => {
this.zuJianLeiXingSelect = res
const currentItem = this.zuJianLeiXingSelect.find(
(item) => item.elementId == this.ruleForm.let3,
)
if (this.ruleForm.let3) {
this.zuJianLeiXingSelectChange(this.ruleForm.let3)
}
if (currentItem && currentItem.eaLevel == 1) {
this.disabled1 = true
} else {
this.disabled1 = false
}
})
if (fieldsValue && fieldsValue.length == 4) { if (fieldsValue && fieldsValue.length == 4) {
this.ruleForm.dynamicForm_ = [] this.ruleForm.dynamicForm_ = []
} else { } else {
if(!fieldsValue) return if (!fieldsValue) return
let fieldsValue_ = JSON.parse(fieldsValue) let fieldsValue_ = JSON.parse(fieldsValue)
fieldsValue_.map((item) => { fieldsValue_.map((item) => {
if (item.dictKey) { if (item.dictKey) {
...@@ -1497,12 +1717,13 @@ export default { ...@@ -1497,12 +1717,13 @@ export default {
saveFactor() { saveFactor() {
//确定维护资产要素 //确定维护资产要素
let extend = [] let extend = []
console.log('')
this.elementTree.forEach((item) => { this.elementTree.forEach((item) => {
if (item.checkedCities.length > 0) { if (item.checkedCities.length > 0) {
extend.push({ extend.push({
archiType: item.archiType, archiType: item.archiType,
assetIdList: item.checkedCities, assetIdList: item.checkedCities,
archiBelongId: this.archiBelongId archiBelongId: item.archiBelongId,
}) })
} }
}) })
...@@ -1579,8 +1800,12 @@ export default { ...@@ -1579,8 +1800,12 @@ export default {
state: 2, state: 2,
icon: this.selectGraphSrc, icon: this.selectGraphSrc,
iconName: this.selectGraphShape, iconName: this.selectGraphShape,
parentElement: [this.ruleForm.preArc],
assetNumber: this.ruleForm.assetNumber,
color: this.ruleForm.color, color: this.ruleForm.color,
graphId: this.graphId, graphId: this.graphId,
parentAssetId: this.selectValue,
parentAssetName: this.selectLabel,
} }
if (this.is_add_edit == 'add') { if (this.is_add_edit == 'add') {
addSystemTable(params).then((res) => { addSystemTable(params).then((res) => {
...@@ -1823,6 +2048,8 @@ export default { ...@@ -1823,6 +2048,8 @@ export default {
this.ruleForm.icon = '' this.ruleForm.icon = ''
this.selectGraphSrc = '' this.selectGraphSrc = ''
this.selectGraphShape = '' this.selectGraphShape = ''
;(this.cascaderValue = []), (this.ruleForm.assetNumber = '')
this.ruleForm.preArc = ''
}) })
}, },
moreDelete() { moreDelete() {
......
...@@ -901,7 +901,7 @@ export default { ...@@ -901,7 +901,7 @@ export default {
current: 1, current: 1,
sizes: [10, 20, 50, 100, 200], sizes: [10, 20, 50, 100, 200],
size: 10, size: 10,
total: 20, //总条数 total: 0, //总条数
}, },
tableHeight: null, tableHeight: null,
graphList: [], graphList: [],
......
...@@ -380,7 +380,7 @@ export default { ...@@ -380,7 +380,7 @@ export default {
current: 1, current: 1,
sizes: [10, 20, 50, 100, 200], sizes: [10, 20, 50, 100, 200],
size: 10, size: 10,
total: 20, //总条数 total: 0, //总条数
}, },
tableHeight: null, tableHeight: null,
searchParams: { searchParams: {
......
...@@ -64,7 +64,7 @@ export default { ...@@ -64,7 +64,7 @@ export default {
current: 1, current: 1,
sizes: [10, 20, 50, 100, 200], sizes: [10, 20, 50, 100, 200],
size: 10, size: 10,
total: 20 //总条数 total: 0 //总条数
}, },
tableHeight: null, tableHeight: null,
searchParams: { searchParams: {
......
...@@ -64,7 +64,7 @@ export default { ...@@ -64,7 +64,7 @@ export default {
current: 1, current: 1,
sizes: [10, 20, 50, 100, 200], sizes: [10, 20, 50, 100, 200],
size: 10, size: 10,
total: 20 //总条数 total: 0 //总条数
}, },
tableHeight: null, tableHeight: null,
searchParams: { searchParams: {
......
...@@ -65,7 +65,7 @@ export default { ...@@ -65,7 +65,7 @@ export default {
current: 1, current: 1,
sizes: [10, 20, 50, 100, 200], sizes: [10, 20, 50, 100, 200],
size: 10, size: 10,
total: 20 //总条数 total: 0 //总条数
}, },
tableHeight: null, tableHeight: null,
searchParams: { searchParams: {
......
...@@ -62,7 +62,7 @@ export default { ...@@ -62,7 +62,7 @@ export default {
current: 1, current: 1,
sizes: [10, 20, 50, 100, 200], sizes: [10, 20, 50, 100, 200],
size: 10, size: 10,
total: 20 //总条数 total: 0 //总条数
}, },
tableHeight: null, tableHeight: null,
searchParams: { searchParams: {
......
...@@ -62,7 +62,7 @@ export default { ...@@ -62,7 +62,7 @@ export default {
current: 1, current: 1,
sizes: [10, 20, 50, 100, 200], sizes: [10, 20, 50, 100, 200],
size: 10, size: 10,
total: 20 //总条数 total: 0 //总条数
}, },
tableHeight: null, tableHeight: null,
searchParams: { searchParams: {
......
...@@ -116,7 +116,7 @@ export default { ...@@ -116,7 +116,7 @@ export default {
current: 1, current: 1,
sizes: [10, 20, 50, 100, 200], sizes: [10, 20, 50, 100, 200],
size: 10, size: 10,
total: 20 //总条数 total: 0 //总条数
}, },
tableHeight: null, tableHeight: null,
fuHeDu: [], fuHeDu: [],
......
...@@ -395,7 +395,7 @@ export default { ...@@ -395,7 +395,7 @@ export default {
current: 1, current: 1,
sizes: [10, 20, 50, 100, 200], sizes: [10, 20, 50, 100, 200],
size: 10, size: 10,
total: 20, //总条数 total: 0, //总条数
}, },
tableHeight: null, tableHeight: null,
searchParams: { searchParams: {
......
...@@ -779,7 +779,7 @@ export default { ...@@ -779,7 +779,7 @@ export default {
current: 1, current: 1,
sizes: [10, 20, 50, 100, 200], sizes: [10, 20, 50, 100, 200],
size: 10, size: 10,
total: 20, //总条数 total: 0, //总条数
}, },
tableHeight: null, tableHeight: null,
searchParams: { searchParams: {
...@@ -807,7 +807,7 @@ export default { ...@@ -807,7 +807,7 @@ export default {
current: 1, current: 1,
sizes: [10, 20, 50, 100, 200], sizes: [10, 20, 50, 100, 200],
size: 10, size: 10,
total: 20, //总条数 total: 0, //总条数
}, },
selectRow: [], selectRow: [],
selectRow3: [], selectRow3: [],
...@@ -817,7 +817,7 @@ export default { ...@@ -817,7 +817,7 @@ export default {
current: 1, current: 1,
sizes: [10, 20, 50, 100, 200], sizes: [10, 20, 50, 100, 200],
size: 10, size: 10,
total: 20, //总条数 total: 0, //总条数
}, },
selectRo3: [], selectRo3: [],
tableData4: [ tableData4: [
......
...@@ -312,7 +312,7 @@ export default { ...@@ -312,7 +312,7 @@ export default {
current: 1, current: 1,
sizes: [10, 20, 50, 100, 200], sizes: [10, 20, 50, 100, 200],
size: 10, size: 10,
total: 20, //总条数 total: 0, //总条数
}, },
tableHeight: null, tableHeight: null,
searchParams: { searchParams: {
......
...@@ -344,7 +344,7 @@ export default { ...@@ -344,7 +344,7 @@ export default {
current: 1, current: 1,
sizes: [10, 20, 50, 100, 200], sizes: [10, 20, 50, 100, 200],
size: 10, size: 10,
total: 20, //总条数 total: 0, //总条数
}, },
tableHeight: null, tableHeight: null,
moBanMingCheng: [], moBanMingCheng: [],
......
...@@ -4,32 +4,34 @@ ...@@ -4,32 +4,34 @@
<div class="search_menu"> <div class="search_menu">
<div class="search_menu_item_container"> <div class="search_menu_item_container">
<div class="search_menu_item"> <div class="search_menu_item">
<span class="search_title">单位</span> <span class="search_title">建设单位</span>
<el-select <el-select
v-model="searchParams.let1" v-model="searchParams.let1"
placeholder="请选择" placeholder="请选择"
class="search_item" class="search_item"
filterable
> >
<el-option <el-option
v-for="item in fuHeDu" v-for="item in sysOrgOptions"
:key="item.value" :key="item.orgId"
:label="item.label" :label="item.orgName"
:value="item.value" :value="item.orgId"
></el-option> ></el-option>
</el-select> </el-select>
</div> </div>
<div class="search_menu_item"> <div class="search_menu_item">
<span class="search_title">部门</span> <span class="search_title">业务部门</span>
<el-select <el-select
filterable
v-model="searchParams.let2" v-model="searchParams.let2"
placeholder="请选择" placeholder="请选择"
class="search_item" class="search_item"
> >
<el-option <el-option
v-for="item in fuHeDu" v-for="item in sysDeptOptions"
:key="item.value" :key="item.orgId"
:label="item.label" :label="item.orgName"
:value="item.value" :value="item.orgId"
></el-option> ></el-option>
</el-select> </el-select>
</div> </div>
...@@ -101,13 +103,21 @@ ...@@ -101,13 +103,21 @@
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
prop="manageOrgId" prop="manageOrgId"
label="单位" label="建设单位"
align="center" align="center"
:formatter="
(row, column, cellValue, index) =>
formatterColumn(row, column, cellValue, index, 'sysOrgOptions')
"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
prop="manageDeptId" prop="manageDeptId"
label="部门" label="业务部门"
align="center" align="center"
:formatter="
(row, column, cellValue, index) =>
formatterColumn(row, column, cellValue, index, 'sysDeptOptions')
"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
prop="appName" prop="appName"
...@@ -244,6 +254,8 @@ ...@@ -244,6 +254,8 @@
import { import {
getDianXingAnLiSelectData, getDianXingAnLiSelectData,
getGaiSheJiaGouZunCongJiaChaTable, getGaiSheJiaGouZunCongJiaChaTable,
getOrgOption,
getDeptOption,
} from '@/api/index.js' } from '@/api/index.js'
import { MessageBox, Message } from 'element-ui' import { MessageBox, Message } from 'element-ui'
import $ from 'jquery' import $ from 'jquery'
...@@ -268,7 +280,7 @@ export default { ...@@ -268,7 +280,7 @@ export default {
current: 1, current: 1,
sizes: [10, 20, 50, 100, 200], sizes: [10, 20, 50, 100, 200],
size: 10, size: 10,
total: 20, //总条数 total: 0, //总条数
}, },
tableHeight: null, tableHeight: null,
searchParams: { searchParams: {
...@@ -280,8 +292,13 @@ export default { ...@@ -280,8 +292,13 @@ export default {
fuHeDu: [], fuHeDu: [],
ziJianLeiXing: [], ziJianLeiXing: [],
selectRows: [], selectRows: [],
sysOrgOptions: [],
sysDeptOptions: [],
} }
}, },
created() {
this.getDicts()
},
mounted() { mounted() {
window.addEventListener('resize', () => { window.addEventListener('resize', () => {
this.set_table_height() this.set_table_height()
...@@ -296,6 +313,22 @@ export default { ...@@ -296,6 +313,22 @@ export default {
}) })
}, },
methods: { methods: {
formatterColumn(row, column, cellValue, index, options) {
const obj = this[options]?.find((v) => v.orgId == cellValue) || {}
return obj.label
},
getDicts() {
getDeptOption().then((res) => {
if (res.code === 200) {
this.sysDeptOptions = res.data
}
})
getOrgOption().then((res) => {
if (res.code === 200) {
this.sysOrgOptions = res.data
}
})
},
indexMethod(index) { indexMethod(index) {
return (this.pager.current - 1) * this.pager.size + index + 1 return (this.pager.current - 1) * this.pager.size + index + 1
}, },
......
...@@ -31,8 +31,8 @@ import ListPage from '@/components/ListPage.vue' ...@@ -31,8 +31,8 @@ import ListPage from '@/components/ListPage.vue'
import SearchForm from '@/components/SearchForm.vue' import SearchForm from '@/components/SearchForm.vue'
import TableConfig from '@/components/TableConfig.vue' import TableConfig from '@/components/TableConfig.vue'
// import { getDianXingAnLiSelectData } from '@/api/index.js'
import { queryAppArchiControlRequirements } from '@/api/interface' import { queryAppArchiControlRequirements } from '@/api/interface'
import { getOrgOption, getDeptOption } from '@/api/index'
import { prjPlanClass } from '@/utils/dictionary' import { prjPlanClass } from '@/utils/dictionary'
import { getDictTypeOptions } from '@/utils' import { getDictTypeOptions } from '@/utils'
export default { export default {
...@@ -61,18 +61,20 @@ export default { ...@@ -61,18 +61,20 @@ export default {
formOptions() { formOptions() {
return [ return [
{ {
label: '单位', // label文字 label: '建设单位', // label文字
prop: 'manageOrgId', // 字段名 prop: 'manageOrgId', // 字段名
element: 'el-select', // 指定elementui组件 element: 'el-select', // 指定elementui组件
placeholder: '请选择', // elementui组件属性 placeholder: '请选择', // elementui组件属性
dictType: 'sys_org', options: this.sysOrgOptions,
filterable: true
}, },
{ {
label: '部门', // label文字 label: '业务部门', // label文字
prop: 'manageDeptId', // 字段名 prop: 'manageDeptId', // 字段名
element: 'el-select', // 指定elementui组件 element: 'el-select', // 指定elementui组件
placeholder: '请选择', // elementui组件属性 placeholder: '请选择', // elementui组件属性
dictType: 'sys_dept', options: this.sysDeptOptions,
filterable: true
}, },
{ {
label: '系统名称', // label文字 label: '系统名称', // label文字
...@@ -94,14 +96,14 @@ export default { ...@@ -94,14 +96,14 @@ export default {
{ type: 'selection', width: '55px' }, { type: 'selection', width: '55px' },
{ label: '序号', type: 'index', width: '80px' }, { label: '序号', type: 'index', width: '80px' },
{ {
label: '单位', label: '建设单位',
prop: 'manageOrgId', prop: 'manageOrgId',
options: this.sysOrgOptions, options: this.sysOrgOptions,
collectionType: true, collectionType: true,
width: '120px', width: '120px',
}, },
{ {
label: '部门', label: '业务部门',
prop: 'manageDeptId', prop: 'manageDeptId',
options: this.sysDeptOptions, options: this.sysDeptOptions,
collectionType: true, collectionType: true,
...@@ -193,11 +195,25 @@ export default { ...@@ -193,11 +195,25 @@ export default {
getDictTypeOptions('build_type').then((res) => { getDictTypeOptions('build_type').then((res) => {
this.buildTypeOptions = res this.buildTypeOptions = res
}) })
getDictTypeOptions('sys_org').then((res) => { getDeptOption().then((res) => {
this.sysOrgOptions = res if (res.code === 200) {
this.sysDeptOptions = res.data.map((v) => {
return {
label: v.orgName,
value: v.orgId,
}
})
}
}) })
getDictTypeOptions('sys_dept').then((res) => { getOrgOption().then((res) => {
this.sysDeptOptions = res if (res.code === 200) {
this.sysOrgOptions = res.data.map((v) => {
return {
label: v.orgName,
value: v.orgId,
}
})
}
}) })
getDictTypeOptions('sys_build_org').then((res) => { getDictTypeOptions('sys_build_org').then((res) => {
this.sysBuildOrgOptions = res this.sysBuildOrgOptions = res
......
...@@ -36,6 +36,7 @@ import SearchForm from '@/components/SearchForm.vue' ...@@ -36,6 +36,7 @@ import SearchForm from '@/components/SearchForm.vue'
import TableConfig from '@/components/TableConfig.vue' import TableConfig from '@/components/TableConfig.vue'
import { queryPrelDesInspecte } from '@/api/interface' import { queryPrelDesInspecte } from '@/api/interface'
import { getOrgOption, getDeptOption } from '@/api/index'
import { prjPlanClass, completionStatus } from '@/utils/dictionary' import { prjPlanClass, completionStatus } from '@/utils/dictionary'
import { getDictTypeOptions } from '@/utils' import { getDictTypeOptions } from '@/utils'
export default { export default {
...@@ -63,18 +64,20 @@ export default { ...@@ -63,18 +64,20 @@ export default {
formOptions() { formOptions() {
let arr = [ let arr = [
{ {
label: '单位', // label文字 label: '建设单位', // label文字
prop: 'manageOrgId', // 字段名 prop: 'manageOrgId', // 字段名
element: 'el-select', // 指定elementui组件 element: 'el-select', // 指定elementui组件
placeholder: '请选择', // elementui组件属性 placeholder: '请选择', // elementui组件属性
dictType: 'sys_org', options: this.sysOrgOptions,
filterable: true
}, },
{ {
label: '部门', // label文字 label: '业务部门', // label文字
prop: 'manageDeptId', // 字段名 prop: 'manageDeptId', // 字段名
element: 'el-select', // 指定elementui组件 element: 'el-select', // 指定elementui组件
placeholder: '请选择', // elementui组件属性 placeholder: '请选择', // elementui组件属性
dictType: 'sys_dept', options: this.sysDeptOptions,
filterable: true
}, },
{ {
label: '系统名称', // label文字 label: '系统名称', // label文字
...@@ -98,14 +101,14 @@ export default { ...@@ -98,14 +101,14 @@ export default {
{ type: 'selection', width: '55px' }, { type: 'selection', width: '55px' },
{ label: '序号', type: 'index', width: '80px' }, { label: '序号', type: 'index', width: '80px' },
{ {
label: '单位', label: '建设单位',
prop: 'manageOrgId', prop: 'manageOrgId',
options: this.sysOrgOptions, options: this.sysOrgOptions,
collectionType: true, collectionType: true,
width: '120px', width: '120px',
}, },
{ {
label: '部门', label: '业务部门',
prop: 'manageDeptId', prop: 'manageDeptId',
options: this.sysDeptOptions, options: this.sysDeptOptions,
collectionType: true, collectionType: true,
...@@ -193,11 +196,25 @@ export default { ...@@ -193,11 +196,25 @@ export default {
getDictTypeOptions('build_type').then((res) => { getDictTypeOptions('build_type').then((res) => {
this.buildTypeOptions = res this.buildTypeOptions = res
}) })
getDictTypeOptions('sys_org').then((res) => { getDeptOption().then((res) => {
this.sysOrgOptions = res if (res.code === 200) {
this.sysDeptOptions = res.data.map((v) => {
return {
label: v.orgName,
value: v.orgId,
}
})
}
}) })
getDictTypeOptions('sys_dept').then((res) => { getOrgOption().then((res) => {
this.sysDeptOptions = res if (res.code === 200) {
this.sysOrgOptions = res.data.map((v) => {
return {
label: v.orgName,
value: v.orgId,
}
})
}
}) })
getDictTypeOptions('sys_build_org').then((res) => { getDictTypeOptions('sys_build_org').then((res) => {
this.sysBuildOrgOptions = res this.sysBuildOrgOptions = res
......
...@@ -371,7 +371,7 @@ export default { ...@@ -371,7 +371,7 @@ export default {
current: 1, current: 1,
sizes: [10, 20, 50, 100, 200], sizes: [10, 20, 50, 100, 200],
size: 10, size: 10,
total: 20, //总条数 total: 0, //总条数
}, },
tableHeight: null, tableHeight: null,
searchParams: { searchParams: {
...@@ -433,7 +433,7 @@ export default { ...@@ -433,7 +433,7 @@ export default {
}) })
} }
}) })
getDictTypeOptions('sys_build_org').then((res) => { getDictTypeOptions('build_company').then((res) => {
this.sysBuildOrgOptions = res this.sysBuildOrgOptions = res
}) })
// console.log(getDictTypeOptions('sys_build_org')) // console.log(getDictTypeOptions('sys_build_org'))
......
...@@ -399,7 +399,7 @@ export default { ...@@ -399,7 +399,7 @@ export default {
current: 1, current: 1,
sizes: [10, 20, 50, 100, 200], sizes: [10, 20, 50, 100, 200],
size: 10, size: 10,
total: 20, //总条数 total: 0, //总条数
}, },
tableHeight: null, tableHeight: null,
is_add_edit: 'add', is_add_edit: 'add',
......
...@@ -144,7 +144,7 @@ export default { ...@@ -144,7 +144,7 @@ export default {
current: 1, current: 1,
sizes: [10, 20, 50, 100, 200], sizes: [10, 20, 50, 100, 200],
size: 10, size: 10,
total: 20, //总条数 total: 0, //总条数
}, },
tableHeight: null, tableHeight: null,
searchParams: { searchParams: {
......
...@@ -229,7 +229,7 @@ export default { ...@@ -229,7 +229,7 @@ export default {
current: 1, current: 1,
sizes: [10, 20, 50, 100, 200], sizes: [10, 20, 50, 100, 200],
size: 10, size: 10,
total: 20, //总条数 total: 0, //总条数
}, },
formData: { formData: {
fileName: '', fileName: '',
......
...@@ -186,7 +186,7 @@ export default { ...@@ -186,7 +186,7 @@ export default {
current: 1, current: 1,
sizes: [10, 20, 50, 100, 200], sizes: [10, 20, 50, 100, 200],
size: 10, size: 10,
total: 20, //总条数 total: 0, //总条数
}, },
tableHeight: null, tableHeight: null,
} }
......
<template> <template>
...@@ -122,7 +122,7 @@ export default { ...@@ -122,7 +122,7 @@ export default {
current: 1, current: 1,
sizes: [10, 20, 50, 100, 200], sizes: [10, 20, 50, 100, 200],
size: 10, size: 10,
total: 20 //总条数 total: 0 //总条数
}, },
tableHeight: null, tableHeight: null,
searchParams: { searchParams: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!