页面修改

This commit is contained in:
zzyuan 2025-10-29 09:44:47 +08:00
parent 280e625a3b
commit 5de681fc79
3 changed files with 151 additions and 148 deletions

View File

@ -69,38 +69,33 @@
/> />
<!-- 添加或修改参数配置对话框 --> <!-- 添加或修改参数配置对话框 -->
<el-dialog :title="title+''" :visible.sync="open" width="700px" append-to-body> <el-dialog :title="title+''" :visible.sync="open" width="700px" append-to-body>
<el-tabs v-model="activeName" @tab-click="handleTabClick"> <el-form ref="baseForm" :model="baseForm" :rules="baseFormRules" label-width="150px">
<!-- 基础设置 --> <el-row>
<el-tab-pane label="" name="baseSetting" style="height: 400px;"> <el-col :span="24">
<el-form ref="baseForm" :model="baseForm" :rules="baseFormRules" label-width="150px"> <el-form-item label="保护定值单图片" prop="imgUrl">
<el-row> <el-upload
<el-col :span="24"> :http-request="
<el-form-item label="保护定值单图片" prop="imgUrl"> (obj) => imgUpLoad(obj, 'fileUrl')
<el-upload "
:http-request=" action="#"
(obj) => imgUpLoad(obj, 'fileUrl') :limit="1"
" :file-list="fileList"
action="#" :show-file-list="true"
:limit="1" list-type="picture-card"
:file-list="fileList" accept=".png, .jpg, .jpeg"
:show-file-list="true" :on-success="handleAvatarSuccess"
list-type="picture-card" :before-upload="handleBeforeUpload"
accept=".png, .jpg, .jpeg" :class="{ disabled:uploadDisabled }"
:on-success="handleAvatarSuccess" :on-preview="handlePictureCardPreview"
:before-upload="handleBeforeUpload" :on-remove="handleRemove"
:class="{ disabled:uploadDisabled }" >
:on-preview="handlePictureCardPreview" <i class="el-icon-plus avatar-uploader-icon"></i>
:on-remove="handleRemove" </el-upload>
> </el-form-item>
<i class="el-icon-plus avatar-uploader-icon"></i> </el-col>
</el-upload> </el-row>
</el-form-item> </el-form>
</el-col>
</el-row>
</el-form>
</el-tab-pane>
</el-tabs>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>

View File

@ -1,10 +1,10 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="" prop="keyWord"> <el-form-item label="关键字" prop="keyWord">
<el-input <el-input
v-model="queryParams.keyWord" v-model="queryParams.keyWord"
placeholder="请输入" placeholder="请输入定值单单号、定值单名称"
clearable maxlength="20" clearable maxlength="20"
style="width: 300px" style="width: 300px"
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
@ -38,16 +38,16 @@
</el-row> </el-row>
<el-table v-loading="loading" :data="tableListData" @selection-change="handleSelectionChange" height="800"> <el-table v-loading="loading" :data="tableListData" @selection-change="handleSelectionChange" height="800">
<el-table-column type="selection" align="center" width="55" /> <el-table-column type="selection" align="center" width="55" />
<el-table-column align="center" prop="protectionCode" :show-overflow-tooltip="true" width="120" label="定值单编号" /> <el-table-column align="center" prop="protectionCode" :show-overflow-tooltip="true" label="定值单编号" />
<el-table-column align="center" prop="protectionName" :show-overflow-tooltip="true" width="120" label="定值单名称" /> <el-table-column align="center" prop="protectionName" :show-overflow-tooltip="true" label="定值单名称" />
<el-table-column align="center" prop="protectionDate" :show-overflow-tooltip="true" width="120" label="定值单日期" /> <el-table-column align="center" prop="protectionDate" :show-overflow-tooltip="true" label="定值单日期" />
<el-table-column align="center" prop="deviceName" :show-overflow-tooltip="true" width="120" label="设备所属" /> <el-table-column align="center" prop="deviceName" :show-overflow-tooltip="true" label="设备所属" />
<el-table-column align="center" prop="oneDevice" :show-overflow-tooltip="true" width="150" label="一次设备名称" /> <el-table-column align="center" prop="oneDevice" :show-overflow-tooltip="true" label="一次设备名称" />
<el-table-column align="center" prop="protectionDevice" :show-overflow-tooltip="true" width="120" label="保护装置名称" /> <el-table-column align="center" prop="protectionDevice" :show-overflow-tooltip="true" label="保护装置名称" />
<el-table-column align="center" prop="protectionDeviceModel" :show-overflow-tooltip="true" width="120" label="保护装置型号" /> <el-table-column align="center" prop="protectionDeviceModel" :show-overflow-tooltip="true" label="保护装置型号" />
<el-table-column align="center" prop="protectionDeviceVersion" :show-overflow-tooltip="true" width="120" label="装置版本" /> <el-table-column align="center" prop="protectionDeviceVersion" :show-overflow-tooltip="true" label="装置版本" />
<el-table-column align="center" prop="remark" :show-overflow-tooltip="true" width="120" label="备注" /> <el-table-column align="center" prop="remark" :show-overflow-tooltip="true" label="备注" />
<el-table-column align="center" prop="description" :show-overflow-tooltip="true" width="120" label="说明" /> <el-table-column align="center" prop="description" :show-overflow-tooltip="true" label="说明" />
<el-table-column label="操作" align="center" width="250" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" width="250" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
@ -60,7 +60,7 @@
size="mini" size="mini"
type="text" type="text"
@click="handleUpdate(scope.row)" @click="handleUpdate(scope.row)"
>编辑</el-button> >重新识别</el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
@ -80,43 +80,39 @@
/> />
<!-- 添加或修改参数配置对话框 --> <!-- 添加或修改参数配置对话框 -->
<el-dialog :title="title+''" :visible.sync="open" width="700px" append-to-body> <el-dialog title="上传定值单" :visible.sync="open" width="450px" append-to-body>
<el-tabs v-model="activeName" @tab-click="handleTabClick"> <div style="width: 100%;display: flex;align-items: center;">
<!-- 基础设置 --> <el-upload
<el-tab-pane label="" name="baseSetting" style="height: 400px;"> :http-request="(obj) => imgUpLoad(obj, 'fileUrl')"
<el-form ref="baseForm" :model="baseForm" :rules="baseFormRules" label-width="150px"> action="#"
<el-row> style="width: 100%;"
<el-col :span="24"> :limit="6"
<el-form-item label="保护定值单图片" prop="imgUrl"> :file-list="fileList"
<el-upload :show-file-list="true"
:http-request=" accept=".png, .jpg, .jpeg"
(obj) => imgUpLoad(obj, 'fileUrl') :on-success="handleAvatarSuccess"
" :before-upload="handleBeforeUpload"
action="#" :class="{ disabled:uploadDisabled }"
:limit="1" :on-preview="handlePictureCardPreview"
:file-list="fileList" :on-remove="handleRemove"
:show-file-list="true" drag
list-type="picture-card" >
accept=".png, .jpg, .jpeg" <i class="el-icon-upload"></i>
:on-success="handleAvatarSuccess" <div class="el-upload__text"
:before-upload="handleBeforeUpload" >将文件拖到此处<em>点击上传</em></div
:class="{ disabled:uploadDisabled }" >
:on-preview="handlePictureCardPreview" <div class="el-upload__tip text-center" slot="tip">
:on-remove="handleRemove" <div>仅允许导入pngjpgjpeg图片格式文件</div>
> <div>单个文件大小不超过10M</div>
<i class="el-icon-plus avatar-uploader-icon"></i> </div>
</el-upload> </el-upload>
</el-form-item> </div>
</el-col>
</el-row>
</el-form>
</el-tab-pane>
</el-tabs>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- 识别解析结果 -->
<el-dialog :title="titleView+''" :visible.sync="openView" width="700px" append-to-body> <el-dialog :title="titleView+''" :visible.sync="openView" width="700px" append-to-body>
<el-tabs v-model="activeName" @tab-click="handleTabClick"> <el-tabs v-model="activeName" @tab-click="handleTabClick">
<!-- 基础设置 --> <!-- 基础设置 -->
@ -205,6 +201,21 @@
checkUrlNameList: [],// checkUrlNameList: [],//
dialogVisible:false,// dialogVisible:false,//
dialogImageUrl:"",// dialogImageUrl:"",//
//
upload: {
//
open: false,
//
title: '',
//
isUploading: false,
//
updateSupport: 0,
//
headers: { Authorization: 'Bearer ' + getToken() },
//
url: process.env.VUE_APP_BASE_API + '/system/user/importData',
},
}; };
}, },
mounted(){ mounted(){
@ -253,28 +264,28 @@
// //
reset() { reset() {
this.baseForm = { this.baseForm = {
substationName:"", protectionId:"",
runTime:"" };
};
this.resetForm("baseForm");
}, },
/** 新增按钮操作 */ /** 新增按钮操作 */
handleAdd() { handleAdd() {
this.reset(); this.reset();
this.open = true; this.open = true;
this.title = "新增"; this.fileList=[]
console.log("this.baseForm",this.baseForm); this.checkUrlList=[]
this.checkUrlNameList=[]
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
this.open = true; this.open = true;
this.baseForm = Object.assign({}, row) this.baseForm = Object.assign({}, row)
this.fileList=[{url:this.baseForm.imgUrl}] this.fileList=[]
this.checkUrlList=[this.baseForm.imgUrl] this.checkUrlList=[]
this.checkUrlNameList=[this.baseForm.imgName] this.checkUrlNameList=[]
// this.$set(this,"metadata",row.deviceMetadata) // this.fileList=[{url:this.baseForm.imgUrl}]
this.title = "修改"; // this.checkUrlList=[this.baseForm.imgUrl]
// this.checkUrlNameList=[this.baseForm.imgName]
}, },
handleView(row) { handleView(row) {
this.reset(); this.reset();
@ -294,7 +305,13 @@
console.log("this.checkUrlList",this.checkUrlList); console.log("this.checkUrlList",this.checkUrlList);
console.log("this.checkUrlNameList",this.checkUrlNameList); console.log("this.checkUrlNameList",this.checkUrlNameList);
console.log("this.baseForm",this.baseForm); console.log("this.baseForm",this.baseForm);
editProdectionApi({checkUrlList:this.checkUrlList,checkUrlNameList:this.checkUrlNameList,protectionId:this.baseForm.protectionId,type:'0'}).then(response => { let params = {
checkUrlList:this.checkUrlList,
checkUrlNameList:this.checkUrlNameList,
protectionId:this.baseForm.protectionId,
type:'0'
}
editProdectionApi(params).then(response => {
console.log("editProdectionApi",response); console.log("editProdectionApi",response);
this.getList(); this.getList();
this.open = false; this.open = false;
@ -339,19 +356,19 @@
if (res.code == 200) { if (res.code == 200) {
this.checkUrlList.push(res.data.url) this.checkUrlList.push(res.data.url)
this.checkUrlNameList.push(res.data.name) this.checkUrlNameList.push(res.data.name)
this.$set(this.baseForm,"imageUrl",res.data.url) // this.$set(this.baseForm,"imageUrl",res.data.url)
} else { } else {
this.fileList=[] this.fileList=[]
this.checkUrlList=[] this.checkUrlList=[]
this.checkUrlNameList=[] this.checkUrlNameList=[]
this.$set(this.baseForm,"imgUrl",'') // this.$set(this.baseForm,"imgUrl",'')
this.$modal.msgError(res.msg) this.$modal.msgError(res.msg)
} }
this.btnLoading=false; this.btnLoading=false;
}).catch((error) => { }).catch((error) => {
this.fileList=[] // this.fileList=[]
this.checkUrlList=[] // this.checkUrlList=[]
this.checkUrlNameList=[] // this.checkUrlNameList=[]
this.btnLoading=false; this.btnLoading=false;
this.$modal.msgError(error) this.$modal.msgError(error)
}) })
@ -361,9 +378,9 @@
}, },
// //
handleBeforeUpload(file) { handleBeforeUpload(file) {
const isLt = file.size / 1024 / 1024 < 5 const isLt = file.size / 1024 / 1024 < 10
if (!isLt) { if (!isLt) {
this.$modal.msgError(`图片大小不能超过 5 MB`) this.$modal.msgError(`图片大小不能超过 10 MB`)
return false return false
} }
}, },
@ -382,8 +399,7 @@
handlePictureCardPreview(file) { handlePictureCardPreview(file) {
this.dialogImageUrl = file.url this.dialogImageUrl = file.url
this.dialogVisible = true this.dialogVisible = true
}, }
} }
}; };
</script> </script>

View File

@ -81,61 +81,53 @@
<!-- 添加或修改参数配置对话框 --> <!-- 添加或修改参数配置对话框 -->
<el-dialog :title="title+''" :visible.sync="open" width="700px" append-to-body> <el-dialog :title="title+''" :visible.sync="open" width="700px" append-to-body>
<el-tabs v-model="activeName" @tab-click="handleTabClick"> <el-form ref="baseForm" :model="baseForm" :rules="baseFormRules" label-width="150px">
<!-- 基础设置 --> <el-row>
<el-tab-pane label="" name="baseSetting" style="height: 400px;"> <el-col :span="24">
<el-form ref="baseForm" :model="baseForm" :rules="baseFormRules" label-width="150px"> <el-form-item label="保护定值单图片" prop="imgUrl">
<el-row> <el-upload
<el-col :span="24"> :http-request="
<el-form-item label="保护定值单图片" prop="imgUrl"> (obj) => imgUpLoad(obj, 'fileUrl')
<el-upload "
:http-request=" action="#"
(obj) => imgUpLoad(obj, 'fileUrl') :limit="1"
" :file-list="fileList"
action="#" :show-file-list="true"
:limit="1" list-type="picture-card"
:file-list="fileList" accept=".png, .jpg, .jpeg"
:show-file-list="true" :on-success="handleAvatarSuccess"
list-type="picture-card" :before-upload="handleBeforeUpload"
accept=".png, .jpg, .jpeg" :class="{ disabled:uploadDisabled }"
:on-success="handleAvatarSuccess" :on-preview="handlePictureCardPreview"
:before-upload="handleBeforeUpload" :on-remove="handleRemove"
:class="{ disabled:uploadDisabled }" >
:on-preview="handlePictureCardPreview" <i class="el-icon-plus avatar-uploader-icon"></i>
:on-remove="handleRemove" </el-upload>
> </el-form-item>
<i class="el-icon-plus avatar-uploader-icon"></i> </el-col>
</el-upload> </el-row>
</el-form-item> </el-form>
</el-col>
</el-row>
</el-form>
</el-tab-pane>
</el-tabs>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-dialog :title="titleView+''" :visible.sync="openView" width="700px" append-to-body> <el-dialog :title="titleView+''" :visible.sync="openView" width="700px" append-to-body>
<el-tabs v-model="activeName" @tab-click="handleTabClick"> <el-form label-width="150px">
<!-- 基础设置 --> <el-row>
<el-tab-pane label="" name="baseSetting" style="height: 400px;"> <el-col :span="24">
<el-form label-width="150px"> 阜阳电网继电保护装置整定值通知书
<el-row> </el-col>
<el-col :span="24"> </el-row>
阜阳电网继电保护装置整定值通知书 <el-row>
</el-col> <el-col :span="24"></el-col>
</el-row> <el-col :span="24"></el-col>
<el-row> <el-col :span="24"></el-col>
<el-col :span="24"></el-col> <el-col :span="24"></el-col>
<el-col :span="24"></el-col> </el-row>
<el-col :span="24"></el-col> </el-form>
<el-col :span="24"></el-col>
</el-row>
</el-form>
</el-tab-pane>
</el-tabs>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>