|
@@ -829,11 +829,31 @@ const editHtmlId = ref('')
|
|
|
const entrustId = ref('')
|
|
|
const delegateContractChange = async () => {
|
|
|
delegateHtmlLoading.value = true
|
|
|
+ const res = await getCheckSample()
|
|
|
+ if (!res) {
|
|
|
+ delegateHtmlLoading.value = false
|
|
|
+ return
|
|
|
+ }
|
|
|
await getDelegateExcelHtml()
|
|
|
await getDelegateDataInfo()
|
|
|
delegateHtmlLoading.value = false
|
|
|
}
|
|
|
|
|
|
+//校验是否关联
|
|
|
+const getCheckSample = async () => {
|
|
|
+ const { error, code, msg } = await samplingApi.getCheckSample({
|
|
|
+ nodeId: primaryKeyId.value,
|
|
|
+ sampleId: editHtmlId.value,
|
|
|
+ contractId: delegateContractId.value,
|
|
|
+ })
|
|
|
+ if (!error && code === 200) {
|
|
|
+ return true
|
|
|
+ } else {
|
|
|
+ window.$message.error(msg)
|
|
|
+ return false
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
//获取委托数据
|
|
|
const getDelegateDataInfo = async () => {
|
|
|
const { error, code, msg, data } = await samplingApi.getBussDataInfoTrialEntrust({
|