|
@@ -10,6 +10,12 @@
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</template>
|
|
|
+ <template v-else-if="fromDataType(item.datatype) == 'DROP'">
|
|
|
+ <el-select class="input-shadow" size="small" multiple filterable default-first-option style="width: 100%" v-model="tableForm[item.pagecode]" @change="changeSelect(item.pagecode, item)" placeholder="请选择" clearable @clear="tableForm[item.pagecode] = ''">
|
|
|
+ <el-option v-for="itemParams in tableOptions[item.pagecode]" :key="itemParams['dropdownlistid']" :label="itemParams['dropdownlistlabel']" :value="itemParams['dropdownlistid']">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
<template v-else-if="fromDataType(item.datatype) == 'TEXT' || fromDataType(item.datatype) == 'VARCHAR'">
|
|
|
<el-input size="small" @change="inputChangeHandler(item.pagecode)" v-model="tableForm[item.pagecode]"></el-input>
|
|
|
</template>
|
|
@@ -79,6 +85,10 @@ export default {
|
|
|
type: Array,
|
|
|
default: () => new Array()
|
|
|
},
|
|
|
+ formPass: {
|
|
|
+ type: Array,
|
|
|
+ default: () => new Array()
|
|
|
+ },
|
|
|
formData: {
|
|
|
type: Object,
|
|
|
default: () => new Object()
|
|
@@ -168,7 +178,7 @@ export default {
|
|
|
const [allResult, allResultKey] = [[], []]
|
|
|
formItemCopy.map(({ dropdownlist, pagecode, defaultparameters }) => {
|
|
|
if (((dropdownlist || dropdownlist == 0) && dropdownlist != "")) {
|
|
|
- const datacontent = defaultparameters ? { filter:this.formatDefault(defaultparameters)} : { filter: { 1: 1 } }
|
|
|
+ const datacontent = defaultparameters ? { filter: this.formatDefault(defaultparameters) } : { filter: { 1: 1 } }
|
|
|
allResultKey.push(pagecode)
|
|
|
allResult.push(Query({ serviceid: dropdownlist, datacontent, event: '0' }))
|
|
|
}
|
|
@@ -191,6 +201,16 @@ export default {
|
|
|
} else {
|
|
|
this.formItemArr = formItem
|
|
|
}
|
|
|
+ const passitem = this.formItemArr.filter(item => item.pagecode == 'passparameters')
|
|
|
+ if (passitem?.length) {
|
|
|
+ const passitemkey = passitem[0]
|
|
|
+ passitemkey.datatype = 'DROP'
|
|
|
+ this.formPass.map(item => {
|
|
|
+ item.dropdownlistid = item.pageconfigurationid
|
|
|
+ item.dropdownlistlabel = item.pagename
|
|
|
+ })
|
|
|
+ this.tableOptions['passparameters'] = this.formPass
|
|
|
+ }
|
|
|
this.loading = false
|
|
|
},
|
|
|
formatData (returnData) {
|
|
@@ -227,6 +247,28 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ formatPass (npass = []) {
|
|
|
+ const datas = []
|
|
|
+ const maps = []
|
|
|
+ if (npass?.length) {
|
|
|
+ this.formPass.filter(item => {
|
|
|
+ npass.map(p => {
|
|
|
+ if (item.dropdownlistid == p) {
|
|
|
+ datas.push(item)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (datas?.length) {
|
|
|
+ datas.map(item => {
|
|
|
+ const nitem = {}
|
|
|
+ nitem[item.pagecode] = item.alias ? item.alias : item.pagecode
|
|
|
+ nitem['keyVal'] = item.pageconfigurationid
|
|
|
+ maps.push(nitem)
|
|
|
+ })
|
|
|
+ this.tableForm.passparameters = JSON.stringify(maps)
|
|
|
+ }
|
|
|
+ },
|
|
|
clearTypeUpload (nload = []) {
|
|
|
if (nload?.length) {
|
|
|
const files = this.$refs['upload']
|
|
@@ -241,8 +283,10 @@ export default {
|
|
|
let flag = false
|
|
|
const ndata = this.formItemArr.filter(item => item.datatype == 'password' || item.datatype == 'PASSWORD')
|
|
|
const nload = this.formItemArr.filter(item => item.datatype == 'upload' || item.datatype == 'UPLOAD')
|
|
|
+ const npass = this.tableForm.passparameters
|
|
|
if (nload?.length) this.addTypeUpload(nload)
|
|
|
if (ndata?.length) this.addTypePassWord(ndata)
|
|
|
+ if (npass?.length) this.formatPass(npass)
|
|
|
this.$refs["ruleForm"].validate((valid) => {
|
|
|
if (valid) {
|
|
|
flag = true
|