策略管理修改
Showing
1 changed file
with
33 additions
and
6 deletions
| ... | @@ -4,7 +4,8 @@ | ... | @@ -4,7 +4,8 @@ |
| 4 | <el-button v-if="!isLook" plain @click="invokeTemplate" v-preReClick>合约模板调用</el-button> | 4 | <el-button v-if="!isLook" plain @click="invokeTemplate" v-preReClick>合约模板调用</el-button> |
| 5 | </div> | 5 | </div> |
| 6 | <el-table class="strategyTable" ref="strategyTableRef" v-loading="strategyDataLoading" :data="strategyData" | 6 | <el-table class="strategyTable" ref="strategyTableRef" v-loading="strategyDataLoading" :data="strategyData" |
| 7 | :height="isReport ? 'auto' : '250px'" :highlight-current-row="true" stripe tooltip-effect="light" border :span-method="arraySpanMethod"> | 7 | :height="isReport ? 'auto' : '250px'" :highlight-current-row="true" stripe tooltip-effect="light" border |
| 8 | :span-method="arraySpanMethod"> | ||
| 8 | <el-table-column label="序号" width="56" align="center" fixed="left" :formatter="formatIndex" /> | 9 | <el-table-column label="序号" width="56" align="center" fixed="left" :formatter="formatIndex" /> |
| 9 | <el-table-column prop="action" label="行为类型" :width="isReport ? 'auto' : '150px'" | 10 | <el-table-column prop="action" label="行为类型" :width="isReport ? 'auto' : '150px'" |
| 10 | :min-width="isReport ? '100px' : undefined" align="left" :show-overflow-tooltip="!isReport"> | 11 | :min-width="isReport ? '100px' : undefined" align="left" :show-overflow-tooltip="!isReport"> |
| ... | @@ -15,8 +16,9 @@ | ... | @@ -15,8 +16,9 @@ |
| 15 | <template #default="scope"> | 16 | <template #default="scope"> |
| 16 | <el-select v-if="!isLook" v-model="scope.row['action']" placeholder="请选择" :disabled="isLook" | 17 | <el-select v-if="!isLook" v-model="scope.row['action']" placeholder="请选择" :disabled="isLook" |
| 17 | @change="(val) => selectOperationChange(val, scope)" clearable filterable> | 18 | @change="(val) => selectOperationChange(val, scope)" clearable filterable> |
| 19 | <!-- 合约模板时不可以设置这个属性,只能在合约创建时设置 --> | ||
| 18 | <el-option | 20 | <el-option |
| 19 | v-for="opt in actionOptionsList.filter(a => scope.row.action == a.policyName || !strategyData.some(s => s.action == a.policyName))" | 21 | v-for="opt in actionOptionsList.filter(a => scope.row.action == a.policyName || !strategyData.some(s => s.action == a.policyName) || ((a.policyEnName == 'limitField' || a.policyEnName == 'limitedDeliveryConnector' || a.policyEnName == 'limitedUseConnector') && productFieldList != null))" |
| 20 | :key="opt['policyName']" :label="opt['policyName']" :value="opt['policyName']" /> | 22 | :key="opt['policyName']" :label="opt['policyName']" :value="opt['policyName']" /> |
| 21 | </el-select> | 23 | </el-select> |
| 22 | <span v-else>{{ scope.row['action'] || '--' }}</span> | 24 | <span v-else>{{ scope.row['action'] || '--' }}</span> |
| ... | @@ -29,7 +31,8 @@ | ... | @@ -29,7 +31,8 @@ |
| 29 | <span v-else>{{ scope.row['actionEnName'] || '--' }}</span> | 31 | <span v-else>{{ scope.row['actionEnName'] || '--' }}</span> |
| 30 | </template> | 32 | </template> |
| 31 | </el-table-column> | 33 | </el-table-column> |
| 32 | <el-table-column prop="constraintName" label="约束条件" :width="isReport ? 'auto' : '150px'" :min-width="isReport ? '100px' : undefined" align="left" :show-overflow-tooltip="!isReport"> | 34 | <el-table-column prop="constraintName" label="约束条件" :width="isReport ? 'auto' : '150px'" |
| 35 | :min-width="isReport ? '100px' : undefined" align="left" :show-overflow-tooltip="!isReport"> | ||
| 33 | <template #header> | 36 | <template #header> |
| 34 | <span>约束条件</span> | 37 | <span>约束条件</span> |
| 35 | <span style="color:red;margin-left: 2px;">*</span> | 38 | <span style="color:red;margin-left: 2px;">*</span> |
| ... | @@ -43,13 +46,15 @@ | ... | @@ -43,13 +46,15 @@ |
| 43 | <span v-else>{{ scope.row['constraintName'] || '--' }}</span> | 46 | <span v-else>{{ scope.row['constraintName'] || '--' }}</span> |
| 44 | </template> | 47 | </template> |
| 45 | </el-table-column> | 48 | </el-table-column> |
| 46 | <el-table-column prop="constraintEnName" label="约束条件英文名称" :width="isReport ? 'auto' : '150px'" :min-width="isReport ? '120px' : undefined" align="left" :show-overflow-tooltip="!isReport"> | 49 | <el-table-column prop="constraintEnName" label="约束条件英文名称" :width="isReport ? 'auto' : '150px'" |
| 50 | :min-width="isReport ? '120px' : undefined" align="left" :show-overflow-tooltip="!isReport"> | ||
| 47 | <template #default="scope"> | 51 | <template #default="scope"> |
| 48 | <el-input v-if="!isLook" v-model="scope.row['constraintEnName']" :disabled="true" placeholder="-"></el-input> | 52 | <el-input v-if="!isLook" v-model="scope.row['constraintEnName']" :disabled="true" placeholder="-"></el-input> |
| 49 | <span v-else>{{ scope.row['constraintEnName'] || '--' }}</span> | 53 | <span v-else>{{ scope.row['constraintEnName'] || '--' }}</span> |
| 50 | </template> | 54 | </template> |
| 51 | </el-table-column> | 55 | </el-table-column> |
| 52 | <el-table-column prop="constraintOperatorCode" label="运算符" :width="isReport ? 'auto' : '150px'" :min-width="isReport ? '100px' : undefined" align="left" :show-overflow-tooltip="!isReport"> | 56 | <el-table-column prop="constraintOperatorCode" label="运算符" :width="isReport ? 'auto' : '150px'" |
| 57 | :min-width="isReport ? '100px' : undefined" align="left" :show-overflow-tooltip="!isReport"> | ||
| 53 | <template #header> | 58 | <template #header> |
| 54 | <span>运算符</span> | 59 | <span>运算符</span> |
| 55 | <span style="color:red;margin-left: 2px;">*</span> | 60 | <span style="color:red;margin-left: 2px;">*</span> |
| ... | @@ -63,7 +68,8 @@ | ... | @@ -63,7 +68,8 @@ |
| 63 | <span v-else>{{ scope.row['constraintOperatorName'] || '--' }}</span> | 68 | <span v-else>{{ scope.row['constraintOperatorName'] || '--' }}</span> |
| 64 | </template> | 69 | </template> |
| 65 | </el-table-column> | 70 | </el-table-column> |
| 66 | <el-table-column prop="constraintValue" label="约束值" :width="isReport ? 'auto' : '240px'" :min-width="isReport ? '160px' : undefined" align="left" :show-overflow-tooltip="!isReport"> | 71 | <el-table-column prop="constraintValue" label="约束值" :width="isReport ? 'auto' : '240px'" |
| 72 | :min-width="isReport ? '160px' : undefined" align="left" :show-overflow-tooltip="!isReport"> | ||
| 67 | <template #header> | 73 | <template #header> |
| 68 | <span>约束值</span> | 74 | <span>约束值</span> |
| 69 | <span style="color:red;margin-left: 2px;">*</span> | 75 | <span style="color:red;margin-left: 2px;">*</span> |
| ... | @@ -139,12 +145,19 @@ const props = defineProps({ | ... | @@ -139,12 +145,19 @@ const props = defineProps({ |
| 139 | type: Array<any>, | 145 | type: Array<any>, |
| 140 | default: [] | 146 | default: [] |
| 141 | }, | 147 | }, |
| 148 | productFieldList: { //字段列表 | ||
| 149 | type: Array<any>, | ||
| 150 | default: [] | ||
| 151 | }, | ||
| 142 | isReport: { | 152 | isReport: { |
| 143 | type: Boolean, | 153 | type: Boolean, |
| 144 | default: false | 154 | default: false |
| 145 | } | 155 | } |
| 146 | }) | 156 | }) |
| 147 | 157 | ||
| 158 | /** 连接器下拉列表,搜索取得 */ | ||
| 159 | const connectorList: any = ref([]); | ||
| 160 | |||
| 148 | const getActualOperationList = (scope) => { | 161 | const getActualOperationList = (scope) => { |
| 149 | let val = scope.row.constraintName; | 162 | let val = scope.row.constraintName; |
| 150 | let conditionItem = val && props.constraintOptionsList.find(c => c.policyName == val); | 163 | let conditionItem = val && props.constraintOptionsList.find(c => c.policyName == val); |
| ... | @@ -434,6 +447,20 @@ const validateValue = () => { | ... | @@ -434,6 +447,20 @@ const validateValue = () => { |
| 434 | return true; | 447 | return true; |
| 435 | } | 448 | } |
| 436 | 449 | ||
| 450 | const remoteMethod = (query: string) => { | ||
| 451 | if (query) { | ||
| 452 | // loading.value = true | ||
| 453 | // setTimeout(() => { | ||
| 454 | // loading.value = false | ||
| 455 | // options.value = list.value.filter((item) => { | ||
| 456 | // return item.label.toLowerCase().includes(query.toLowerCase()) | ||
| 457 | // }) | ||
| 458 | // }, 200) | ||
| 459 | } else { | ||
| 460 | connectorList.value = [] | ||
| 461 | } | ||
| 462 | } | ||
| 463 | |||
| 437 | defineExpose({ | 464 | defineExpose({ |
| 438 | strategyData, | 465 | strategyData, |
| 439 | validateValue | 466 | validateValue | ... | ... |
-
Please register or sign in to post a comment