From d76f7e384251908c2fb20f0032491f08b5bdf0f4 Mon Sep 17 00:00:00 2001 From: 叶松 <2217086471@qq.com> Date: 星期一, 27 十一月 2023 16:47:40 +0800 Subject: [PATCH] 隐患地点修改为下拉框 --- web/src/views/SecureManage/NipCheck/NipTips.vue | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 50 insertions(+), 5 deletions(-) diff --git a/web/src/views/SecureManage/NipCheck/NipTips.vue b/web/src/views/SecureManage/NipCheck/NipTips.vue index e064a47..7753e63 100644 --- a/web/src/views/SecureManage/NipCheck/NipTips.vue +++ b/web/src/views/SecureManage/NipCheck/NipTips.vue @@ -74,7 +74,14 @@ </el-date-picker> </el-form-item> <el-form-item label="隐患地点:" prop="dangerLocation"> - <el-input v-model="ruleForm.dangerLocation" :size="size" clearable placeholder="请输入隐患地点" :disabled="disabled"></el-input> + <el-select v-model="ruleForm.dangerLocation" placeholder="请选择隐患地点" clearable :disabled="disabled"> + <el-option + v-for="item in positonOptions" + :key="item.dictId" + :label="item.dictName" + :value="item.dictId"> + </el-option> + </el-select> </el-form-item> <el-form-item label="隐患标题" prop="title"> <el-input v-model="ruleForm.title" :size="size" type="textarea" :rows="5" clearable placeholder="请输入隐患标题" :disabled="disabled"></el-input> @@ -114,7 +121,7 @@ <script> import { buttonPinia } from '../../../pinia/index'; import UploadImage from '../../../components/uploadImage.vue' -import { throttle, changeSize } from '../../../plugins/public'; // 导入节流、动态切换组件尺寸方法 +import { throttle, changeSize,downFiles } from '../../../plugins/public'; // 导入节流、动态切换组件尺寸方法 export default { components:{ UploadImage, @@ -129,6 +136,7 @@ disabled:false, loading: false, dataList: [], //举报隐患信息列表 + positonOptions:[],//隐患地点 imageList:[], asyncTitle: true, // 对话框title 新增:true 修改:false asyncVisible: false, // 添加 修改对话框 @@ -200,8 +208,23 @@ that.size = changeSize(); } that.searchButtonInfo(true); + that.searchPositionInfos() }, methods: { + //获取隐患地点 + searchPositionInfos(){ + let params = { + pageNum: 1, + pageSize: 100000000 + } + this.$api.Dictionary.searchDictionary(params).then(res=>{ + if(res.statusMsg === 'ok'){ + this.positonOptions = res.data.list.filter(item =>item.dictType === 'danger_region') + }else{ + this.$message.warning(res.statusMsg) + } + }) + }, // 查询按钮列表信息 searchButtonInfo(bol) { if(bol) { @@ -241,7 +264,7 @@ res.data.imgEntities.map(item=>{ this.imageList.push({ id: this.imageList.length + 1, - url:`https://pipe.thhy-tj.com/${item.imgPath}`, + url:`https://szpipe.thhy-tj.com/${item.imgPath}`, name:item.imgPath, nameImg:item.imgName }) @@ -251,8 +274,30 @@ } }) }, + // 转圈圈 + functionLoading() { + this.loadingView = this.$loading({ + lock: true, + text: '请稍后...', + spinner: 'el-icon-loading', + background: 'rgba(0, 0, 0, 0.7)' + }); + }, //导出excel - exportFiles(){}, + exportFiles(){ + let params = {} + params.startTime = this.search.time&&this.search.time[0] + params.endTime = this.search.time&&this.search.time[1] + delete params.time + this.functionLoading(); + this.$api.Safety.exportHiddenFiles(params).then(res => { + downFiles(res, '举报信息', 'xls') + this.loadingView.close() + }) + .catch(() => { + this.loadingView.close(); + }) + }, // 修改按钮信息 updateProp(row) { this.imageList = [] @@ -265,7 +310,7 @@ res.data.imgEntities.map(item=>{ this.imageList.push({ id: this.imageList.length + 1, - url:`https://pipe.thhy-tj.com/${item.imgPath}`, + url:`https://szpipe.thhy-tj.com/${item.imgPath}`, name:item.imgPath, nameImg:item.imgName }) -- Gitblit v1.9.3