7012779f by lihua

授权运营时间起止改为一个日期范围选择框

1 parent dc6c4ba0
...@@ -429,6 +429,11 @@ onMounted(() => { ...@@ -429,6 +429,11 @@ onMounted(() => {
429 <el-date-picker v-else-if="editForm[item.field] && editForm[item.field].type == 'date'" v-model="scope.row[item.field]" :placeholder="editForm[item.field].placeholder" 429 <el-date-picker v-else-if="editForm[item.field] && editForm[item.field].type == 'date'" v-model="scope.row[item.field]" :placeholder="editForm[item.field].placeholder"
430 :clearable="editForm[item.field].clearable" type="date" 430 :clearable="editForm[item.field].clearable" type="date"
431 format="YYYY-MM-DD" value-format="YYYY-MM-DD" /> 431 format="YYYY-MM-DD" value-format="YYYY-MM-DD" />
432 <el-date-picker v-else-if="editForm[item.field] && editForm[item.field].type == 'date-picker'" style="width: 240px;"
433 v-model="scope.row[item.field]" type="daterange" range-separator="至" start-placeholder="开始日期" :format="item.format ?? 'YYYY-MM-DD'"
434 :value-format="item.valueFormat ?? 'YYYY-MM-DD'"
435 end-placeholder="结束日期" :unlink-panels="item.unlink ?? false" :shortcuts="item.shortcuts ?? []"
436 :default-value="item.defaultDate" :disabled="item.disabled ?? false" />
432 <template v-else-if="editForm[item.field] && editForm[item.field].type == 'defaultValue'"> 437 <template v-else-if="editForm[item.field] && editForm[item.field].type == 'defaultValue'">
433 <el-date-picker v-if="scope.row[item.dataTypeName] === 'date'" v-model="scope.row[item.field]" type="date" 438 <el-date-picker v-if="scope.row[item.dataTypeName] === 'date'" v-model="scope.row[item.field]" type="date"
434 format="YYYY-MM-DD" value-format="YYYY-MM-DD" :placeholder="editForm[item.field].placeholder" /> 439 format="YYYY-MM-DD" value-format="YYYY-MM-DD" :placeholder="editForm[item.field].placeholder" />
......
...@@ -422,8 +422,9 @@ const authSourceTableInfo = ref({ ...@@ -422,8 +422,9 @@ const authSourceTableInfo = ref({
422 height: '214px', 422 height: '214px',
423 fields: [ 423 fields: [
424 { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" }, 424 { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" },
425 { label: "授权运营时间起", field: "authOperatTimeStart", width: 140 }, 425 { label: "授权运营时间", field: "authOperatTimeStart", width: 200, getName: (scope) => {
426 { label: "授权运营时间止", field: "authOperatTimeEnd", width: 140 }, 426 return scope.row.authOperatTimeStart + '至' + scope.row.authOperatTimeEnd;
427 } },
427 { label: "数据资源登记确认单编码", field: "dataRegistCode", width: 200 }, 428 { label: "数据资源登记确认单编码", field: "dataRegistCode", width: 200 },
428 { label: "数据资源登记名称", field: "dataRegistName", width: 160 }, 429 { label: "数据资源登记名称", field: "dataRegistName", width: 160 },
429 ], 430 ],
......
...@@ -447,8 +447,7 @@ const handleProductBaseFormSelectChange = (val, row, info) => { ...@@ -447,8 +447,7 @@ const handleProductBaseFormSelectChange = (val, row, info) => {
447 respParamsTableInfo.value.data = respParamsData.value; 447 respParamsTableInfo.value.data = respParamsData.value;
448 authSourceData.value = detailValue.resourcesRSVOS?.map(d => { 448 authSourceData.value = detailValue.resourcesRSVOS?.map(d => {
449 return { 449 return {
450 authOperatTimeStart: d.authOperatTimeStart, 450 authOperatTimeRange: [d.authOperatTimeStart, d.authOperatTimeEnd],
451 authOperatTimeEnd: d.authOperatTimeEnd,
452 dataRegistCode: d.dataRegistCode, 451 dataRegistCode: d.dataRegistCode,
453 dataRegistName: d.dataRegistName 452 dataRegistName: d.dataRegistName
454 } 453 }
...@@ -1617,8 +1616,7 @@ const authSourceTableInfo = ref({ ...@@ -1617,8 +1616,7 @@ const authSourceTableInfo = ref({
1617 height: '214px', 1616 height: '214px',
1618 fields: [ 1617 fields: [
1619 { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" }, 1618 { label: "序号", type: "index", width: TableColumnWidth.INDEX, align: "center" },
1620 { label: "授权运营时间起", field: "authOperatTimeStart", width: 140, required: true, columClass: 'edit-colum', type: 'edit' }, 1619 { label: "授权运营时间", field: "authOperatTimeRange", width: 260, required: true, columClass: 'edit-colum', type: 'edit' },
1621 { label: "授权运营时间止", field: "authOperatTimeEnd", width: 140, required: true, columClass: 'edit-colum', type: 'edit' },
1622 { label: "数据资源登记确认单编码", field: "dataRegistCode", width: 200, required: true, columClass: 'edit-colum', type: 'edit' }, 1620 { label: "数据资源登记确认单编码", field: "dataRegistCode", width: 200, required: true, columClass: 'edit-colum', type: 'edit' },
1623 { label: "数据资源登记名称", field: "dataRegistName", width: 160, required: true, columClass: 'edit-colum', type: 'edit' }, 1621 { label: "数据资源登记名称", field: "dataRegistName", width: 160, required: true, columClass: 'edit-colum', type: 'edit' },
1624 ], 1622 ],
...@@ -1641,22 +1639,30 @@ const authSourceTableInfo = ref({ ...@@ -1641,22 +1639,30 @@ const authSourceTableInfo = ref({
1641 placeholder: '请输入', 1639 placeholder: '请输入',
1642 clearable: true, 1640 clearable: true,
1643 }, 1641 },
1644 authOperatTimeStart: { 1642 authOperatTimeRange: {
1645 label: '', 1643 label: '',
1646 type: 'date', 1644 type: 'date-picker',
1647 field: 'authOperatTimeStart', 1645 field: 'authOperatTimeRange',
1648 default: '', 1646 default: [],
1649 placeholder: '请选择',
1650 clearable: true,
1651 },
1652 authOperatTimeEnd: {
1653 label: '',
1654 type: 'date',
1655 field: 'authOperatTimeEnd',
1656 default: '',
1657 placeholder: '请选择', 1647 placeholder: '请选择',
1658 clearable: true, 1648 clearable: true,
1659 }, 1649 },
1650 // authOperatTimeStart: {
1651 // label: '',
1652 // type: 'date',
1653 // field: 'authOperatTimeStart',
1654 // default: '',
1655 // placeholder: '请选择',
1656 // clearable: true,
1657 // },
1658 // authOperatTimeEnd: {
1659 // label: '',
1660 // type: 'date',
1661 // field: 'authOperatTimeEnd',
1662 // default: '',
1663 // placeholder: '请选择',
1664 // clearable: true,
1665 // },
1660 }, 1666 },
1661 STATUS: 'edit', 1667 STATUS: 'edit',
1662 data: authSourceData.value, 1668 data: authSourceData.value,
...@@ -1687,7 +1693,7 @@ const authSourceTableInfo = ref({ ...@@ -1687,7 +1693,7 @@ const authSourceTableInfo = ref({
1687 1693
1688 /** 给表格添加一行入参定义。 */ 1694 /** 给表格添加一行入参定义。 */
1689 const addAuthSources = () => { 1695 const addAuthSources = () => {
1690 authSourceData.value.push({ authOperatTimeStart: '', authOperatTimeEnd: '', dataRegistCode: '', dataRegistName: '' }); 1696 authSourceData.value.push({ authOperatTimeRange: [], dataRegistCode: '', dataRegistName: '' });
1691 authSourceTableInfo.value.data = authSourceData.value; 1697 authSourceTableInfo.value.data = authSourceData.value;
1692 nextTick(() => { 1698 nextTick(() => {
1693 scrollLastRowToView(authSourceTableRef.value?.tableRef, authSourceData.value.length); 1699 scrollLastRowToView(authSourceTableRef.value?.tableRef, authSourceData.value.length);
...@@ -1995,7 +2001,7 @@ onBeforeMount(async () => { ...@@ -1995,7 +2001,7 @@ onBeforeMount(async () => {
1995 fullscreenLoading.value = false; 2001 fullscreenLoading.value = false;
1996 if (res?.code == proxy.$passCode) { 2002 if (res?.code == proxy.$passCode) {
1997 detailInfo.value = res.data || {}; 2003 detailInfo.value = res.data || {};
1998 // detailInfo.value.productName = detailInfo.value.damGuid ? detailInfo.value.damGuid : detailInfo.value.productName; 2004 // detailInfo.value.productName = detailInfo.value.damGuid ? detailInfo.value.damGuid : detailInfo.value.productName;
1999 if (detailInfo.value.damGuid) { 2005 if (detailInfo.value.damGuid) {
2000 const opt = registerCatalogList.value.find(item => item.guid == detailInfo.value.damGuid); 2006 const opt = registerCatalogList.value.find(item => item.guid == detailInfo.value.damGuid);
2001 productBaseInfoItems.value[0].default = opt ? opt.guid : detailInfo.value.productName; 2007 productBaseInfoItems.value[0].default = opt ? opt.guid : detailInfo.value.productName;
...@@ -2049,8 +2055,9 @@ onBeforeMount(async () => { ...@@ -2049,8 +2055,9 @@ onBeforeMount(async () => {
2049 respParamsTableInfo.value.data = respParamsData.value; 2055 respParamsTableInfo.value.data = respParamsData.value;
2050 authSourceData.value = detailInfo.value.resourcesRSVOS?.map(d => { 2056 authSourceData.value = detailInfo.value.resourcesRSVOS?.map(d => {
2051 return { 2057 return {
2052 authOperatTimeStart: d.authOperatTimeStart, 2058 authOperatTimeRange: [d.authOperatTimeStart, d.authOperatTimeEnd],
2053 authOperatTimeEnd: d.authOperatTimeEnd, 2059 // authOperatTimeStart: d.authOperatTimeStart,
2060 // authOperatTimeEnd: d.authOperatTimeEnd,
2054 dataRegistCode: d.dataRegistCode, 2061 dataRegistCode: d.dataRegistCode,
2055 dataRegistName: d.dataRegistName 2062 dataRegistName: d.dataRegistName
2056 } 2063 }
...@@ -2180,7 +2187,12 @@ const saveDraft = () => { ...@@ -2180,7 +2187,12 @@ const saveDraft = () => {
2180 }, { 2187 }, {
2181 reqParamListRQVOS: inputParamsData.value, 2188 reqParamListRQVOS: inputParamsData.value,
2182 respParamListRQVOS: respParamsData.value, 2189 respParamListRQVOS: respParamsData.value,
2183 resourcesRQVOS: registerInfoValue.isAuthreSourceDevelop == 'Y' ? authSourceData.value : [], 2190 resourcesRQVOS: registerInfoValue.isAuthreSourceDevelop == 'Y' ? authSourceData.value?.map(a => {
2191 return Object.assign(a, {
2192 authOperatTimeStart: a.authOperatTimeRange?.[0],
2193 authOperatTimeEnd: a.authOperatTimeRange?.[1],
2194 });
2195 }) : [],
2184 organizationRQVOS: registerInfoValue.isSharedData == 'Y' ? orgData.value : [] 2196 organizationRQVOS: registerInfoValue.isSharedData == 'Y' ? orgData.value : []
2185 }, { 2197 }, {
2186 registerRQVO: { 2198 registerRQVO: {
...@@ -2300,16 +2312,16 @@ const save = () => { ...@@ -2300,16 +2312,16 @@ const save = () => {
2300 return; 2312 return;
2301 } 2313 }
2302 for (const d of authSourceData.value) { 2314 for (const d of authSourceData.value) {
2303 if (!d.authOperatTimeStart) { 2315 if (!d.authOperatTimeRange?.length) {
2304 activeShareTabName.value = 'authSource';
2305 proxy.$ElMessage.error('授权运营时间起不能为空');
2306 return;
2307 }
2308 if (!d.authOperatTimeEnd) {
2309 activeShareTabName.value = 'authSource'; 2316 activeShareTabName.value = 'authSource';
2310 proxy.$ElMessage.error('授权运营时间不能为空'); 2317 proxy.$ElMessage.error('授权运营时间不能为空');
2311 return; 2318 return;
2312 } 2319 }
2320 // if (!d.authOperatTimeEnd) {
2321 // activeShareTabName.value = 'authSource';
2322 // proxy.$ElMessage.error('授权运营时间止不能为空');
2323 // return;
2324 // }
2313 if (!d.dataRegistCode) { 2325 if (!d.dataRegistCode) {
2314 activeShareTabName.value = 'authSource'; 2326 activeShareTabName.value = 'authSource';
2315 proxy.$ElMessage.error('数据资源登记确认单编码不能为空'); 2327 proxy.$ElMessage.error('数据资源登记确认单编码不能为空');
...@@ -2320,11 +2332,8 @@ const save = () => { ...@@ -2320,11 +2332,8 @@ const save = () => {
2320 proxy.$ElMessage.error('数据资源登记名称不能为空'); 2332 proxy.$ElMessage.error('数据资源登记名称不能为空');
2321 return; 2333 return;
2322 } 2334 }
2323 if (d.authOperatTimeStart > d.authOperatTimeEnd) { 2335 d.authOperatTimeStart = d.authOperatTimeRange?.[0];
2324 activeShareTabName.value = 'authSource'; 2336 d.authOperatTimeEnd = d.authOperatTimeRange?.[1];
2325 proxy.$ElMessage.error('授权运营时间起不能大于授权运营时间止');
2326 return;
2327 }
2328 } 2337 }
2329 } 2338 }
2330 if (registerInfo.isSharedData == 'Y') { 2339 if (registerInfo.isSharedData == 'Y') {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!