diff --git a/package.json b/package.json
index 217a181b269368f8d74257f2a64cbaea9b67b9d3..8494daeaa23e2e6451fa785b66a52e4d47578642 100644
--- a/package.json
+++ b/package.json
@@ -4,6 +4,7 @@
"homepage": "https://iczer.github.io/vue-antd-admin",
"private": true,
"scripts": {
+ "start": "vue-cli-service serve",
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
@@ -86,4 +87,4 @@
"git add"
]
}
-}
+}
\ No newline at end of file
diff --git a/src/api/organization.js b/src/api/organization.js
index be858d7967cac040926bfe62f7b87eb6a5d5f1d5..944790d6f454f4c6ccdec5f9cf417ed549d1fc80 100644
--- a/src/api/organization.js
+++ b/src/api/organization.js
@@ -1,5 +1,9 @@
import { delReq, getReq, postReq, putReq } from '@/utils';
+function getJobsApi(data) {
+ return getReq('/api/v1/jobs', data);
+}
+
function addJobsApi(data) {
return postReq('/api/v1/jobs', data);
}
@@ -8,12 +12,28 @@ function updateJobsApi(data) {
return putReq('/api/v1/jobs', data);
}
-function getOrganizationList(data) {
+function getOrganizationListApi(data) {
return getReq('/api/v1/organizations', data);
}
+function getOrganizationDetailsApi(id) {
+ return getReq(`/api/v1/organizations/${id}`);
+}
+
+function addOrgApi(data) {
+ return postReq('/api/v1/organizations', data);
+}
+
+function updateOrgApi(data) {
+ return putReq('/api/v1/organizations', data);
+}
+
export default {
addJobs: addJobsApi,
updateJobs: updateJobsApi,
- getOrganizationList: getOrganizationList,
+ getOrganizationList: getOrganizationListApi,
+ getJobs: getJobsApi,
+ getOrganizationDetails: getOrganizationDetailsApi,
+ addOrg: addOrgApi,
+ updateOrg: updateOrgApi,
};
diff --git a/src/components/Acron/ACron.vue b/src/components/Acron/ACron.vue
new file mode 100644
index 0000000000000000000000000000000000000000..242833ba28eb096f07b35e16f175b6834818033a
--- /dev/null
+++ b/src/components/Acron/ACron.vue
@@ -0,0 +1,86 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/Acron/AntCron.vue b/src/components/Acron/AntCron.vue
new file mode 100644
index 0000000000000000000000000000000000000000..cc0aa0968cbaba2e37e5aab4a3ae296d9715efd3
--- /dev/null
+++ b/src/components/Acron/AntCron.vue
@@ -0,0 +1,1150 @@
+
+
+
+
+
+
+ 秒
+
+
+
+ 每一秒钟
+
+
+
+ 每隔
+ 秒执行 从
+ 秒开始
+
+
+
+ 具体秒数(可多选)
+
+ {{ index }}
+
+
+
+
+ 周期从
+ 到
+ 秒
+
+
+
+
+
+
+ 分
+
+
+
+
+ 每一分钟
+
+
+
+ 每隔
+ 分执行 从
+ 分开始
+
+
+
+ 具体分钟数(可多选)
+
+ {{ index }}
+
+
+
+
+ 周期从
+ 到
+ 分
+
+
+
+
+
+
+
+ 时
+
+
+
+
+ 每一小时
+
+
+
+ 每隔
+ 小时执行 从
+ 小时开始
+
+
+
+ 具体小时数(可多选)
+
+ {{ index }}
+
+
+
+
+ 周期从
+ 到
+ 小时
+
+
+
+
+
+
+
+ 天
+
+
+
+
+ 每一天
+
+
+
+ 每隔
+ 周执行 从
+
+ {{ weekDays[index-1] }}
+ 开始
+
+
+
+
+ 每隔
+ 天执行 从
+ 日开始
+
+
+
+ 具体星期几(可多选)
+
+ {{ weekDays[index-1] }}
+
+
+
+ 具体天数(可多选)
+
+ {{ index+1 }}
+
+
+
+ 在这个月的最后一天
+
+
+ 在这个月的最后一个工作日
+
+
+
+ 在这个月的最后一个
+
+ {{ weekDays[index] }}
+
+
+
+
+
+ 在本月底前
+ 天
+
+
+
+
+ 最近的工作日(周一至周五)至本月
+ 日
+
+
+
+
+ 在这个月的第
+ 个
+
+ {{ weekDays[index] }}
+
+
+
+
+
+
+
+
+ 月
+
+
+
+
+ 每一月
+
+
+
+ 每隔
+ 月执行 从
+ 月开始
+
+
+
+ 具体月数(可多选)
+
+ {{ index+1 }}
+
+
+
+
+ 从
+ 到
+ 月之间的每个月
+
+
+
+
+
+
+
+ 年
+
+
+
+
+ 每一年
+
+
+
+ 每隔
+ 年执行 从
+ 年开始
+
+
+
+ 具体年份(可多选)
+
+ {{ curYear+index-1 }}
+
+
+
+
+ 从
+ 到
+ 年之间的每一年
+
+
+
+
+
+
+
+ {{this.cron }}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/components/Acron/index.js b/src/components/Acron/index.js
new file mode 100644
index 0000000000000000000000000000000000000000..9bf9702547165811cbf9b9e7ea1fcd79977eba23
--- /dev/null
+++ b/src/components/Acron/index.js
@@ -0,0 +1,3 @@
+import ACron from './ACron'
+
+export default ACron
\ No newline at end of file
diff --git a/src/components/Acron/validator.js b/src/components/Acron/validator.js
new file mode 100644
index 0000000000000000000000000000000000000000..f45bc05aa1232c3a8d2122fc8ce1397854e9c32a
--- /dev/null
+++ b/src/components/Acron/validator.js
@@ -0,0 +1,22 @@
+// import CronParser from 'cron-parser'
+export const WEEK_MAP_EN = {
+ 'sun': '0',
+ 'mon': '1',
+ 'tue': '2',
+ 'wed': '3',
+ 'thu': '4',
+ 'fri': '5',
+ 'sat': '6',
+
+ }
+
+export const replaceWeekName = (c) => {
+ if (c) {
+ c = c.toLowerCase()
+ Object.keys(WEEK_MAP_EN).forEach(k => {
+ c = c.replace(new RegExp(k, 'g'), WEEK_MAP_EN[k])
+ })
+ c = c.replace(new RegExp('7', 'g'), '0')
+ }
+ return c
+}
diff --git a/src/components/MySelect/index.vue b/src/components/MySelect/index.vue
new file mode 100644
index 0000000000000000000000000000000000000000..0c9ff1c4232892754e4916c47ae30ceeb7a02deb
--- /dev/null
+++ b/src/components/MySelect/index.vue
@@ -0,0 +1,38 @@
+
+
+
+
+
diff --git a/src/components/table/index.vue b/src/components/table/index.vue
index ebee3a6a7f37c54ef11358bec9d1c475d362db79..8d7a9ec7f0a0946dfe5055ac9f56e989efbb1d94 100644
--- a/src/components/table/index.vue
+++ b/src/components/table/index.vue
@@ -24,13 +24,22 @@
{{ btn.text }}
-
+
@@ -85,6 +94,7 @@ export default {
},
formatData: Function,
noPage: Boolean,
+ rowSelection: Object, // radio OR checkbox
},
data() {
return {
@@ -114,6 +124,8 @@ export default {
wrapperCol: { span: 20 },
},
total: 0,
+ selectedRowKeys: [],
+ selectedRows: [],
};
},
watch: {
@@ -135,6 +147,15 @@ export default {
total: this.total,
};
},
+ isRowSelection() {
+ return this.rowSelection
+ ? {
+ ...this.rowSelection,
+ selectedRowKeys: this.selectedRowKeys,
+ onChange: this.onSelectChange,
+ }
+ : undefined;
+ },
},
methods: {
@@ -202,6 +223,21 @@ export default {
this.initQuery.pageNum = page.current;
this.getData();
},
+
+ onSelectChange(selectedRowKeys, selectedRows) {
+ this.selectedRowKeys = selectedRowKeys;
+ this.selectedRows = selectedRows;
+ },
+ handleClose() {
+ this.selectedRowKeys = [];
+ this.selectedRows = [];
+ },
+ getSelectedRowKeys() {
+ return this.selectedRowKeys;
+ },
+ getTableData() {
+ return this.data;
+ },
},
};
diff --git a/src/pages/system/view/organization/components/OrganizationTree.vue b/src/pages/system/view/organization/components/OrganizationTree.vue
index cf0d023d194af0540672ff19acd4a7875b2e04c6..bf0e9b2feef696ed8e6f741d717681cd12b33007 100644
--- a/src/pages/system/view/organization/components/OrganizationTree.vue
+++ b/src/pages/system/view/organization/components/OrganizationTree.vue
@@ -1,19 +1,16 @@
-
+
\ No newline at end of file
diff --git a/src/pages/system/view/organization/orgmanagement/form.vue b/src/pages/system/view/organization/orgmanagement/form.vue
new file mode 100644
index 0000000000000000000000000000000000000000..d676792c35ee424b252530df1445050334dc182a
--- /dev/null
+++ b/src/pages/system/view/organization/orgmanagement/form.vue
@@ -0,0 +1,68 @@
+
+
+
+
+ 组织
+ 部门
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/system/view/organization/usermanagement/index.js b/src/pages/system/view/organization/usermanagement/index.js
deleted file mode 100644
index b6916d834ab0de1dd74cd29601094275376ac566..0000000000000000000000000000000000000000
--- a/src/pages/system/view/organization/usermanagement/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import User from './User';
-
-export default User;
diff --git a/src/router/config.js b/src/router/config.js
index 948d40d589b99f9b9e1f42ab46464a2bb0a21e4a..cf8d176716ac8e9ab839c0949a9fe8b4c4f052c8 100644
--- a/src/router/config.js
+++ b/src/router/config.js
@@ -79,21 +79,22 @@ const options = {
path: 'job_management',
name: '岗位管理',
component: () =>
- import('@/pages/system/view/organization/jobsmanagement'),
+ import('@/pages/system/view/organization/jobsmanagement/Jobs.vue'),
},
{
path: 'user_management',
name: '用户管理',
component: () =>
- import('@/pages/system/view/organization/usermanagement'),
+ import('@/pages/system/view/organization/usermanagement/User.vue'),
+ },
+ {
+ path: 'org_management',
+ name: '机构管理',
+ component: () =>
+ import('@/pages/system/view/organization/orgmanagement/Org.vue'),
},
],
},
- {
- path: 'user_management',
- name: '用户管理',
- component: () => import('@/pages/system/view/user'),
- },
{
path: 'role_management',
name: '角色管理',
diff --git a/src/utils/index.js b/src/utils/index.js
index 0df8d96076a14e38543650a4bbbb63e624e967bb..71befbb56f87f0d9e6312c366bced5f5f8ea0c6d 100644
--- a/src/utils/index.js
+++ b/src/utils/index.js
@@ -66,6 +66,7 @@ export function arrayToTree(options) {
const THISDATA = JSON.parse(JSON.stringify(this.data));
for (let i = 0; i < this.data.length; i++) {
let currentElement = this.data[i];
+ currentElement.selectable = currentElement.orgType === 'DEPARTMENT';
let tempCurrentElementParent = this.indexStorage[currentElement[this.parentKey]]; // 临时变量里面的当前元素的父元素
if (tempCurrentElementParent) {
// 如果存在父元素
@@ -88,3 +89,16 @@ export function arrayToTree(options) {
this.toTree();
return this;
}
+
+// select组件 数据格式化
+export const formatObj = async (ArrObj, obj) => {
+ const newData = [...ArrObj];
+ const newDataOne = await newData.map(i => {
+ const newObj = { ...i };
+ Object.keys(obj).forEach(key => {
+ newObj[key] = i[obj[key]];
+ });
+ return newObj;
+ });
+ return newDataOne;
+};