From 968a86277f7a34214255a55ae1ae603efcbe54a7 Mon Sep 17 00:00:00 2001
From: du <1176658673@qq.com>
Date: Mon, 29 Jan 2024 09:44:22 +0800
Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=B7=A5=E4=BD=9C=20?=
=?UTF-8?q?=E5=8A=A8=E6=80=81=E3=80=81=E7=AE=A1=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/system/base/org/index.vue | 4 +-
src/views/work-manage/components/Add.vue | 6 +-
src/views/work-manage/components/cg.vue | 200 -----------------------
src/views/work-manage/index.vue | 168 ++++++++++++++++++-
src/views/work-trends/components/Add.vue | 6 +-
src/views/work-trends/index.vue | 9 +-
6 files changed, 186 insertions(+), 207 deletions(-)
delete mode 100644 src/views/work-manage/components/cg.vue
diff --git a/src/views/system/base/org/index.vue b/src/views/system/base/org/index.vue
index 4b7b7d2..3991b99 100644
--- a/src/views/system/base/org/index.vue
+++ b/src/views/system/base/org/index.vue
@@ -59,6 +59,7 @@
prop="performclassname"
:resizable="true"
label="组织名称"
+ width="250"
>
@@ -73,7 +75,7 @@
diff --git a/src/views/work-manage/components/Add.vue b/src/views/work-manage/components/Add.vue
index 121030a..b145ec4 100644
--- a/src/views/work-manage/components/Add.vue
+++ b/src/views/work-manage/components/Add.vue
@@ -3,7 +3,7 @@
{});
const emits = defineEmits(["close", "onSubmit"]);
diff --git a/src/views/work-manage/components/cg.vue b/src/views/work-manage/components/cg.vue
deleted file mode 100644
index 10c2dd6..0000000
--- a/src/views/work-manage/components/cg.vue
+++ /dev/null
@@ -1,200 +0,0 @@
-
-
-
-
-
-
-
-
- 新增
-
-
-
- 刷新
-
-
-
- 导出
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 详情
-
-
-
- 删除
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/views/work-manage/index.vue b/src/views/work-manage/index.vue
index 8e47691..6d34efa 100644
--- a/src/views/work-manage/index.vue
+++ b/src/views/work-manage/index.vue
@@ -9,7 +9,94 @@
-
+
+
+
+
+
+
+ 新增
+
+
+
+ 刷新
+
+
+
+ 导出
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 详情
+
+
+
+ 删除
+
+
+
+
+
+
+
+
@@ -18,21 +105,31 @@
import { onMounted, ref } from "vue";
// import { ElMessageBox } from "element-plus";
import { wkTypes } from "@/api/Work";
-import CG from "./components/cg.vue";
+// import CG from "./components/cg.vue";
+import Add from "./components/add.vue";
+import { sendWorkPage } from "@/api/Work";
+import useUserStore from "@/store/modules/user";
+const userStore = useUserStore();
+const user = ref(JSON.parse(userStore.userInfo));
+const userId = ref(user.value.userId);
const tabIndex = ref(0);
const tabs = ref([
{ typeName: "常规工作", sortId: 1, },
]);
const typeId = ref('');
+//弹窗标题
+const tabsTitle = ref('');
//头部点击取id
const clickRadio = ()=>{
tabs.value.forEach(item => {
if (item.sortId == tabIndex.value) {
typeId.value = item.typeId
+ tabsTitle.value = item.typeName;
}
});
+ getList()
}
//工作类型
const getWkTypes = ()=>{
@@ -42,9 +139,76 @@ const getWkTypes = ()=>{
wkTypes(params).then((res: any) => {
tabs.value = res.data;
typeId.value = res.data[0].typeId;
+ tabsTitle.value = res.data[0].typeName;
tabIndex.value = 1;
+ getSendWorkPage();
});
}
+
+
+const search = ref([]);
+const currentPage = ref(1);
+const pageSize = ref(10);
+const total = ref(0);
+
+
+//获取列表
+const tableDataloading = ref(false);
+const tableData = ref([]);
+const getSendWorkPage = () => {
+ tableDataloading.value = true;
+ let params = {
+ userId:userId.value,
+ limit: pageSize.value,
+ page: currentPage.value,
+ typeId:typeId.value,
+ };
+ sendWorkPage(params).then((res: any) => {
+ tableData.value = res.data.list;
+ total.value = res.data.total;
+ tableDataloading.value = false;
+ });
+};
+
+//新增弹窗
+const dialogVisible = ref(false);
+const form = ref({});
+const readonly = ref(false);
+//关闭新增弹窗
+const onclone = () => {
+ dialogVisible.value = false;
+ form.value = {};
+ getList();
+};
+//删除
+const deletelist = (data)=>{
+ console.log(data,'===>');
+ // ElMessageBox.confirm("是否确认删除?", "提示", {
+ // confirmButtonText: "是",
+ // cancelButtonText: "否",
+ // type: "warning",
+ // }).then(() => {
+ // delOthequipment(id, userId.value).then((res: any) => {
+ // if (res.code == 1) {
+ // ElMessage.success({
+ // message: "删除成功",
+ // type: "success",
+ // });
+ // } else {
+ // ElMessage.error({
+ // message: res.message,
+ // type: "error",
+ // });
+ // }
+ // getSendWorkPage();
+ // });
+ // });
+
+}
+const getList = ()=>{
+ currentPage.value = 1;
+ getSendWorkPage();
+}
onMounted(() => {
getWkTypes();
});
diff --git a/src/views/work-trends/components/Add.vue b/src/views/work-trends/components/Add.vue
index 9540f1f..2878efc 100644
--- a/src/views/work-trends/components/Add.vue
+++ b/src/views/work-trends/components/Add.vue
@@ -3,7 +3,7 @@
{});
const emits = defineEmits(["close", "onSubmit"]);
diff --git a/src/views/work-trends/index.vue b/src/views/work-trends/index.vue
index 80024dd..9146ab1 100644
--- a/src/views/work-trends/index.vue
+++ b/src/views/work-trends/index.vue
@@ -135,6 +135,7 @@
:readonly="readonly"
@close="onclone"
:typeId="typeId"
+ :tabsTitle="tabsTitle"
/>
@@ -142,7 +143,7 @@