Merge branch 'bjxz-dev' of http://139.9.66.234:18023/dhp/zhgdyun into bjxz-dev
This commit is contained in:
commit
b3597a9440
@ -1,5 +1,5 @@
|
|||||||
//-------项目配置标识-------
|
//-------项目配置标识-------
|
||||||
var COMPANY = ""; //通用
|
// var COMPANY = ""; //通用
|
||||||
// var COMPANY='zhongjian'; //中建,和沃尔对接的插件版用这个企业
|
// var COMPANY='zhongjian'; //中建,和沃尔对接的插件版用这个企业
|
||||||
// var COMPANY='hezhan'; //合展-宿迁
|
// var COMPANY='hezhan'; //合展-宿迁
|
||||||
// var COMPANY='nanchang'; //南昌地铁、衢州
|
// var COMPANY='nanchang'; //南昌地铁、衢州
|
||||||
@ -21,7 +21,7 @@ var COMPANY = ""; //通用
|
|||||||
// COMPANY = "agjt"; //鞍钢集团
|
// COMPANY = "agjt"; //鞍钢集团
|
||||||
// COMPANY = 'zkax' //中科安信
|
// COMPANY = 'zkax' //中科安信
|
||||||
// COMPANY = 'hfqc' //乌丹站舍(合肥启程)
|
// COMPANY = 'hfqc' //乌丹站舍(合肥启程)
|
||||||
// COMPANY = 'mulei' //木垒
|
COMPANY = 'mulei' //木垒
|
||||||
|
|
||||||
var PROJECT = {
|
var PROJECT = {
|
||||||
local_test: "common", // 普通版
|
local_test: "common", // 普通版
|
||||||
|
|||||||
@ -219,3 +219,9 @@ export const getStatsByEnterpriseApi= data => post('/xmgl/qualityInspectionRecor
|
|||||||
export const getRiskChartApi = data => post('/xmgl/qualityInspectionRecord/riskChart', data); // 风险走势图
|
export const getRiskChartApi = data => post('/xmgl/qualityInspectionRecord/riskChart', data); // 风险走势图
|
||||||
export const getCountDangerLevelApi = data => post('/xmgl/qualityInspectionRecord/countDangerLevel', data); // 隐患数量展示
|
export const getCountDangerLevelApi = data => post('/xmgl/qualityInspectionRecord/countDangerLevel', data); // 隐患数量展示
|
||||||
export const getcountQualityInspectionRecordRegionApi = data => post('/xmgl/qualityInspectionRecord/countQualityInspectionRecordRegion', data); // 责任区域数据统计
|
export const getcountQualityInspectionRecordRegionApi = data => post('/xmgl/qualityInspectionRecord/countQualityInspectionRecordRegion', data); // 责任区域数据统计
|
||||||
|
|
||||||
|
// 质量文件管理
|
||||||
|
export const getQualityFileListApi = data => post('/xmgl/qualityFile/page', data);
|
||||||
|
export const addQualityFileApi = data => post('/xmgl/qualityFile/add', data);
|
||||||
|
export const updateQualityFileApi = data => post('/xmgl/qualityFile/edit', data);
|
||||||
|
export const deleteQualityFileApi = data => post('/xmgl/qualityFile/delete', data);
|
||||||
@ -180,12 +180,12 @@ if (process.env.NODE_ENV == "development") {
|
|||||||
// axios.defaults.baseURL = 'http://192.168.34.221:28890/' //郭圣雄本地
|
// axios.defaults.baseURL = 'http://192.168.34.221:28890/' //郭圣雄本地
|
||||||
// axios.defaults.baseURL = "http://192.168.34.221:9111/"; //郭圣雄本地
|
// axios.defaults.baseURL = "http://192.168.34.221:9111/"; //郭圣雄本地
|
||||||
// axios.defaults.baseURL = "http://192.168.34.221:19112/"; //郭圣雄本地
|
// axios.defaults.baseURL = "http://192.168.34.221:19112/"; //郭圣雄本地
|
||||||
// axios.defaults.baseURL = 'http://192.168.34.155:19111/' //彭洁本地
|
axios.defaults.baseURL = 'http://192.168.34.155:19111/' //彭洁本地
|
||||||
// axios.defaults.baseURL = 'http://182.90.224.237:51234/' //郭圣雄远程
|
// axios.defaults.baseURL = 'http://182.90.224.237:51234/' //郭圣雄远程
|
||||||
// axios.defaults.baseURL = 'http://jxj.zhgdyun.com:61212/' //彭洁远程
|
// axios.defaults.baseURL = 'http://jxj.zhgdyun.com:61212/' //彭洁远程
|
||||||
// axios.defaults.baseURL ='http://101.43.164.214:45020/' //沈阳和盈
|
// axios.defaults.baseURL ='http://101.43.164.214:45020/' //沈阳和盈
|
||||||
// axios.defaults.baseURL ='http://183.249.224.118:9000/' //嘉兴王江泾公用码头
|
// axios.defaults.baseURL ='http://183.249.224.118:9000/' //嘉兴王江泾公用码头
|
||||||
axios.defaults.baseURL = 'http://101.43.164.214:11111/' // 百色三标段项目
|
// axios.defaults.baseURL = 'http://101.43.164.214:11111/' // 百色三标段项目
|
||||||
// axios.defaults.baseURL = 'http://125.88.207.86:8088/'//中建四局线上(最新)地址
|
// axios.defaults.baseURL = 'http://125.88.207.86:8088/'//中建四局线上(最新)地址
|
||||||
// axios.defaults.baseURL = 'http://125.88.207.86:8099/'//中建四局(沙湖)线上(最新)地址
|
// axios.defaults.baseURL = 'http://125.88.207.86:8099/'//中建四局(沙湖)线上(最新)地址
|
||||||
// axios.defaults.baseURL = 'http://jxj.zhgdyun.com:15551/'//测试地址
|
// axios.defaults.baseURL = 'http://jxj.zhgdyun.com:15551/'//测试地址
|
||||||
|
|||||||
@ -394,15 +394,15 @@ function getPubKey(callback) {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// 监听滚动条
|
// 监听滚动条 - 滚动摄像头列表会照成抖动(去除
|
||||||
window.addEventListener('scroll', () => {
|
// window.addEventListener('scroll', () => {
|
||||||
// console.log('滚动条')
|
// // console.log('滚动条')
|
||||||
if(oWebControl != null){
|
// if(oWebControl != null){
|
||||||
width = document.getElementById('videoOverview').offsetWidth-20
|
// width = document.getElementById('videoOverview').offsetWidth-20
|
||||||
height = document.getElementById('videoOverview').offsetHeight-18
|
// height = document.getElementById('videoOverview').offsetHeight-18
|
||||||
oWebControl.JS_Resize(width, height );
|
// oWebControl.JS_Resize(width, height );
|
||||||
}
|
// }
|
||||||
},true);
|
// },true);
|
||||||
// 监听窗口
|
// 监听窗口
|
||||||
// window.addEventListener('resize', () => {
|
// window.addEventListener('resize', () => {
|
||||||
// console.log('窗口')
|
// console.log('窗口')
|
||||||
|
|||||||
@ -380,15 +380,15 @@ function getPubKey(callback) {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// 监听滚动条
|
// 监听滚动条 - 滚动摄像头列表会照成抖动(去除
|
||||||
window.addEventListener('scroll', () => {
|
// window.addEventListener('scroll', () => {
|
||||||
// console.log('滚动条')
|
// // console.log('滚动条')
|
||||||
if(oWebControl != null){
|
// if(oWebControl != null){
|
||||||
width = document.getElementById('videoOverview').offsetWidth-20
|
// width = document.getElementById('videoOverview').offsetWidth-20
|
||||||
height = document.getElementById('videoOverview').offsetHeight-18
|
// height = document.getElementById('videoOverview').offsetHeight-18
|
||||||
oWebControl.JS_Resize(width, height );
|
// oWebControl.JS_Resize(width, height );
|
||||||
}
|
// }
|
||||||
},true);
|
// },true);
|
||||||
// 监听窗口
|
// 监听窗口
|
||||||
// window.addEventListener('resize', () => {
|
// window.addEventListener('resize', () => {
|
||||||
// console.log('窗口')
|
// console.log('窗口')
|
||||||
|
|||||||
@ -116,13 +116,13 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// 监听滚动条scroll事件,使插件窗口跟随浏览器滚动而移动
|
// 监听滚动条scroll事件,使插件窗口跟随浏览器滚动而移动 - 滚动摄像头列表会照成抖动(去除
|
||||||
$(window).scroll(() => {
|
// $(window).scroll(() => {
|
||||||
if (this.oWebControl != null) {
|
// if (this.oWebControl != null) {
|
||||||
this.oWebControl.JS_Resize(this.width, this.height);
|
// this.oWebControl.JS_Resize(this.width, this.height);
|
||||||
this.setWndCover();
|
// this.setWndCover();
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
this.closeWindow();//关闭插件
|
this.closeWindow();//关闭插件
|
||||||
|
|||||||
@ -1538,6 +1538,14 @@ const routes2 = [{
|
|||||||
"@/views/projectFront/quality/subdivisionalWorks.vue",
|
"@/views/projectFront/quality/subdivisionalWorks.vue",
|
||||||
], resolve),
|
], resolve),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "/project/quality/qualityFile", //质量管理 -- 分布分项工程
|
||||||
|
name: "质量管理_质量文件管理",
|
||||||
|
component: (resolve) =>
|
||||||
|
require([
|
||||||
|
"@/views/projectFront/quality/qualityFile.vue",
|
||||||
|
], resolve),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: "/project/quality/rectificationRanking", //质量管理 -- 整改排名
|
path: "/project/quality/rectificationRanking", //质量管理 -- 整改排名
|
||||||
name: "质量管理_整改排名1",
|
name: "质量管理_整改排名1",
|
||||||
|
|||||||
@ -56,13 +56,13 @@ export default new Vuex.Store({
|
|||||||
// FILEURL: 'http://1.13.185.209:9820/image/', // 中科佳成
|
// FILEURL: 'http://1.13.185.209:9820/image/', // 中科佳成
|
||||||
// UPLOADURL: 'http://8.136.222.164:8808/upload/image/', // 中科安信
|
// UPLOADURL: 'http://8.136.222.164:8808/upload/image/', // 中科安信
|
||||||
// FILEURL: 'http://8.136.222.164:8808/image/', // 中科安信
|
// FILEURL: 'http://8.136.222.164:8808/image/', // 中科安信
|
||||||
UPLOADURL: 'http://101.43.164.214:11111/upload/image/', // 百色
|
// UPLOADURL: 'http://101.43.164.214:11111/upload/image/', // 百色
|
||||||
FILEURL: 'http://101.43.164.214:11111/image/', // 百色
|
// FILEURL: 'http://101.43.164.214:11111/image/', // 百色
|
||||||
WORKFLOWURL: "http://101.43.164.214:11129/#/workspace/forms", // 百色
|
WORKFLOWURL: "http://101.43.164.214:11129/#/workspace/forms", // 百色
|
||||||
// UPLOADURL:'http://182.90.224.237:51234/upload/image/',
|
// UPLOADURL:'http://182.90.224.237:51234/upload/image/',
|
||||||
// FILEURL:'http://182.90.224.237:51234/image/',
|
// FILEURL:'http://182.90.224.237:51234/image/',
|
||||||
// UPLOADURL: "http://http://192.168.34.155:19111/upload/image/", // 洁本地
|
UPLOADURL: "http://http://192.168.34.155:19111/upload/image/", // 洁本地
|
||||||
// FILEURL: "http://http://192.168.34.155:19111/image/", //洁本地
|
FILEURL: "http://http://192.168.34.155:19111/image/", //洁本地
|
||||||
// UPLOADURL: 'http://192.168.34.221:9111/upload/image/', // 郭圣雄本地
|
// UPLOADURL: 'http://192.168.34.221:9111/upload/image/', // 郭圣雄本地
|
||||||
// FILEURL: 'http://192.168.34.221:9111/image/', //郭圣雄本地
|
// FILEURL: 'http://192.168.34.221:9111/image/', //郭圣雄本地
|
||||||
// WORKFLOWURL: "http://192.168.34.216:88/#/workspace/forms", //jiayu工作流地址(本地)
|
// WORKFLOWURL: "http://192.168.34.216:88/#/workspace/forms", //jiayu工作流地址(本地)
|
||||||
@ -72,8 +72,8 @@ export default new Vuex.Store({
|
|||||||
CONTRACTORURL2: process.env.NODE_ENV == "development" ? "http://192.168.34.175:88/#/workspace/contractorApply" : `${window.location.protocol}//${window.location.host}/contractorApply/index.html#/workspace/contractorApply`, //罗峰承包商入场地址(本地)
|
CONTRACTORURL2: process.env.NODE_ENV == "development" ? "http://192.168.34.175:88/#/workspace/contractorApply" : `${window.location.protocol}//${window.location.host}/contractorApply/index.html#/workspace/contractorApply`, //罗峰承包商入场地址(本地)
|
||||||
// UPLOADURL:'http://182.90.224.237:51234/upload/image/',// 郭圣雄远程
|
// UPLOADURL:'http://182.90.224.237:51234/upload/image/',// 郭圣雄远程
|
||||||
// FILEURL:'http://182.90.224.237:51234/image/',//郭圣雄远程
|
// FILEURL:'http://182.90.224.237:51234/image/',//郭圣雄远程
|
||||||
UPLOADURL: 'http://42.180.188.17:11211/upload/image', //测试
|
// UPLOADURL: 'http://42.180.188.17:11211/upload/image', //测试
|
||||||
FILEURL: 'http://42.180.188.17:11211/image/', //测试
|
// FILEURL: 'http://42.180.188.17:11211/image/', //测试
|
||||||
// BASEURL: baseUrl ?
|
// BASEURL: baseUrl ?
|
||||||
// baseUrl : window.location.protocol + "//" + window.location.host + "/", //正式环境
|
// baseUrl : window.location.protocol + "//" + window.location.host + "/", //正式环境
|
||||||
// UPLOADURL: window.location.protocol + "//" + window.location.host + "/upload/image", //正式环境
|
// UPLOADURL: window.location.protocol + "//" + window.location.host + "/upload/image", //正式环境
|
||||||
|
|||||||
@ -1,6 +1,31 @@
|
|||||||
import resetForm from './resetForm';
|
import resetForm from './resetForm';
|
||||||
import nowDate from './nowDate';
|
import nowDate from './nowDate';
|
||||||
|
|
||||||
|
// 下载
|
||||||
|
export function download(url, fileName) {
|
||||||
|
const x = new XMLHttpRequest()
|
||||||
|
x.open('GET', url, true)
|
||||||
|
x.responseType = 'blob'
|
||||||
|
x.onload = () => {
|
||||||
|
const url = window.URL.createObjectURL(x.response)
|
||||||
|
createAndRemove(url, fileName)
|
||||||
|
}
|
||||||
|
x.send()
|
||||||
|
}
|
||||||
|
function createAndRemove(url, fileName) {
|
||||||
|
// 创建隐藏的可下载链接
|
||||||
|
var eleLink = document.createElement('a')
|
||||||
|
eleLink.download = fileName
|
||||||
|
eleLink.style.display = 'none'
|
||||||
|
// 下载内容转变成blob地址
|
||||||
|
eleLink.href = url
|
||||||
|
// 触发点击
|
||||||
|
document.body.appendChild(eleLink)
|
||||||
|
eleLink.click()
|
||||||
|
// 然后移除
|
||||||
|
document.body.removeChild(eleLink)
|
||||||
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
resetForm, nowDate
|
resetForm, nowDate
|
||||||
}
|
}
|
||||||
@ -595,7 +595,7 @@ export default {
|
|||||||
getUserByUidApi(data).then((res) => {
|
getUserByUidApi(data).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
//赋值
|
//赋值
|
||||||
this.parseLoginData(res.result);
|
this.parseLoginData(res.result, true);
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(res.message);
|
this.$message.error(res.message);
|
||||||
}
|
}
|
||||||
|
|||||||
267
src/views/projectFront/quality/qualityFile.vue
Normal file
267
src/views/projectFront/quality/qualityFile.vue
Normal file
@ -0,0 +1,267 @@
|
|||||||
|
<template>
|
||||||
|
<div class="fullHeight">
|
||||||
|
<div class="searchBox whiteBlock">
|
||||||
|
<el-button type="warning" size="medium" plain @click="refresh">{{ $t('message.deviceManage.refresh') }}</el-button>
|
||||||
|
<el-button type="primary" size="medium" @click="add">{{ $t('message.deviceManage.add') }}</el-button>
|
||||||
|
</div>
|
||||||
|
<div class="table_wrap whiteBlock">
|
||||||
|
<el-table class="tables" :data="dataList" height="800">
|
||||||
|
<el-table-column prop="name" align="center" label="文件名称"></el-table-column>
|
||||||
|
<el-table-column prop="typeName" align="center" label="文件类型"></el-table-column>
|
||||||
|
<el-table-column prop="fileUrl" label="文件" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-link type="primary" @click="handleDownload(scope.row)">
|
||||||
|
{{ scope.row.fileUrl }}
|
||||||
|
</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :label="$t('message.deviceManage.operation')" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div class="tableBtns">
|
||||||
|
<div @click="edit(scope.row)" class="operationText">
|
||||||
|
<img src="@/assets/images/icon-edit.png" width="15px" height="15px" />
|
||||||
|
<span>{{ $t('message.deviceManage.edit') }}</span>
|
||||||
|
</div>
|
||||||
|
<div @click="deleteDev(scope.row)" class="operationText">
|
||||||
|
<img src="@/assets/images/icon-delete.png" width="15px" height="15px" />
|
||||||
|
<span>{{ $t('message.deviceManage.delete') }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNo"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
layout="total, prev, pager, next, jumper"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<el-dialog
|
||||||
|
:modal-append-to-body="false"
|
||||||
|
@close="close"
|
||||||
|
:title="Popup.type === 'add' ? '新增文件' : '编辑文件'"
|
||||||
|
:visible.sync="Popup.show"
|
||||||
|
width="667px"
|
||||||
|
>
|
||||||
|
<div class="dialog_content">
|
||||||
|
<el-form
|
||||||
|
v-if="Popup.type === 'add' || Popup.type === 'edit'"
|
||||||
|
size="medium"
|
||||||
|
ref="addEditForm"
|
||||||
|
:model="addEditForm"
|
||||||
|
:rules="addEditRules"
|
||||||
|
label-width="140px"
|
||||||
|
class="dialogFormBox"
|
||||||
|
>
|
||||||
|
<el-form-item label="文件名称" prop="name">
|
||||||
|
<el-input v-model="addEditForm.name" :placeholder="$t('message.deviceManage.placeholder')"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="文件类型" prop="type">
|
||||||
|
<el-select v-model="addEditForm.type" placeholder="请选择">
|
||||||
|
<el-option v-for="item in dictionaryList" :key="item.data" :label="item.name" :value="item.data"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="文件" prop="fileUrl">
|
||||||
|
<el-upload
|
||||||
|
class="upload-demo"
|
||||||
|
name="files"
|
||||||
|
:action="$store.state.UPLOADURL"
|
||||||
|
:on-remove="handleRemove"
|
||||||
|
:multiple="false"
|
||||||
|
:on-exceed="handleExceed"
|
||||||
|
:on-success="handleSuccess"
|
||||||
|
:file-list="fileList"
|
||||||
|
:limit="1"
|
||||||
|
>
|
||||||
|
<el-button size="medium" type="primary">
|
||||||
|
{{ $t('message.docManage.dialog_upload_files.click_upload') }}
|
||||||
|
</el-button>
|
||||||
|
<!-- <div slot="tip" class="el-upload__tip">
|
||||||
|
{{ $t('message.docManage.dialog_upload_files.upload_msg') }}
|
||||||
|
</div> -->
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button class="cancleBtn" @click="close" icon="el-icon-circle-close" size="medium"
|
||||||
|
>{{ $t('message.deviceManage.cancel') }}
|
||||||
|
</el-button>
|
||||||
|
<el-button type="primary" icon="el-icon-circle-check" @click="submit" size="medium"
|
||||||
|
>{{ $t('message.deviceManage.save') }}
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import { getQualityFileListApi, addQualityFileApi, updateQualityFileApi, deleteQualityFileApi } from '@/assets/js/api/quality'
|
||||||
|
import { getDictionaryItemApi } from '@/assets/js/api/companyDiagram.js'
|
||||||
|
import { download } from '@/util'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
mounted() {
|
||||||
|
this.getDictionaryList()
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
headers() {
|
||||||
|
return { Authorization: this.$store.state.userInfo.token }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
props: {
|
||||||
|
multiple: true
|
||||||
|
},
|
||||||
|
total: 0,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNo: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
},
|
||||||
|
dictionaryList: [],
|
||||||
|
fileList: [], //上传文件
|
||||||
|
addEditRules: {
|
||||||
|
type: [{ required: true, message: '请选择文件类型', trigger: 'change' }],
|
||||||
|
fileUrl: [{ required: true, message: '请上传文件', trigger: 'change' }]
|
||||||
|
},
|
||||||
|
addEditForm: {},
|
||||||
|
dataList: [],
|
||||||
|
Popup: {
|
||||||
|
type: 'add',
|
||||||
|
show: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
//获取字典
|
||||||
|
getDictionaryList() {
|
||||||
|
getDictionaryItemApi({
|
||||||
|
dictionaryEncoding: 'quality_file_type'
|
||||||
|
}).then(res => {
|
||||||
|
if (res.result.length > 0) {
|
||||||
|
this.dictionaryList = res.result
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handle(type, show) {
|
||||||
|
//打开弹窗前的统一处理
|
||||||
|
this.Popup = {
|
||||||
|
type: type,
|
||||||
|
show: show
|
||||||
|
}
|
||||||
|
},
|
||||||
|
add() {
|
||||||
|
this.handle('add', true)
|
||||||
|
},
|
||||||
|
edit(obj) {
|
||||||
|
this.addEditForm = JSON.parse(JSON.stringify(obj))
|
||||||
|
this.fileList = [
|
||||||
|
{
|
||||||
|
name: obj.name,
|
||||||
|
url: obj.fileUrl
|
||||||
|
}
|
||||||
|
]
|
||||||
|
// this.$forceUpdate();
|
||||||
|
console.log('#编辑', obj)
|
||||||
|
this.handle('edit', true)
|
||||||
|
},
|
||||||
|
deleteDev(obj) {
|
||||||
|
console.log('删除', obj)
|
||||||
|
this.$confirm(this.$t('message.projectInfo.confirmTipText') + '?', this.$t('message.projectInfo.tip'), {
|
||||||
|
confirmButtonText: /* '确定', */ this.$t('message.energyManage.material.confirm'),
|
||||||
|
cancelButtonText: /* '取消', */ this.$t('message.energyManage.material.cancel'),
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
deleteQualityFileApi({ id: obj.id }).then(result => {
|
||||||
|
if (result.success) {
|
||||||
|
this.$message.success(result.message)
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
},
|
||||||
|
submit() {
|
||||||
|
let params = JSON.parse(JSON.stringify(this.addEditForm))
|
||||||
|
params.projectSn = this.$store.state.projectSn
|
||||||
|
this.$refs.addEditForm.validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
const api = this.Popup.type === 'add' ? addQualityFileApi : updateQualityFileApi
|
||||||
|
api(params).then(result => {
|
||||||
|
if (result.success) {
|
||||||
|
this.$message.success(result.message)
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.Popup.show = false
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 导入成功
|
||||||
|
handleSuccess(res) {
|
||||||
|
console.log('导入', res)
|
||||||
|
this.addEditForm.fileUrl = res.data[0].imageUrl
|
||||||
|
this.addEditForm.name = res.data[0].fileInfo.originalFilename
|
||||||
|
},
|
||||||
|
handleRemove(file, fileList) {
|
||||||
|
this.fileList = fileList
|
||||||
|
this.addEditForm.fileUrl = ''
|
||||||
|
},
|
||||||
|
handleExceed() {},
|
||||||
|
handleDownload(data) {
|
||||||
|
download(this.$store.state.FILEURL + data.fileUrl, data.name)
|
||||||
|
},
|
||||||
|
refresh() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
getList() {
|
||||||
|
getQualityFileListApi({
|
||||||
|
...this.queryParams,
|
||||||
|
projectSn: this.$store.state.projectSn
|
||||||
|
}).then(res => {
|
||||||
|
if (res.success) {
|
||||||
|
console.log('records', res.result)
|
||||||
|
this.dataList = res.result.records
|
||||||
|
this.total = res.result.total
|
||||||
|
console.log('run', this.dataList)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.Popup.show = false
|
||||||
|
this.addEditForm = {}
|
||||||
|
this.fileList = []
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.addEditForm.clearValidate()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="less" scoped>
|
||||||
|
.tables {
|
||||||
|
img {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tableBtns {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.yj-dialogFormBox {
|
||||||
|
width: 462px;
|
||||||
|
}
|
||||||
|
::v-deep .el-input__inner {
|
||||||
|
line-height: 1px !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Loading…
x
Reference in New Issue
Block a user