From c8b0f21069f25ad52101d4e7d1fc36be2e69840a Mon Sep 17 00:00:00 2001
From: "2309368887@qq.com" <2309368887@qq.com>
Date: Tue, 21 Jun 2022 15:38:34 +0800
Subject: [PATCH 1/3] xial
---
.env.development | 4 +-
src/api/model/opl.js | 39 +++++++++
src/config/route.js | 9 ++
src/views/opm/operation.vue | 102 +++++++++++++++++++++++
src/views/opm/oplcate.vue | 158 ++++++++++++++++++++++++++++++++++++
5 files changed, 310 insertions(+), 2 deletions(-)
create mode 100644 src/api/model/opl.js
create mode 100644 src/views/opm/oplcate.vue
diff --git a/.env.development b/.env.development
index a395fc0b..e12feb9f 100644
--- a/.env.development
+++ b/.env.development
@@ -5,8 +5,8 @@ NODE_ENV = development
VUE_APP_TITLE = '曲阳金隅安全智能管控平台'
# 接口地址
-# VUE_APP_API_BASEURL = http://49.232.14.174:2226/api
-VUE_APP_API_BASEURL = http://127.0.0.1:8000/api
+ VUE_APP_API_BASEURL = http://49.232.14.174:2226/api
+#VUE_APP_API_BASEURL = http://127.0.0.1:8000/api
# 本地端口
VUE_APP_PORT = 2800
diff --git a/src/api/model/opl.js b/src/api/model/opl.js
new file mode 100644
index 00000000..145c1286
--- /dev/null
+++ b/src/api/model/opl.js
@@ -0,0 +1,39 @@
+import config from "@/config"
+import http from "@/utils/request"
+
+export default {
+ rparty: {
+ list: {
+ name: "获取",
+ req: async function(data){
+ return await http.get(
+ `${config.API_URL}/opm/opl_cate/`,
+ data
+ );
+ }
+ },
+ update: {
+ name: "更新",
+ req: async function(id, data){
+ return await http.put(
+ `${config.API_URL}/opm/opl_cate/${id}/`,
+ data);
+ }
+ },
+ create: {
+ name: "创建",
+ req: async function(data){
+ return await http.post(
+ `${config.API_URL}/opm/opl_cate/`,
+ data);
+ }
+ },
+ delete: {
+ name: "删除",
+ req: async function(id){
+ return await http.delete(
+ `${config.API_URL}/opm/opl_cate/${id}/`);
+ }
+ }
+ },
+}
\ No newline at end of file
diff --git a/src/config/route.js b/src/config/route.js
index 4d4b6681..feb302d9 100644
--- a/src/config/route.js
+++ b/src/config/route.js
@@ -143,6 +143,15 @@ const routes = [
},
"component": "opm/operation"
},
+ {
+ "name": "oplcate",
+ "path": "/opm/oplcate",
+ "meta": {
+ "title": "许可证分类",
+ "icon": "el-icon-menu",
+ },
+ "component": "opm/oplcate"
+ },
]
},
{
diff --git a/src/views/opm/operation.vue b/src/views/opm/operation.vue
index e69de29b..e09b0f44 100644
--- a/src/views/opm/operation.vue
+++ b/src/views/opm/operation.vue
@@ -0,0 +1,102 @@
+
+
+
+
+
+
+
+
+
+
+
+ 企业员工
+ 相关方
+ 访客
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查看
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/opm/oplcate.vue b/src/views/opm/oplcate.vue
new file mode 100644
index 00000000..5277507e
--- /dev/null
+++ b/src/views/opm/oplcate.vue
@@ -0,0 +1,158 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查看
+ 编辑
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
From 46b34704d56b9292def31761c4ab9e81a91c9424 Mon Sep 17 00:00:00 2001
From: "2309368887@qq.com" <2309368887@qq.com>
Date: Thu, 23 Jun 2022 09:51:06 +0800
Subject: [PATCH 2/3] zuoye
---
src/api/model/{opl.js => am.js} | 17 ++-
src/api/model/opm.js | 78 ++++++++++
src/components/scTable/index.vue | 10 +-
src/utils/verificate.js | 27 ++++
src/views/hrm/ep_form.vue | 10 +-
src/views/opm/operation.vue | 130 +++++++++++-----
src/views/opm/operation_form.vue | 254 +++++++++++++++++++++++++++++++
src/views/opm/oplcate.vue | 12 +-
src/views/opm/oplcate_form.vue | 228 +++++++++++++++++++++++++++
src/views/ops/logInfo.vue | 2 +-
src/views/ops/menu.vue | 26 ++--
src/views/sys/dept.vue | 12 +-
src/views/sys/dict.vue | 7 +-
src/views/sys/role.vue | 12 +-
src/views/sys/user.vue | 8 +-
15 files changed, 745 insertions(+), 88 deletions(-)
rename src/api/model/{opl.js => am.js} (74%)
create mode 100644 src/api/model/opm.js
create mode 100644 src/views/opm/operation_form.vue
create mode 100644 src/views/opm/oplcate_form.vue
diff --git a/src/api/model/opl.js b/src/api/model/am.js
similarity index 74%
rename from src/api/model/opl.js
rename to src/api/model/am.js
index 145c1286..54414d7d 100644
--- a/src/api/model/opl.js
+++ b/src/api/model/am.js
@@ -1,13 +1,14 @@
import config from "@/config"
import http from "@/utils/request"
-
+/*区域接口*/
export default {
- rparty: {
+
+ area: {
list: {
name: "获取",
req: async function(data){
return await http.get(
- `${config.API_URL}/opm/opl_cate/`,
+ `${config.API_URL}/am/area/`,
data
);
}
@@ -16,7 +17,7 @@ export default {
name: "更新",
req: async function(id, data){
return await http.put(
- `${config.API_URL}/opm/opl_cate/${id}/`,
+ `${config.API_URL}/am/area/${id}/`,
data);
}
},
@@ -24,7 +25,7 @@ export default {
name: "创建",
req: async function(data){
return await http.post(
- `${config.API_URL}/opm/opl_cate/`,
+ `${config.API_URL}/am/area/`,
data);
}
},
@@ -32,8 +33,12 @@ export default {
name: "删除",
req: async function(id){
return await http.delete(
- `${config.API_URL}/opm/opl_cate/${id}/`);
+ `${config.API_URL}/am/area/${id}/`);
}
}
},
+
+
+
+
}
\ No newline at end of file
diff --git a/src/api/model/opm.js b/src/api/model/opm.js
new file mode 100644
index 00000000..11b9b336
--- /dev/null
+++ b/src/api/model/opm.js
@@ -0,0 +1,78 @@
+import config from "@/config"
+import http from "@/utils/request"
+/*作业接口*/
+export default {
+ /*作业许可证分类*/
+ oplcate: {
+ list: {
+ name: "获取",
+ req: async function(data){
+ return await http.get(
+ `${config.API_URL}/opm/opl_cate/`,
+ data
+ );
+ }
+ },
+ update: {
+ name: "更新",
+ req: async function(id, data){
+ return await http.put(
+ `${config.API_URL}/opm/opl_cate/${id}/`,
+ data);
+ }
+ },
+ create: {
+ name: "创建",
+ req: async function(data){
+ return await http.post(
+ `${config.API_URL}/opm/opl_cate/`,
+ data);
+ }
+ },
+ delete: {
+ name: "删除",
+ req: async function(id){
+ return await http.delete(
+ `${config.API_URL}/opm/opl_cate/${id}/`);
+ }
+ }
+ },
+
+
+
+ /*作业*/
+ operation: {
+ list: {
+ name: "获取",
+ req: async function(data){
+ return await http.get(
+ `${config.API_URL}/opm/operation/`,
+ data
+ );
+ }
+ },
+ update: {
+ name: "更新",
+ req: async function(id, data){
+ return await http.put(
+ `${config.API_URL}/opm/operation/${id}/`,
+ data);
+ }
+ },
+ create: {
+ name: "创建",
+ req: async function(data){
+ return await http.post(
+ `${config.API_URL}/opm/operation/`,
+ data);
+ }
+ },
+ delete: {
+ name: "删除",
+ req: async function(id){
+ return await http.delete(
+ `${config.API_URL}/opm/operation/${id}/`);
+ }
+ }
+ },
+}
\ No newline at end of file
diff --git a/src/components/scTable/index.vue b/src/components/scTable/index.vue
index 5c50b401..2b59c252 100644
--- a/src/components/scTable/index.vue
+++ b/src/components/scTable/index.vue
@@ -264,7 +264,7 @@ export default {
},
//获取数据
async getData() {
- debugger;
+
this.loading = true;
var reqData = {
[config.request.page]: this.currentPage,
@@ -278,7 +278,7 @@ export default {
// delete reqData[config.request.pageSize]
}
Object.assign(reqData, this.tableParams);
- debugger;
+
try {
var res = await this.apiObj.req(reqData);
if (this.hidePagination) {
@@ -288,7 +288,7 @@ export default {
}
if(this.$route.path==='/sys/dept'||this.$route.path==='/sys/perm'){
this.tableData = this.redata(res);
- debugger;
+
console.log(this.tableData)
}else{
this.tableData = res || [];
@@ -316,7 +316,7 @@ export default {
}
if(this.$route.path==='/sys/dept'||this.$route.path==='/ops/menu'){
this.tableData = this.redata(dataList);
- debugger;
+
console.log(this.tableData)
}else{
this.tableData = dataList || [];
@@ -354,7 +354,7 @@ export default {
parent.children = parent.children ? parent.children : [];
parent.children.push(item);
}
- debugger;
+
console.log(arr);
return arr;
},
diff --git a/src/utils/verificate.js b/src/utils/verificate.js
index 36b7983e..51c97443 100644
--- a/src/utils/verificate.js
+++ b/src/utils/verificate.js
@@ -16,3 +16,30 @@ export function verifyCars(rule, value, callback) {
}
callback()
}
+export function genTree(data) {
+ const result = []
+ if (!Array.isArray(data)) {
+ return result
+ }
+ data.forEach(item => {
+ delete item.children
+ })
+ const map = {}
+ data.forEach(item => {
+ item.label = item.name
+ if(item.fullname){
+ item.label = item.fullname
+ }
+ item.value = item.id
+ map[item.id] = item
+ })
+ data.forEach(item => {
+ const parent = map[item.parent]
+ if (parent) {
+ (parent.children || (parent.children = [])).push(item)
+ } else {
+ result.push(item)
+ }
+ })
+ return result
+ }
diff --git a/src/views/hrm/ep_form.vue b/src/views/hrm/ep_form.vue
index 19713e1e..d121eae5 100644
--- a/src/views/hrm/ep_form.vue
+++ b/src/views/hrm/ep_form.vue
@@ -226,14 +226,14 @@
},
//表单提交方法
submit() {
- debugger;
+ //debugger;
this.$refs.dialogForm.validate((valid) => {
- debugger;
+ // debugger;
if (valid) {
- debugger;
+ // debugger;
this.isSaveing = true;
if (this.mode === 'add') {
- debugger;
+ // debugger;
this.$API.hrm.employee.create.req(this.form)
.then(res => {
this.isSaveing = false;
@@ -264,7 +264,7 @@
},
//表单注入数据
setData(data) {
- debugger;
+ //debugger;
console.log(defaultForm);
// this.form = defaultForm;
Object.assign(this.form, data);
diff --git a/src/views/opm/operation.vue b/src/views/opm/operation.vue
index e09b0f44..b5a9bb6e 100644
--- a/src/views/opm/operation.vue
+++ b/src/views/opm/operation.vue
@@ -1,64 +1,49 @@
-
- -->
+
-
+
-
-
+
+
+
-
-
- 企业员工
- 相关方
- 访客
-
-
-
-
-
-
-
-
-
-
-
+
+
查看
-
-
+ 编辑
+
+
+
+
+
+
diff --git a/src/views/opm/oplcate.vue b/src/views/opm/oplcate.vue
index 5277507e..24da7283 100644
--- a/src/views/opm/oplcate.vue
+++ b/src/views/opm/oplcate.vue
@@ -33,21 +33,25 @@
+
+
+
diff --git a/src/views/ops/logInfo.vue b/src/views/ops/logInfo.vue
index eca96198..16997aa7 100644
--- a/src/views/ops/logInfo.vue
+++ b/src/views/ops/logInfo.vue
@@ -32,7 +32,7 @@
methods: {
setData(data){
this.data = data;
- debugger;
+ // debugger;
console.log(data);
let dataStr = '';
for (let i in data) {
diff --git a/src/views/ops/menu.vue b/src/views/ops/menu.vue
index 6a0537b5..9e0ca46a 100644
--- a/src/views/ops/menu.vue
+++ b/src/views/ops/menu.vue
@@ -158,14 +158,14 @@
},
handleChange(value) {
// this.menu.checked = check.checkedKeys;
- debugger;
+ // debugger;
console.log(value);
console.log(this.addForm.parent);
},
//加载树数据
async getGroup() {
var res = await this.$API.system.permission.list.req({page: 0});
- debugger;
+ // debugger;
let permList = res;
this.permList = res;
let posts = [];
@@ -187,7 +187,7 @@
parent.children = parent.children ? parent.children : [];
parent.children.push(item);
}
- debugger;
+ //debugger;
this.group = arr;
},
@@ -200,7 +200,7 @@
this.codesLimited = true;
},
saveCodes(){
- debugger;console.log(this.addForm.codes);
+ // debugger;console.log(this.addForm.codes);
this.addForm.codes.push(this.codes);
this.codes = ''
},
@@ -214,7 +214,7 @@
this.type = 'edit';
this.addForm.id = row.id;
this.addForm.name = row.name;
- debugger;
+ // debugger;
console.log(row.codes);
this.codes = row.codes.join(',');
let parent = row.parent!==null?this.findParents(this.permList, row.parent):'';
@@ -227,7 +227,7 @@
this.limitedVisible = true;
},
findParents(arr, parent) {
- debugger;
+ //debugger;
let data = [];
arr.forEach(item => {
if (item.id === parent) {
@@ -239,7 +239,7 @@
}
}
});
- debugger;
+ //debugger;
return data
},
//删除
@@ -255,15 +255,15 @@
},
submitHandle() {
let that = this;
- debugger;
+ // debugger;
console.log(this.addForm.parent);
- debugger;
+ // debugger;
if (this.addForm.parent !== null) {
this.addForm.parent = this.addForm.parent[this.addForm.parent.length - 1];
} else {
this.addForm.parent = ""
}
- debugger;
+ // debugger;
console.log(this.codes);
if(this.codes.indexOf(','>-1)){
@@ -271,10 +271,10 @@
}else{
this.addForm.codes.push(this.codes)
}
- debugger;
+ // debugger;
console.log(this.addForm.codes);
this.$refs.addForm.validate((valid) => {
- debugger;
+ // debugger;
if (valid) {
this.isSaveing = true;
var res;
@@ -287,7 +287,7 @@
this.limitedVisible = false;
this.$refs.table.refresh();
console.log(res);
- debugger;
+ // debugger;
}
})
},
diff --git a/src/views/sys/dept.vue b/src/views/sys/dept.vue
index 66c073b4..d82422bb 100644
--- a/src/views/sys/dept.vue
+++ b/src/views/sys/dept.vue
@@ -123,7 +123,7 @@
methods: {
handleChange(value) {
// this.menu.checked = check.checkedKeys;
- debugger;
+ //debugger;
console.log(value);
console.log(this.addForm.parent);
},
@@ -165,7 +165,7 @@
},
//编辑
editDept(row){
- debugger;
+ // debugger;
this.temp = [];
this.type='edit';
this.addForm.id=row.id;
@@ -203,12 +203,12 @@
},
submitHandle(){
let that = this;
- debugger;
+ //debugger;
console.log(this.addForm.parent);
- debugger;
+ //debugger;
this.addForm.parent = this.addForm.parent!==null?this.addForm.parent[0]?this.addForm.parent[0]:'':'';
this.$refs.addForm.validate( (valid) => {
- debugger;
+ // debugger;
if (valid) {
this.isSaveing = true;
var res;
@@ -221,7 +221,7 @@
this.limitedVisible = false;
this.$refs.table.refresh();
console.log(res);
- debugger;
+ // debugger;
}
})
},
diff --git a/src/views/sys/dict.vue b/src/views/sys/dict.vue
index d0bbb3a4..35f69960 100644
--- a/src/views/sys/dict.vue
+++ b/src/views/sys/dict.vue
@@ -41,6 +41,7 @@
+
@@ -90,7 +91,7 @@
-
+
@@ -275,7 +276,7 @@
},
findParents(arr,parent){
let that = this;
- debugger;
+ // debugger;
arr.forEach(item=>{
debugger;
if(item.id===parent){
@@ -314,7 +315,7 @@
}
}*/
let res = this.$API.system.dicttype.delete.req(data.id);
- debugger;
+ // debugger;
console.log(res);
this.getDicType();
this.showDicloading = false;
diff --git a/src/views/sys/role.vue b/src/views/sys/role.vue
index 07e97659..74a1b417 100644
--- a/src/views/sys/role.vue
+++ b/src/views/sys/role.vue
@@ -120,7 +120,7 @@
methods: {
handleChange(item, check) {
this.menu.checked = check.checkedKeys;
- debugger;
+ //debugger;
console.log(check);
console.log(this.checkList);
},
@@ -142,7 +142,7 @@
// debugger;
console.log(obj);
for (let item of posts) {
- debugger;
+ // debugger;
if (item.parentId == null) {
arr.push(item);
continue
@@ -169,12 +169,12 @@
console.log(this.menu.list);
},*/
submitHandle(){
- debugger;
+ // debugger;
let that = this;
- debugger;
+ // debugger;
this.addForm.perms = this.menu.checked;
this.$refs.addForm.validate( (valid) => {
- debugger;
+ // debugger;
if (valid) {
this.isSaveing = true;
var res;
@@ -187,7 +187,7 @@
this.limitedVisible = false;
this.$refs.table.refresh();
console.log(res);
- debugger;
+ // debugger;
}
})
},
diff --git a/src/views/sys/user.vue b/src/views/sys/user.vue
index f663cbcf..8e1c0f0c 100644
--- a/src/views/sys/user.vue
+++ b/src/views/sys/user.vue
@@ -279,7 +279,7 @@
},
//编辑
formEdit(row,index) {
- debugger;
+ // debugger;
console.log(row);
this.limitedVisible = true;
if(index==='1'){
@@ -370,7 +370,7 @@
//树点击事件
groupClick(data) {
console.log(data);
- debugger;
+ // debugger;
let params = {belong_dept: data.id};
this.$refs.table.reload(params);
},
@@ -380,10 +380,10 @@
},
//表单提交方法
submit(){
- debugger;
+ // debugger;
this.$refs.addForm.validate(async (valid) => {
if (valid) {
- debugger;
+ // debugger;
this.isSaveing = true;
// this.addForm.belong_dept = this.addForm.belong_dept[this.addForm.belong_dept.length - 1];
let res;
From 2039b52b40c102d37c220b93cdf42123d0d4fa03 Mon Sep 17 00:00:00 2001
From: "2309368887@qq.com" <2309368887@qq.com>
Date: Thu, 23 Jun 2022 10:04:31 +0800
Subject: [PATCH 3/3] zuoyetijiao
---
src/api/model/system.js | 2 +-
src/api/model/wf.js | 2 +-
src/views/sys/task.vue | 1 +
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/api/model/system.js b/src/api/model/system.js
index 4237d33c..b8eff89a 100644
--- a/src/api/model/system.js
+++ b/src/api/model/system.js
@@ -319,7 +319,7 @@ export default {
},
runOnce: {
name: "执行一次",
- req: async function(data){
+ req: async function(data,id){
return await http.post(`${config.API_URL}/system/ptask/${id}/run_once/`,data);
}
},
diff --git a/src/api/model/wf.js b/src/api/model/wf.js
index a96f3b8f..1619c315 100644
--- a/src/api/model/wf.js
+++ b/src/api/model/wf.js
@@ -74,7 +74,7 @@ export default {
ticketItem: {
name: "工单详情",
req: async function(id){
- return await http.get(`${config.API_URL}/wf/ticket/${id}/`);
+ return await http.get(`${config.API_URL}/wf/ticket/${id}/`);
}
},
create: {
diff --git a/src/views/sys/task.vue b/src/views/sys/task.vue
index de41d813..46fde2b4 100644
--- a/src/views/sys/task.vue
+++ b/src/views/sys/task.vue
@@ -198,6 +198,7 @@
},
run(task){
this.$API.system.task.runOnce.req(task.id).then(res=>{
+ console.log(res)
})
this.$message.success(`已成功执行计划任务:${task.title}`)
}