修改禅道已知bug

This commit is contained in:
qq787203167
2022-07-01 11:24:27 +08:00
parent 44a2815ec9
commit 96da56370a
7 changed files with 419 additions and 368 deletions
+1
View File
@@ -1064,4 +1064,5 @@ module.exports = {
Templatenamelist: 'Template name - parameter item collection list',
newNiONumber: 'Number',
English: 'English',
requiredParametersEmpty:'Required parameters cannot be empty',
}
+1
View File
@@ -1068,4 +1068,5 @@ module.exports = {
Templatenamelist: '模板名称-参数项收集清单',
newNiONumber: 'NIO编号',
English:'英文',
requiredParametersEmpty:'必填参数不能为空',
}
+192 -170
View File
@@ -1,7 +1,7 @@
<template>
<div style="height: 100%">
<div class='box'>
<!-- 纯文本-->
<!-- 纯文本-->
<div v-if='detailDate.controlType === "1"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type==="text"'>
@@ -20,7 +20,7 @@
<a-input class="box-input inputWid"
:disabled="item.isLock == '1' ? true: false"
:placeholder="$t('pleaseEnter')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 中文-->
<div v-if="item.controlVerify == '2'">
@@ -28,7 +28,7 @@
:disabled="item.isLock == '1' ? true: false"
:placeholder="$t('pleaseEnter')+$t('chinese')"
onkeyup="value=value.replace(/[^\u4e00-\u9fa5]/g,'')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 正整数 -->
<div v-if="item.controlVerify == '3'">
@@ -37,7 +37,7 @@
:max="99999"
:precision="0"
:placeholder="$t('enterPositiveInteger')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 正浮点书 -->
<div v-if="item.controlVerify == '4'">
@@ -45,7 +45,7 @@
:disabled="item.isLock == '1' ? true: false"
onkeyup="value=value.replace(/^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$/g,'')"
:placeholder="$t('pleaseEnter')+$t('Positivefloatingpointnumber')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 整数或小数 -->
<div v-if="item.controlVerify == '5'">
@@ -53,7 +53,7 @@
:disabled="item.isLock == '1' ? true: false"
:max="99999"
:placeholder="$t('pleaseEnter')+$t('integerOrDecimal')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 一位小数 -->
<div v-if="item.controlVerify == '6'">
@@ -62,7 +62,7 @@
:max="99999"
:precision="1"
:placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 两位小数-->
<div v-if="item.controlVerify == '7'">
@@ -71,7 +71,7 @@
:max="99999"
:precision="2"
:placeholder="$t('pleaseEnter')+$t('TwoDecimalplaces')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 三位小数-->
<div v-if="item.controlVerify == '8'">
@@ -80,7 +80,7 @@
:max="99999"
:precision="3"
:placeholder="$t('pleaseEnter')+$t('Threedecimalplaces')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 四位小数-->
<div v-if="item.controlVerify == '9'">
@@ -89,16 +89,17 @@
:max="99999"
:precision="4"
:placeholder="$t('pleaseEnter')+$t('FourDecimalplaces')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
</div>
</div>
</div>
<!-- 纯下拉单选-->
<!-- 纯下拉单选-->
<div v-if='detailDate.controlType === "2"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type === "pull"'>
<a-select v-model="item.dataValue" class='selectWid' :disabled="item.isLock == '1' ? true: false" allowClear>
<a-select v-model="item.dataValue" class='selectWid' :disabled="item.isLock == '1' ? true: false"
allowClear>
<a-select-option v-for="(item, key) in item.controlValue" :key="key" :value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.label ">
{{ item.label }}
@@ -108,11 +109,12 @@
</div>
</div>
</div>
<!-- 纯下拉多选-->
<!-- 纯下拉多选-->
<div v-if='detailDate.controlType === "3"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' style='flex: 1' class='add-width'>
<div v-if='item.type==="pull_more"'>
<a-select v-model="item.dataValue" mode="multiple" class='selectWid' :disabled="item.isLock == '1' ? true: false" allowClear>
<a-select v-model="item.dataValue" mode="multiple" class='selectWid'
:disabled="item.isLock == '1' ? true: false" allowClear>
<a-select-option v-for="(item, key) in item.controlValue" :key="key" :value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.label ">
{{ item.label }}
@@ -122,7 +124,7 @@
</div>
</div>
</div>
<!-- 纯附件-->
<!-- 纯附件-->
<div v-if='detailDate.controlType === "4"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' style='flex: 1' class='add-width'>
<div v-if='item.type==="file"'>
@@ -134,11 +136,12 @@
</div>
</div>
</div>
<!-- 文本+下拉单选-->
<!-- 文本+下拉单选-->
<div v-if='detailDate.controlType === "5"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type==="pull"'>
<a-select v-model="item.dataValue" class='selectWid' :disabled="item.isLock == '1' ? true: false" allowClear>
<a-select v-model="item.dataValue" class='selectWid' :disabled="item.isLock == '1' ? true: false"
allowClear>
<a-select-option v-for="(itemin, key) in item.controlValue" :key="key" :value="itemin.value">
<span style="display: inline-block;width: 100%" :title=" itemin.label ">
{{ itemin.label }}
@@ -162,7 +165,7 @@
<a-input class="box-input inputWid"
:disabled="item.isLock == '1' ? true: false"
:placeholder="$t('pleaseEnter')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 中文-->
<div v-if="item.controlVerify == '2'">
@@ -170,7 +173,7 @@
:disabled="item.isLock == '1' ? true: false"
:placeholder="$t('pleaseEnter')+$t('chinese')"
onkeyup="value=value.replace(/[^\u4e00-\u9fa5]/g,'')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 正整数 -->
<div v-if="item.controlVerify == '3'">
@@ -179,7 +182,7 @@
:max="99999"
:precision="0"
:placeholder="$t('enterPositiveInteger')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 正浮点书 -->
<div v-if="item.controlVerify == '4'">
@@ -187,7 +190,7 @@
:disabled="item.isLock == '1' ? true: false"
onkeyup="value=value.replace(/^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$/g,'')"
:placeholder="$t('pleaseEnter')+$t('Positivefloatingpointnumber')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 整数或小数 -->
<div v-if="item.controlVerify == '5'">
@@ -195,7 +198,7 @@
:disabled="item.isLock == '1' ? true: false"
:max="99999"
:placeholder="$t('pleaseEnter')+$t('integerOrDecimal')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 一位小数 -->
<div v-if="item.controlVerify == '6'">
@@ -204,7 +207,7 @@
:max="99999"
:precision="1"
:placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 两位小数-->
<div v-if="item.controlVerify == '7'">
@@ -213,7 +216,7 @@
:max="99999"
:precision="2"
:placeholder="$t('pleaseEnter')+$t('TwoDecimalplaces')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 三位小数-->
<div v-if="item.controlVerify == '8'">
@@ -222,7 +225,7 @@
:max="99999"
:precision="3"
:placeholder="$t('pleaseEnter')+$t('Threedecimalplaces')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 四位小数-->
<div v-if="item.controlVerify == '9'">
@@ -231,12 +234,12 @@
:max="99999"
:precision="4"
:placeholder="$t('pleaseEnter')+$t('FourDecimalplaces')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
</div>
</div>
</div>
<!-- 文本+下拉多选-->
<!-- 文本+下拉多选-->
<div v-if='detailDate.controlType === "6"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type==="text"'>
@@ -255,7 +258,7 @@
<a-input class="box-input inputWid"
:disabled="item.isLock == '1' ? true: false"
:placeholder="$t('pleaseEnter')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 中文-->
<div v-if="item.controlVerify == '2'">
@@ -263,7 +266,7 @@
:disabled="item.isLock == '1' ? true: false"
:placeholder="$t('pleaseEnter')+$t('chinese')"
onkeyup="value=value.replace(/[^\u4e00-\u9fa5]/g,'')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 正整数 -->
<div v-if="item.controlVerify == '3'">
@@ -272,7 +275,7 @@
:max="99999"
:precision="0"
:placeholder="$t('enterPositiveInteger')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 正浮点书 -->
<div v-if="item.controlVerify == '4'">
@@ -280,7 +283,7 @@
:disabled="item.isLock == '1' ? true: false"
onkeyup="value=value.replace(/^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$/g,'')"
:placeholder="$t('pleaseEnter')+$t('Positivefloatingpointnumber')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 整数或小数 -->
<div v-if="item.controlVerify == '5'">
@@ -288,7 +291,7 @@
:disabled="item.isLock == '1' ? true: false"
:max="99999"
:placeholder="$t('pleaseEnter')+$t('integerOrDecimal')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 一位小数 -->
<div v-if="item.controlVerify == '6'">
@@ -297,7 +300,7 @@
:max="99999"
:precision="1"
:placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 两位小数-->
<div v-if="item.controlVerify == '7'">
@@ -306,7 +309,7 @@
:max="99999"
:precision="2"
:placeholder="$t('pleaseEnter')+$t('TwoDecimalplaces')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 三位小数-->
<div v-if="item.controlVerify == '8'">
@@ -315,7 +318,7 @@
:max="99999"
:precision="3"
:placeholder="$t('pleaseEnter')+$t('Threedecimalplaces')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 四位小数-->
<div v-if="item.controlVerify == '9'">
@@ -324,11 +327,12 @@
:max="99999"
:precision="4"
:placeholder="$t('pleaseEnter')+$t('FourDecimalplaces')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
</div>
<div v-if='item.type==="pull_more"'>
<a-select v-model="item.dataValue" mode="multiple" class='selectWid' :disabled="item.isLock == '1' ? true: false" allowClear>
<a-select v-model="item.dataValue" mode="multiple" class='selectWid'
:disabled="item.isLock == '1' ? true: false" allowClear>
<a-select-option v-for="(item, key) in item.controlValue" :key="key" :value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.label ">
{{ item.label }}
@@ -338,7 +342,7 @@
</div>
</div>
</div>
<!-- 文本+附件-->
<!-- 文本+附件-->
<div v-if='detailDate.controlType === "7"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type==="text"'>
@@ -357,7 +361,7 @@
<a-input class="box-input inputWid"
:disabled="item.isLock == '1' ? true: false"
:placeholder="$t('pleaseEnter')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 中文-->
<div v-if="item.controlVerify == '2'">
@@ -365,7 +369,7 @@
:disabled="item.isLock == '1' ? true: false"
:placeholder="$t('pleaseEnter')+$t('chinese')"
onkeyup="value=value.replace(/[^\u4e00-\u9fa5]/g,'')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 正整数 -->
<div v-if="item.controlVerify == '3'">
@@ -374,7 +378,7 @@
:max="99999"
:precision="0"
:placeholder="$t('enterPositiveInteger')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 正浮点书 -->
<div v-if="item.controlVerify == '4'">
@@ -382,7 +386,7 @@
:disabled="item.isLock == '1' ? true: false"
onkeyup="value=value.replace(/^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$/g,'')"
:placeholder="$t('pleaseEnter')+$t('Positivefloatingpointnumber')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 整数或小数 -->
<div v-if="item.controlVerify == '5'">
@@ -390,7 +394,7 @@
:disabled="item.isLock == '1' ? true: false"
:max="99999"
:placeholder="$t('pleaseEnter')+$t('integerOrDecimal')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 一位小数 -->
<div v-if="item.controlVerify == '6'">
@@ -399,7 +403,7 @@
:max="99999"
:precision="1"
:placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 两位小数-->
<div v-if="item.controlVerify == '7'">
@@ -408,7 +412,7 @@
:max="99999"
:precision="2"
:placeholder="$t('pleaseEnter')+$t('TwoDecimalplaces')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 三位小数-->
<div v-if="item.controlVerify == '8'">
@@ -417,7 +421,7 @@
:max="99999"
:precision="3"
:placeholder="$t('pleaseEnter')+$t('Threedecimalplaces')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 四位小数-->
<div v-if="item.controlVerify == '9'">
@@ -426,7 +430,7 @@
:max="99999"
:precision="4"
:placeholder="$t('pleaseEnter')+$t('FourDecimalplaces')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
</div>
<div v-if='item.type==="file"'>
@@ -438,11 +442,12 @@
</div>
</div>
</div>
<!-- 下拉单选+附件-->
<!-- 下拉单选+附件-->
<div v-if='detailDate.controlType === "8"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type==="pull"'>
<a-select v-model="item.dataValue" class='selectWid' :disabled="item.isLock == '1' ? true: false" allowClear>
<a-select v-model="item.dataValue" class='selectWid' :disabled="item.isLock == '1' ? true: false"
allowClear>
<a-select-option v-for="(itemin, key) in item.controlValue" :key="key" :value="itemin.value">
<span style="display: inline-block;width: 100%" :title=" itemin.label ">
{{ itemin.label }}
@@ -459,11 +464,12 @@
</div>
</div>
</div>
<!-- 下拉多选+附件-->
<!-- 下拉多选+附件-->
<div v-if='detailDate.controlType === "9"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type==="pull_more"'>
<a-select v-model="item.dataValue" mode="multiple" class='selectWid' :disabled="item.isLock == '1' ? true: false" allowClear>
<a-select v-model="item.dataValue" mode="multiple" class='selectWid'
:disabled="item.isLock == '1' ? true: false" allowClear>
<a-select-option v-for="(item, key) in item.controlValue" :key="key" :value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.label ">
{{ item.label }}
@@ -480,11 +486,12 @@
</div>
</div>
</div>
<!-- 文本+下拉单选+附件-->
<!-- 文本+下拉单选+附件-->
<div v-if='detailDate.controlType === "10"' class='add_flex'>
<div v-for='(item,index) in detailDate.list' :key='index' class='add-width'>
<div v-if='item.type==="pull"'>
<a-select v-model="item.dataValue" class='selectWid' :disabled="item.isLock == '1' ? true: false" allowClear>
<a-select v-model="item.dataValue" class='selectWid' :disabled="item.isLock == '1' ? true: false"
allowClear>
<a-select-option v-for="(itemin, key) in item.controlValue" :key="key" :value="itemin.value">
<span style="display: inline-block;width: 100%" :title=" itemin.label ">
{{ itemin.label }}
@@ -508,7 +515,7 @@
<a-input class="box-input inputWid"
:disabled="item.isLock == '1' ? true: false"
:placeholder="$t('pleaseEnter')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 中文-->
<div v-if="item.controlVerify == '2'">
@@ -516,7 +523,7 @@
:disabled="item.isLock == '1' ? true: false"
:placeholder="$t('pleaseEnter')+$t('chinese')"
onkeyup="value=value.replace(/[^\u4e00-\u9fa5]/g,'')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 正整数 -->
<div v-if="item.controlVerify == '3'">
@@ -525,7 +532,7 @@
:max="99999"
:precision="0"
:placeholder="$t('enterPositiveInteger')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 正浮点书 -->
<div v-if="item.controlVerify == '4'">
@@ -533,7 +540,7 @@
:disabled="item.isLock == '1' ? true: false"
onkeyup="value=value.replace(/^[1-9]\d*\.\d*|0\.\d*[1-9]\d*$/g,'')"
:placeholder="$t('pleaseEnter')+$t('Positivefloatingpointnumber')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 整数或小数 -->
<div v-if="item.controlVerify == '5'">
@@ -541,7 +548,7 @@
:disabled="item.isLock == '1' ? true: false"
:max="99999"
:placeholder="$t('pleaseEnter')+$t('integerOrDecimal')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 一位小数 -->
<div v-if="item.controlVerify == '6'">
@@ -550,7 +557,7 @@
:max="99999"
:precision="1"
:placeholder="$t('pleaseEnter')+$t('OneDecimalPlace')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 两位小数-->
<div v-if="item.controlVerify == '7'">
@@ -559,7 +566,7 @@
:max="99999"
:precision="2"
:placeholder="$t('pleaseEnter')+$t('TwoDecimalplaces')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 三位小数-->
<div v-if="item.controlVerify == '8'">
@@ -568,7 +575,7 @@
:max="99999"
:precision="3"
:placeholder="$t('pleaseEnter')+$t('Threedecimalplaces')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
<!-- 四位小数-->
<div v-if="item.controlVerify == '9'">
@@ -577,7 +584,7 @@
:max="99999"
:precision="4"
:placeholder="$t('pleaseEnter')+$t('FourDecimalplaces')"
v-model="item.dataValue" />
v-model="item.dataValue"/>
</div>
</div>
<div v-if='item.type==="file"'>
@@ -590,133 +597,148 @@
</div>
</div>
</div>
<uploadFileChangeDown ref="uploadFile" @uploadSuccess="uploadSuccess" :detailDate='detailDate'></uploadFileChangeDown>
<uploadFileChangeDown ref="uploadFile" @uploadSuccess="uploadSuccess"
:detailDate='detailDate'></uploadFileChangeDown>
</div>
</template>
<script>
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
import uploadFileChangeDown from '@/components/uploadFileChangeDown/file'
export default {
name: 'index',
props: {
detailDate: {
type: Object,
default: {},
require: true
}
},
data() {
return {
isLock: '0',
formInline: {},
visible: false,
detailDatetransformation: []
}
},
components: {
uploadFileChangeDown
},
mounted() {
this.detailDate.list.forEach((item) => {
if(item.type === 'pull_more') {
item.dataValue = []
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
import uploadFileChangeDown from '@/components/uploadFileChangeDown/file'
export default {
name: 'index',
props: {
detailDate: {
type: Object,
default: {},
require: true
}
// this.detailDatetransformation.push(item)
})
},
methods: {
uploadSuccess(data) {
let attIdList = []
if(data && data.length>0){
data.map(item => {
attIdList.push(item.id || data.name)
})
},
data() {
return {
isLock: '0',
formInline: {},
visible: false,
detailDatetransformation: []
}
},
components: {
uploadFileChangeDown
},
mounted() {
this.detailDate.list.forEach((item) => {
if (item.type === 'pull_more') {
item.dataValue = []
}
// this.detailDatetransformation.push(item)
})
},
methods: {
uploadSuccess(data) {
let attIdList = []
if (data && data.length > 0) {
data.map(item => {
attIdList.push(item.id || data.name)
})
/** 赋值给当前对应的表单文件 */
// this.formInline[this.uploadName] = attIdList.join(',')
// this.formInline = { ...this.formInline }
// console.log('form',this.formInline)
} else {
// this.formInline[this.uploadName]=''
// this.formInline = { ...this.formInline }
// console.log('form',this.formInline)
}
this.detailDate.list.forEach((item, index) => {
if(item.type === 'file') {
if (item.type === 'file') {
item.dataValue = attIdList.join(',')
}
})
/** 赋值给当前对应的表单文件 */
// this.formInline[this.uploadName] = attIdList.join(',')
// this.formInline = { ...this.formInline }
// console.log('form',this.formInline)
}else{
// this.formInline[this.uploadName]=''
// this.formInline = { ...this.formInline }
// console.log('form',this.formInline)
},
clickButtonToUpload(item) {
console.log(item)
if (item.isLock == '1') {
this.$refs.uploadFile.disabled = true
} else {
this.$refs.uploadFile.disabled = false
}
this.$refs.uploadFile.visible = true
getAction('sys/common/getFileInfos', { id: item.dataValue }).then((res) => {
if (res.success) {
this.$refs.uploadFile.perentHandleFunc(res.result)
} else {
this.$refs.uploadFile.perentHandleFunc()
}
})
}
},
clickButtonToUpload(item) {
this.$refs.uploadFile.visible = true
getAction('sys/common/getFileInfos', { id: item.dataValue }).then((res) => {
if (res.success) {
this.$refs.uploadFile.perentHandleFunc(res.result)
} else {
this.$refs.uploadFile.perentHandleFunc()
}
})
},
},
watch: {
detailDate(newold,oldold) {
console.log(newold,oldold,'ll')
},
formInline:{
handler(newOld,oldval) {
console.log(newOld,oldval,'ll')
watch: {
detailDate(newold, oldold) {
console.log(newold, oldold, 'll')
},
deep: true
formInline: {
handler(newOld, oldval) {
console.log(newOld, oldval, 'll')
},
deep: true
}
}
}
}
</script>
<style>
.table .ant-table-column-title {
font-weight: bold;
}
.table .ant-table-column-title {
font-weight: bold;
}
.ant-table td {
white-space: nowrap;
}
.ant-table td {
white-space: nowrap;
}
</style>
<style lang="less" scoped>
.box {
width: 100%;
height: calc(100% - 100px);
overflow: auto;
}
.box {
width: 100%;
height: calc(100% - 100px);
overflow: auto;
}
.text {
margin-right: 10px;
}
.text {
margin-right: 10px;
}
.page {
text-align: right;
margin-top: 20px;
}
.add_flex{
display: flex;
}
/deep/.box{
overflow: hidden;
}
.add_flex_item{
width: 30%;
flex: 1;
}
.selectWid{
min-width: 150px;
}
.inputWid{
min-width: 150px;
}
.add-width{
width: 33%;
margin-right: 5px;
}
.add--number{
width: 101%;
}
.page {
text-align: right;
margin-top: 20px;
}
.add_flex {
display: flex;
}
/deep/ .box {
overflow: hidden;
}
.add_flex_item {
width: 30%;
flex: 1;
}
.selectWid {
min-width: 150px;
}
.inputWid {
min-width: 150px;
}
.add-width {
width: 33%;
margin-right: 5px;
}
.add--number {
width: 101%;
}
</style>
@@ -360,7 +360,7 @@
}
getAction(this.url.getLoginUserType, params).then((res) => {
if (res.success) {
this.getTableList()
this.getTableList(res.result[0].value)
this.$emit('LoginUserType', res.result)
}
})
@@ -455,7 +455,7 @@
cancleoperationFailed(){
this.selectedRowKeys = []
},
getTableList() {
getTableList(currentPersonRole) {
// todo
let paramsManifestid
let url
@@ -464,13 +464,12 @@
paramsManifestid = this.$route.query.id
url = this.url.tableList
} else {
console.log('历史版本呢')
// 历史版本
paramsManifestid = this.$route.query.it
url = 'params/collectManifestHistory/list'
}
let params = {
userTypes: this.currentPersonRole,
userTypes: this.currentPersonRole || currentPersonRole,
paramsManifestId: paramsManifestid,
...this.formInline
}
@@ -5,7 +5,8 @@
<span style='flex: 1'>
{{ this.template.templateName === undefined || this.template.templateName === null? '暂无模板': this.template.templateName }}
</span>
<span style='flex: none' @click='download' v-if='this.template.templateName !== undefined && this.template.templateName !== null'>
<span style='flex: none' @click='download'
v-if='this.template.templateName !== undefined && this.template.templateName !== null'>
<a-icon type="download"/>
</span>
</div>
@@ -34,140 +35,121 @@
</template>
<script>
import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import { getAction, postAction, downFile, downloadFile } from '@/api/manage'
import { Base64 } from 'js-base64'
import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import { getAction, postAction, downFile, downloadFile } from '@/api/manage'
import { Base64 } from 'js-base64'
export default {
name: 'file',
props: ['disableds', 'thisFileUploadUrl', 'readonly', 'thisFileType', 'isUploadFile','detailDate'],
data() {
return {
visible: false,
title: this.$t('clickUpload'),
uploadAction: window._CONFIG['domianURL'] + '/sys/common/upload',
state: undefined,
myuploadAction: window._CONFIG['domianURL'] + this.thisFileUploadUrl,
upDataList: [],
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
fileList: [],
myfileList: [],
isLoding: false,
cut: '',
template: {},
disabled: false
}
},
created() {
this.detailDate.list.forEach((item) => {
console.log('ppp')
if(item.type == 'file' && item.isLock == '1') {
this.disabled = true
export default {
name: 'file',
props: ['disableds', 'thisFileUploadUrl', 'readonly', 'thisFileType', 'isUploadFile', 'detailDate'],
data() {
return {
visible: false,
title: this.$t('clickUpload'),
uploadAction: window._CONFIG['domianURL'] + '/sys/common/upload',
state: undefined,
myuploadAction: window._CONFIG['domianURL'] + this.thisFileUploadUrl,
upDataList: [],
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
fileList: [],
myfileList: [],
isLoding: false,
cut: '',
template: {},
disabled: false
}
})
console.log(this.detailDate,'detailDate')
const token = Vue.ls.get(ACCESS_TOKEN)
this.headers = { 'X-Access-Token': token }
this.containerId = 'container-ty-' + new Date().getTime()
},
mounted() {
this.detailDate.list.forEach((item) => {
if(item.type === 'file') {
},
created() {
console.log(this.detailDate, 'detailDate')
// this.detailDate.list.forEach((item) => {
// if (item.type == 'file' && item.isLock == '1') {
// this.disabled = true
// }
// })
const token = Vue.ls.get(ACCESS_TOKEN)
this.headers = { 'X-Access-Token': token }
this.containerId = 'container-ty-' + new Date().getTime()
},
mounted() {
this.detailDate.list.forEach((item) => {
if (item.type === 'file') {
this.template.templateId = item.templateId
this.template.templateName = item.templateName
}
})
let long = localStorage.getItem('language')
this.cut = ''
if (long && long == 'zh-cn') {
this.cut = 'cn'
} else if (long && long == 'en-us') {
this.cut = 'en'
}
// console.log(this.thisFileType,this.thisFileSize,this.thisFileUploadUrl);
},
methods: {
download() {
downloadFile('/sys/common/downLoadFile', this.template.templateName, { id: this.template.templateId })
},
perentHandleFunc(data) {
this.myfileList = data
if (data && data.length > 0) {
this.myfileList.forEach((res) => {
res.name = res.fileName
res.uid = res.id
})
} else {
this.myfileList = []
}
},
beforeUpload(file) {
// let thisFileType = this.thisFileType.replace(/\s+/g, "");
this.fileTypeSatus = true
//TODO 客户要求不拦截文件
// if(file.type){
// if (thisFileType.indexOf(file.type) != -1) {
// this.fileTypeSatus = true;
// }else{
// this.fileTypeSatus = false;
// }
// }else{
// if(file.name.slice(file.name.length - 3 , file.name.length) == 'rar'){
// this.fileTypeSatus = true
// }else if(file.type == 'application/x-zip-compressed'){
// this.fileTypeSatus = true
// }else{
// this.fileTypeSatus = false;
// }
// }
this.$message.destroy()
},
remove() {
this.fileTypeSatus = true
},
mypreview(item) {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + encodeURIComponent(this.downLoadFileUrl + '/' + item.ext1)
window.open(url, '_blank')
},
handleChange(info) {
if(info.fileList.length > 1) {
this.$message.warning(this.$t('onlyOnefileUploaded'))
return
}
let { file } = info
const status = info.file.status
info.fileList.forEach((val, index) => {
if (val.response && !val.response.result) {
this.$message.error(val.response.message)
info.fileList.splice(index, 1)
}
})
if (status === 'error') {
this.$emit('uploadSuccess', this.fileList)
let long = localStorage.getItem('language')
this.cut = ''
if (long && long == 'zh-cn') {
this.cut = 'cn'
} else if (long && long == 'en-us') {
this.cut = 'en'
}
// console.log(this.thisFileType,this.thisFileSize,this.thisFileUploadUrl);
},
methods: {
download() {
downloadFile('/sys/common/downLoadFile', this.template.templateName, { id: this.template.templateId })
},
perentHandleFunc(data) {
this.myfileList = data
if (data && data.length > 0) {
this.myfileList.forEach((res) => {
res.name = res.fileName
res.uid = res.id
})
} else {
this.myfileList = []
}
},
beforeUpload(file) {
// let thisFileType = this.thisFileType.replace(/\s+/g, "");
this.fileTypeSatus = true
//TODO 客户要求不拦截文件
// if(file.type){
// if (thisFileType.indexOf(file.type) != -1) {
// this.fileTypeSatus = true;
// }else{
// this.fileTypeSatus = false;
// }
// }else{
// if(file.name.slice(file.name.length - 3 , file.name.length) == 'rar'){
// this.fileTypeSatus = true
// }else if(file.type == 'application/x-zip-compressed'){
// this.fileTypeSatus = true
// }else{
// this.fileTypeSatus = false;
// }
// }
this.$message.destroy()
this.$message.error(`${info.file.name}` + this.$t('FileUploadFailed'))
} else if (status === 'removed') {
this.myfileList = info.fileList
this.fileList = []
this.myfileList.forEach((res) => {
if (res.response) {
this.fileList.push(res.response.result)
} else {
this.fileList.push(res)
},
remove() {
this.fileTypeSatus = true
},
mypreview(item) {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + encodeURIComponent(this.downLoadFileUrl + '/' + item.ext1)
window.open(url, '_blank')
},
handleChange(info) {
if (info.fileList.length > 1) {
this.$message.warning(this.$t('onlyOnefileUploaded'))
return
}
let { file } = info
const status = info.file.status
info.fileList.forEach((val, index) => {
if (val.response && !val.response.result) {
this.$message.error(val.response.message)
info.fileList.splice(index, 1)
}
})
this.$emit('uploadSuccess', this.fileList)
if (this.myfileList.length > 0) {
if (status === 'error') {
this.$emit('uploadSuccess', this.fileList)
this.$message.destroy()
this.$message.success(`${info.file.name}` + this.$t('DeletedSuccessfully'))
}
} else if (status === 'done') {
this.fileList = []
this.myfileList = info.fileList
if (info.fileList.length > 20) {
info.fileList.splice(20)
this.$message.error(`${info.file.name}` + this.$t('FileUploadFailed'))
} else if (status === 'removed') {
this.myfileList = info.fileList
this.fileList = []
this.myfileList.forEach((res) => {
if (res.response) {
this.fileList.push(res.response.result)
@@ -176,66 +158,84 @@ export default {
}
})
this.$emit('uploadSuccess', this.fileList)
this.$message.destroy()
this.$message.error(this.$t('UploadMost'))
return
}
this.myfileList.forEach((res) => {
if (res.response) {
this.fileList.push(res.response.result)
} else {
this.fileList.push(res)
if (this.myfileList.length > 0) {
this.$message.destroy()
this.$message.success(`${info.file.name}` + this.$t('DeletedSuccessfully'))
}
})
this.$emit('uploadSuccess', this.fileList)
if (this.myfileList.length > 0) {
this.$message.destroy()
if (file.response.success) {
this.$message.success(`${info.file.name}` + this.$t('FileUploadedSuccessfully'))
} else if (status === 'done') {
this.fileList = []
this.myfileList = info.fileList
if (info.fileList.length > 20) {
info.fileList.splice(20)
this.myfileList = info.fileList
this.myfileList.forEach((res) => {
if (res.response) {
this.fileList.push(res.response.result)
} else {
this.fileList.push(res)
}
})
this.$emit('uploadSuccess', this.fileList)
this.$message.destroy()
this.$message.error(this.$t('UploadMost'))
return
}
this.myfileList.forEach((res) => {
if (res.response) {
this.fileList.push(res.response.result)
} else {
this.fileList.push(res)
}
})
this.$emit('uploadSuccess', this.fileList)
if (this.myfileList.length > 0) {
this.$message.destroy()
if (file.response.success) {
this.$message.success(`${info.file.name}` + this.$t('FileUploadedSuccessfully'))
}
}
} else if (status === 'uploading') {
this.myfileList = info.fileList
// this.$message.success(`${info.file.name} 文件上传成功。`);
}
},
resetFileList() {
this.myfileList = []
this.fileList = []
},
preview(file) {
let fileQuery = file.response ? file.response.result : file
let fileName = fileQuery.fileName
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix === '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id))
} else if (fileSuffix === '.docx') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else {
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
}
} else if (status === 'uploading') {
this.myfileList = info.fileList
// this.$message.success(`${info.file.name} 文件上传成功。`);
}
},
resetFileList() {
this.myfileList = []
this.fileList = []
},
preview(file) {
let fileQuery = file.response ? file.response.result : file
let fileName = fileQuery.fileName
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix === '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id))
} else if (fileSuffix === '.docx') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else if (fileSuffix === '.xlsx' || fileSuffix === '.xls') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else {
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
}
}
}
}
</script>
<style>
.ant-upload-list-item-name {
color: rgba(0, 0, 0, 0.65) !important;
}
.ant-upload-list-item-name {
color: rgba(0, 0, 0, 0.65) !important;
}
.action-upload {
font-size: 67px;
color: #c0c4cc;
}
.action-upload {
font-size: 67px;
color: #c0c4cc;
}
.uploadFile {
.uploadFile {
}
}
</style>
@@ -796,7 +796,7 @@
this.currentPersonRole = val.length >= 1 ? val[0].value : ''
}
this.RoleType = val
this.formInlineRoleSwitching.roleSwitchingCode = JSON.parse(localStorage.getItem('currentPersonRole')) === null ? this.currentPersonRole : JSON.parse(localStorage.getItem('currentPersonRole'))
this.formInlineRoleSwitching.roleSwitchingCode = val[0].value
this.formInlineRoleSwitching = { ...this.formInlineRoleSwitching }
},
// 表格所选中得行内容
@@ -969,27 +969,33 @@
ishandleSubmit() {
let _this = this
let postDate = []
console.log(this.selectedRowKeysValue)
this.selectedRowKeysValue.forEach((item, index) => {
for (let i = 0; i < this.selectedRowKeysValue.length; i++) {
let postDateobj = {}
Object.keys(item).forEach((itemIn, index) => {
if (itemIn !== 'sdt') {
if (item[itemIn] instanceof Object && !(item[itemIn] instanceof Array)) {
postDateobj[itemIn] = item[itemIn]
item[itemIn].list.forEach((item, index) => {
if (item.type == 'pull_more') {
item.dataValue = item.dataValue.join(',')
let itemIn = Object.keys(this.selectedRowKeysValue[i])
for (let j = 0; j < itemIn.length; j++) {
if (itemIn[j] !== 'sdt') {
if (this.selectedRowKeysValue[i][itemIn[j]] instanceof Object && !(this.selectedRowKeysValue[i][itemIn[j]] instanceof Array)) {
postDateobj[itemIn[j]] = this.selectedRowKeysValue[i][itemIn[j]]
for (let k = 0; k < this.selectedRowKeysValue[i][itemIn[j]].list.length; k++) {
if (this.selectedRowKeysValue[i][itemIn[j]].list[k].type == 'pull_more') {
this.selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = this.selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.join(',')
}
if (item.type == 'text' && item.dataValue !== null) {
item.dataValue = item.dataValue.toString()
if (this.selectedRowKeysValue[i][itemIn[j]].list[k].type == 'text' && this.selectedRowKeysValue[i][itemIn[j]].list[k].dataValue !== null) {
this.selectedRowKeysValue[i][itemIn[j]].list[k].dataValue = this.selectedRowKeysValue[i][itemIn[j]].list[k].dataValue.toString()
}
})
if (!this.selectedRowKeysValue[i][itemIn[j]].list[k].dataValue && this.selectedRowKeysValue[i][itemIn[j]].list[k].isMust == '1'
&& this.selectedRowKeysValue[i][itemIn[j]].list[k].isLock == '0') {
this.$message.warning(this.selectedRowKeysValue[i].nioNumber + ',' + this.$t('requiredParametersEmpty'))
return
}
}
}
}
})
postDateobj.id = item.id
}
postDateobj.id = this.selectedRowKeysValue[i].id
postDate.push(postDateobj)
})
}
let configDataList = { configDataList: postDate }
if (this.selectedRowKeys.length == 0) {
this.$message.warning(this.$t('selectLeastOne'))
@@ -49,16 +49,18 @@
:dataSource='dataSource'
:pagination='false'
:loading='loading'
:scroll="{x: 600}"
:scroll="{x: '100%',y:'calc(100vh - 320px)'}"
:rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}'
@change='handleTableChange'>
<span slot="paramsManifestClick" slot-scope="text,record">
<a @click="paramsManifestClick(record)">
<a class="textName" :title="text" @click="paramsManifestClick(record)">
{{ text && text.length > 50 ? text.slice(0, 49) + '...' : text }}
</a>
</span>
<span slot="collectionCompletionTime" slot-scope="text,record">
{{record.finishTime ? record.finishTime : '-'}}
<span class="textName" :title="record.finishTime">
{{record.finishTime ? record.finishTime : '-'}}
</span>
</span>
<span slot="operation" slot-scope="text,record">
<a class="text-operation" @click="configure(record)">{{$t('configure')}}</a>
@@ -129,43 +131,50 @@
title: this.$t('title'),
align: 'center',
dataIndex: 'title',
width: 240,
scopedSlots: { customRender: 'paramsManifestClick' }
},
{
title: this.$t('status'),
align: 'center',
width: 80,
ellipsis: true,
dataIndex: 'state'
},
{
title: this.$t('parameterTemplateName'),
align: 'center',
width: 180,
ellipsis: true,
dataIndex: 'paramsTemplateName'
},
{
title: this.$t('collectionCompletionTime'),
align: 'center',
dataIndex: 'finishTime',
width: 130,
width: 160,
ellipsis: true,
scopedSlots: { customRender: 'collectionCompletionTime' }
},
{
title: this.$t('Version'),
align: 'center',
width: 50,
ellipsis: true,
dataIndex: 'version'
},
{
title: this.$t('creator'),
align: 'center',
width: 110,
ellipsis: true,
dataIndex: 'createBy'
},
{
title: this.$t('createTime'),
align: 'center',
width: 160,
ellipsis: true,
dataIndex: 'createTime'
},
{
@@ -517,6 +526,19 @@
/deep/ .add-padding {
margin-left: -89px !important;
}
.textName {
width: 100%;
overflow: hidden;
display: -webkit-box;
text-overflow: ellipsis;
/*! autoprefixer: off */
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
/*! autoprefixer: on;*/
text-justify: inter-ideograph;
word-break: break-all
}
</style>
<style>
.box-input .ant-select-selection {