|
@@ -3,36 +3,58 @@
|
|
|
<el-form ref="ruleForm" :model="tableForm" :label-width="labelWidth">
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="24">
|
|
|
+ <el-form-item prop="serviceid" label="所属服务">
|
|
|
+ <el-select v-model="tableForm.serviceid" placeholder="请选择">
|
|
|
+ <el-option v-for="(item,index) in selectService" :key="index" :label="item.servicename" :value="item.serviceid"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col v-if="tableForm.algorithmtype == 0" :span="24">
|
|
|
<el-form-item prop="preconditions" label="执行条件">
|
|
|
<el-input size="small" type="textarea" v-model="tableForm.preconditions"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
- <el-form-item prop="algorithmtype" label="类型">
|
|
|
+ <el-form-item prop="algorithmtype" label="算法类型">
|
|
|
<el-select v-model="tableForm.algorithmtype" @change="changeSelect('algorithmtype',tableForm.algorithmtype)" placeholder="请选择">
|
|
|
<el-option v-for="(item,index) in selectType" :key="index" :label="item.name" :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col v-if="tableForm.algorithmtype == 1 || tableForm.algorithmtype == 2 || tableForm.algorithmtype == 3 || tableForm.algorithmtype == 6" :span="24">
|
|
|
- <el-form-item prop="executionnumber" label="算法">
|
|
|
- <el-select v-model="tableForm.executionnumber" @change="changeSelect('executionnumber',tableForm.executionnumber)" placeholder="请选择">
|
|
|
+ <el-form-item prop="algorithmname" label="算法名称">
|
|
|
+ <el-select v-model="tableForm.algorithmname" @change="changeSelect('algorithmname',tableForm.algorithmname)" placeholder="请选择">
|
|
|
<el-option v-for="(item,index) in selectAlgorithm" :key="index" :label="item.name" :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col v-if=" tableForm.executionnumber == 2 || tableForm.algorithmtype == 3 || tableForm.algorithmtype == 6" :span="24">
|
|
|
- <el-form-item prop="datasourceid" label="数据源">
|
|
|
+ <el-col v-if=" tableForm.algorithmtype == 2 || tableForm.algorithmtype == 3 || tableForm.algorithmtype == 6" :span="24">
|
|
|
+ <el-form-item prop="datasourceid" label="数据源编号">
|
|
|
<el-select v-model="tableForm.datasourceid" @change="changeSelect('datasourceid',tableForm.datasourceid)" placeholder="请选择">
|
|
|
- <el-option v-for="(item,index) in selectSource" :key="index" :label="item.name" :value="item.id"></el-option>
|
|
|
+ <el-option v-for="(item,index) in selectSource" :key="index" :label="item.datasourcedescribe" :value="item.datasourceid"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="24">
|
|
|
- <el-form-item prop="computingexpression" label="表达式">
|
|
|
+ <el-form-item prop="targetsource" label="数据源目标">
|
|
|
+ <el-input size="small" v-model="tableForm.targetsource"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item prop="executionorder" label="执行排序">
|
|
|
+ <el-input size="small" v-model="tableForm.executionorder"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item prop="computingexpression" label="计算表达式">
|
|
|
<el-input size="small" type="textarea" v-model="tableForm.computingexpression"></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item prop="algorithmdescription" label="算法说明">
|
|
|
+ <el-input size="small" v-model="tableForm.algorithmdescription"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
</div>
|
|
@@ -55,17 +77,23 @@ export default {
|
|
|
data () {
|
|
|
return {
|
|
|
tableForm: {
|
|
|
+ serviceid: '',
|
|
|
preconditions: '',
|
|
|
algorithmtype: '',
|
|
|
- executionnumber: '',
|
|
|
- computingexpression: ''
|
|
|
+ algorithmname: '',
|
|
|
+ executionorder: '',
|
|
|
+ targetsource: '',
|
|
|
+ datasourceid: '',
|
|
|
+ computingexpression: '',
|
|
|
+ algorithmdescription: ''
|
|
|
},
|
|
|
tableOptions: {},
|
|
|
formItemArr: [],
|
|
|
loading: false,
|
|
|
selectType: [],
|
|
|
selectAlgorithm: [],
|
|
|
- selectSource: []
|
|
|
+ selectSource: [],
|
|
|
+ selectService: []
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -78,7 +106,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted () {
|
|
|
- this.getSelectData('algorithmtype', 20, { type: '0' })
|
|
|
+ this.getSelectData('serviceid', 14, { 1: 1 }) //所属服务
|
|
|
+ this.getSelectData('datasourceid', 12, { 1: 1 }) //数据源
|
|
|
+ this.getSelectData('algorithmname', 20, { type: '1' }) //算法名称
|
|
|
+ this.getSelectData('algorithmtype', 20, { type: '0' }) //算法类型
|
|
|
},
|
|
|
methods: {
|
|
|
//获取表单下拉数据
|
|
@@ -107,14 +138,17 @@ export default {
|
|
|
},
|
|
|
setFormSelectData (name, returnData) {
|
|
|
switch (name) {
|
|
|
+ case 'serviceid':
|
|
|
+ this.selectService = [...returnData]
|
|
|
+ break;
|
|
|
case 'algorithmtype':
|
|
|
this.selectType = [...returnData]
|
|
|
break;
|
|
|
- case 'executionnumber':
|
|
|
+ case 'algorithmname':
|
|
|
this.selectAlgorithm = [...returnData]
|
|
|
break;
|
|
|
case 'datasourceid':
|
|
|
- console.log(returnData)
|
|
|
+ this.selectSource = [...returnData]
|
|
|
break
|
|
|
default:
|
|
|
break;
|
|
@@ -128,12 +162,13 @@ export default {
|
|
|
switch (name) {
|
|
|
case 'algorithmtype':
|
|
|
if (code == 1 || code == 2 || code == 3 || code == 6) {
|
|
|
- this.getSelectData('executionnumber', 20, { superiorid: code })
|
|
|
+ this.tableForm.algorithmname = ''
|
|
|
+ this.getSelectData('algorithmname', 20, { superiorid: code })
|
|
|
}
|
|
|
break;
|
|
|
- case 'executionnumber':
|
|
|
- if (code == 2 || code == 3 || code == 6) {
|
|
|
- this.getSelectData('datasourceid', 20, { superiorid: code })
|
|
|
+ case 'algorithmname':
|
|
|
+ if (code == 9 || code == 10) {
|
|
|
+ this.getSelectData('datasourceid', 12, { datasourcetype: code })
|
|
|
}
|
|
|
break;
|
|
|
default:
|