|
|
@ -341,10 +341,14 @@ export default { |
|
|
searchCodeItemDefsSeq(params).then(({data})=>{ |
|
|
searchCodeItemDefsSeq(params).then(({data})=>{ |
|
|
if (data && data.code === 0){ |
|
|
if (data && data.code === 0){ |
|
|
this.itemDefs = data.rows; |
|
|
this.itemDefs = data.rows; |
|
|
if (this.itemDefs.length > 0){ |
|
|
|
|
|
|
|
|
if (this.itemDefs.length > 0 && this.conditionDetailModal.seqNo === undefined){ |
|
|
this.conditionDetailModal.SQLStatementExecuteItem = this.itemDefs[0].itemNo; |
|
|
this.conditionDetailModal.SQLStatementExecuteItem = this.itemDefs[0].itemNo; |
|
|
this.saveCodeItemValue(this.itemDefs[0]); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
let params = { |
|
|
|
|
|
itemNo: this.conditionDetailModal.SQLStatementExecuteItem, |
|
|
|
|
|
site:this.itemValue.site, |
|
|
|
|
|
} |
|
|
|
|
|
this.saveCodeItemValue(params); |
|
|
}else { |
|
|
}else { |
|
|
this.$message.warning(data.msg) |
|
|
this.$message.warning(data.msg) |
|
|
} |
|
|
} |
|
|
@ -361,7 +365,7 @@ export default { |
|
|
if (data && data.code === 0){ |
|
|
if (data && data.code === 0){ |
|
|
this.saveItemValueList = data.rows; |
|
|
this.saveItemValueList = data.rows; |
|
|
this.$nextTick(()=>{ |
|
|
this.$nextTick(()=>{ |
|
|
if (this.saveItemValueList.length > 0){ |
|
|
|
|
|
|
|
|
if (this.saveItemValueList.length > 0 && this.conditionDetailModal.seqNo === undefined){ |
|
|
this.conditionDetailModal.SQLStatementExecuteValueItemNo = this.saveItemValueList[0].valueItemNo; |
|
|
this.conditionDetailModal.SQLStatementExecuteValueItemNo = this.saveItemValueList[0].valueItemNo; |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
@ -383,6 +387,7 @@ export default { |
|
|
Object.keys(this.conditionDetailModal).forEach(key => { |
|
|
Object.keys(this.conditionDetailModal).forEach(key => { |
|
|
this.conditionDetailModal[key] = undefined; |
|
|
this.conditionDetailModal[key] = undefined; |
|
|
}); |
|
|
}); |
|
|
|
|
|
this.conditionDetailModal.seqNo = undefined; |
|
|
this.conditionDetailModal.SQLStatementExecuteFlag = 'N'; |
|
|
this.conditionDetailModal.SQLStatementExecuteFlag = 'N'; |
|
|
}, |
|
|
}, |
|
|
changeItemDef(val){ |
|
|
changeItemDef(val){ |
|
|
@ -452,6 +457,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
handleEditConditionDetail(){ |
|
|
handleEditConditionDetail(){ |
|
|
this.conditionDetailModal = {...this.conditionDetails[this.selectionDetailIndex]} |
|
|
this.conditionDetailModal = {...this.conditionDetails[this.selectionDetailIndex]} |
|
|
|
|
|
this.conditionDetailModal.SQLStatementExecuteItem = parseInt(this.conditionDetailModal.SQLStatementExecuteItem) |
|
|
this.searchCodeItemDefs(); |
|
|
this.searchCodeItemDefs(); |
|
|
this.itemDefModalVisible = true |
|
|
this.itemDefModalVisible = true |
|
|
}, |
|
|
}, |
|
|
@ -688,7 +694,7 @@ export default { |
|
|
<el-dialog title="条件定义" v-drag :close-on-click-modal="false" :visible.sync="itemDefModalVisible" @close="closeConditionDetail" width="400px" append-to-body> |
|
|
<el-dialog title="条件定义" v-drag :close-on-click-modal="false" :visible.sync="itemDefModalVisible" @close="closeConditionDetail" width="400px" append-to-body> |
|
|
<el-form ref="formConditionDetail" label-position="top" :rules="detailRules" :model="conditionDetailModal" > |
|
|
<el-form ref="formConditionDetail" label-position="top" :rules="detailRules" :model="conditionDetailModal" > |
|
|
<el-row :gutter="10"> |
|
|
<el-row :gutter="10"> |
|
|
<el-col :span="12"> |
|
|
|
|
|
|
|
|
<el-col :span="10"> |
|
|
<el-form-item label="运算符号:" prop="SQLStatementExecuteCalculate" :show-message="false"> |
|
|
<el-form-item label="运算符号:" prop="SQLStatementExecuteCalculate" :show-message="false"> |
|
|
<el-select v-model="conditionDetailModal.SQLStatementExecuteCalculate" style="width: 100%" placeholder="请选择" > |
|
|
<el-select v-model="conditionDetailModal.SQLStatementExecuteCalculate" style="width: 100%" placeholder="请选择" > |
|
|
<el-option label="并且" value="1"></el-option> |
|
|
<el-option label="并且" value="1"></el-option> |
|
|
@ -697,20 +703,23 @@ export default { |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
|
|
|
<el-row :gutter="10"> |
|
|
|
|
|
<el-col :span="12"> |
|
|
|
|
|
|
|
|
<el-col :span="14"> |
|
|
<el-form-item label="元素名称:" prop="SQLStatementExecuteItem" :show-message="false"> |
|
|
<el-form-item label="元素名称:" prop="SQLStatementExecuteItem" :show-message="false"> |
|
|
<el-select v-model="conditionDetailModal.SQLStatementExecuteItem" style="width: 100%" @change="changeItemDef"> |
|
|
<el-select v-model="conditionDetailModal.SQLStatementExecuteItem" style="width: 100%" @change="changeItemDef"> |
|
|
<el-option v-for="(o, index) in itemDefs" :key="o.itemNo" :label="`(${o.itemNo})${o.itemDesc}`" :value="o.itemNo"></el-option> |
|
|
<el-option v-for="(o, index) in itemDefs" :key="o.itemNo" :label="`(${o.itemNo})${o.itemDesc}`" :value="o.itemNo"></el-option> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12"> |
|
|
|
|
|
|
|
|
</el-row> |
|
|
|
|
|
<el-row :gutter="10"> |
|
|
|
|
|
<el-col :span="24"> |
|
|
<el-form-item label="元素可选值:" prop="SQLStatementExecuteValueItemNo" :show-message="false"> |
|
|
<el-form-item label="元素可选值:" prop="SQLStatementExecuteValueItemNo" :show-message="false"> |
|
|
<el-select v-model="conditionDetailModal.SQLStatementExecuteValueItemNo" style="width: 100%"> |
|
|
<el-select v-model="conditionDetailModal.SQLStatementExecuteValueItemNo" style="width: 100%"> |
|
|
<div v-for="(o, index) in saveItemValueList" :key="index"> |
|
|
<div v-for="(o, index) in saveItemValueList" :key="index"> |
|
|
<el-option :label="`(${o.valueNo})${o.itemValue}`" :value="o.valueItemNo"></el-option> |
|
|
|
|
|
|
|
|
<el-option :label="`(${o.valueNo})${o.itemValue}`" :value="o.valueItemNo"> |
|
|
|
|
|
<span style="float: left">{{ `(${o.valueNo})${o.itemValue}` }}</span> |
|
|
|
|
|
<span style="float: right; color: #8492a6; font-size: 13px">{{o.conditionName}}</span> |
|
|
|
|
|
</el-option> |
|
|
</div> |
|
|
</div> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|