From d3c9153e84b50de8af426e6e948d3da400c26f61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E7=A3=8A?= <45566618@qq.com> Date: Wed, 22 May 2024 21:34:09 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E5=85=AC=E5=91=8A=E4=BC=98?= =?UTF-8?q?=E5=8C=96=EF=BC=8C=E5=A2=9E=E5=8A=A0=E5=8E=86=E5=8F=B2=E9=80=9A?= =?UTF-8?q?=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/site/common/header.vue | 15 +- src/views/zy/zyGonggao/ZyGonggao.api.ts | 8 + src/views/zy/zyGonggao/ZyGonggao.data.ts | 25 +- src/views/zy/zyGonggao/ZyGonggaoList.vue | 293 +++++++++--------- .../zy/zyGonggao/components/ZyGonggaoForm.vue | 6 +- .../components/ZyGonggaoHistoryList.vue | 155 +++++++++ .../components/ZyGonggaoHistoryModal.vue | 61 ++++ .../zyGonggao/components/ZyGonggaoYlForm.vue | 129 ++++++++ .../zyGonggao/components/ZyGonggaoYlModal.vue | 75 +++++ 9 files changed, 599 insertions(+), 168 deletions(-) create mode 100644 src/views/zy/zyGonggao/components/ZyGonggaoHistoryList.vue create mode 100644 src/views/zy/zyGonggao/components/ZyGonggaoHistoryModal.vue create mode 100644 src/views/zy/zyGonggao/components/ZyGonggaoYlForm.vue create mode 100644 src/views/zy/zyGonggao/components/ZyGonggaoYlModal.vue diff --git a/src/views/site/common/header.vue b/src/views/site/common/header.vue index d12e20c..de6039e 100644 --- a/src/views/site/common/header.vue +++ b/src/views/site/common/header.vue @@ -150,14 +150,17 @@ function toIndex(){ } }) - + let roleList = userStore?.getLoginInfo?.roleList - for(var i=0;i { @@ -264,4 +267,4 @@ function toIndex(){ - \ No newline at end of file + diff --git a/src/views/zy/zyGonggao/ZyGonggao.api.ts b/src/views/zy/zyGonggao/ZyGonggao.api.ts index 9df2628..f42573c 100644 --- a/src/views/zy/zyGonggao/ZyGonggao.api.ts +++ b/src/views/zy/zyGonggao/ZyGonggao.api.ts @@ -11,6 +11,7 @@ enum Api { deleteBatch = '/zyGonggao/zyGonggao/deleteBatch', importExcel = '/zyGonggao/zyGonggao/importExcel', exportXls = '/zyGonggao/zyGonggao/exportXls', + historyList = '/zyGonggao/zyGonggao/historyList', } /** @@ -70,3 +71,10 @@ export const saveOrUpdate = (params, isUpdate) => { let url = isUpdate ? Api.edit : Api.save; return defHttp.post({ url: url, params }, { isTransformResponse: false }); } + + +/** + * 历史列表接口 + * @param params + */ +export const historyList = (params) => defHttp.get({ url: Api.historyList, params }); diff --git a/src/views/zy/zyGonggao/ZyGonggao.data.ts b/src/views/zy/zyGonggao/ZyGonggao.data.ts index ed615de..4634c99 100644 --- a/src/views/zy/zyGonggao/ZyGonggao.data.ts +++ b/src/views/zy/zyGonggao/ZyGonggao.data.ts @@ -10,18 +10,23 @@ export const columns: BasicColumn[] = [ dataIndex: 'title' }, { - title: '状态', + title: '修改时间', align: "center", - dataIndex: 'ggStatus_dictText' - }, - { - title: '发布时间', - align: "center", - dataIndex: 'fbTime', - customRender:({text}) =>{ - return !text?"":(text.length>10?text.substr(0,10):text); - }, + dataIndex: 'updateTime' }, + // { + // title: '状态', + // align: "center", + // dataIndex: 'ggStatus_dictText' + // }, + // { + // title: '发布时间', + // align: "center", + // dataIndex: 'fbTime', + // customRender:({text}) =>{ + // return !text?"":(text.length>10?text.substr(0,10):text); + // }, + // }, ]; //查询数据 diff --git a/src/views/zy/zyGonggao/ZyGonggaoList.vue b/src/views/zy/zyGonggao/ZyGonggaoList.vue index 4ed3b7f..d8a75d5 100644 --- a/src/views/zy/zyGonggao/ZyGonggaoList.vue +++ b/src/views/zy/zyGonggao/ZyGonggaoList.vue @@ -1,8 +1,8 @@ diff --git a/src/views/zy/zyGonggao/components/ZyGonggaoForm.vue b/src/views/zy/zyGonggao/components/ZyGonggaoForm.vue index 7dba1e2..46adbe6 100644 --- a/src/views/zy/zyGonggao/components/ZyGonggaoForm.vue +++ b/src/views/zy/zyGonggao/components/ZyGonggaoForm.vue @@ -26,7 +26,7 @@ import { saveOrUpdate } from '../ZyGonggao.api'; import { Form } from 'ant-design-vue'; import { useRouter } from 'vue-router'; - + const props = defineProps({ formDisabled: { type: Boolean, default: false }, formData: { type: Object, default: ()=>{} }, @@ -66,7 +66,7 @@ return props.formDisabled; }); - + /** * 新增 */ @@ -109,7 +109,7 @@ } } } - console.log(`🚀 ~ submitForm ~ model:`, model) + // console.log(`🚀 ~ submitForm ~ model:`, model) await saveOrUpdate(model, isUpdate.value) .then((res) => { if (res.success) { diff --git a/src/views/zy/zyGonggao/components/ZyGonggaoHistoryList.vue b/src/views/zy/zyGonggao/components/ZyGonggaoHistoryList.vue new file mode 100644 index 0000000..779343a --- /dev/null +++ b/src/views/zy/zyGonggao/components/ZyGonggaoHistoryList.vue @@ -0,0 +1,155 @@ + + + + + diff --git a/src/views/zy/zyGonggao/components/ZyGonggaoHistoryModal.vue b/src/views/zy/zyGonggao/components/ZyGonggaoHistoryModal.vue new file mode 100644 index 0000000..2e443b8 --- /dev/null +++ b/src/views/zy/zyGonggao/components/ZyGonggaoHistoryModal.vue @@ -0,0 +1,61 @@ + + + + + diff --git a/src/views/zy/zyGonggao/components/ZyGonggaoYlForm.vue b/src/views/zy/zyGonggao/components/ZyGonggaoYlForm.vue new file mode 100644 index 0000000..7f45aee --- /dev/null +++ b/src/views/zy/zyGonggao/components/ZyGonggaoYlForm.vue @@ -0,0 +1,129 @@ + + + + + diff --git a/src/views/zy/zyGonggao/components/ZyGonggaoYlModal.vue b/src/views/zy/zyGonggao/components/ZyGonggaoYlModal.vue new file mode 100644 index 0000000..5a7fab2 --- /dev/null +++ b/src/views/zy/zyGonggao/components/ZyGonggaoYlModal.vue @@ -0,0 +1,75 @@ + + + + +