2c919c5d by lihua

数据申请数据范围使用上架的时间

1 parent de8bdb54
...@@ -15,7 +15,9 @@ ...@@ -15,7 +15,9 @@
15 </div> 15 </div>
16 <div class="bottom_tool_wrap"> 16 <div class="bottom_tool_wrap">
17 <el-button @click="cancel">取消</el-button> 17 <el-button @click="cancel">取消</el-button>
18 <el-button @click="save" v-show="detailInfo.approveState !== 'Y' && detailInfo.approveState !== 'C' && detailInfo.approveState !== 'R'" v-preReClick>保存</el-button> 18 <el-button @click="save"
19 v-show="detailInfo.approveState !== 'Y' && detailInfo.approveState !== 'C' && detailInfo.approveState !== 'R'"
20 v-preReClick>保存</el-button>
19 <el-button type="primary" @click="submit" v-preReClick>提交审批</el-button> 21 <el-button type="primary" @click="submit" v-preReClick>提交审批</el-button>
20 </div> 22 </div>
21 </div> 23 </div>
...@@ -55,7 +57,7 @@ const baseInfoFormItems = ref([{ ...@@ -55,7 +57,7 @@ const baseInfoFormItems = ref([{
55 router.push({ 57 router.push({
56 name: 'productSortCatalogDetail', 58 name: 'productSortCatalogDetail',
57 query: { 59 query: {
58 guid: route.query.damGuid, // 产品GUID 60 guid: detailInfo.value.damGuid ? detailInfo.value.damGuid : route.query.damGuid, // 产品GUID
59 type: 'detail', // 查看类型 61 type: 'detail', // 查看类型
60 foundMode: 'tdsUse', // 发现模式 62 foundMode: 'tdsUse', // 发现模式
61 name: route.query.damName, // 产品名称 63 name: route.query.damName, // 产品名称
...@@ -119,6 +121,12 @@ const baseInfoFormItems = ref([{ ...@@ -119,6 +121,12 @@ const baseInfoFormItems = ref([{
119 placeholder: "开始时间~结束时间", 121 placeholder: "开始时间~结束时间",
120 clearable: true, 122 clearable: true,
121 required: true, 123 required: true,
124 disabledDate: (date) => {
125 if (productDetail.value.timeAreaStart) {
126 return date < new Date(productDetail.value.timeAreaStart) || date > new Date(productDetail.value.timeAreaEnd);
127 }
128 return false;
129 }
122 }, 130 },
123 { 131 {
124 label: '产品发布机构', 132 label: '产品发布机构',
...@@ -322,6 +330,23 @@ onBeforeMount(() => { ...@@ -322,6 +330,23 @@ onBeforeMount(() => {
322 }); 330 });
323 body.dispatchEvent(clickEvent); 331 body.dispatchEvent(clickEvent);
324 }) 332 })
333 getTdsRegisterCatalogDetail(detailInfo.value.damGuid).then((res: any) => {
334 fullscreenLoading.value = false;
335 if (res?.code == proxy.$passCode) {
336 let detail = productDetail.value = res.data || {};
337 let item = baseInfoFormItems.value.find(item => item.field == 'dataRange');
338 if (item) {
339 baseInfoFormItems.value[4].disabledDate = (date) => {
340 if (detail.timeAreaStart) {
341 return date < new Date(detail.timeAreaStart) || date > new Date(detail.timeAreaEnd);
342 }
343 return false;
344 }
345 }
346 } else {
347 res?.msg && proxy.$ElMessage.error(res.msg);
348 }
349 })
325 } else { 350 } else {
326 res?.msg && proxy.$ElMessage.error(res.msg); 351 res?.msg && proxy.$ElMessage.error(res.msg);
327 } 352 }
...@@ -335,8 +360,27 @@ onBeforeMount(() => { ...@@ -335,8 +360,27 @@ onBeforeMount(() => {
335 baseInfoFormItems.value[0].default = <string>route.query.damName; 360 baseInfoFormItems.value[0].default = <string>route.query.damName;
336 baseInfoFormItems.value[1].default = detail.productCode; 361 baseInfoFormItems.value[1].default = detail.productCode;
337 baseInfoFormItems.value[2].default = detail.damTypeName; 362 baseInfoFormItems.value[2].default = detail.damTypeName;
363 let item = baseInfoFormItems.value.find(item => item.field == 'dataRange');
364 if (item) {
365 item.default = detail.timeAreaStart ? [detail.timeAreaStart, detail.timeAreaEnd] : null;
366 item.disabledDate = (date) => {
367 if (detail.timeAreaStart) {
368 return date < new Date(detail.timeAreaStart) || date > new Date(detail.timeAreaEnd);
369 }
370 return false;
371 }
372 }
338 let issuingNameItem = baseInfoFormItems.value.find(item => item.field == 'issuingName'); 373 let issuingNameItem = baseInfoFormItems.value.find(item => item.field == 'issuingName');
339 issuingNameItem && (issuingNameItem.default = detail.rightMainName || '--'); 374 issuingNameItem && (issuingNameItem.default = detail.rightMainName || '--');
375 nextTick(() => {
376 const body = document.body;
377 const clickEvent = new MouseEvent('click', {
378 bubbles: true,
379 cancelable: true,
380 view: window
381 });
382 body.dispatchEvent(clickEvent);
383 })
340 } else { 384 } else {
341 res?.msg && proxy.$ElMessage.error(res.msg); 385 res?.msg && proxy.$ElMessage.error(res.msg);
342 } 386 }
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!