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