3a04083d by lihua

二期的策略引用

1 parent 98939da2
......@@ -30,7 +30,7 @@
"crypto-js": "^4.2.0",
"dayjs": "^1.11.7",
"echarts": "^5.4.3",
"element-plus": "^2.9.0",
"element-plus": "^2.10.5",
"eruda": "^3.0.0",
"file-saver": "^2.0.5",
"hotkeys-js": "^3.10.2",
......
......@@ -51,8 +51,8 @@ dependencies:
specifier: ^5.4.3
version: 5.5.1
element-plus:
specifier: ^2.9.0
version: 2.9.0(vue@3.5.13)
specifier: ^2.10.5
version: 2.10.5(vue@3.5.13)
eruda:
specifier: ^3.0.0
version: 3.4.1
......@@ -4066,8 +4066,8 @@ packages:
resolution: {integrity: sha512-IXEuxU+5ClW2IGEYFC2T7szbyVgehupCWQe5GNh+H065CD6U6IFN0s4KeAMFGNmQolRU4IV7zGBWSYMmZ8uuqQ==}
dev: true
/element-plus@2.9.0(vue@3.5.13):
resolution: {integrity: sha512-ccOFXKsauo2dtokAr4OX7gZsb7TuAoVxA2zGRZo5o2yyDDBLBaZxOoFQPoxITSLcHbBfQuNDGK5Iag5hnyKkZA==}
/element-plus@2.10.5(vue@3.5.13):
resolution: {integrity: sha512-O9wTDu3Tm51ACVByWrThtBhH4Ygefg1HGY5pyAaxnoIrj8uMN0GtZ4IREwR3Yw/6sM2HyxjrsGI/D46iUVP97A==}
peerDependencies:
vue: ^3.2.0
dependencies:
......
......@@ -155,8 +155,8 @@ export const getContractDataProduct = (tenantGuid) => request({
})
/** 获取下拉数据产品列表的去重字段 */
export const getDamFieldsByProductGuid = (productGuid, isTds = 'N') => request({
url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/connector-invoke/field-by-dam-guid?damGuid=${productGuid}&isTds=${isTds}`,
export const getDamFieldsByProductGuid = (productGuid, isTds = 'N', isAnnon = 'N') => request({
url: `${import.meta.env.VITE_APP_DIGITAL_CONTRACT_URL}/connector-invoke/field-by-dam-guid?damGuid=${productGuid}&isTds=${isTds}&isAnnon=${isAnnon}`,
method: 'get'
})
......
......@@ -3,9 +3,9 @@
<div class="h-title">策略信息</div>
<el-button v-if="!isLook" plain @click="invokeTemplate" v-preReClick>合约模板调用</el-button>
</div>
<el-table class="strategyTable no-scroll-vertical" ref="strategyTableRef" v-loading="strategyDataLoading" :data="strategyData"
:height="(isReport || isLook) ? 'auto' : '250px'" :highlight-current-row="true" stripe tooltip-effect="light" border
:span-method="arraySpanMethod">
<el-table :key="key" class="strategyTable no-scroll-vertical" ref="strategyTableRef" v-loading="strategyDataLoading"
:data="strategyData" :height="(isReport || isLook) ? 'auto' : '250px'" :highlight-current-row="true" stripe
tooltip-effect="light" border :span-method="arraySpanMethod">
<el-table-column label="序号" width="56" align="center" fixed="left" :formatter="formatIndex" />
<el-table-column prop="action" label="行为类型" :width="isLook ? '106px' : (isReport ? 'auto' : '150px')"
:min-width="isReport ? '100px' : undefined" align="left" :show-overflow-tooltip="!isReport">
......@@ -76,7 +76,7 @@
</template>
<template #default="scope">
<el-input
v-if="!isLook && !(productFieldList != null && (scope.row.constraintEnName == 'limitedDeliveryConnector' || scope.row.constraintEnName == 'limitedUseConnector' || scope.row.constraintEnName == 'dataField'))"
v-if="!isLook && !(productFieldList != null && (scope.row.constraintEnName == 'limitedDeliveryConnector' || scope.row.constraintEnName == 'limitedUseConnector' || scope.row.constraintEnName == 'dataField' || scope.row.constraintEnName == 'limitedState' || scope.row.constraintEnName == 'areaAddress'))"
v-model="scope.row['constraintValue']" placeholder="请输入" :maxlength="200"
@change="(val) => handleOperatorSelectChange(val, scope, 'constraintValue')" clearable></el-input>
<!-- 限定连接器 -->
......@@ -84,19 +84,39 @@
v-else-if="!isLook && productFieldList != null && (scope.row.constraintEnName == 'limitedDeliveryConnector' || scope.row.constraintEnName == 'limitedUseConnector')"
v-model="scope.row['constraintConnectorValue']" :loading="loading" :remote="true"
:remote-method="remoteMethod" :max-collapse-tags="1" :collapse-tags="true" :collapse-tags-tooltip="true"
multiple filterable clearable :placeholder="scope.row.constraintPlaceholderValue || '请输入关键字搜索'" value-key="guid" @change="(val) => handleOperatorSelectChange(val, scope, 'constraintConnectorValue')">
<el-option v-for="opt in connectorList" :key="opt['guid']" :label="opt['tenantName']"
:value="opt['guid']" />
multiple filterable clearable :placeholder="scope.row.constraintPlaceholderValue || '请输入关键字搜索'"
value-key="guid" @change="(val) => handleOperatorSelectChange(val, scope, 'constraintConnectorValue')">
<el-option v-for="opt in connectorList" :key="opt['guid']" :label="opt['tenantName']" :value="opt['guid']" />
</el-select>
<!-- 加密字段 -->
<!-- 限定字段 -->
<el-select v-else-if="!isLook && productFieldList != null && scope.row.constraintEnName == 'dataField'"
:max-collapse-tags="1" :collapse-tags="true" :collapse-tags-tooltip="true"
v-model="scope.row['constraintFieldValue']" multiple filterable clearable :placeholder="scope.row.constraintPlaceholderValue || '请选择'"
v-model="scope.row['constraintFieldValue']" multiple filterable clearable
:placeholder="scope.row.constraintPlaceholderValue || '请选择'"
@change="(val) => handleOperatorSelectChange(val, scope, 'constraintFieldValue')">
<el-option v-for="opt in productFieldList" :key="opt['enName']" :label="opt['chName']"
:value="opt['enName']" />
<el-option v-for="opt in (scope.row.actionEnName == 'anonymize' ? annonFieldsList : productFieldList)"
:key="opt['enName']" :label="opt['chName']" :value="opt['enName']" />
</el-select>
<span v-else>{{ (scope.row.constraintEnName == 'dataField' ? scope.row.additionValue?.map(a => a.chName)?.join(',') : ((scope.row.constraintEnName == 'limitedDeliveryConnector' || scope.row.constraintEnName == 'limitedUseConnector') ? scope.row.additionValue?.map(a => a.tenantName)?.join(',') : scope.row['constraintValue'])) || '--' }}</span>
<!-- 限定状态 -->
<el-select v-else-if="!isLook && productFieldList != null && scope.row.constraintEnName == 'limitedState'"
:max-collapse-tags="1" :collapse-tags="true" :collapse-tags-tooltip="true"
v-model="scope.row['constraintStateValue']" :multiple="false" filterable clearable
:placeholder="scope.row.constraintPlaceholderValue || '请选择'"
@change="(val) => handleOperatorSelectChange(val, scope, 'constraintStateValue')">
<el-option v-for="opt in limitStateOptionList" :key="opt['value']" :label="opt['label']"
:value="opt['value']" />
</el-select>
<el-cascader v-else-if="!isLook && productFieldList != null && scope.row.constraintEnName == 'areaAddress'"
v-model="scope.row['constraintAddressValue']" :props="addressProps" :show-all-levels="true" :clearable="true"
show-checked-strategy="parent" :filterable="true" :collapse-tags="true" :collapse-tags-tooltip="true"
:max-collapse-tags="1" :options="parentAreaData" :disabled="false"
@change="(val) => handleOperatorSelectChange(val, scope, 'constraintAddressValue')" />
<span v-else>{{((scope.row.constraintEnName == 'dataField') ?
scope.row.additionValue?.map(a => a.chName)?.join(',') : ((scope.row.constraintEnName ==
'limitedDeliveryConnector' || scope.row.constraintEnName == 'limitedUseConnector') ?
scope.row.additionValue?.map(a => a.tenantName)?.join(',') : (scope.row.constraintEnName == 'limitedState' ||
scope.row.constraintEnName == 'areaAddress' ? scope.row.additionValue?.map(a => a.value)?.join(',') :
scope.row['constraintValue']))) || '--'}}</span>
</template>
</el-table-column>
<el-table-column v-if="!isLook" label="操作" width="140px" align="left" fixed="right" show-overflow-tooltip>
......@@ -120,7 +140,10 @@ import { CirclePlus } from "@element-plus/icons-vue";
import {
getValidContractTemplateList,
getContractTenantList
} from "@/api/modules/dataSmartContract"
} from "@/api/modules/dataSmartContract";
import {
getAreaData,
} from "@/api/modules/queryService";
const { required } = useValidator();
const { proxy } = getCurrentInstance() as any;
......@@ -150,10 +173,18 @@ const props = defineProps({
type: Array<any>,
default: []
},
limitStateOptionList: { //限定状态字典下拉列表
type: Array<any>,
default: []
},
productFieldList: { //字段列表
type: Array<any>,
default: null
},
annonFieldsList: { //匿名化选择的字段列表
type: Array<any>,
default: null
},
isReport: {
type: Boolean,
default: false
......@@ -164,6 +195,102 @@ const loading = ref(false);
/** 连接器下拉列表,搜索取得 */
const connectorList: any = ref([]);
const key = ref(0);
const getParentAreaPromise: any = ref(null);
const getAreaDataPromise: any = ref({});
const getAreaDatas: any = ref({});
const parentAreaData: any = ref([]);
const getArea = (node, resolve) => {
const { level } = node
if (node.data.code == '710000') {
resolve([]);
return;
}
let params = {
parentGuid: node.value
}
if (!node.value) {
if (getParentAreaPromise.value) {
getParentAreaPromise.value.then((res: any) => {
resolve(res);
})
} else {
resolve(parentAreaData.value);
}
return;
}
if (node.loaded) {
resolve([]);
return;
}
if (getAreaDatas.value[node.value]?.length) {
resolve(getAreaDatas.value[node.value]);
return;
}
if (!getAreaDataPromise.value[node.value]) {
getAreaDataPromise.value[node.value] = getAreaData(params).then((res: any) => {
node.loaded = true;
getAreaDataPromise.value[node.value] = null;
if (res?.code == proxy.$passCode) {
const data = res.data ?? []
data.map(item => {
item.leaf = level >= 2
})
node.data.children = data;
resolve(data)
getAreaDatas.value[node.value] = data;
nextTick(() => {
if (level == 2 && init.value) {
key.value++;
strategyValueInfo.value = transferValueToNew(props.value);
init.value = false;
}
})
return data;
}
})
} else {
getAreaDataPromise.value[node.value].then((data) => {
getAreaDataPromise.value[node.value] = null;
node.loaded = true;
data.map(item => {
item.leaf = level >= 2
})
node.data.children = data;
resolve(data)
nextTick(() => {
if (level == 2 && init.value) {
key.value++;
strategyValueInfo.value = transferValueToNew(props.value);
init.value = false;
}
})
})
}
}
/** 省市区级联属性配置 */
const addressProps = ref({
label: 'name',
value: 'guid',
lazy: true,
checkStrictly: true,
lazyLoad: getArea,
multiple: true,
checkOnClickNode: false,
})
onBeforeMount(() => {
getParentAreaPromise.value = getAreaData({ parentId: null }).then((res: any) => {
if (res?.code == proxy.$passCode) {
parentAreaData.value = res.data ?? [];
return parentAreaData.value;
}
})
})
const getActualOperationList = (scope) => {
let val = scope.row.constraintName;
let conditionItem = val && props.constraintOptionsList.find(c => c.policyName == val);
......@@ -199,11 +326,17 @@ const transferValueToNew = (val, isTemplate = false) => {
if (childInfo.constraintEnName == 'dataField' && childInfo.additionValue?.length) {
childInfo.constraintFieldValue = childInfo.additionValue.map(a => a.enName);
}
if (childInfo.constraintEnName == 'limitedState' && childInfo.additionValue?.length) {
childInfo.constraintStateValue = childInfo.additionValue?.[0].value;
}
if (childInfo.constraintEnName == 'areaAddress' && childInfo.additionValue?.length) {
childInfo.constraintAddressValue = childInfo.additionValue.map(a => a.value?.split('-'));
}
if ((childInfo.constraintEnName == 'limitedDeliveryConnector' || childInfo.constraintEnName == 'limitedUseConnector') && childInfo.additionValue?.length) {
childInfo.constraintConnectorValue = childInfo.additionValue.map(a => a.guid);
connectorList.value.push(...childInfo.additionValue);
}
if (isTemplate && (childInfo.constraintEnName == 'dataField' || childInfo.constraintEnName == 'limitedDeliveryConnector' || childInfo.constraintEnName == 'limitedUseConnector')) {
if (isTemplate && (childInfo.constraintEnName == 'dataField' || childInfo.constraintEnName == 'limitedState' || childInfo.constraintEnName == 'limitedDeliveryConnector' || childInfo.constraintEnName == 'limitedUseConnector')) {
childInfo.constraintPlaceholderValue = childInfo.constraintValue;
}
delete childInfo.children; //删掉冗余信息,否则后续修改会覆盖正确的值
......@@ -223,7 +356,10 @@ const transferValueToNew = (val, isTemplate = false) => {
return detailPolicyListValue;
}
const init = ref(false);
watch(() => props.value, (val) => {
init.value = true;
strategyValueInfo.value = transferValueToNew(val);
}, {
deep: true,
......@@ -233,7 +369,19 @@ watch(() => props.value, (val) => {
watch(() => props.productFieldList, (val, oldValue) => {
strategyValueInfo.value.forEach(s => {
s.children?.forEach(sc => {
if (sc.constraintFieldValue?.length) {
if (sc.constraintFieldValue?.length && s.actionEnName != 'anonymize') {
sc.constraintFieldValue = sc.constraintFieldValue.filter(f => val.some(v => v.enName == f))
}
})
})
}, {
deep: true
})
watch(() => props.annonFieldsList, (val, oldValue) => {
strategyValueInfo.value.forEach(s => {
s.children?.forEach(sc => {
if (sc.constraintFieldValue?.length && s.actionEnName == 'anonymize') {
sc.constraintFieldValue = sc.constraintFieldValue.filter(f => val.some(v => v.enName == f))
}
})
......@@ -265,6 +413,7 @@ const strategyData = computed(() => {
/** 操作行为下拉框改变,带出英文名称等信息 */
const selectOperationChange = (val, scope) => {
init.value = false;
let index = scope.row.index;
let sv = strategyValueInfo.value.find(s => s.index == index);
if (sv) {
......@@ -277,6 +426,7 @@ const selectOperationChange = (val, scope) => {
/** 约束条件下拉框改变,带出英文名称 */
const selectConditionChange = (val, scope) => {
init.value = false;
let index = scope.row.index;
let sv = strategyValueInfo.value.find(s => s.index == index);
let svChild = sv.children?.find(c => c.childIndex == scope.row.childIndex);
......@@ -291,6 +441,7 @@ const selectConditionChange = (val, scope) => {
}
const handleOperatorSelectChange = (val, scope, field) => {
init.value = false;
let index = scope.row.index;
let sv = strategyValueInfo.value.find(s => s.index == index);
let svChild = sv.children?.find(c => c.childIndex == scope.row.childIndex);
......@@ -299,11 +450,30 @@ const handleOperatorSelectChange = (val, scope, field) => {
svChild.additionValue = val?.map(vv => {
return connectorList.value.find(c => c.guid == vv);
})
} else if (field == 'constraintAddressValue') {
svChild.additionValue = val?.map(vv => {
let label = ''
let node: any = {};
vv.forEach((vc, index) => {
if (index == 0) {
node = parentAreaData.value.find(p => p.code == vc);
label = label + (node?.name || '');
} else {
node = node.children?.find(p => p.code == vc);
label = label + '/' + (node?.name || '');
}
})
return {
value: vv.join('-'),
label: label
};
})
}
}
/** 添加策略信息的操作行为行 */
const addStrategy = () => {
init.value = false;
let len = strategyValueInfo.value.length;
if (len == props.actionOptionsList?.length) {
proxy.$ElMessage.warning('暂无可添加的行为类型!');
......@@ -319,6 +489,7 @@ const addStrategy = () => {
/** 添加约束条件 */
const handleConditionClickAdd = (scope) => {
init.value = false;
/** 根据index值进行添加删除 */
let index = scope.row.index;
let sv = strategyValueInfo.value.find(s => s.index == index);
......@@ -500,6 +671,22 @@ const validateValue = () => {
return false;
}
}
} else if (d.constraintEnName == 'limitedState') {
// 如果是模板不需要必填。只有
if (props.productFieldList !== null) {
if (!d.constraintStateValue) {
proxy.$ElMessage.error('字段的约束值必填,请填写完整');
return false;
}
}
} else if (d.constraintEnName == 'areaAddress') {
// 如果是模板不需要必填。只有
if (props.productFieldList !== null) {
if (!d.constraintAddressValue?.length) {
proxy.$ElMessage.error('字段的约束值必填,请填写完整');
return false;
}
}
} else if ((d.constraintEnName == 'limitedDeliveryConnector' || d.constraintEnName == 'limitedUseConnector')) {
if (props.productFieldList !== null) {
if (!d.constraintConnectorValue?.length) {
......
......@@ -314,12 +314,21 @@ const hanldeTableSelectChange = (val, scope, item) => {
if (res?.code == proxy.$passCode) {
productFieldList.value = res.data || initStrategyData.value;
} else {
productFieldList.value = [];
productFieldList.value = initProductFieldValue.value;
res?.msg && proxy.$ElMessage.error(res?.msg)
}
})
getDamFieldsByProductGuid(productItem?.productGuid, isDataUse.value ? 'Y' : 'N', 'Y').then((res: any) => {
if (res?.code == proxy.$passCode) {
annonFieldsList.value = res.data || initProductFieldValue.value;
} else {
annonFieldsList.value = initProductFieldValue.value;
res?.msg && proxy.$ElMessage.error(res?.msg)
}
})
} else {
productFieldList.value = initProductFieldValue.value;
annonFieldsList.value = initProductFieldValue.value;
}
// 连接器只能选择数据提供方的产品,不需要切换了
// let nodeInfo = nodeInfoFormRef.value.formInline;
......@@ -434,9 +443,15 @@ const constraintOptionsList: any = ref([]);
/** 策略操作行为下拉列表 */
const actionOptionsList: any = ref([]);
/** 限定状态字典下拉列表 */
const limitedStateOptionsList: any = ref([]);
/** 根据选择的数据产品显示限定字段下拉列表 */
const initProductFieldValue: any = ref([]);
/** 策略中选择的限定字段列表 */
const productFieldList: any = ref([]);
/** 匿名化选择的限定字段列表 */
const annonFieldsList: any = ref([]);
/** 初始化的策略值为空数组 */
const initStrategyData = ref([]);
......@@ -462,15 +477,28 @@ const getSubmitInfo = () => {
let v = Object.assign({}, d, { orderNum: index + 1, });
if (d.constraintEnName == 'dataField' && d.constraintFieldValue?.length) {
v.constraintValue = d.constraintFieldValue.join(',');
let fieldList = d.actionEnName == 'anonymize' ? annonFieldsList.value : productFieldList.value;
v.additionValue = d.constraintFieldValue?.map(dv => {
return {
enName: dv,
chName: productFieldList?.value.find(p => p.enName == dv)?.chName || dv
chName: fieldList.find(p => p.enName == dv)?.chName || dv
}
})
} else if ((d.constraintEnName == 'limitedDeliveryConnector' || d.constraintEnName == 'limitedUseConnector') && d.constraintConnectorValue?.length) {
} else if (d.constraintEnName == 'limitedState' && d.constraintStateValue) {
v.constraintValue = d.constraintStateValue;
v.additionValue = [{
value: d.constraintStateValue,
label: limitedStateOptionsList.value.find(p => p.value == d.constraintStateValue)?.label || d.constraintStateValue
}];
}
else if ((d.constraintEnName == 'limitedDeliveryConnector' || d.constraintEnName == 'limitedUseConnector') && d.constraintConnectorValue?.length) {
v.constraintValue = d.constraintConnectorValue?.join(',');
v.additionValue = d.additionValue;
} else if (d.constraintEnName == 'areaAddress' && d.constraintAddressValue?.length) {
v.constraintValue = d.constraintAddressValue?.map(dd => {
return dd.at(-1);
})?.join(',');
v.additionValue = d.additionValue;
}
return v;
}) || [];
......@@ -710,8 +738,17 @@ onBeforeMount(() => {
res?.msg && proxy.$ElMessage.error(res?.msg)
}
})
getDamFieldsByProductGuid(productGuid, isDataUse.value ? 'Y' : 'N', 'Y').then((res: any) => {
if (res?.code == proxy.$passCode) {
annonFieldsList.value = res.data || initProductFieldValue.value;
} else {
annonFieldsList.value = initProductFieldValue.value;
res?.msg && proxy.$ElMessage.error(res?.msg)
}
})
} else {
productFieldList.value = initProductFieldValue.value;
annonFieldsList.value = initProductFieldValue.value;
}
} else {
res?.msg && proxy.$ElMessage.error(res?.msg)
......@@ -785,6 +822,14 @@ onBeforeMount(() => {
res?.msg && proxy.$ElMessage.error(res?.msg);
}
})
getParamsList({ dictType: '限定状态' }).then((res: any) => {
if (res?.code == proxy.$passCode) {
const data = res.data || [];
limitedStateOptionsList.value = data;
} else {
res?.msg && proxy.$ElMessage.error(res?.msg);
}
})
getActionPolicyList().then((res: any) => {
if (res?.code == proxy.$passCode) {
const data = res.data || [];
......@@ -863,8 +908,8 @@ onActivated(() => {
<Form ref="nodeInfoFormRef" formId="node-info-form" :itemList="nodeInfoFormItems" :rules="nodeInfoFormRules"
@select-change="handleNodeSelectChange" col="col3" />
<StrategyTable ref="strategyTableRef" :show-title="true" :value="detailInfo.policys || initStrategyData"
:operatorOptionList="operatorOptionList" :actionOptionsList="actionOptionsList"
:productFieldList="productFieldList" :constraintOptionsList="constraintOptionsList"></StrategyTable>
:operatorOptionList="operatorOptionList" :actionOptionsList="actionOptionsList" :limit-state-option-list="limitedStateOptionsList"
:productFieldList="productFieldList" :annon-fields-list="annonFieldsList" :constraintOptionsList="constraintOptionsList"></StrategyTable>
</ContentWrap>
</div>
<div class="tool_btns">
......
......@@ -136,15 +136,27 @@ const btnHandles = ref({
let v = Object.assign({}, d, { orderNum: index + 1, });
if (d.constraintEnName == 'dataField' && d.constraintFieldValue?.length) {
v.constraintValue = d.constraintFieldValue.join(',');
let fieldList = d.actionEnName == 'anonymize' ? annonFieldsList.value : productFieldList.value;
v.additionValue = d.constraintFieldValue?.map(dv => {
return {
enName: dv,
chName: productFieldList?.value.find(p => p.enName == dv)?.chName || dv
chName: fieldList.find(p => p.enName == dv)?.chName || dv
}
})
} else if (d.constraintEnName == 'limitedState' && d.constraintStateValue?.length) {
v.constraintValue = d.constraintStateValue;
v.additionValue = [{
value: d.constraintStateValue,
label: limitedStateOptionsList.value.find(p => p.value == d.constraintStateValue)?.label || d.constraintStateValue
}]
} else if ((d.constraintEnName == 'limitedDeliveryConnector' || d.constraintEnName == 'limitedUseConnector') && d.constraintConnectorValue?.length) {
v.constraintValue = d.constraintConnectorValue?.join(',');
v.additionValue = d.additionValue;
} else if (d.constraintEnName == 'areaAddress' && d.constraintAddressValue?.length) {
v.constraintValue = d.constraintAddressValue?.map(dd => {
return dd.at(-1);
})?.join(',');
v.additionValue = d.additionValue;
}
return v;
})
......@@ -946,12 +958,15 @@ const constraintOptionsList: any = ref([]);
/** 策略操作行为下拉列表 */
const actionOptionsList: any = ref([]);
/** 限定状态字典下拉列表 */
const limitedStateOptionsList: any = ref([]);
/** 根据选择的数据产品显示限定字段下拉列表 */
const initProductFieldValue: any = ref([]);
const productFieldList: any = ref([]);
/** 初始化的策略值为空数组 */
const initStrategyData = ref([]);
/** 匿名化选择的限定字段列表 */
const annonFieldsList: any = ref([]);
/** 获取第二步合约协商信息 */
const getStepTwoNegotiateInfo = (loading = true) => {
......@@ -1079,8 +1094,17 @@ onBeforeMount(() => {
res?.msg && proxy.$ElMessage.error(res?.msg)
}
})
getDamFieldsByProductGuid(productGuid, provider.executionerGuid != userData.tenantGuid ? 'Y' : 'N', 'Y').then((res: any) => {
if (res?.code == proxy.$passCode) {
annonFieldsList.value = res.data || initProductFieldValue.value;
} else {
annonFieldsList.value = initProductFieldValue.value;
res?.msg && proxy.$ElMessage.error(res?.msg)
}
})
} else {
productFieldList.value = initProductFieldValue.value;
annonFieldsList.value = initProductFieldValue.value;
}
} else {
res?.msg && proxy.$ElMessage.error(res?.msg)
......@@ -1097,6 +1121,14 @@ onBeforeMount(() => {
res?.msg && proxy.$ElMessage.error(res?.msg);
}
})
getParamsList({ dictType: '限定状态' }).then((res: any) => {
if (res?.code == proxy.$passCode) {
const data = res.data || [];
limitedStateOptionsList.value = data;
} else {
res?.msg && proxy.$ElMessage.error(res?.msg);
}
})
getActionPolicyList().then((res: any) => {
if (res?.code == proxy.$passCode) {
const data = res.data || [];
......@@ -1318,8 +1350,8 @@ onActivated(() => {
expandSwicth style="margin-top: 15px" :isExpand="expandPolicyConsult" @expand="(v) => (expandPolicyConsult = v)"
description="">
<StrategyTable ref="strategyTableEditRef" :show-title="true" :value="consultDetailInfo?.policys"
:operatorOptionList="operatorOptionList" :actionOptionsList="actionOptionsList" :productFieldList="productFieldList"
:constraintOptionsList="constraintOptionsList"></StrategyTable>
:operatorOptionList="operatorOptionList" :actionOptionsList="actionOptionsList" :productFieldList="productFieldList" :annonFieldsList="annonFieldsList"
:limit-state-option-list="limitedStateOptionsList" :constraintOptionsList="constraintOptionsList"></StrategyTable>
</ContentWrap>
<ContentWrap v-show="detailType == 'consult' || currentStep == 2" id="history-info-consult" title="协商记录"
expandSwicth style="margin-top: 15px" :isExpand="expandConsultHistory"
......@@ -1328,7 +1360,7 @@ onActivated(() => {
<el-timeline-item v-for="(activity, index) in activities" :key="index" :timestamp="activity.timestamp"
:hollow="activity.hollow" :type="activity.type" placement="top">
<div v-for="(child, childIndex) of activity.children" class="row-per"
:style="{ 'margin-top': childIndex > 0 ? '8px' : '0px' }">
:style="{ 'margin-top': <number>childIndex > 0 ? '8px' : '0px' }">
<div
:class="child.negotiateEntityType == '数据提供方' ? 'label' : (child.negotiateEntityType == '数据服务方' ? 'label2' : 'label1')">
{{ child.negotiateEntityType }}
......
......@@ -241,7 +241,7 @@ const tablePageChange = (info) => {
getTableData();
};
const defaultValueInfo = ref({ bizStatus: 'Y' });
const defaultValueInfo = ref({ bizStatus: 'Y', constraintOperatorCodes: [], });
const newCreate = () => {
drawerInfo.value.visible = true;
......@@ -338,7 +338,7 @@ const classEditFormItems: any = ref([{
tagsTooltip: true,
placeholder: '默认全部',
field: 'constraintOperatorCodes',
default: '',
default: [],
options: operatorOptionList.value,
filterable: true,
clearable: true,
......@@ -421,6 +421,8 @@ const drawerBtnClick = async (btn, info) => {
}).map(v => {
return v.value;
})
} else {
info.constraintOperatorCodes = [];
}
drawerInfo.value.footer.btns[1].loading = true;
if (drawerInfo.value.type == 'edit') {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!