Compare commits
No commits in common. "e3f954f27572369454d9c9480bc68b55882df345" and "f3ffd8a9b9009ca1fa0c31bd8db7f3e05116d5b2" have entirely different histories.
e3f954f275
...
f3ffd8a9b9
|
|
@ -70,6 +70,9 @@
|
||||||
|
|
||||||
<!-- 添加或修改参数配置对话框 -->
|
<!-- 添加或修改参数配置对话框 -->
|
||||||
<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-tab-pane label="" name="baseSetting" style="height: 400px;">
|
||||||
<el-form ref="baseForm" :model="baseForm" :rules="baseFormRules" label-width="150px">
|
<el-form ref="baseForm" :model="baseForm" :rules="baseFormRules" label-width="150px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
|
|
@ -96,6 +99,8 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</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>
|
||||||
|
|
|
||||||
|
|
@ -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" label="定值单编号" />
|
<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" 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" 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" 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" 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" 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" 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" 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" 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" label="说明" />
|
<el-table-column align="center" prop="description" :show-overflow-tooltip="true" width="120" 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,39 +80,43 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改参数配置对话框 -->
|
<!-- 添加或修改参数配置对话框 -->
|
||||||
<el-dialog title="上传定值单" :visible.sync="open" width="450px" append-to-body>
|
<el-dialog :title="title+''" :visible.sync="open" width="700px" append-to-body>
|
||||||
<div style="width: 100%;display: flex;align-items: center;">
|
<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-upload
|
<el-upload
|
||||||
:http-request="(obj) => imgUpLoad(obj, 'fileUrl')"
|
:http-request="
|
||||||
|
(obj) => imgUpLoad(obj, 'fileUrl')
|
||||||
|
"
|
||||||
action="#"
|
action="#"
|
||||||
style="width: 100%;"
|
:limit="10"
|
||||||
:limit="6"
|
|
||||||
:file-list="fileList"
|
:file-list="fileList"
|
||||||
:show-file-list="true"
|
:show-file-list="true"
|
||||||
|
list-type="picture-card"
|
||||||
accept=".png, .jpg, .jpeg"
|
accept=".png, .jpg, .jpeg"
|
||||||
:on-success="handleAvatarSuccess"
|
:on-success="handleAvatarSuccess"
|
||||||
:before-upload="handleBeforeUpload"
|
:before-upload="handleBeforeUpload"
|
||||||
:class="{ disabled:uploadDisabled }"
|
:class="{ disabled:uploadDisabled }"
|
||||||
:on-preview="handlePictureCardPreview"
|
:on-preview="handlePictureCardPreview"
|
||||||
:on-remove="handleRemove"
|
:on-remove="handleRemove"
|
||||||
drag
|
|
||||||
>
|
>
|
||||||
<i class="el-icon-upload"></i>
|
<i class="el-icon-plus avatar-uploader-icon"></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-upload>
|
||||||
</div>
|
</el-form-item>
|
||||||
|
</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">
|
||||||
<!-- 基础设置 -->
|
<!-- 基础设置 -->
|
||||||
|
|
@ -201,21 +205,6 @@
|
||||||
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(){
|
||||||
|
|
@ -264,28 +253,28 @@
|
||||||
// 表单重置
|
// 表单重置
|
||||||
reset() {
|
reset() {
|
||||||
this.baseForm = {
|
this.baseForm = {
|
||||||
protectionId:"",
|
substationName:"",
|
||||||
|
runTime:""
|
||||||
};
|
};
|
||||||
|
this.resetForm("baseForm");
|
||||||
},
|
},
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
this.reset();
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.fileList=[]
|
this.title = "新增";
|
||||||
this.checkUrlList=[]
|
console.log("this.baseForm",this.baseForm);
|
||||||
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=[]
|
this.fileList=[{url:this.baseForm.imgUrl}]
|
||||||
this.checkUrlList=[]
|
this.checkUrlList=[this.baseForm.imgUrl]
|
||||||
this.checkUrlNameList=[]
|
this.checkUrlNameList=[this.baseForm.imgName]
|
||||||
// this.fileList=[{url:this.baseForm.imgUrl}]
|
// this.$set(this,"metadata",row.deviceMetadata)
|
||||||
// this.checkUrlList=[this.baseForm.imgUrl]
|
this.title = "修改";
|
||||||
// this.checkUrlNameList=[this.baseForm.imgName]
|
|
||||||
},
|
},
|
||||||
handleView(row) {
|
handleView(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
|
|
@ -305,13 +294,7 @@
|
||||||
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);
|
||||||
let params = {
|
editProdectionApi({checkUrlList:this.checkUrlList,checkUrlNameList:this.checkUrlNameList,protectionId:this.baseForm.protectionId,type:'0'}).then(response => {
|
||||||
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;
|
||||||
|
|
@ -356,19 +339,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)
|
||||||
})
|
})
|
||||||
|
|
@ -378,9 +361,9 @@
|
||||||
},
|
},
|
||||||
// 上传之前
|
// 上传之前
|
||||||
handleBeforeUpload(file) {
|
handleBeforeUpload(file) {
|
||||||
const isLt = file.size / 1024 / 1024 < 10
|
const isLt = file.size / 1024 / 1024 < 5
|
||||||
if (!isLt) {
|
if (!isLt) {
|
||||||
this.$modal.msgError(`图片大小不能超过 10 MB`)
|
this.$modal.msgError(`图片大小不能超过 5 MB`)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -399,7 +382,8 @@
|
||||||
handlePictureCardPreview(file) {
|
handlePictureCardPreview(file) {
|
||||||
this.dialogImageUrl = file.url
|
this.dialogImageUrl = file.url
|
||||||
this.dialogVisible = true
|
this.dialogVisible = true
|
||||||
}
|
},
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
|
|
@ -81,6 +81,9 @@
|
||||||
|
|
||||||
<!-- 添加或修改参数配置对话框 -->
|
<!-- 添加或修改参数配置对话框 -->
|
||||||
<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-tab-pane label="" name="baseSetting" style="height: 400px;">
|
||||||
<el-form ref="baseForm" :model="baseForm" :rules="baseFormRules" label-width="150px">
|
<el-form ref="baseForm" :model="baseForm" :rules="baseFormRules" label-width="150px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
|
|
@ -107,14 +110,17 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</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-tab-pane label="" name="baseSetting" style="height: 400px;">
|
||||||
<el-form label-width="150px">
|
<el-form label-width="150px">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24">
|
<el-col :span="24">
|
||||||
|
|
@ -128,6 +134,8 @@
|
||||||
<el-col :span="24"></el-col>
|
<el-col :span="24"></el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue