diff --git "a/public/\345\257\274\345\207\272Excel.svg" "b/public/\345\257\274\345\207\272Excel.svg"
new file mode 100644
index 0000000000000000000000000000000000000000..8a534bf213e47763d8361ae8619c58af723724e1
--- /dev/null
+++ "b/public/\345\257\274\345\207\272Excel.svg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/src/App.vue b/src/App.vue
index cee8e63e27b1030da8640924896c1fe401403f22..f23afd34d825e711a25f8ebfaa0726f226bc7bc5 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -7,10 +7,10 @@ import departments from './component/humanResources/department.vue'
-
-
-
+
+
+
后台管理平台
diff --git a/src/component/contractManagement/contractCategory/contractCategory.vue b/src/component/contractManagement/contractCategory/contractCategory.vue
index 96c222beedeacc402eb32c9bd2519d7c87c3c68f..e35133a47977a65e7bed838d29828dc0c079c7da 100644
--- a/src/component/contractManagement/contractCategory/contractCategory.vue
+++ b/src/component/contractManagement/contractCategory/contractCategory.vue
@@ -6,9 +6,9 @@ import addDownload from '@/component/main/header/add_download/addDownload.vue'
import addButton from '@/component/main/header/add_download/button.vue'
import { TableType, _tableData, _operation, _cellStyle } from '@/component/main/tableList/tableList'
import { ref, provide, reactive, onMounted, watch } from 'vue';
-import ejectDialog from '@/component/main/ejectDialog.vue'
-import { getContractCategory } from '@/api/api'
-import { ElMessage } from 'element-plus'
+import ejectDialog from '@/component/main/ejectDialog.vue';
+import { getContractCategory } from '@/api/api';
+import { message } from '@/util/message';
import { computed } from '@vue/reactivity';
// pagination
@@ -47,7 +47,7 @@ const tableType = ref(new TableType());
tableType.value = [
{ name: "id号", type: "id", width: "150px", isSort: false, align: "center" },
{ name: "类别名称", type: "typeName", width: "auto", isSort: false, align: "left" },
- { name: "状态", type: "state", width: "150px", isSort: false, align: "center", isReadOnly: true }
+ { name: "状态", type: "state", width: "150px", isSort: false, align: "center", isReadOnly: false }
]
const operation = ref(_operation);
operation.value = {
@@ -73,28 +73,20 @@ const cellSetStyle = ({ row, column, rowIndex, columnIndex }) => {
//dialog
const bangDingtest = ref();
const inputDialog = ref();
-const inputEditDialog = ref();
+const inputEditDialog = computed({
+ get: () => {
+ return row.value.typeName;
+ },
+ set: (val) => {
+ row.value.typeName = val;
+ getData();
+ }
+});
onMounted(() => {
- watch(() => rowID.value, () => {
- const temp = (tableData.value.filter((item) => item.id == rowID.value)[0]);
- inputEditDialog.value = (temp ? temp.typeName : "");
- })
})
-const sendRequest = ()=>{
+const sendRequest = () => {
console.log('发送请求');
- if ('成功') {
- ElMessage({
- showClose: true,
- message: '成功',
- type: 'success',
- })
- } else {
- ElMessage({
- showClose: true,
- message: '成功',
- type: 'error',
- })
- }
+ message(10000);
}
//对话框
@@ -104,7 +96,7 @@ const disabledDialog = ref(false);
const detailsDialog = ref(false);
const editDialog = ref(false);
const deleteDialog = ref(false);
-const rowID = ref();
+const row = ref();
provide("addSubcategoriesDialog", addSubcategoriesDialog);
provide("disabledDialog", disabledDialog);
provide("detailsDialog", detailsDialog);
@@ -112,8 +104,8 @@ provide("editDialog", editDialog);
provide("deleteDialog", deleteDialog);
provide("tableData", tableData);
-provide("rowID", rowID);
-provide("changeState",()=>{
+provide("row", row);
+provide("changeState", () => {
console.log(1111);
})
provide("cellSetStyle", ({ row, column, rowIndex, columnIndex }) => {
@@ -151,7 +143,7 @@ provide("cellSetStyle", ({ row, column, rowIndex, columnIndex }) => {
新增类别
-
+
编辑类别
diff --git a/src/component/contractManagement/contractList/contractList.vue b/src/component/contractManagement/contractList/contractList.vue
index d5015883721a18ceb7e65897f34d251005aaa8cf..ffb2d74c3b2ec6a4e5b24442c288f2c7c54be4e2 100644
--- a/src/component/contractManagement/contractList/contractList.vue
+++ b/src/component/contractManagement/contractList/contractList.vue
@@ -83,7 +83,7 @@ const disabledDialog = ref(false);
const detailsDialog = ref(false);
const editDialog = ref(false);
const deleteDialog = ref(false);
-const rowID = ref();
+const row = ref();
provide("addSubcategoriesDialog", addSubcategoriesDialog);
provide("disabledDialog", disabledDialog);
provide("detailsDialog", detailsDialog);
@@ -93,7 +93,7 @@ provide("deleteDialog", deleteDialog);
provide("tableData", tableData);
provide("tablePagination", tablePagination);
provide("contractSelect", contractSelect);
-provide("rowID",rowID);
+provide("row",row);
provide("cellSetStyle", ({ row, column, rowIndex, columnIndex }) => {
if (column.property === "state") {
if (row.state == "正常") {
@@ -131,9 +131,10 @@ provide("changeState",()=>{
-
+ 添加合同
+ 合同详情
diff --git a/src/component/enterpriseAnnouncement/announcementType.vue b/src/component/enterpriseAnnouncement/announcementType.vue
index aa407e1611745aa222ca231ddc32a549c9f8db08..f83727bfca417289c21d1d5cd4c94f89e0c34328 100644
--- a/src/component/enterpriseAnnouncement/announcementType.vue
+++ b/src/component/enterpriseAnnouncement/announcementType.vue
@@ -109,7 +109,7 @@ const disabledDialog = ref(false);
const detailsDialog = ref(false);
const editDialog = ref(false);
const deleteDialog = ref(false);
-const rowID = ref();
+const row = ref();
provide("addSubcategoriesDialog", addSubcategoriesDialog);
provide("disabledDialog", disabledDialog);
provide("detailsDialog", detailsDialog);
@@ -117,7 +117,7 @@ provide("editDialog", editDialog);
provide("deleteDialog", deleteDialog);
provide("tableData", tableData);
-provide("rowID", rowID);
+provide("row", row);
provide("changeState",()=>{
console.log(1111);
})
diff --git a/src/component/humanResources/department.vue b/src/component/humanResources/department.vue
index 23fc31ae059fc48f193c468cd06d4a6234939a9d..f9a7005e3d93031742eb43c5f316858c48013cf1 100644
--- a/src/component/humanResources/department.vue
+++ b/src/component/humanResources/department.vue
@@ -9,14 +9,20 @@ import { ref, provide, onMounted } from 'vue';
import { getHumanResourcesDepartment } from '@/api/api';
import { FlatToTree } from '@/util/toTree';
import { deepClone } from '@/util/deepCode';
+import { computed } from '@vue/reactivity';
const addText = ref('添加部门');
let tableData = ref([
])
+let respData = ref();
+const getData = () => {
+ getHumanResourcesDepartment().then((res)=>{
+ respData.value = res.data.data.data;
+ tableData.value = FlatToTree(deepClone(res.data.data.data)).tree;
+ })
+}
onMounted(async () => {
- let data = (await getHumanResourcesDepartment()).data.data.data;
- console.log(deepClone(data));
- tableData.value = FlatToTree(deepClone(data)).tree;
+ getData();
})
let tableType = ref([
@@ -63,21 +69,25 @@ let tableType = ref([
align: "center"
},
{
- name:'状态',
- type:'state',
- width:'120px',
+ name: '状态',
+ type: 'state',
+ width: '120px',
}
]
);
let operation = ref({ type: ["addSubcategories", "edit", "delete"], width: "220px" });
-
-
-
-
-
-
-
+const addDept = ref();
+const addSubDept = ref();
+const editDept = computed({
+ get: () => {
+ return row.value.departmentName;
+ },
+ set: (val) => {
+ row.value.departmentName = val;
+ getData();
+ }
+})
@@ -99,7 +109,7 @@ const disabledDialog = ref(false);
const detailsDialog = ref(false);
const editDialog = ref(false);
const deleteDialog = ref(false);
-const rowID = ref();
+const row = ref();
provide("addSubcategoriesDialog", addSubcategoriesDialog);
provide("disabledDialog", disabledDialog);
provide("detailsDialog", detailsDialog);
@@ -107,11 +117,11 @@ provide("editDialog", editDialog);
provide("deleteDialog", deleteDialog);
provide("tableData", tableData);
-provide("rowID", rowID);
+provide("row", row);
provide("changeState", () => {
console.log(1111);
})
-provide("subString","子部门");
+provide("subString", "子部门");
provide("cellSetStyle", ({ row, column, rowIndex, columnIndex }) => {
if (column.property === "state") {
if (row.state == "正常") {
@@ -140,16 +150,19 @@ provide("cellSetStyle", ({ row, column, rowIndex, columnIndex }) => {
- fdsafs
+ 添加部门
+
- fdsafs
+ 添加子部门
+
- fdsafs
+ 编辑部门名称
+
- fdsafs
+ 删除
diff --git a/src/component/main/header/add_download/downloadItem.vue b/src/component/main/header/add_download/downloadItem.vue
index 3f8d79371df0b64bbd1061f880583e2d99b7f7fc..74bcb13687ea88fbd7a8a6d7f5c21237ec2cd728 100644
--- a/src/component/main/header/add_download/downloadItem.vue
+++ b/src/component/main/header/add_download/downloadItem.vue
@@ -1,14 +1,14 @@
diff --git a/src/component/main/header/add_download/downloadItem/item.vue b/src/component/main/header/add_download/downloadItem/item.vue
index e65c9f65db9e95cf4ab401acfb7298fae4c9ad2d..2fdb1fa7186256ceb5f773782b4d007e75bc4a78 100644
--- a/src/component/main/header/add_download/downloadItem/item.vue
+++ b/src/component/main/header/add_download/downloadItem/item.vue
@@ -1,19 +1,13 @@
-
-
+
+
diff --git a/src/component/main/tableList/table/operation/operations.vue b/src/component/main/tableList/table/operation/operations.vue
index fec8c53a0a23a1f8d1a9c3e270ff2b3f797fa8ab..c9753bbf4bc86b48bbe0df35328b03700146b38f 100644
--- a/src/component/main/tableList/table/operation/operations.vue
+++ b/src/component/main/tableList/table/operation/operations.vue
@@ -5,11 +5,11 @@ import detailss from './details.vue';
import disabled from './disabled.vue';
import addSubcategories from './addSubcategories.vue';
import { inject } from 'vue';
-
+import { deepClone } from '../../../../../util/deepCode'
const prop = defineProps<{
operationNul: { type: string[], width: string, coordin: Map> },
- row: number
+ row: {id:number}
}>()
const isExist = (tempString: string) => {
if (prop.operationNul.type.includes(tempString)) {
@@ -18,7 +18,7 @@ const isExist = (tempString: string) => {
if(!prop.operationNul.coordin){
return false;
}
- if(prop.operationNul.coordin.get(prop.row)?.has(tempString)){
+ if(prop.operationNul.coordin.get(prop.row.id)?.has(tempString)){
return true;
}
return false;
@@ -28,9 +28,9 @@ const disabledDialog = inject("disabledDialog");
const detailsDialog = inject("detailsDialog");
const editDialog = inject("editDialog");
const deleteDialog = inject("deleteDialog");
-const rowID: any = inject("rowID");
+const row: any = inject("row");
const clickButton = (callback: Function) => {
- rowID.value = prop.row;
+ row.value = deepClone(prop.row);
callback(0);
}
diff --git a/src/component/main/tableList/table/table.vue b/src/component/main/tableList/table/table.vue
index 54f84b3db77b42cf65f96478a70de8902514ac57..e62e9dcef7f4b1491d5e5b3eeff0a7662b0ad436 100644
--- a/src/component/main/tableList/table/table.vue
+++ b/src/component/main/tableList/table/table.vue
@@ -54,7 +54,7 @@ const changeState:any = inject("changeState");
-
+
diff --git a/src/util/message.js b/src/util/message.js
new file mode 100644
index 0000000000000000000000000000000000000000..4f6ec316eecbc75cff7a43659e044fa6c387f5c3
--- /dev/null
+++ b/src/util/message.js
@@ -0,0 +1,17 @@
+import { ElMessage } from 'element-plus'
+
+export function message(code){
+ if (code === 10000) {
+ ElMessage({
+ showClose: true,
+ message: '成功',
+ type: 'success',
+ })
+ } else {
+ ElMessage({
+ showClose: true,
+ message: '成功',
+ type: 'error',
+ })
+ }
+}
\ No newline at end of file