标准法规属性自定义修改

This commit is contained in:
宋伟佳
2021-09-27 11:26:18 +08:00
parent c4a1137a29
commit c0fd82980a
@@ -2,8 +2,8 @@
<template> <template>
<div class="attribute-custom v-class"> <div class="attribute-custom v-class">
<div class="action-bar1"> <div class="action-bar1">
<el-button class="common-button-primary add-button" size="mini" v-btn-permission="''" type="primary" @click="showAddModel"><i class="iconfont">&#xe84e;</i>新增</el-button> <el-button size="mini" style="margin-right: 5px" class="common-button-primary add-button" type="primary" @click="showAddModel"><i class="iconfont">&#xe84e;</i>新增</el-button>
<el-button class="common-button-default" size="small" v-btn-permission="''" @click="showDisplayLocationDialog">展示区域管理</el-button> <el-button size="small" class="common-button-default" @click="showDisplayLocationDialog">展示区域管理</el-button>
</div> </div>
<loading :loading="attributeDataLoading">数据处理中</loading> <loading :loading="attributeDataLoading">数据处理中</loading>
<div class="content"> <div class="content">
@@ -74,16 +74,16 @@
<template slot-scope="scope"> <template slot-scope="scope">
<div @click.stop style="display: inline-block"> <div @click.stop style="display: inline-block">
<el-dropdown trigger="click" @command="handleCommand"> <el-dropdown trigger="click" @command="handleCommand">
<i class="iconfont">&#xe61e;</i> <i class="iconfont">&#xe61e;</i>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item v-btn-permission="''" :command="[scope.row, '编辑']">编辑</el-dropdown-item> <el-dropdown-item v-btn-permission="'PTH96GYZT6SQZE9H8XCF'" :command="[scope.row, '编辑']">编辑</el-dropdown-item>
<el-dropdown-item v-btn-permission="''" :disabled="scope.row.isEdit==='1'" :command="[scope.row, '删除']">删除</el-dropdown-item> <el-dropdown-item :disabled="scope.row.isEdit==='1'" :command="[scope.row, '删除']">删除</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<pagination :total="total" :pageChange="pageNo" :pageSizeChange="pageSize" @pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination> <pagination :total="total" :pageChange="pageNo" :pageSizeChange="pageSize" @pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination>
<!-- 新建抽屉--> <!-- 新建抽屉-->
@@ -118,7 +118,7 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="属性字段" prop="attrField" class="add-form-item" :class="{'form-item-disabled': addOrEdit === 'edit'}"> <el-form-item label="属性字段" prop="attrField" class="add-form-item" :class="{'form-item-disabled': addOrEdit === 'edit'}">
<el-input v-model.trim="attributeEO.attrField" :disabled="addOrEdit === 'edit'" placeholder="请输入属性字段" clearable/> <el-input v-model.trim="attributeEO.attrField" :disabled="addOrEdit === 'edit'" placeholder="请输入属性字段" clearable/>
</el-form-item> </el-form-item>
<el-form-item label="属性名称" prop="attrName" class="add-form-item"> <el-form-item label="属性名称" prop="attrName" class="add-form-item">
@@ -135,7 +135,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="选项值" prop="selVal" class="add-form-item" v-if="attributeEO.attrType === 'SEL_OPTION' || attributeEO.attrType === 'SEL_OPTS'"> <el-form-item label="选项值" prop="selVal" class="add-form-item" v-if="attributeEO.attrType === 'SEL_OPTION' || attributeEO.attrType === 'SEL_OPTS'">
<el-select v-model="attributeEO.selVal" placeholder="请选择" filterable> <el-select v-model="attributeEO.selVal" placeholder="请选择" :disabled="addOrEdit === 'edit'" filterable>
<el-option <el-option
v-for="item in relateDicIdOptions" v-for="item in relateDicIdOptions"
:label="item.label" :label="item.label"
@@ -188,8 +188,8 @@
</el-form> </el-form>
</div> </div>
<div id="roleFormButton" class="demo-drawer-footer"> <div id="roleFormButton" class="demo-drawer-footer">
<el-button class="common-button-primary" size="mini" icon="el-icon-check" type="primary" @click="saveInfo()">提交</el-button> <el-button round class="common-button-primary" icon="el-icon-check" type="primary" @click="saveInfo()">提交</el-button>
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="cancelModel">取消</el-button> <el-button round class="common-button-default" icon="el-icon-close" @click="cancelModel">取消</el-button>
</div> </div>
</el-drawer> </el-drawer>
@@ -199,7 +199,7 @@
width="400px" width="400px"
> >
<div style="margin-bottom: 10px;"> <div style="margin-bottom: 10px;">
<el-button size="mini" class="common-button-primary add-button" v-btn-permission="'e128da8f053dd19113e75772f2c70f29'" type="primary" icon="add" @click="showAddDisplayLocationDialog(undefined)">新增</el-button> <el-button round class="common-button-primary add-button" type="primary" icon="add" @click="showAddDisplayLocationDialog(undefined)">新增</el-button>
</div> </div>
<el-table <el-table
:loading="displayLocationDialogTableConfig.loading" :loading="displayLocationDialogTableConfig.loading"
@@ -228,10 +228,10 @@
<template slot-scope="scope"> <template slot-scope="scope">
<div @click.stop style="display: inline-block"> <div @click.stop style="display: inline-block">
<el-dropdown trigger="click" @command="handleCommand2"> <el-dropdown trigger="click" @command="handleCommand2">
<i class="iconfont">&#xe61e;</i> <i class="iconfont">&#xe61e;</i>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">
<el-dropdown-item v-btn-permission="'2a788bca1cca66384e97f8ff722d4232'" :command="[scope.row, '修改']">修改</el-dropdown-item> <el-dropdown-item :command="[scope.row, '修改']">修改</el-dropdown-item>
<el-dropdown-item v-btn-permission="'116a3f339f3600e639271d0073045912'" :disabled="scope.row.validFlag===1" :command="[scope.row, '删除']">删除</el-dropdown-item> <el-dropdown-item :disabled="scope.row.validFlag===1" :command="[scope.row, '删除']">删除</el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</div> </div>
@@ -273,8 +273,8 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="mini" class="common-button-default" @click="handleDisplayLocationFormDialogReset('displayLocationDialogForm')"> </el-button> <el-button round class="common-button-default" @click="handleDisplayLocationFormDialogReset('displayLocationDialogForm')"> </el-button>
<el-button size="mini" class="common-button-primary" type="primary" @click="handleDisplayLocationFormDialogSubmit('displayLocationDialogForm')"> </el-button> <el-button round class="common-button-primary" type="primary" @click="handleDisplayLocationFormDialogSubmit('displayLocationDialogForm')"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
@@ -319,7 +319,6 @@ export default {
}, },
displayLocationDialogFormData: { displayLocationDialogFormData: {
areaName: '', areaName: '',
sarType: '',
showIndex: '' showIndex: ''
}, },
displayLocationDialogFormRules: { displayLocationDialogFormRules: {
@@ -331,8 +330,7 @@ export default {
{required: true, message: '所属模块不能为空', trigger: 'change'} {required: true, message: '所属模块不能为空', trigger: 'change'}
], ],
showIndex: [ showIndex: [
{ required: true, message: '排序号不能为空且为正整数', trigger: 'blur'}, { type: 'number', required: true, message: '请输入排序号', trigger: 'blur' },
{ type: 'string', validator: this.verify.validStandNumInCompile2, trigger: 'blur'},
{ type: 'number', min: 0, max: 999, message: '请输入0-999之间的整数', trigger: 'blur' } { type: 'number', min: 0, max: 999, message: '请输入0-999之间的整数', trigger: 'blur' }
] ]
}, },
@@ -353,7 +351,7 @@ export default {
showRegionId: '', showRegionId: '',
selVal: '', selVal: '',
isSearch: '1', isSearch: '1',
sarType: 'STAND', sarType: '',
isWarn: '1' isWarn: '1'
}, },
attrTypeOptions: [ attrTypeOptions: [
@@ -461,7 +459,7 @@ export default {
this.$confirm('确认删除该条数据?', { this.$confirm('确认删除该条数据?', {
title: '确认删除', title: '确认删除',
confirmButtonClass: 'common-button-primary', confirmButtonClass: 'common-button-primary',
roundButton: false, roundButton: true,
callback: (action, instance) => { callback: (action, instance) => {
if (action === 'confirm') { if (action === 'confirm') {
const {id} = data const {id} = data
@@ -561,7 +559,7 @@ export default {
queryDisplayLocationList (sarType) { queryDisplayLocationList (sarType) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
this.$http.get('lawssBase/utArea/getAreaList', { this.$http.get('lawssBase/utArea/getAreaList', {
sarType: sarType sarType: sarType || 'INLAND_STAND'
}, { }, {
_this: this _this: this
}, res => { }, res => {
@@ -589,17 +587,17 @@ export default {
}, },
getAttrByPage () { getAttrByPage () {
this.$http.get('lawss/sarStandAttrDetails/page', { this.$http.get('lawss/sarStandAttrDetails/page', {
page: this.pageNo, page: this.pageNo,
pageSize: this.pageSize, pageSize: this.pageSize,
sarType: this.sarType sarType: this.sarType
}, { }, {
_this: this, _this: this,
loading: 'attributeDataLoading' loading: 'attributeDataLoading'
}, },
res => { res => {
this.attributeList = res.data.list this.attributeList = res.data.list
this.total = res.data.count this.total = res.data.count
}, e => {}) }, e => {})
this.$refs.selections.clearSelection() this.$refs.selections.clearSelection()
}, },
async showAddModel () { async showAddModel () {
@@ -609,7 +607,6 @@ export default {
this.addOrEdit = 'add' this.addOrEdit = 'add'
this.attributeTitle = '新增' this.attributeTitle = '新增'
this.showInfoModal = true this.showInfoModal = true
this.attributeEO = {}
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['attributeEO'].resetFields() this.$refs['attributeEO'].resetFields()
}) })
@@ -660,7 +657,7 @@ export default {
this.$confirm('确认删除选中数据?', { this.$confirm('确认删除选中数据?', {
title: '提示', title: '提示',
confirmButtonClass: 'common-button-primary', confirmButtonClass: 'common-button-primary',
roundButton: false, roundButton: true,
callback: (action, instance) => { callback: (action, instance) => {
if (action === 'confirm') { if (action === 'confirm') {
this.$http.put('lawss/sarStandAttrDetails/deleteByIds', { this.$http.put('lawss/sarStandAttrDetails/deleteByIds', {
@@ -679,13 +676,13 @@ export default {
}, },
getDictionarySelList () { getDictionarySelList () {
this.$http.get('sys/dictionary/getDictionaryCodeSelList', { this.$http.get('sys/dictionary/getDictionaryCodeSelList', {
sarType: this.sarType sarType: this.sarType
}, { }, {
_this: this _this: this
}, },
res => { res => {
this.relateDicIdOptions = res.data this.relateDicIdOptions = res.data
}, e => {}) }, e => {})
}, },
getAttrTypeText (type) { getAttrTypeText (type) {
let texts = '' let texts = ''
@@ -725,7 +722,9 @@ export default {
this.addOrEdit = 'edit' this.addOrEdit = 'edit'
this.attributeTitle = '编辑' this.attributeTitle = '编辑'
this.showInfoModal = true this.showInfoModal = true
this.attributeEO = JSON.parse(JSON.stringify(params)) this.$nextTick(() => {
this.attributeEO = JSON.parse(JSON.stringify(params))
})
}, },
handleTableDelete (params) { handleTableDelete (params) {
this.selectedList = [] this.selectedList = []