77c169ab by lihua

合约策略接口联调

1 parent 50fba49d
...@@ -156,7 +156,7 @@ export const getContractDataProduct = (tenantGuid) => request({ ...@@ -156,7 +156,7 @@ export const getContractDataProduct = (tenantGuid) => request({
156 156
157 /** 获取下拉数据产品列表的去重字段 */ 157 /** 获取下拉数据产品列表的去重字段 */
158 export const getDamFieldsByProductGuid = (productGuid) => request({ 158 export const getDamFieldsByProductGuid = (productGuid) => request({
159 url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/field-by-dam-guid?productGuid=${productGuid}`, 159 url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/field-by-dam-guid?damGuid=${productGuid}`,
160 method: 'post' 160 method: 'post'
161 }) 161 })
162 162
...@@ -217,9 +217,9 @@ export const continueContractNegotiate = (params) => request({ ...@@ -217,9 +217,9 @@ export const continueContractNegotiate = (params) => request({
217 }); 217 });
218 218
219 /** 获取可选的企业下拉列表,认证过之后带标识的 */ 219 /** 获取可选的企业下拉列表,认证过之后带标识的 */
220 export const getContractTenantList = () => request({ 220 export const getContractTenantList = (tenantName = '') => request({
221 url: `${import.meta.env.VITE_APP_PERSONAL_URL}/tenant/get-social-credit-code-tenant`, 221 url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/connector-invoke/get-enterprise?tenantName=${tenantName}`,
222 method: 'post' 222 method: 'get'
223 }) 223 })
224 224
225 /** 撤回合约 */ 225 /** 撤回合约 */
......
...@@ -25,6 +25,27 @@ const routes: RouteRecordRaw[] = [ ...@@ -25,6 +25,27 @@ const routes: RouteRecordRaw[] = [
25 }, 25 },
26 ], 26 ],
27 }, 27 },
28 {
29 path: '/data-asset/data-usage',
30 component: Layout,
31 meta: {
32 title: '数据使用',
33 icon: 'sidebar-videos',
34 },
35 children: [
36 {
37 path: '',
38 name: 'dataUsage',
39 component: () => import('@/views/data_asset/dataUsage.vue'),
40 meta: {
41 title: '',
42 sidebar: false,
43 breadcrumb: false,
44 cache: true
45 },
46 },
47 ],
48 },
28 ] 49 ]
29 50
30 export default routes 51 export default routes
......
1 <script lang="ts" setup name="dataUsage">
2 import TableTools from "@/components/Tools/table_tools.vue";
3 import { commonPageConfig, TableColumnWidth } from '@/utils/enum';
4 import {
5
6 } from "@/api/modules/dataDelivery";
7
8 const router = useRouter();
9 const route = useRoute();
10 const { proxy } = getCurrentInstance() as any;
11
12 const searchItemList = ref([
13 {
14 type: "input",
15 label: "",
16 field: "dataProductName",
17 default: "",
18 placeholder: "数据产品名称",
19 maxlength: 50,
20 clearable: true,
21 },
22 {
23 type: "input",
24 label: "",
25 field: "contractName",
26 default: "",
27 placeholder: "合约名称",
28 maxlength: 50,
29 clearable: true,
30 },
31 ]);
32
33 const page = ref({
34 ...commonPageConfig,
35 dataProductName: '',
36 contractName: ''
37 });
38
39 const tableFields = ref([
40 { label: "序号", type: "index", width: 56, align: "center" },
41 {
42 label: "数据产品名称", field: "dataProductName", width: 150, type: "text_btn", columClass: 'text_btn', value: "detail", click: (scope) => {
43 router.push({
44 name: 'productListingDetail',
45 query: {
46 guid: scope.row.dataProductGuid,
47 type: 'detail',
48 name: scope.row.dataProductName,
49 }
50 });
51 }
52 },
53 {
54 label: "合约名称", field: "contractName", width: 160, type: "text_btn", columClass: 'text_btn', value: "detail1", click: (scope) => {
55 //履约中的合约状态
56 router.push({
57 name: 'smartContractDetail',
58 query: {
59 guid: scope.row.guid,
60 name: scope.row.contractName,
61 type: 'keepAgree',
62 isDetail: 'Y'
63 }
64 });
65 }
66 },
67 { label: "交付方式", field: "deliveryMethod", width: 120 },
68 {
69 label: "交付状态", field: "deliveryStatus", type: "tag", width: 96, align: 'center',
70 getName: (scope) => {
71 const deliveryStatus = scope.row.deliveryStatus
72 switch (deliveryStatus) {
73 case 1:
74 return '未交付';
75 case 2:
76 return '已交付';
77 case 3:
78 return '交付中';
79 default:
80 return '--';
81 }
82 }, tagType: (scope) => {
83 const deliveryStatus = scope.row.deliveryStatus
84 switch (deliveryStatus) {
85 case 3:
86 return 'warning';
87 case 2:
88 return 'success';
89 case 1:
90 return 'info';
91 default:
92 return 'info';
93 }
94 }
95 },
96 { label: "交付时间", field: "deliveryTime", width: 170 },
97 ]);
98
99 const currTableData: any = ref({});
100 const tableInfo = ref({
101 id: 'contract-table',
102 rowKey: 'guid',
103 loading: false,
104 fields: tableFields.value,
105 data: [], //{ verifySatus: 2 }, { verifySatus: 4 }, { verifySatus: 3, deliveryStatus: 2, }
106 page: {
107 type: "normal",
108 rows: 0,
109 ...page.value,
110 },
111 actionInfo: {
112 label: "操作",
113 type: "btn",
114 width: 160,
115 btns: (scope) => {
116 }
117 }
118 });
119
120 const toSearch = (val: any, clear: boolean = false) => {
121 if (clear) {
122 searchItemList.value.map((item) => (item.default = ""));
123 page.value.dataProductName = '';
124 page.value.contractName = '';
125 } else {
126 page.value.dataProductName = val.dataProductName;
127 page.value.contractName = val.contractName;
128 }
129 getTableData();
130 };
131
132 </script>
133
134 <template>
135 <div class="container_wrap">
136 <div class="table_tool_wrap">
137 <TableTools :searchItems="searchItemList" :searchId="'contract-search'" @search="toSearch" :init="false" />
138 </div>
139 <div class="table_panel_wrap" style="height: calc(100% - 44px);">
140 <Table :tableInfo="tableInfo" @tablePageChange="tablePageChange" />
141 </div>
142 </div>
143 </template>
144
145 <style lang="scss" scoped>
146
147 </style>
...\ No newline at end of file ...\ No newline at end of file
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
40 <template #default="scope"> 40 <template #default="scope">
41 <el-select v-if="!isLook" v-model="scope.row['constraintName']" placeholder="请选择" :disabled="isLook" 41 <el-select v-if="!isLook" v-model="scope.row['constraintName']" placeholder="请选择" :disabled="isLook"
42 @change="(val) => selectConditionChange(val, scope)" clearable filterable> 42 @change="(val) => selectConditionChange(val, scope)" clearable filterable>
43 <el-option v-for="opt in productFieldList == null ? constraintOptionsList : constraintOptionsList.filter(a => !(a.policyEnName == 'limitField' || a.policyEnName == 'limitedDeliveryConnector' || a.policyEnName == 'limitedUseConnector'))" :key="opt['policyName']" :label="opt['policyName']" 43 <el-option v-for="opt in constraintOptionsList" :key="opt['policyName']" :label="opt['policyName']"
44 :value="opt['policyName']" /> 44 :value="opt['policyName']" />
45 </el-select> 45 </el-select>
46 <span v-else>{{ scope.row['constraintName'] || '--' }}</span> 46 <span v-else>{{ scope.row['constraintName'] || '--' }}</span>
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
68 <span v-else>{{ scope.row['constraintOperatorName'] || '--' }}</span> 68 <span v-else>{{ scope.row['constraintOperatorName'] || '--' }}</span>
69 </template> 69 </template>
70 </el-table-column> 70 </el-table-column>
71 <el-table-column prop="constraintValue" label="约束值" :width="isReport ? 'auto' : '240px'" 71 <el-table-column prop="constraintValue" label="约束值" :width="isReport ? 'auto' : '340px'"
72 :min-width="isReport ? '160px' : undefined" align="left" :show-overflow-tooltip="!isReport"> 72 :min-width="isReport ? '160px' : undefined" align="left" :show-overflow-tooltip="!isReport">
73 <template #header> 73 <template #header>
74 <span>约束值</span> 74 <span>约束值</span>
...@@ -76,21 +76,25 @@ ...@@ -76,21 +76,25 @@
76 </template> 76 </template>
77 <template #default="scope"> 77 <template #default="scope">
78 <el-input 78 <el-input
79 v-if="!isLook && !((scope.row.constraintEnName == 'limitedDeliveryConnector' || scope.row.constraintEnName == 'limitedUseConnector' || scope.row.constraintEnName == 'limitField'))" 79 v-if="!isLook && !(productFieldList != null && (scope.row.constraintEnName == 'limitedDeliveryConnector' || scope.row.constraintEnName == 'limitedUseConnector' || scope.row.constraintEnName == 'dataField'))"
80 v-model="scope.row['constraintValue']" placeholder="请输入" :maxlength="200" 80 v-model="scope.row['constraintValue']" placeholder="请输入" :maxlength="200"
81 @change="(val) => handleOperatorSelectChange(val, scope, 'constraintValue')" clearable></el-input> 81 @change="(val) => handleOperatorSelectChange(val, scope, 'constraintValue')" clearable></el-input>
82 <!-- 限定连接器 --> 82 <!-- 限定连接器 -->
83 <el-select 83 <el-select
84 v-else-if="!isLook && (scope.row.constraintEnName == 'limitedDeliveryConnector' || scope.row.constraintEnName == 'limitedUseConnector')" 84 v-else-if="!isLook && productFieldList != null && (scope.row.constraintEnName == 'limitedDeliveryConnector' || scope.row.constraintEnName == 'limitedUseConnector')"
85 v-model="scope.row['constraintConnectorValue']" :remote="true" :remote-method="remoteMethod" filterable clearable placeholder="请选择"> 85 v-model="scope.row['constraintConnectorValue']" :loading="loading" :remote="true"
86 <el-option v-for="opt in connectorList" :key="opt['guid']" :label="opt['connectorName']" 86 :remote-method="remoteMethod" :max-collapse-tags="1" :collapse-tags="true" :collapse-tags-tooltip="true"
87 :value="opt['guid']" /> 87 multiple filterable clearable :placeholder="scope.row.constraintPlaceholderValue || '请输入关键字搜索'" value-key="guid">
88 <el-option v-for="opt in connectorList" :key="opt['guid']" :label="opt['tenantName']"
89 :value="opt" />
88 </el-select> 90 </el-select>
89 <!-- 加密字段 --> 91 <!-- 加密字段 -->
90 <el-select v-else-if="!isLook && scope.row.constraintEnName == 'limitField'" 92 <el-select v-else-if="!isLook && productFieldList != null && scope.row.constraintEnName == 'dataField'"
91 v-model="scope.row['constraintValue']" filterable clearable placeholder="请选择"> 93 :max-collapse-tags="1" :collapse-tags="true" :collapse-tags-tooltip="true"
94 v-model="scope.row['constraintFieldValue']" multiple filterable clearable :placeholder="scope.row.constraintPlaceholderValue || '请选择'"
95 @change="(val) => handleOperatorSelectChange(val, scope, 'constraintFieldValue')">
92 <el-option v-for="opt in productFieldList" :key="opt['enName']" :label="opt['chName']" 96 <el-option v-for="opt in productFieldList" :key="opt['enName']" :label="opt['chName']"
93 :value="opt['guid']" /> 97 :value="opt['enName']" />
94 </el-select> 98 </el-select>
95 <span v-else>{{ scope.row['constraintFieldValue'] || '--' }}</span> 99 <span v-else>{{ scope.row['constraintFieldValue'] || '--' }}</span>
96 </template> 100 </template>
...@@ -114,7 +118,8 @@ ...@@ -114,7 +118,8 @@
114 import { useValidator } from "@/hooks/useValidator"; 118 import { useValidator } from "@/hooks/useValidator";
115 import { CirclePlus } from "@element-plus/icons-vue"; 119 import { CirclePlus } from "@element-plus/icons-vue";
116 import { 120 import {
117 getValidContractTemplateList 121 getValidContractTemplateList,
122 getContractTenantList
118 } from "@/api/modules/dataSmartContract" 123 } from "@/api/modules/dataSmartContract"
119 124
120 const { required } = useValidator(); 125 const { required } = useValidator();
...@@ -147,7 +152,7 @@ const props = defineProps({ ...@@ -147,7 +152,7 @@ const props = defineProps({
147 }, 152 },
148 productFieldList: { //字段列表 153 productFieldList: { //字段列表
149 type: Array<any>, 154 type: Array<any>,
150 default: [] 155 default: null
151 }, 156 },
152 isReport: { 157 isReport: {
153 type: Boolean, 158 type: Boolean,
...@@ -155,6 +160,7 @@ const props = defineProps({ ...@@ -155,6 +160,7 @@ const props = defineProps({
155 } 160 }
156 }) 161 })
157 162
163 const loading = ref(false);
158 /** 连接器下拉列表,搜索取得 */ 164 /** 连接器下拉列表,搜索取得 */
159 const connectorList: any = ref([]); 165 const connectorList: any = ref([]);
160 166
...@@ -184,11 +190,20 @@ const strategyValueInfo: any = ref([{ ...@@ -184,11 +190,20 @@ const strategyValueInfo: any = ref([{
184 }]); 190 }]);
185 191
186 /** 将数据库存储的值转化为该组件接收的树形结构 */ 192 /** 将数据库存储的值转化为该组件接收的树形结构 */
187 const transferValueToNew = (val) => { 193 const transferValueToNew = (val, isTemplate = false) => {
188 let detailPolicyListValue: any[] = [] 194 let detailPolicyListValue: any[] = []
189 val?.forEach((p, index) => { 195 val?.forEach((p, index) => {
190 let lastItem = detailPolicyListValue?.[detailPolicyListValue.length - 1]; 196 let lastItem = detailPolicyListValue?.[detailPolicyListValue.length - 1];
191 let childInfo = Object.assign({}, p); 197 let childInfo = Object.assign({}, p);
198 if (childInfo.constraintEnName == 'dataField' && childInfo.additionValue?.length) {
199 childInfo.constraintFieldValue = childInfo.additionValue.map(a => a.enName);
200 }
201 if ((childInfo.constraintEnName == 'limitedDeliveryConnector' || childInfo.constraintEnName == 'limitedUseConnector') && childInfo.additionValue?.length) {
202 childInfo.constraintConnectorValue = childInfo.additionValue;
203 }
204 if (isTemplate && (childInfo.constraintEnName == 'dataField' || childInfo.constraintEnName == 'limitedDeliveryConnector' || childInfo.constraintEnName == 'limitedUseConnector')) {
205 childInfo.constraintPlaceholderValue = childInfo.constraintValue;
206 }
192 delete childInfo.children; //删掉冗余信息,否则后续修改会覆盖正确的值 207 delete childInfo.children; //删掉冗余信息,否则后续修改会覆盖正确的值
193 delete childInfo.action; 208 delete childInfo.action;
194 delete childInfo.actionEnName; 209 delete childInfo.actionEnName;
...@@ -212,6 +227,18 @@ watch(() => props.value, (val) => { ...@@ -212,6 +227,18 @@ watch(() => props.value, (val) => {
212 immediate: true 227 immediate: true
213 }) 228 })
214 229
230 watch(() => props.productFieldList, (val, oldValue) => {
231 strategyValueInfo.value.forEach(s => {
232 s.children?.forEach(sc => {
233 if (sc.constraintFieldValue?.length) {
234 sc.constraintFieldValue = sc.constraintFieldValue.filter(f => val.some(v => v.enName == f))
235 }
236 })
237 })
238 }, {
239 deep: true
240 })
241
215 /** 策略信息表格数据 */ 242 /** 策略信息表格数据 */
216 const strategyData = computed(() => { 243 const strategyData = computed(() => {
217 let v: any = []; 244 let v: any = [];
...@@ -312,7 +339,7 @@ const handleConditionDelete = (scope) => { ...@@ -312,7 +339,7 @@ const handleConditionDelete = (scope) => {
312 const mergedIndexes = computed(() => { 339 const mergedIndexes = computed(() => {
313 let index = 1; 340 let index = 1;
314 const mergedIndexes: any[] = []; 341 const mergedIndexes: any[] = [];
315 342
316 for (let i = 0; i < strategyData.value.length; i++) { 343 for (let i = 0; i < strategyData.value.length; i++) {
317 if (i === 0 || strategyData.value[i - 1]['action'] != strategyData.value[i]['action'] || strategyData.value[i - 1]['index'] != strategyData.value[i]['index']) { 344 if (i === 0 || strategyData.value[i - 1]['action'] != strategyData.value[i]['action'] || strategyData.value[i - 1]['index'] != strategyData.value[i]['index']) {
318 // 新合并组开始 345 // 新合并组开始
...@@ -323,7 +350,7 @@ const mergedIndexes = computed(() => { ...@@ -323,7 +350,7 @@ const mergedIndexes = computed(() => {
323 mergedIndexes.push(0); // 0表示不显示序号 350 mergedIndexes.push(0); // 0表示不显示序号
324 } 351 }
325 } 352 }
326 353
327 return mergedIndexes; 354 return mergedIndexes;
328 }); 355 });
329 356
...@@ -416,7 +443,7 @@ const templateDialogInfo = ref({ ...@@ -416,7 +443,7 @@ const templateDialogInfo = ref({
416 templateDialogInfo.value.visible = false; 443 templateDialogInfo.value.visible = false;
417 //将选择的值带入表格 TODO,跟经理确认是全量覆盖,还是保留操作行为不同的行。暂时先做成全量覆盖吧。 444 //将选择的值带入表格 TODO,跟经理确认是全量覆盖,还是保留操作行为不同的行。暂时先做成全量覆盖吧。
418 let item: any = templateFormItems.value[0].options?.find((i: any) => i.guid == info.guid); 445 let item: any = templateFormItems.value[0].options?.find((i: any) => i.guid == info.guid);
419 strategyValueInfo.value = transferValueToNew(item?.policyRSVOS || []); 446 strategyValueInfo.value = transferValueToNew(item?.policyRSVOS || [], true);
420 }, 447 },
421 cancel: () => { 448 cancel: () => {
422 templateDialogInfo.value.visible = false; 449 templateDialogInfo.value.visible = false;
...@@ -443,12 +470,29 @@ const validateValue = () => { ...@@ -443,12 +470,29 @@ const validateValue = () => {
443 proxy.$ElMessage.error('约束值必填,请填写完整'); 470 proxy.$ElMessage.error('约束值必填,请填写完整');
444 return false; 471 return false;
445 } 472 }
473 if (d.constraintName.includes('字段') && !d.constraintFieldValue?.length) {
474 proxy.$ElMessage.error('约束值必填,请填写完整');
475 return false;
476 }
477 if ((d.constraintEnName == 'limitedDeliveryConnector' || d.constraintEnName == 'limitedUseConnector') && !d.constraintConnectorValue?.length) {
478 proxy.$ElMessage.error('约束值必填,请填写完整');
479 return false;
480 }
446 } 481 }
447 return true; 482 return true;
448 } 483 }
449 484
450 const remoteMethod = (query: string) => { 485 const remoteMethod = (query: string) => {
451 if (query) { 486 if (query) {
487 loading.value = true;
488 getContractTenantList(query).then((res: any) => {
489 loading.value = false;
490 if (res.code == proxy.$passCode) {
491 connectorList.value = res.data || [];
492 } else {
493 res?.msg && proxy.$ElMessage.error(res.msg);
494 }
495 })
452 // loading.value = true 496 // loading.value = true
453 // setTimeout(() => { 497 // setTimeout(() => {
454 // loading.value = false 498 // loading.value = false
......
...@@ -310,17 +310,17 @@ const hanldeTableSelectChange = (val, scope, item) => { ...@@ -310,17 +310,17 @@ const hanldeTableSelectChange = (val, scope, item) => {
310 scope.row.dataProductType = productItem?.productType; 310 scope.row.dataProductType = productItem?.productType;
311 scope.row.dataProductTypeName = productItem?.productTypeName; 311 scope.row.dataProductTypeName = productItem?.productTypeName;
312 /** 选择了产品,需要重新查询去重字段 */ 312 /** 选择了产品,需要重新查询去重字段 */
313 if (val?.productGuid) { 313 if (productItem?.productGuid) {
314 getDamFieldsByProductGuid(val?.productGuid).then((res: any) => { 314 getDamFieldsByProductGuid(productItem?.productGuid).then((res: any) => {
315 if (res?.code == proxy.$passCode) { 315 if (res?.code == proxy.$passCode) {
316 productFieldList.value = res.data || []; 316 productFieldList.value = res.data || initStrategyData.value;
317 } else { 317 } else {
318 productFieldList.value = []; 318 productFieldList.value = [];
319 res?.msg && proxy.$ElMessage.error(res?.msg) 319 res?.msg && proxy.$ElMessage.error(res?.msg)
320 } 320 }
321 }) 321 })
322 } else { 322 } else {
323 productFieldList.value = []; 323 productFieldList.value = initProductFieldValue.value;
324 } 324 }
325 // 连接器只能选择数据提供方的产品,不需要切换了 325 // 连接器只能选择数据提供方的产品,不需要切换了
326 // let nodeInfo = nodeInfoFormRef.value.formInline; 326 // let nodeInfo = nodeInfoFormRef.value.formInline;
...@@ -436,7 +436,11 @@ const constraintOptionsList: any = ref([]); ...@@ -436,7 +436,11 @@ const constraintOptionsList: any = ref([]);
436 const actionOptionsList: any = ref([]); 436 const actionOptionsList: any = ref([]);
437 437
438 /** 根据选择的数据产品显示限定字段下拉列表 */ 438 /** 根据选择的数据产品显示限定字段下拉列表 */
439 const productFieldList :any = ref([]); 439 const initProductFieldValue: any = ref([]);
440 const productFieldList: any = ref([]);
441
442 /** 初始化的策略值为空数组 */
443 const initStrategyData = ref([]);
440 444
441 const getSubmitInfo = () => { 445 const getSubmitInfo = () => {
442 let baseInfo = baseInfoFormRef.value.formInline; 446 let baseInfo = baseInfoFormRef.value.formInline;
...@@ -456,7 +460,17 @@ const getSubmitInfo = () => { ...@@ -456,7 +460,17 @@ const getSubmitInfo = () => {
456 executionerName: tenantList.value.find(t => t.guid == nodeInfo.dataUserGuid)?.tenantName 460 executionerName: tenantList.value.find(t => t.guid == nodeInfo.dataUserGuid)?.tenantName
457 }]; 461 }];
458 params.policys = strategyTableRef.value.strategyData?.map((d, index) => { 462 params.policys = strategyTableRef.value.strategyData?.map((d, index) => {
459 return Object.assign({}, d, { orderNum: index + 1 }) 463 let v = Object.assign({}, d, { orderNum: index + 1, });
464 if (d.constraintName.includes('字段') && d.constraintFieldValue?.length) {
465 v.constraintValue = d.constraintFieldValue.join(',');
466 v.additionValue = d.constraintFieldValue?.map(dv => {
467 return {
468 enName: dv,
469 chName: productFieldList?.value.find(p => p.enName == dv)?.chName || dv
470 }
471 })
472 }
473 return v;
460 }) || []; 474 }) || [];
461 return params; 475 return params;
462 } 476 }
...@@ -647,10 +661,10 @@ onBeforeMount(() => { ...@@ -647,10 +661,10 @@ onBeforeMount(() => {
647 let exec = () => { 661 let exec = () => {
648 let userRole = localStorage.getItem('userRole'); 662 let userRole = localStorage.getItem('userRole');
649 if (userRole == USERROLE.PROVIDER) { 663 if (userRole == USERROLE.PROVIDER) {
650 // baseInfoFormItems.value[1].disabled = true; 664 // baseInfoFormItems.value[1].disabled = true;
651 baseInfoFormItems.value[1].default = '01'; 665 baseInfoFormItems.value[1].default = '01';
652 productTableInfo.value.editInfo.dataProductId.props.label = 'productName'; 666 productTableInfo.value.editInfo.dataProductId.props.label = 'productName';
653 } 667 }
654 // else { //可以选点对点。未认证时只能选择中介参与 668 // else { //可以选点对点。未认证时只能选择中介参与
655 // baseInfoFormItems.value[1].disabled = !currTenantDetailInfo.value.trustedIdentityCredential; 669 // baseInfoFormItems.value[1].disabled = !currTenantDetailInfo.value.trustedIdentityCredential;
656 // baseInfoFormItems.value[1].default = !currTenantDetailInfo.value.trustedIdentityCredential ? '02' : '01'; 670 // baseInfoFormItems.value[1].default = !currTenantDetailInfo.value.trustedIdentityCredential ? '02' : '01';
...@@ -687,6 +701,19 @@ onBeforeMount(() => { ...@@ -687,6 +701,19 @@ onBeforeMount(() => {
687 extendTableInfo.value.data = extendData.value; 701 extendTableInfo.value.data = extendData.value;
688 productData.value = detailInfo.value.contractSubjects || []; 702 productData.value = detailInfo.value.contractSubjects || [];
689 productTableInfo.value.data = productData.value; 703 productTableInfo.value.data = productData.value;
704 let productGuid = productData.value?.[0]?.dataProductGuid;
705 if (productGuid) {
706 getDamFieldsByProductGuid(productGuid).then((res: any) => {
707 if (res?.code == proxy.$passCode) {
708 productFieldList.value = res.data || initProductFieldValue.value;
709 } else {
710 productFieldList.value = initProductFieldValue.value;
711 res?.msg && proxy.$ElMessage.error(res?.msg)
712 }
713 })
714 } else {
715 productFieldList.value = initProductFieldValue.value;
716 }
690 } else { 717 } else {
691 res?.msg && proxy.$ElMessage.error(res?.msg) 718 res?.msg && proxy.$ElMessage.error(res?.msg)
692 } 719 }
...@@ -835,9 +862,9 @@ onActivated(() => { ...@@ -835,9 +862,9 @@ onActivated(() => {
835 <div class="h-title">策略执行节点</div> 862 <div class="h-title">策略执行节点</div>
836 <Form ref="nodeInfoFormRef" formId="node-info-form" :itemList="nodeInfoFormItems" :rules="nodeInfoFormRules" 863 <Form ref="nodeInfoFormRef" formId="node-info-form" :itemList="nodeInfoFormItems" :rules="nodeInfoFormRules"
837 @select-change="handleNodeSelectChange" col="col3" /> 864 @select-change="handleNodeSelectChange" col="col3" />
838 <StrategyTable ref="strategyTableRef" :show-title="true" :value="detailInfo.policys || []" 865 <StrategyTable ref="strategyTableRef" :show-title="true" :value="detailInfo.policys || initStrategyData"
839 :operatorOptionList="operatorOptionList" :actionOptionsList="actionOptionsList" :productFieldList="productFieldList" 866 :operatorOptionList="operatorOptionList" :actionOptionsList="actionOptionsList"
840 :constraintOptionsList="constraintOptionsList"></StrategyTable> 867 :productFieldList="productFieldList" :constraintOptionsList="constraintOptionsList"></StrategyTable>
841 </ContentWrap> 868 </ContentWrap>
842 </div> 869 </div>
843 <div class="tool_btns"> 870 <div class="tool_btns">
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!