页面修改
This commit is contained in:
parent
280e625a3b
commit
5de681fc79
|
|
@ -70,9 +70,6 @@
|
|||
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog :title="title+''" :visible.sync="open" width="700px" append-to-body>
|
||||
<el-tabs v-model="activeName" @tab-click="handleTabClick">
|
||||
<!-- 基础设置 -->
|
||||
<el-tab-pane label="" name="baseSetting" style="height: 400px;">
|
||||
<el-form ref="baseForm" :model="baseForm" :rules="baseFormRules" label-width="150px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
|
|
@ -99,8 +96,6 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<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
|
||||
v-model="queryParams.keyWord"
|
||||
placeholder="请输入"
|
||||
placeholder="请输入定值单单号、定值单名称"
|
||||
clearable maxlength="20"
|
||||
style="width: 300px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
|
|
@ -38,16 +38,16 @@
|
|||
</el-row>
|
||||
<el-table v-loading="loading" :data="tableListData" @selection-change="handleSelectionChange" height="800">
|
||||
<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="protectionName" :show-overflow-tooltip="true" width="120" label="定值单名称" />
|
||||
<el-table-column align="center" prop="protectionDate" :show-overflow-tooltip="true" width="120" label="定值单日期" />
|
||||
<el-table-column align="center" prop="deviceName" :show-overflow-tooltip="true" width="120" label="设备所属" />
|
||||
<el-table-column align="center" prop="oneDevice" :show-overflow-tooltip="true" width="150" label="一次设备名称" />
|
||||
<el-table-column align="center" prop="protectionDevice" :show-overflow-tooltip="true" width="120" label="保护装置名称" />
|
||||
<el-table-column align="center" prop="protectionDeviceModel" :show-overflow-tooltip="true" width="120" label="保护装置型号" />
|
||||
<el-table-column align="center" prop="protectionDeviceVersion" :show-overflow-tooltip="true" width="120" label="装置版本" />
|
||||
<el-table-column align="center" prop="remark" :show-overflow-tooltip="true" width="120" label="备注" />
|
||||
<el-table-column align="center" prop="description" :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" label="定值单名称" />
|
||||
<el-table-column align="center" prop="protectionDate" :show-overflow-tooltip="true" label="定值单日期" />
|
||||
<el-table-column align="center" prop="deviceName" :show-overflow-tooltip="true" label="设备所属" />
|
||||
<el-table-column align="center" prop="oneDevice" :show-overflow-tooltip="true" label="一次设备名称" />
|
||||
<el-table-column align="center" prop="protectionDevice" :show-overflow-tooltip="true" label="保护装置名称" />
|
||||
<el-table-column align="center" prop="protectionDeviceModel" :show-overflow-tooltip="true" label="保护装置型号" />
|
||||
<el-table-column align="center" prop="protectionDeviceVersion" :show-overflow-tooltip="true" label="装置版本" />
|
||||
<el-table-column align="center" prop="remark" :show-overflow-tooltip="true" 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">
|
||||
<template slot-scope="scope">
|
||||
|
|
@ -60,7 +60,7 @@
|
|||
size="mini"
|
||||
type="text"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>编辑</el-button>
|
||||
>重新识别</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
|
|
@ -80,43 +80,39 @@
|
|||
/>
|
||||
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog :title="title+''" :visible.sync="open" width="700px" append-to-body>
|
||||
<el-tabs v-model="activeName" @tab-click="handleTabClick">
|
||||
<!-- 基础设置 -->
|
||||
<el-tab-pane label="" name="baseSetting" style="height: 400px;">
|
||||
<el-form ref="baseForm" :model="baseForm" :rules="baseFormRules" label-width="150px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="保护定值单图片" prop="imgUrl">
|
||||
<el-dialog title="上传定值单" :visible.sync="open" width="450px" append-to-body>
|
||||
<div style="width: 100%;display: flex;align-items: center;">
|
||||
<el-upload
|
||||
:http-request="
|
||||
(obj) => imgUpLoad(obj, 'fileUrl')
|
||||
"
|
||||
:http-request="(obj) => imgUpLoad(obj, 'fileUrl')"
|
||||
action="#"
|
||||
:limit="1"
|
||||
style="width: 100%;"
|
||||
:limit="6"
|
||||
:file-list="fileList"
|
||||
:show-file-list="true"
|
||||
list-type="picture-card"
|
||||
accept=".png, .jpg, .jpeg"
|
||||
:on-success="handleAvatarSuccess"
|
||||
:before-upload="handleBeforeUpload"
|
||||
:class="{ disabled:uploadDisabled }"
|
||||
:on-preview="handlePictureCardPreview"
|
||||
:on-remove="handleRemove"
|
||||
drag
|
||||
>
|
||||
<i class="el-icon-plus avatar-uploader-icon"></i>
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text"
|
||||
>将文件拖到此处,或<em>点击上传</em></div
|
||||
>
|
||||
<div class="el-upload__tip text-center" slot="tip">
|
||||
<div>仅允许导入png、jpg、jpeg图片格式文件。</div>
|
||||
<div>单个文件大小不超过10M</div>
|
||||
</div>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 识别解析结果 -->
|
||||
<el-dialog :title="titleView+''" :visible.sync="openView" width="700px" append-to-body>
|
||||
<el-tabs v-model="activeName" @tab-click="handleTabClick">
|
||||
<!-- 基础设置 -->
|
||||
|
|
@ -205,6 +201,21 @@
|
|||
checkUrlNameList: [],//图片
|
||||
dialogVisible:false,//图片弹窗
|
||||
dialogImageUrl:"",//图片弹窗
|
||||
// 用户导入参数
|
||||
upload: {
|
||||
// 是否显示弹出层(用户导入)
|
||||
open: false,
|
||||
// 弹出层标题(用户导入)
|
||||
title: '',
|
||||
// 是否禁用上传
|
||||
isUploading: false,
|
||||
// 是否更新已经存在的用户数据
|
||||
updateSupport: 0,
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: 'Bearer ' + getToken() },
|
||||
// 上传的地址
|
||||
url: process.env.VUE_APP_BASE_API + '/system/user/importData',
|
||||
},
|
||||
};
|
||||
},
|
||||
mounted(){
|
||||
|
|
@ -253,28 +264,28 @@
|
|||
// 表单重置
|
||||
reset() {
|
||||
this.baseForm = {
|
||||
substationName:"",
|
||||
runTime:""
|
||||
protectionId:"",
|
||||
};
|
||||
this.resetForm("baseForm");
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "新增";
|
||||
console.log("this.baseForm",this.baseForm);
|
||||
this.fileList=[]
|
||||
this.checkUrlList=[]
|
||||
this.checkUrlNameList=[]
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.baseForm = Object.assign({}, row)
|
||||
this.fileList=[{url:this.baseForm.imgUrl}]
|
||||
this.checkUrlList=[this.baseForm.imgUrl]
|
||||
this.checkUrlNameList=[this.baseForm.imgName]
|
||||
// this.$set(this,"metadata",row.deviceMetadata)
|
||||
this.title = "修改";
|
||||
this.fileList=[]
|
||||
this.checkUrlList=[]
|
||||
this.checkUrlNameList=[]
|
||||
// this.fileList=[{url:this.baseForm.imgUrl}]
|
||||
// this.checkUrlList=[this.baseForm.imgUrl]
|
||||
// this.checkUrlNameList=[this.baseForm.imgName]
|
||||
},
|
||||
handleView(row) {
|
||||
this.reset();
|
||||
|
|
@ -294,7 +305,13 @@
|
|||
console.log("this.checkUrlList",this.checkUrlList);
|
||||
console.log("this.checkUrlNameList",this.checkUrlNameList);
|
||||
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);
|
||||
this.getList();
|
||||
this.open = false;
|
||||
|
|
@ -339,19 +356,19 @@
|
|||
if (res.code == 200) {
|
||||
this.checkUrlList.push(res.data.url)
|
||||
this.checkUrlNameList.push(res.data.name)
|
||||
this.$set(this.baseForm,"imageUrl",res.data.url)
|
||||
// this.$set(this.baseForm,"imageUrl",res.data.url)
|
||||
} else {
|
||||
this.fileList=[]
|
||||
this.checkUrlList=[]
|
||||
this.checkUrlNameList=[]
|
||||
this.$set(this.baseForm,"imgUrl",'')
|
||||
// this.$set(this.baseForm,"imgUrl",'')
|
||||
this.$modal.msgError(res.msg)
|
||||
}
|
||||
this.btnLoading=false;
|
||||
}).catch((error) => {
|
||||
this.fileList=[]
|
||||
this.checkUrlList=[]
|
||||
this.checkUrlNameList=[]
|
||||
// this.fileList=[]
|
||||
// this.checkUrlList=[]
|
||||
// this.checkUrlNameList=[]
|
||||
this.btnLoading=false;
|
||||
this.$modal.msgError(error)
|
||||
})
|
||||
|
|
@ -361,9 +378,9 @@
|
|||
},
|
||||
// 上传之前
|
||||
handleBeforeUpload(file) {
|
||||
const isLt = file.size / 1024 / 1024 < 5
|
||||
const isLt = file.size / 1024 / 1024 < 10
|
||||
if (!isLt) {
|
||||
this.$modal.msgError(`图片大小不能超过 5 MB`)
|
||||
this.$modal.msgError(`图片大小不能超过 10 MB`)
|
||||
return false
|
||||
}
|
||||
},
|
||||
|
|
@ -382,8 +399,7 @@
|
|||
handlePictureCardPreview(file) {
|
||||
this.dialogImageUrl = file.url
|
||||
this.dialogVisible = true
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -81,9 +81,6 @@
|
|||
|
||||
<!-- 添加或修改参数配置对话框 -->
|
||||
<el-dialog :title="title+''" :visible.sync="open" width="700px" append-to-body>
|
||||
<el-tabs v-model="activeName" @tab-click="handleTabClick">
|
||||
<!-- 基础设置 -->
|
||||
<el-tab-pane label="" name="baseSetting" style="height: 400px;">
|
||||
<el-form ref="baseForm" :model="baseForm" :rules="baseFormRules" label-width="150px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
|
|
@ -110,17 +107,14 @@
|
|||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<el-dialog :title="titleView+''" :visible.sync="openView" width="700px" append-to-body>
|
||||
<el-tabs v-model="activeName" @tab-click="handleTabClick">
|
||||
<!-- 基础设置 -->
|
||||
<el-tab-pane label="" name="baseSetting" style="height: 400px;">
|
||||
<el-form label-width="150px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
|
|
@ -134,8 +128,6 @@
|
|||
<el-col :span="24"></el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Reference in New Issue