修改禅道已知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:'必填参数不能为空',
} }
@@ -98,7 +98,8 @@
<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 }}
@@ -112,7 +113,8 @@
<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 }}
@@ -138,7 +140,8 @@
<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 }}
@@ -328,7 +331,8 @@
</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 }}
@@ -442,7 +446,8 @@
<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 }}
@@ -463,7 +468,8 @@
<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 }}
@@ -484,7 +490,8 @@
<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 }}
@@ -590,13 +597,15 @@
</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 { export default {
name: 'index', name: 'index',
props: { props: {
@@ -632,11 +641,6 @@ export default {
data.map(item => { data.map(item => {
attIdList.push(item.id || data.name) attIdList.push(item.id || data.name)
}) })
this.detailDate.list.forEach((item, index) => {
if(item.type === 'file') {
item.dataValue = attIdList.join(',')
}
})
/** 赋值给当前对应的表单文件 */ /** 赋值给当前对应的表单文件 */
// this.formInline[this.uploadName] = attIdList.join(',') // this.formInline[this.uploadName] = attIdList.join(',')
// this.formInline = { ...this.formInline } // this.formInline = { ...this.formInline }
@@ -647,8 +651,19 @@ export default {
// console.log('form',this.formInline) // console.log('form',this.formInline)
} }
this.detailDate.list.forEach((item, index) => {
if (item.type === 'file') {
item.dataValue = attIdList.join(',')
}
})
}, },
clickButtonToUpload(item) { 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 this.$refs.uploadFile.visible = true
getAction('sys/common/getFileInfos', { id: item.dataValue }).then((res) => { getAction('sys/common/getFileInfos', { id: item.dataValue }).then((res) => {
if (res.success) { if (res.success) {
@@ -657,7 +672,7 @@ export default {
this.$refs.uploadFile.perentHandleFunc() this.$refs.uploadFile.perentHandleFunc()
} }
}) })
}, }
}, },
watch: { watch: {
detailDate(newold, oldold) { detailDate(newold, oldold) {
@@ -696,26 +711,33 @@ export default {
text-align: right; text-align: right;
margin-top: 20px; margin-top: 20px;
} }
.add_flex { .add_flex {
display: flex; display: flex;
} }
/deep/ .box { /deep/ .box {
overflow: hidden; overflow: hidden;
} }
.add_flex_item { .add_flex_item {
width: 30%; width: 30%;
flex: 1; flex: 1;
} }
.selectWid { .selectWid {
min-width: 150px; min-width: 150px;
} }
.inputWid { .inputWid {
min-width: 150px; min-width: 150px;
} }
.add-width { .add-width {
width: 33%; width: 33%;
margin-right: 5px; margin-right: 5px;
} }
.add--number { .add--number {
width: 101%; width: 101%;
} }
@@ -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>
@@ -60,13 +61,12 @@ export default {
} }
}, },
created() { created() {
this.detailDate.list.forEach((item) => {
console.log('ppp')
if(item.type == 'file' && item.isLock == '1') {
this.disabled = true
}
})
console.log(this.detailDate, 'detailDate') 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) const token = Vue.ls.get(ACCESS_TOKEN)
this.headers = { 'X-Access-Token': token } this.headers = { 'X-Access-Token': token }
this.containerId = 'container-ty-' + new Date().getTime() this.containerId = 'container-ty-' + new Date().getTime()
@@ -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,17 +49,19 @@
: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">
<span class="textName" :title="record.finishTime">
{{record.finishTime ? 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>
<a class="text-operation" @click="edit(record)">{{$t('edit')}}</a> <a class="text-operation" @click="edit(record)">{{$t('edit')}}</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 {