40ced974 by lihua

策略管理接口联调

1 parent 4c244be7
1 # 页面标题 1 # 页面标题
2 VITE_APP_TITLE = 可信数据空间 2 VITE_APP_TITLE = 可信数据服务平台
3 # 接口域名 3 # 接口域名
4 # VITE_API_BASEURL = https://www.zgsjzc.com/api 4 # VITE_API_BASEURL = https://www.zgsjzc.com/api
5 # VITE_API_BASEURL = https://swzl-test.csbr.cn/api 5 # VITE_API_BASEURL = https://swzl-test.csbr.cn/api
......
1 import request from "@/utils/request";
2
3 /** 数据交付 */
4
5 export const getPageList = (params) => request({
6 url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/contract-delivery/page-list`,
7 method: 'post',
8 data: params
9 })
10
11 export const deleteDeliveryContract = (params) => request({
12 url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/contract-delivery/delete`,
13 method: 'delete',
14 data: params
15 });
...\ No newline at end of file ...\ No newline at end of file
...@@ -154,6 +154,12 @@ export const getContractDataProduct = (tenantGuid) => request({ ...@@ -154,6 +154,12 @@ export const getContractDataProduct = (tenantGuid) => request({
154 method: 'post' 154 method: 'post'
155 }) 155 })
156 156
157 /** 获取下拉数据产品列表的去重字段 */
158 export const getDamFieldsByProductGuid = (productGuid) => request({
159 url: `${import.meta.env.VITE_API_NEW_PORTAL}/dam-catalog-table/field-by-dam-guid?productGuid=${productGuid}`,
160 method: 'post'
161 })
162
157 /** 创建合约 */ 163 /** 创建合约 */
158 export const saveContract = (params) => request({ 164 export const saveContract = (params) => request({
159 url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/contract/save`, 165 url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/contract/save`,
......
1 import type { RouteRecordRaw } from 'vue-router'
2 function Layout() {
3 return import('@/layouts/index.vue')
4 }
5
6 const routes: RouteRecordRaw[] = [
7 {
8 path: '/data-asset/data-delivery',
9 component: Layout,
10 meta: {
11 title: '数据交付',
12 icon: 'sidebar-videos',
13 },
14 children: [
15 {
16 path: '',
17 name: 'dataDelivery',
18 component: () => import('@/views/data_asset/dataDelivery.vue'),
19 meta: {
20 title: '',
21 sidebar: false,
22 breadcrumb: false,
23 cache: true
24 },
25 },
26 ],
27 },
28 ]
29
30 export default routes
...@@ -6,6 +6,7 @@ import DataService from './modules/dataService'; ...@@ -6,6 +6,7 @@ import DataService from './modules/dataService';
6 import DataSmartContract from './modules/dataSmartContract'; 6 import DataSmartContract from './modules/dataSmartContract';
7 import DataFacilitator from './modules/dataFacilitator'; 7 import DataFacilitator from './modules/dataFacilitator';
8 import HomeIndex from './modules/homeIndex'; 8 import HomeIndex from './modules/homeIndex';
9 import DataDelivery from './modules/dataDelivery';
9 10
10 import useSettingsStore from '@/store/modules/settings' 11 import useSettingsStore from '@/store/modules/settings'
11 12
...@@ -97,6 +98,7 @@ const asyncRoutes: RouteRecordRaw[] = [ ...@@ -97,6 +98,7 @@ const asyncRoutes: RouteRecordRaw[] = [
97 ...DataSmartContract, 98 ...DataSmartContract,
98 ...DataFacilitator, 99 ...DataFacilitator,
99 ...HomeIndex, 100 ...HomeIndex,
101 ...DataDelivery,
100 // ...DataAssetRegistry, 102 // ...DataAssetRegistry,
101 ] 103 ]
102 104
......
...@@ -40,7 +40,7 @@ const globalSettings: Settings.all = { ...@@ -40,7 +40,7 @@ const globalSettings: Settings.all = {
40 }, 40 },
41 "home": { 41 "home": {
42 "enable": false, 42 "enable": false,
43 "title": "可信数据空间" 43 "title": "可信数据服务平台"
44 }, 44 },
45 "breadcrumb": { 45 "breadcrumb": {
46 "enable": true 46 "enable": true
......
1 <route lang="yaml"> 1 <route lang="yaml">
2 name: notFound 2 name: notFound
3 meta: 3 meta:
4 title: 可信数据空间 4 title: 可信数据服务平台
5 constant: true 5 constant: true
6 layout: false 6 layout: false
7 </route> 7 </route>
......
1 <script lang="ts" setup name="dataDelivery">
2 import TableTools from "@/components/Tools/table_tools.vue";
3 import { commonPageConfig } from '@/utils/enum';
4 import {
5 getPageList,
6 deleteDeliveryContract
7 } from "@/api/modules/dataDelivery";
8
9 const router = useRouter();
10 const route = useRoute();
11 const { proxy } = getCurrentInstance() as any;
12
13 /** 核验状态列表 */
14 const verifySatusList = ref([{
15 value: 1,
16 label: '未执行'
17 }, {
18 value: 2,
19 label: '已执行'
20 }, {
21 value: 3,
22 label: '通过'
23 }, {
24 value: 4,
25 label: '未通过'
26 }]);
27
28 const searchItemList = ref([
29 {
30 type: "input",
31 label: "",
32 field: "dataProductName",
33 default: "",
34 placeholder: "数据产品名称",
35 maxlength: 50,
36 clearable: true,
37 },
38 {
39 type: "input",
40 label: "",
41 field: "contractName",
42 default: "",
43 placeholder: "合约名称",
44 maxlength: 50,
45 clearable: true,
46 },
47 {
48 type: 'select',
49 label: '',
50 field: 'verifySatus',
51 default: '',
52 placeholder: '核验状态',
53 options: verifySatusList.value,
54 filterable: true,
55 clearable: true
56 }
57 ]);
58
59 const tableFields = ref([
60 { label: "序号", type: "index", width: 56, align: "center" },
61 {
62 label: "数据产品名称", field: "dataProductName", width: 150, type: "text_btn", columClass: 'text_btn', value: "detail", click: (scope) => {
63 router.push({
64 name: 'productListingDetail',
65 query: {
66 guid: scope.row.dataProductGuid,
67 type: 'detail',
68 name: scope.row.dataProductName,
69 }
70 });
71 }
72 },
73 {
74 label: "合约名称", field: "contractName", width: 160, type: "text_btn", columClass: 'text_btn', value: "detail1", click: (scope) => {
75 //履约中的合约状态
76 router.push({
77 name: 'smartContractDetail',
78 query: {
79 guid: scope.row.guid,
80 name: scope.row.contractName,
81 type: 'keepAgree',
82 isDetail: 'Y'
83 }
84 });
85 }
86 },
87 { label: "交付方式", field: "deliveryMethod", width: 120 },
88 {
89 label: "交付状态", field: "deliveryStatus", type: "tag", width: 96, align: 'center',
90 getName: (scope) => {
91 const deliveryStatus = scope.row.deliveryStatus
92 switch (deliveryStatus) {
93 case 1:
94 return '未交付';
95 case 2:
96 return '已交付';
97 case 3:
98 return '交付中';
99 default:
100 return '--';
101 }
102 }, tagType: (scope) => {
103 const deliveryStatus = scope.row.deliveryStatus
104 switch (deliveryStatus) {
105 case 3:
106 return 'warning';
107 case 2:
108 return 'success';
109 case 1:
110 return 'info';
111 default:
112 return 'info';
113 }
114 }
115 },
116 {
117 label: "核验状态", field: "verifySatus", type: "tag", width: 96, align: 'center',
118 getName: (scope) => {
119 const verifySatus = scope.row.verifySatus
120 switch (verifySatus) {
121 case 1:
122 return '未执行';
123 case 2:
124 return '已执行';
125 case 3:
126 return '通过';
127 case 4:
128 return '未通过';
129 default:
130 return '--';
131 }
132 }, tagType: (scope) => {
133 const verifySatus = scope.row.verifySatus
134 switch (verifySatus) {
135 case 1:
136 return 'info';
137 case 3:
138 return 'success';
139 case 2:
140 return 'warning';
141 case 4:
142 return 'danger';
143 default:
144 return 'info';
145 }
146 }
147 },
148 { label: "核验时间", field: "verifyTime", width: 170 },
149 { label: "交付时间", field: "deliveryTime", width: 170 },
150 ]);
151
152 const page = ref({
153 ...commonPageConfig,
154 dataProductName: '',
155 contractName: '',
156 verifySatus: ''
157 });
158
159 const currTableData: any = ref({});
160 const tableInfo = ref({
161 id: 'contract-table',
162 rowKey: 'guid',
163 loading: false,
164 fields: tableFields.value,
165 data: [{ verifySatus: 4 }, {}],
166 page: {
167 type: "normal",
168 rows: 0,
169 ...page.value,
170 },
171 actionInfo: {
172 label: "操作",
173 type: "btn",
174 width: 160,
175 btns: (scope) => {
176 let btns: any = [];
177 let row = scope.row;
178 let deliveryStatus = row.deliveryStatus;
179 if (deliveryStatus == 2) {//已交付有删除按钮
180 btns.push({
181 value: 'del', label: '删除', click: (scope) => {
182 proxy.$openMessageBox("此操作将永久删除, 是否继续?", () => {
183 deleteDeliveryContract([scope.row.guid]).then((res: any) => {
184 if (res?.code == proxy.$passCode) {
185 page.value.curr = 1;
186 getTableData();
187 proxy.$ElMessage.success('删除成功');
188 } else {
189 res?.msg && proxy.$ElMessage.error(res?.msg);
190 }
191 });
192 }, () => {
193 proxy.$ElMessage.info("已取消");
194 })
195 }
196 });
197 } else {
198 btns.push({
199 value: 'refresh', label: '刷新', click: (scope) => {
200
201 }
202 });
203 }
204
205 // 交付只有核验通过有。
206 let verifySatus = row.verifySatus;
207 if (verifySatus == 2) {
208 btns.push({
209 value: 'verify', label: '核验', click: (scope) => {
210
211 }
212 });
213 }
214 return btns;
215 }
216 }
217 });
218
219 const toSearch = (val: any, clear: boolean = false) => {
220 if (clear) {
221 searchItemList.value.map((item) => (item.default = ""));
222 page.value.dataProductName = '';
223 page.value.contractName = '';
224 page.value.verifySatus = "";
225 } else {
226 page.value.dataProductName = val.dataProductName;
227 page.value.contractName = val.contractName;
228 page.value.verifySatus = val.verifySatus;
229 }
230 getTableData();
231 };
232
233 const getTableData = () => {
234 tableInfo.value.loading = true
235 getPageList({
236 pageIndex: page.value.curr,
237 pageSize: page.value.limit,
238 dataProductName: page.value.dataProductName,
239 contractName: page.value.contractName,
240 verifySatus: page.value.verifySatus
241 }).then((res: any) => {
242 tableInfo.value.loading = false
243 if (res?.code == proxy.$passCode) {
244 const data = res.data || {}
245 // tableInfo.value.data = data.records || []
246 tableInfo.value.page.limit = data.pageSize
247 tableInfo.value.page.curr = data.pageIndex
248 tableInfo.value.page.rows = data.totalRows
249 } else {
250 res?.msg && proxy.$ElMessage.error(res?.msg)
251 }
252 }).catch(() => {
253 tableInfo.value.loading = false
254 })
255 };
256
257 const tablePageChange = (info) => {
258 page.value.curr = Number(info.curr);
259 page.value.limit = Number(info.limit);
260 tableInfo.value.page.curr = page.value.curr;
261 tableInfo.value.page.limit = page.value.limit;
262 getTableData();
263 };
264
265 onBeforeMount(() => {
266 toSearch({});
267 });
268
269 </script>
270
271 <template>
272 <div class="container_wrap">
273 <div class="table_tool_wrap">
274 <TableTools :searchItems="searchItemList" :searchId="'contract-search'" @search="toSearch" :init="false" />
275 </div>
276 <div class="table_panel_wrap" style="height: calc(100% - 44px);">
277 <Table :tableInfo="tableInfo" @tablePageChange="tablePageChange" />
278 </div>
279 </div>
280 </template>
281
282 <style lang="scss" scoped>
283 .container_wrap {
284 padding: 0px 16px;
285 }
286 </style>
...\ No newline at end of file ...\ No newline at end of file
...@@ -4,30 +4,35 @@ ...@@ -4,30 +4,35 @@
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'" :min-width="isReport ? '100px' : undefined" align="left" :show-overflow-tooltip="!isReport"> 10 <el-table-column prop="action" label="行为类型" :width="isReport ? 'auto' : '150px'"
11 :min-width="isReport ? '100px' : undefined" align="left" :show-overflow-tooltip="!isReport">
10 <template #header> 12 <template #header>
11 <span>操作行为</span> 13 <span>行为类型</span>
12 <span style="color:red;margin-left: 2px;">*</span> 14 <span style="color:red;margin-left: 2px;">*</span>
13 </template> 15 </template>
14 <template #default="scope"> 16 <template #default="scope">
15 <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"
16 @change="(val) => selectOperationChange(val, scope)" clearable filterable> 18 @change="(val) => selectOperationChange(val, scope)" clearable filterable>
19 <!-- 合约模板时不可以设置这个属性,只能在合约创建时设置 -->
17 <el-option 20 <el-option
18 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))"
19 :key="opt['policyName']" :label="opt['policyName']" :value="opt['policyName']" /> 22 :key="opt['policyName']" :label="opt['policyName']" :value="opt['policyName']" />
20 </el-select> 23 </el-select>
21 <span v-else>{{ scope.row['action'] || '--' }}</span> 24 <span v-else>{{ scope.row['action'] || '--' }}</span>
22 </template> 25 </template>
23 </el-table-column> 26 </el-table-column>
24 <el-table-column prop="actionEnName" label="操作行为英文名称" :width="isReport ? 'auto' : '150px'" :min-width="isReport ? '120px' : undefined" align="left" :show-overflow-tooltip="!isReport"> 27 <el-table-column prop="actionEnName" label="行为类型英文名称" :width="isReport ? 'auto' : '150px'"
28 :min-width="isReport ? '120px' : undefined" align="left" :show-overflow-tooltip="!isReport">
25 <template #default="scope"> 29 <template #default="scope">
26 <el-input v-if="!isLook" v-model="scope.row['actionEnName']" :disabled="true" placeholder="-"></el-input> 30 <el-input v-if="!isLook" v-model="scope.row['actionEnName']" :disabled="true" placeholder="-"></el-input>
27 <span v-else>{{ scope.row['actionEnName'] || '--' }}</span> 31 <span v-else>{{ scope.row['actionEnName'] || '--' }}</span>
28 </template> 32 </template>
29 </el-table-column> 33 </el-table-column>
30 <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">
31 <template #header> 36 <template #header>
32 <span>约束条件</span> 37 <span>约束条件</span>
33 <span style="color:red;margin-left: 2px;">*</span> 38 <span style="color:red;margin-left: 2px;">*</span>
...@@ -41,13 +46,15 @@ ...@@ -41,13 +46,15 @@
41 <span v-else>{{ scope.row['constraintName'] || '--' }}</span> 46 <span v-else>{{ scope.row['constraintName'] || '--' }}</span>
42 </template> 47 </template>
43 </el-table-column> 48 </el-table-column>
44 <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">
45 <template #default="scope"> 51 <template #default="scope">
46 <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>
47 <span v-else>{{ scope.row['constraintEnName'] || '--' }}</span> 53 <span v-else>{{ scope.row['constraintEnName'] || '--' }}</span>
48 </template> 54 </template>
49 </el-table-column> 55 </el-table-column>
50 <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">
51 <template #header> 58 <template #header>
52 <span>运算符</span> 59 <span>运算符</span>
53 <span style="color:red;margin-left: 2px;">*</span> 60 <span style="color:red;margin-left: 2px;">*</span>
...@@ -61,15 +68,31 @@ ...@@ -61,15 +68,31 @@
61 <span v-else>{{ scope.row['constraintOperatorName'] || '--' }}</span> 68 <span v-else>{{ scope.row['constraintOperatorName'] || '--' }}</span>
62 </template> 69 </template>
63 </el-table-column> 70 </el-table-column>
64 <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">
65 <template #header> 73 <template #header>
66 <span>约束值</span> 74 <span>约束值</span>
67 <span style="color:red;margin-left: 2px;">*</span> 75 <span style="color:red;margin-left: 2px;">*</span>
68 </template> 76 </template>
69 <template #default="scope"> 77 <template #default="scope">
70 <el-input v-if="!isLook" v-model="scope.row['constraintValue']" placeholder="请输入" :maxlength="200" 78 <el-input
71 @change="(val) => handleOperatorSelectChange(val, scope, 'constraintValue')" clearable></el-input> 79 v-if="!isLook && !((scope.row.constraintEnName == 'limitedDeliveryConnector' || scope.row.constraintEnName == 'limitedUseConnector' || scope.row.constraintEnName == 'limitField'))"
72 <span v-else>{{ scope.row['constraintValue'] || '--' }}</span> 80 v-model="scope.row['constraintValue']" placeholder="请输入" :maxlength="200"
81 @change="(val) => handleOperatorSelectChange(val, scope, 'constraintValue')" clearable></el-input>
82 <!-- 限定连接器 -->
83 <el-select
84 v-else-if="!isLook && (scope.row.constraintEnName == 'limitedDeliveryConnector' || scope.row.constraintEnName == 'limitedUseConnector')"
85 v-model="scope.row['constraintConnectorValue']" :remote="true" :remote-method="remoteMethod" filterable clearable placeholder="请选择">
86 <el-option v-for="opt in connectorList" :key="opt['guid']" :label="opt['connectorName']"
87 :value="opt['guid']" />
88 </el-select>
89 <!-- 加密字段 -->
90 <el-select v-else-if="!isLook && scope.row.constraintEnName == 'limitField'"
91 v-model="scope.row['constraintValue']" filterable clearable placeholder="请选择">
92 <el-option v-for="opt in productFieldList" :key="opt['enName']" :label="opt['chName']"
93 :value="opt['guid']" />
94 </el-select>
95 <span v-else>{{ scope.row['constraintFieldValue'] || '--' }}</span>
73 </template> 96 </template>
74 </el-table-column> 97 </el-table-column>
75 <el-table-column v-if="!isLook" label="操作" width="140px" align="left" fixed="right" show-overflow-tooltip> 98 <el-table-column v-if="!isLook" label="操作" width="140px" align="left" fixed="right" show-overflow-tooltip>
...@@ -81,7 +104,7 @@ ...@@ -81,7 +104,7 @@
81 </el-table-column> 104 </el-table-column>
82 </el-table> 105 </el-table>
83 <div v-if="!isLook" class="row-add-btn"> 106 <div v-if="!isLook" class="row-add-btn">
84 <el-button link @click="addStrategy" :icon="CirclePlus" v-preReClick>添加操作行为</el-button> 107 <el-button link @click="addStrategy" :icon="CirclePlus" v-preReClick>添加行为类型</el-button>
85 </div> 108 </div>
86 <!-- 选择合约模板对话框 --> 109 <!-- 选择合约模板对话框 -->
87 <Dialog_form :dialogConfigInfo="templateDialogInfo" /> 110 <Dialog_form :dialogConfigInfo="templateDialogInfo" />
...@@ -122,12 +145,19 @@ const props = defineProps({ ...@@ -122,12 +145,19 @@ const props = defineProps({
122 type: Array<any>, 145 type: Array<any>,
123 default: [] 146 default: []
124 }, 147 },
148 productFieldList: { //字段列表
149 type: Array<any>,
150 default: []
151 },
125 isReport: { 152 isReport: {
126 type: Boolean, 153 type: Boolean,
127 default: false 154 default: false
128 } 155 }
129 }) 156 })
130 157
158 /** 连接器下拉列表,搜索取得 */
159 const connectorList: any = ref([]);
160
131 const getActualOperationList = (scope) => { 161 const getActualOperationList = (scope) => {
132 let val = scope.row.constraintName; 162 let val = scope.row.constraintName;
133 let conditionItem = val && props.constraintOptionsList.find(c => c.policyName == val); 163 let conditionItem = val && props.constraintOptionsList.find(c => c.policyName == val);
...@@ -227,7 +257,7 @@ const handleOperatorSelectChange = (val, scope, field) => { ...@@ -227,7 +257,7 @@ const handleOperatorSelectChange = (val, scope, field) => {
227 const addStrategy = () => { 257 const addStrategy = () => {
228 let len = strategyValueInfo.value.length; 258 let len = strategyValueInfo.value.length;
229 if (len == props.actionOptionsList?.length) { 259 if (len == props.actionOptionsList?.length) {
230 proxy.$ElMessage.warning('暂无可添加的操作行为!'); 260 proxy.$ElMessage.warning('暂无可添加的行为类型!');
231 return; 261 return;
232 } 262 }
233 let lastIndex = strategyValueInfo.value.at(-1)?.index || 0; 263 let lastIndex = strategyValueInfo.value.at(-1)?.index || 0;
...@@ -268,7 +298,7 @@ const handleConditionDelete = (scope) => { ...@@ -268,7 +298,7 @@ const handleConditionDelete = (scope) => {
268 }) 298 })
269 } else { 299 } else {
270 //同步删除操作行为 300 //同步删除操作行为
271 proxy.$openMessageBox("确定要删除该操作行为和约束条件吗?", () => { 301 proxy.$openMessageBox("确定要删除该行为类型和约束条件吗?", () => {
272 let index = scope.row.index; 302 let index = scope.row.index;
273 strategyValueInfo.value.splice(index - 1, 1); 303 strategyValueInfo.value.splice(index - 1, 1);
274 proxy.$ElMessage.success('删除成功'); 304 proxy.$ElMessage.success('删除成功');
...@@ -398,7 +428,7 @@ const templateDialogInfo = ref({ ...@@ -398,7 +428,7 @@ const templateDialogInfo = ref({
398 const validateValue = () => { 428 const validateValue = () => {
399 for (const d of strategyData.value) { 429 for (const d of strategyData.value) {
400 if (!d.action) { 430 if (!d.action) {
401 proxy.$ElMessage.error('操作行为必填,请填写完整'); 431 proxy.$ElMessage.error('行为类型必填,请填写完整');
402 return false; 432 return false;
403 } 433 }
404 if (!d.constraintName) { 434 if (!d.constraintName) {
...@@ -417,6 +447,20 @@ const validateValue = () => { ...@@ -417,6 +447,20 @@ const validateValue = () => {
417 return true; 447 return true;
418 } 448 }
419 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
420 defineExpose({ 464 defineExpose({
421 strategyData, 465 strategyData,
422 validateValue 466 validateValue
......
...@@ -13,6 +13,7 @@ import { ...@@ -13,6 +13,7 @@ import {
13 getContractTenantList, 13 getContractTenantList,
14 saveContract, 14 saveContract,
15 updateContract, 15 updateContract,
16 getDamFieldsByProductGuid
16 } from "@/api/modules/dataSmartContract" 17 } from "@/api/modules/dataSmartContract"
17 import StrategyTable from "./components/strategyTable.vue"; 18 import StrategyTable from "./components/strategyTable.vue";
18 import { CirclePlus } from "@element-plus/icons-vue"; 19 import { CirclePlus } from "@element-plus/icons-vue";
...@@ -239,6 +240,7 @@ const productTableInfo = ref({ ...@@ -239,6 +240,7 @@ const productTableInfo = ref({
239 { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" }, 240 { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" },
240 { label: "数据产品", field: "dataProductId", width: 180, required: true, columClass: 'edit-colum', type: 'edit' }, 241 { label: "数据产品", field: "dataProductId", width: 180, required: true, columClass: 'edit-colum', type: 'edit' },
241 { label: "数据产品编码", field: "dataProductId", width: 261 }, 242 { label: "数据产品编码", field: "dataProductId", width: 261 },
243 { label: "产品类型", field: "dataProductTypeName", width: 100 },
242 { label: "所属主体名称", field: "dataProductEntityName", width: 200 }, 244 { label: "所属主体名称", field: "dataProductEntityName", width: 200 },
243 { label: "产品简介", field: "dataProductAbstract", width: 240 }, 245 { label: "产品简介", field: "dataProductAbstract", width: 240 },
244 ], 246 ],
...@@ -304,6 +306,22 @@ const hanldeTableSelectChange = (val, scope, item) => { ...@@ -304,6 +306,22 @@ const hanldeTableSelectChange = (val, scope, item) => {
304 scope.row.dataProductEntityId = productItem?.enterpriseCode; 306 scope.row.dataProductEntityId = productItem?.enterpriseCode;
305 scope.row.dataProductAbstract = productItem?.description; 307 scope.row.dataProductAbstract = productItem?.description;
306 scope.row.dataProductEntityName = productItem?.enterpriseName; 308 scope.row.dataProductEntityName = productItem?.enterpriseName;
309 scope.row.dataProductGuid = productItem?.productGuid;
310 scope.row.dataProductType = productItem?.productType;
311 scope.row.dataProductTypeName = productItem?.productTypeName;
312 /** 选择了产品,需要重新查询去重字段 */
313 if (val?.productGuid) {
314 getDamFieldsByProductGuid(val?.productGuid).then((res: any) => {
315 if (res?.code == proxy.$passCode) {
316 productFieldList.value = res.data || [];
317 } else {
318 productFieldList.value = [];
319 res?.msg && proxy.$ElMessage.error(res?.msg)
320 }
321 })
322 } else {
323 productFieldList.value = [];
324 }
307 if (baseInfoFormRef.value?.formInline?.signModeCode == '02') { 325 if (baseInfoFormRef.value?.formInline?.signModeCode == '02') {
308 let nodeInfo = nodeInfoFormRef.value.formInline; 326 let nodeInfo = nodeInfoFormRef.value.formInline;
309 if (scope.$index == 0) { 327 if (scope.$index == 0) {
...@@ -420,6 +438,9 @@ const constraintOptionsList: any = ref([]); ...@@ -420,6 +438,9 @@ const constraintOptionsList: any = ref([]);
420 /** 策略操作行为下拉列表 */ 438 /** 策略操作行为下拉列表 */
421 const actionOptionsList: any = ref([]); 439 const actionOptionsList: any = ref([]);
422 440
441 /** 根据选择的数据产品显示限定字段下拉列表 */
442 const productFieldList :any = ref([]);
443
423 const getSubmitInfo = () => { 444 const getSubmitInfo = () => {
424 let baseInfo = baseInfoFormRef.value.formInline; 445 let baseInfo = baseInfoFormRef.value.formInline;
425 let nodeInfo = nodeInfoFormRef.value.formInline; 446 let nodeInfo = nodeInfoFormRef.value.formInline;
...@@ -824,7 +845,7 @@ onActivated(() => { ...@@ -824,7 +845,7 @@ onActivated(() => {
824 <Form ref="nodeInfoFormRef" formId="node-info-form" :itemList="nodeInfoFormItems" :rules="nodeInfoFormRules" 845 <Form ref="nodeInfoFormRef" formId="node-info-form" :itemList="nodeInfoFormItems" :rules="nodeInfoFormRules"
825 @select-change="handleNodeSelectChange" col="col3" /> 846 @select-change="handleNodeSelectChange" col="col3" />
826 <StrategyTable ref="strategyTableRef" :show-title="true" :value="detailInfo.policys || []" 847 <StrategyTable ref="strategyTableRef" :show-title="true" :value="detailInfo.policys || []"
827 :operatorOptionList="operatorOptionList" :actionOptionsList="actionOptionsList" 848 :operatorOptionList="operatorOptionList" :actionOptionsList="actionOptionsList" :productFieldList="productFieldList"
828 :constraintOptionsList="constraintOptionsList"></StrategyTable> 849 :constraintOptionsList="constraintOptionsList"></StrategyTable>
829 </ContentWrap> 850 </ContentWrap>
830 </div> 851 </div>
......
...@@ -154,7 +154,7 @@ function testAccount(logonUser: string) { ...@@ -154,7 +154,7 @@ function testAccount(logonUser: string) {
154 <div> 154 <div>
155 <img :src="banner" class="banner"> 155 <img :src="banner" class="banner">
156 <div class="banner_desc"> 156 <div class="banner_desc">
157 <h4>可信数据空间</h4> 157 <h4>可信数据服务平台</h4>
158 <span>激活数据流通体系,释放数据要素新质生产力</span> 158 <span>激活数据流通体系,释放数据要素新质生产力</span>
159 </div> 159 </div>
160 </div> 160 </div>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!