From 7c124560b27add087b4aa8fc457de1e84f950d9c Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Tue, 23 Nov 2021 15:19:33 +0800
Subject: [PATCH] 样式 (1:搜索按钮放入右侧,2:隐藏表格显影按钮,3:页码改为(15,30,50,100))
---
src/views/trainExam/index.vue | 39
src/views/accreditationRecords/accreditationRecordsPaper.vue | 280
src/views/resource/oss.vue | 9
src/views/exam/examPayment.vue | 20
src/views/resource/uploadPolicyRelease.vue | 9
src/views/securityAnalysis/child/situation.vue | 3
src/views/trainApply/index.vue | 9
src/views/ownerFeedback/owner.vue | 512
src/views/dispatchChild/index.vue | 2
src/views/people/expression.vue | 9
src/views/desk/notification.vue | 47
src/views/dispatch/dispatchChildoperable.vue | 40
src/views/work/claim.vue | 412
src/views/people/data.js | 8
src/views/resource/uploadNotice.vue | 9
src/views/resource/attachOnce.vue | 2
src/views/securityGuard/data.js | 1196 +-
src/views/authority/apiscope.vue | 1195 +-
src/views/zc/zc.vue | 6
src/views/securityAnalysis/child/dispatch.vue | 3
src/views/licenseApproval/branchOffice.vue | 11
src/views/system/dict.vue | 220
src/views/system/topmenu.vue | 9
src/views/authority/datascope.vue | 1354 +-
src/views/dispatchChild/data.js | 2
src/views/monitor/log/error.vue | 305
src/views/accreditationRecords/accreditationRecords.vue | 175
src/views/flow/follow.vue | 367
src/views/recruitmentManagement/index.vue | 9
src/views/securityUnit备份/transRegionalcompany.vue | 1
src/views/system/menu.vue | 9
src/views/authority/role.vue | 9
src/views/exam/subject.vue | 19
src/views/securityEquipment/car.js | 4
src/views/exam/startexam.vue | 24
src/views/onSiteInspection/company.vue | 1
src/views/trainExam/data.js | 294
src/views/system/client.vue | 9
src/views/trainExam/modifiedGrades.vue | 1228 +-
src/views/map/carGps.vue | 1
src/views/system/param.vue | 71
src/views/securityUnit备份/index.vue | 2
src/views/trainExam/performance.vue | 1923 ++--
src/views/securityEquipment/gun.vue | 11
src/views/securityUnit备份/localCompany.vue | 2
src/views/system/tenant.vue | 360
src/views/workreport/workreply.vue | 6
src/styles/tableSearchBut.scss | 21
src/views/securityUnit备份/selfRecruitedSecurityGuard.vue | 1
src/views/map/peopleGps.vue | 1
src/views/flow/model.vue | 740 +
src/views/securityEquipment/car.vue | 20
src/views/system/user copy.vue | 37
src/views/securityUnit/index.vue | 2
src/views/securityUnitChild/social.vue | 6
src/views/securityUnit/selfRecruitedSecurityGuard.vue | 9
src/views/tool/code.vue | 686 +
src/styles/element-ui.scss | 8
src/views/system/dictbiz.vue | 221
src/page/index/logo.vue | 13
src/views/securityEquipment/equipments.vue | 10
src/views/dispatch/dispatchChildoperableSee.vue | 9
src/views/system/post.vue | 493
src/views/licenseApproval/cancellationOfFiling.vue | 9
src/views/securityMan/data.js | 8
src/views/work/todo.vue | 395
src/views/securityGuard/securityGuardOnce copy.vue | 6
src/views/securityGuard/securityGuardOnce.vue | 4
src/views/tool/datasource.vue | 482
src/views/exam/singleperformance.vue | 127
src/views/securityEquipment/equipments.js | 4
src/views/securityUnit/localCompany.vue | 13
src/views/util/demo/dict-classic.vue | 615
src/views/securityUnit/armedEscort.vue | 10
src/views/trainingRegistration/index.vue | 7
src/views/securityGuard/securityGuard指纹自动识别(集成VUE报错)-9.vue | 4
src/views/work/done.vue | 370
src/views/talk/talk.vue | 6
src/views/resource/attach.vue | 9
src/views/resource/attachCopy.vue | 9
src/views/workreport/workreport.vue | 9
src/views/map/gunGps.vue | 1
src/views/securityEquipment/gun.js | 250
src/views/social/social.vue | 737 +
src/views/trainExam/singleperformance.vue | 13
src/views/desk/notice.vue | 32
src/views/work/send.vue | 389
src/views/companyApply/index.vue | 26
src/views/dispatch/dispatch.vue | 13
src/views/securityGuard/sfzJS.js | 60
src/views/securityAnalysis/child/certificate.vue | 3
src/views/licenseApproval/securityGuard.vue | 9
src/views/securityGuard/securityGuardRegistration.vue | 2
src/views/licenseApproval/crossRegion.vue | 9
src/views/onSiteInspection/securityStaff.vue | 1
src/views/securityAnalysis/child/assignment.vue | 9
src/views/applyexam/index.vue | 2140 ++--
src/views/system/user.vue | 14
src/views/securityUnit备份/armedEscort.vue | 2
src/views/securityUnit备份/securityTraining.vue | 2
src/views/report/reportlist.vue | 105
public/papersApply.html | 24
src/views/applydetailed/index.vue | 17
src/store/modules/common.js | 1
src/views/flow/manager.vue | 610
src/styles/media.scss | 126
src/views/desk/policyRelease.vue | 28
src/views/monitor/log/usual.vue | 305
src/views/resource/attachOnce copy.vue | 6
src/views/securityUnitChild/index.vue | 21
src/views/licenseApproval/securityPermit.vue | 9
src/views/securityAnalysis/child/socialSecurity.vue | 6
src/views/exam/addsubject.vue | 4
src/views/people/job.vue | 9
src/views/exam/performance.vue | 20
src/views/system/dept.vue | 9
src/views/trainingRegistration/data.js | 414
src/views/traincompany/index.vue | 248
src/views/securityAnalysis/child/examination.vue | 1
src/views/resource/sms.vue | 799 +-
src/views/securityMan/index.vue | 2
src/views/securityUnit/transRegionalcompany.vue | 9
src/views/licenseApproval/securityTraining.vue | 9
src/views/work/start.vue | 420
src/views/monitor/log/api.vue | 297
src/views/resource/uploadNotification.vue | 9
src/views/securityUnit/securityTraining.vue | 10
127 files changed, 11,752 insertions(+), 10,078 deletions(-)
diff --git a/public/papersApply.html b/public/papersApply.html
index 9607aa9..a1b23e6 100644
--- a/public/papersApply.html
+++ b/public/papersApply.html
@@ -12,13 +12,13 @@
justify-content: center;
flex-direction: column;
}
-
+
.excelPrint {
width: 100%;
text-align: center;
margin-top: 50px;
}
-
+
.print {
/* position: absolute;
left: 47%;
@@ -31,7 +31,7 @@
background-color: #1D5CE4;
letter-spacing: 4px;
}
-
+
.user-info-table {
margin-top: 30px;
width: 90%;
@@ -39,28 +39,28 @@
border: 1px solid #000;
background-color: #fff;
}
-
+
.user-info-tr {
height: 50px;
font-size: 14px;
}
-
+
.avatar {
width: 140px;
height: 190px;
}
-
+
.title {
margin-top: 20px;
font-size: 28px;
font-weight: 500;
}
-
+
.avatar {
width: 140px;
height: 190px;
}
-
+
.my-picture {
width: 150px;
/* height: 200px; */
@@ -86,7 +86,7 @@
</div>
</div>
<script>
- var getData = function(name) {
+ var getData = function (name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]);
@@ -96,7 +96,7 @@
var name = JSON.parse(getData("data")).name;
// console.log(JSON.parse(getData("data")), 111);
- axios.get('http://223.82.109.183:2080/api/apply/getApplyDetailList?examId=' + id).then(function(res) {
+ axios.get('http://223.82.109.183:2080/api/apply/getApplyDetailList?examId=' + id).then(function (res) {
// axios.get('http://localhost:81/apply/getApplyDetailList?examId=' + id).then(function(res) {
var data = res.data;
var list = data.applyList;
@@ -108,7 +108,7 @@
<td width="60px">性别</td>
<td width="120px">准考证号</td>
<td width="160px">身份证号</td>
- <td width="300px">单位名称</td>
+ <td width="300px">企业名称</td>
<td width="100px">报考证件</td>
<td width="200px">报名时间</td>
</tr>`
@@ -117,7 +117,7 @@
str += `
<tr class="user-info-tr">
<td>${list[k].realName}</td>
- <td>${list[k].sex==1?"男":(data.sex==2?"女":"")}</td>
+ <td>${list[k].sex == 1 ? "男" : (data.sex == 2 ? "女" : "")}</td>
<td>${list[k].candidateNo}</td>
<td>${list[k].idCardNo}</td>
<td>${list[k].deptName}</td>
diff --git a/src/page/index/logo.vue b/src/page/index/logo.vue
index de07ead..4e6d121 100644
--- a/src/page/index/logo.vue
+++ b/src/page/index/logo.vue
@@ -1,16 +1,13 @@
<template>
<div class="avue-logo">
<transition name="fade">
- <span v-if="keyCollapse"
- class="avue-logo_subtitle"
- key="0">
- {{website.logo}}
+ <span v-if="keyCollapse" class="avue-logo_subtitle" key="0">
+ {{ website.logo }}
</span>
</transition>
<transition-group name="fade">
<template v-if="!keyCollapse">
- <span class="avue-logo_title"
- key="1">{{website.indexTitle}} </span>
+ <span class="avue-logo_title" key="1">{{ website.indexTitle }} </span>
</template>
</transition-group>
</div>
@@ -25,9 +22,9 @@
},
created() {},
computed: {
- ...mapGetters(["website", "keyCollapse"])
+ ...mapGetters(["website", "keyCollapse"]),
},
- methods: {}
+ methods: {},
};
</script>
diff --git a/src/store/modules/common.js b/src/store/modules/common.js
index 38bd3a1..e7ecff6 100644
--- a/src/store/modules/common.js
+++ b/src/store/modules/common.js
@@ -41,6 +41,7 @@
state.isShade = active;
},
SET_COLLAPSE: (state, val = 3) => {
+ // console.log(val)
if (val == 3) {
state.isCollapse = !state.isCollapse;
} else {
diff --git a/src/styles/element-ui.scss b/src/styles/element-ui.scss
index 8cf62df..9827d0e 100644
--- a/src/styles/element-ui.scss
+++ b/src/styles/element-ui.scss
@@ -317,8 +317,10 @@
}
}
-
.avue-form__group > div:last-child {
- display: inline-block !important;
- width: auto !important;
+ display: inline-block !important;
+ width: auto !important;
}
+
+// 表格搜索按钮样式覆盖
+@import "./tableSearchBut.scss";
diff --git a/src/styles/media.scss b/src/styles/media.scss
index 3f1db09..95f9c0b 100644
--- a/src/styles/media.scss
+++ b/src/styles/media.scss
@@ -108,68 +108,68 @@
}
}
-@media screen and (max-width: 992px) {
- $width: 240px;
- // ele的自适应
- .el-dialog,
- .el-message-box {
- width: 98% !important;
- }
- //登录页面
- .login-left {
- display: none !important;
- }
- .login-logo {
- padding-top: 30px !important;
- margin-left: -30px;
- }
- .login-weaper {
- margin: 0 auto;
- width: 96% !important;
- }
- .login-border {
- border-radius: 5px;
- padding: 40px;
- margin: 0 auto;
- float: none !important;
- width: 100% !important;
- }
- .login-main {
- width: 100% !important;
- }
- //主框架
- .avue-tags {
- display: none;
- }
- .avue-left,
- .avue-logo {
- left: -$width;
- }
- .avue-main {
- left: 0;
- width: 100%;
- }
- .avue-header {
- margin-bottom: 15px;
- padding-left: 15px;
- }
- .top-bar__item {
- display: none;
- }
- .avue--collapse {
- .avue-left,
- .avue-logo {
- width: $width;
- left: 0;
- }
+// @media screen and (max-width: 992px) {
+// $width: 240px;
+// // ele的自适应
+// .el-dialog,
+// .el-message-box {
+// width: 98% !important;
+// }
+// //登录页面
+// .login-left {
+// display: none !important;
+// }
+// .login-logo {
+// padding-top: 30px !important;
+// margin-left: -30px;
+// }
+// .login-weaper {
+// margin: 0 auto;
+// width: 96% !important;
+// }
+// .login-border {
+// border-radius: 5px;
+// padding: 40px;
+// margin: 0 auto;
+// float: none !important;
+// width: 100% !important;
+// }
+// .login-main {
+// width: 100% !important;
+// }
+// //主框架
+// .avue-tags {
+// display: none;
+// }
+// .avue-left,
+// .avue-logo {
+// left: -$width;
+// }
+// .avue-main {
+// left: 0;
+// width: 100%;
+// }
+// .avue-header {
+// margin-bottom: 15px;
+// padding-left: 15px;
+// }
+// .top-bar__item {
+// display: none;
+// }
+// .avue--collapse {
+// .avue-left,
+// .avue-logo {
+// width: $width;
+// left: 0;
+// }
- .avue-main {
- width: calc(100% - 60px);
- left: 60px;
- }
+// .avue-main {
+// width: calc(100% - 60px);
+// left: 60px;
+// }
- .avue-header {
- padding-left: 60px;
- }
- }
-}
+// .avue-header {
+// padding-left: 60px;
+// }
+// }
+// }
diff --git a/src/styles/tableSearchBut.scss b/src/styles/tableSearchBut.scss
new file mode 100644
index 0000000..ca30f37
--- /dev/null
+++ b/src/styles/tableSearchBut.scss
@@ -0,0 +1,21 @@
+.tooRowSearch .avue-crud__search .avue-form__group.avue-form__group--flex .avue-form__menu--center {
+ width: 222px !important;
+ position: absolute !important;
+ right: 0 !important;
+ top: 126px !important;
+ z-index: 100 !important;
+}
+.tooRowSearch .el-card.is-never-shadow.avue-crud__search {
+ overflow: visible;
+}
+
+.oneRowSearch .avue-crud__search .avue-form__group.avue-form__group--flex .avue-form__menu--center {
+ width: 222px !important;
+ position: absolute !important;
+ right: 0 !important;
+ top: 71px !important;
+ z-index: 100 !important;
+}
+.oneRowSearch .el-card.is-never-shadow.avue-crud__search {
+ overflow: visible;
+}
diff --git a/src/views/accreditationRecords/accreditationRecords.vue b/src/views/accreditationRecords/accreditationRecords.vue
index 72f84ef..41d66ab 100644
--- a/src/views/accreditationRecords/accreditationRecords.vue
+++ b/src/views/accreditationRecords/accreditationRecords.vue
@@ -1,5 +1,10 @@
<template>
- <basic-container class="desk1">
+ <basic-container
+ :class="[
+ 'desk1',
+ $store.state.control.windowWidth >= 1024 ? 'tooRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option"
:table-loading="loading"
@@ -48,7 +53,7 @@
</template>
<template slot-scope="{ type, size, row }" slot="menu">
<el-button
- style="display:none"
+ style="display: none"
:size="size"
:type="type"
v-if="permission.notice_upload"
@@ -64,10 +69,12 @@
</el-button> -->
</template>
<template slot-scope="{ row }" slot="deptName">
- <el-tag>{{ row.deptName }}</el-tag>
+ <el-tag>{{ row.deptName }}</el-tag>
</template>
<template slot-scope="{ row }" slot="sex">
- <el-tag>{{ row.sex=="1"?"男":row.sex=="2"?"女":""}}</el-tag>
+ <el-tag>{{
+ row.sex == "1" ? "男" : row.sex == "2" ? "女" : ""
+ }}</el-tag>
</template>
</avue-crud>
</basic-container>
@@ -79,7 +86,7 @@
remove,
update,
add,
- getAccreditationRecords
+ getAccreditationRecords,
} from "@/api/accreditationRecords/accreditationRecords";
import { getDept } from "@/api/system/dept";
import { mapGetters } from "vuex";
@@ -90,7 +97,7 @@
export default {
data() {
return {
- check:false,
+ check: false,
form: {},
query: {},
questionBankSearch: {},
@@ -105,6 +112,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
selectionList: [],
option: {
@@ -126,6 +134,7 @@
saveBtnText: "发布",
menuWidth: 150,
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "申请时间",
@@ -139,7 +148,7 @@
editDisplay: false,
viewDisplay: false,
search: true,
- searchSpan:5,
+ searchSpan: 5,
rules: [
{
required: true,
@@ -153,12 +162,12 @@
prop: "realName",
search: true,
searchSpan: 3,
- width:100,
+ width: 100,
searchLabelWidth: 50,
// display: false,
},
// {
- // label: "所属保安公司",
+ // label: "企业名称",
// searchLabelWidth: "110",
// // prop: "deptName",
// prop: "deptId",
@@ -177,20 +186,20 @@
// minWidth: 260,
// },
{
- label: "所属保安公司",
- searchLabelWidth: "110",
- prop: "deptName",
- // type: "tree",
- // dicUrl: "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
- // props: {
- // label: "title",
- // value: "id",
- // },
- slot: true,
- searchSpan: 5,
- search: true,
- overHidden: true,
- minWidth: 200
+ label: "企业名称",
+ searchLabelWidth: "110",
+ prop: "deptName",
+ // type: "tree",
+ // dicUrl: "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
+ // props: {
+ // label: "title",
+ // value: "id",
+ // },
+ slot: true,
+ searchSpan: 5,
+ search: true,
+ overHidden: true,
+ minWidth: 200,
},
{
label: "性别",
@@ -265,7 +274,7 @@
label: "有无照片",
prop: "isAvatar",
type: "select",
- search:true,
+ search: true,
searchLabelWidth: 90,
minWidth: 105,
searchSpan: 3,
@@ -273,20 +282,20 @@
editDisplay: false,
hide: true,
display: false,
- dicData:[
+ dicData: [
{
- label:"全部",
- value:3
+ label: "全部",
+ value: 3,
},
{
- label:"有",
- value:1
+ label: "有",
+ value: 1,
},
{
- label:"无",
- value:2
- }
- ]
+ label: "无",
+ value: 2,
+ },
+ ],
},
],
},
@@ -298,8 +307,14 @@
permissionList() {
return {
addBtn: this.vaildData(null, false),
- viewBtn: this.vaildData(this.permission.accreditationRecords_view, false),
- delBtn: this.vaildData(this.permission.accreditationRecords_delete, false),
+ viewBtn: this.vaildData(
+ this.permission.accreditationRecords_view,
+ false
+ ),
+ delBtn: this.vaildData(
+ this.permission.accreditationRecords_delete,
+ false
+ ),
editBtn: this.vaildData(null, false),
};
},
@@ -317,13 +332,13 @@
mounted() {
this.getDeptInfo(this.userInfo.dept_id);
},
- created(){
- if (this.userInfo.role_name == "公安管理员") {
+ created() {
+ if (this.userInfo.role_name == "公安管理员") {
//判断是否为市局管理员
- if(this.userInfo.jurisdiction=="1372091709474910209"){
- this.check = true;
- // this.vaildData(this.permission.accreditationRecords_paper_delete, false);
- }else{
+ if (this.userInfo.jurisdiction == "1372091709474910209") {
+ this.check = true;
+ // this.vaildData(this.permission.accreditationRecords_paper_delete, false);
+ } else {
this.check = false;
// this.vaildData(null, false);
}
@@ -473,40 +488,40 @@
window.localStorage.getItem("saber-userInfo")
).content.dept_id;
- const { releaseTimeRange } = this.query;
- params["type"] = 1;
- if (this.userInfo.role_name == "保安公司管理员") {
- //如果是保安公司管理员
- params["deptId"] = this.userInfo.dept_id;
- }
- if (this.userInfo.role_name == "培训公司管理员") {
- //如果是培训公司管理员
- params["createUser"] = this.userInfo.Id;
- }
- if (this.userInfo.role_name == "公安管理员") {
- //如果是公安管理员
- params["jurisdiction"] = this.userInfo.jurisdiction;
- }
- let values = {
+ const { releaseTimeRange } = this.query;
+ params["type"] = 1;
+ if (this.userInfo.role_name == "保安公司管理员") {
+ //如果是保安公司管理员
+ params["deptId"] = this.userInfo.dept_id;
+ }
+ if (this.userInfo.role_name == "培训公司管理员") {
+ //如果是培训公司管理员
+ params["createUser"] = this.userInfo.Id;
+ }
+ if (this.userInfo.role_name == "公安管理员") {
+ //如果是公安管理员
+ params["jurisdiction"] = this.userInfo.jurisdiction;
+ }
+ let values = {
+ ...params,
+ };
+ if (releaseTimeRange) {
+ values = {
...params,
+ startTime: releaseTimeRange[0],
+ endTime: releaseTimeRange[1],
+ ...this.query,
};
- if (releaseTimeRange) {
- values = {
- ...params,
- startTime: releaseTimeRange[0],
- endTime: releaseTimeRange[1],
- ...this.query,
- };
- values.releaseTimeRange = null;
- }
- this.loading = true;
- getList(page.currentPage, page.pageSize, values).then((res) => {
- const data = res.data.data;
- this.page.total = data.total;
- this.data = data.records;
- this.loading = false;
- this.selectionClear();
- });
+ values.releaseTimeRange = null;
+ }
+ this.loading = true;
+ getList(page.currentPage, page.pageSize, values).then((res) => {
+ const data = res.data.data;
+ this.page.total = data.total;
+ this.data = data.records;
+ this.loading = false;
+ this.selectionClear();
+ });
},
//保安员证信息导出
handleExport() {
@@ -518,12 +533,12 @@
//获取查询条件
const { releaseTimeRange } = this.questionBankSearch;
if (releaseTimeRange) {
- this.questionBankSearch['startTime'] = releaseTimeRange[0];
- this.questionBankSearch['endTime'] = releaseTimeRange[1];
+ this.questionBankSearch["startTime"] = releaseTimeRange[0];
+ this.questionBankSearch["endTime"] = releaseTimeRange[1];
}
var data = {
- type:1,
- applyUnit:this.questionBankSearch.applyUnit,
+ type: 1,
+ applyUnit: this.questionBankSearch.applyUnit,
deptName: this.questionBankSearch.deptName,
idCardNo: this.questionBankSearch.idCardNo,
realName: this.questionBankSearch.realName,
@@ -546,7 +561,11 @@
}
//序列号url形式,用&拼接
data = Qs.stringify(data);
- window.open(`/api/accreditationRecords/export-security-paper?${this.website.tokenHeader}=${getToken()}&`+data);
+ window.open(
+ `/api/accreditationRecords/export-security-paper?${
+ this.website.tokenHeader
+ }=${getToken()}&` + data
+ );
});
},
},
diff --git a/src/views/accreditationRecords/accreditationRecordsPaper.vue b/src/views/accreditationRecords/accreditationRecordsPaper.vue
index b89f853..4f56172 100644
--- a/src/views/accreditationRecords/accreditationRecordsPaper.vue
+++ b/src/views/accreditationRecords/accreditationRecordsPaper.vue
@@ -1,5 +1,10 @@
<template>
- <basic-container class="desk1">
+ <basic-container
+ :class="[
+ 'desk1',
+ $store.state.control.windowWidth >= 1024 ? 'tooRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option"
:table-loading="loading"
@@ -24,7 +29,7 @@
>
<template slot="menuLeft">
<el-button
- style="display:none"
+ style="display: none"
type="danger"
size="small"
icon="el-icon-delete"
@@ -52,22 +57,20 @@
>证书打印信息导出
</el-button>
<el-button
- type="primary"
- size="small"
- plain
- v-if="permission.accreditationRecords_batch_audit || check"
- icon="el-icon-collection-tag"
- @click="handleSecurityAudit"
- >批量审批
+ type="primary"
+ size="small"
+ plain
+ v-if="permission.accreditationRecords_batch_audit || check"
+ icon="el-icon-collection-tag"
+ @click="handleSecurityAudit"
+ >批量审批
</el-button>
</template>
<template slot-scope="{ row }" slot="category">
<el-tag>{{ row.categoryName }}</el-tag>
</template>
<template slot-scope="{ row }" slot="userType">
- {{
- row.userType == 6 ? "已制证" : row.userType == 7 ? "未制证" : ""
- }}
+ {{ row.userType == 6 ? "已制证" : row.userType == 7 ? "未制证" : "" }}
</template>
<template slot-scope="{ type, size, row }" slot="menu">
<el-button
@@ -115,19 +118,19 @@
</avue-crud>
<el-dialog
- title="证书申请审核"
- :visible.sync="dialogFormVisible"
- modal-append-to-body="false"
- append-to-body="true"
- :close-on-click-model="true"
- >
- <avue-form
- ref="formAudit"
- v-model="Audit"
- :option="optionAudit"
- @reset-change="emptytChange"
- @submit="submit"
- ></avue-form>
+ title="证书申请审核"
+ :visible.sync="dialogFormVisible"
+ modal-append-to-body="false"
+ append-to-body="true"
+ :close-on-click-model="true"
+ >
+ <avue-form
+ ref="formAudit"
+ v-model="Audit"
+ :option="optionAudit"
+ @reset-change="emptytChange"
+ @submit="submit"
+ ></avue-form>
</el-dialog>
<el-dialog
title="批量审批"
@@ -144,45 +147,45 @@
@submit="submitBatchAudit"
></avue-form>
</el-dialog>
- <div style="position: fixed; top: 9999px; width: 100%; height: 100%">
- <div class="certificate_box" id="certificateDom">
- <div class="security_main" ref="certificateBox">
- <div class="security_m_l_titleName widt">
- {{ certificateObj.realName }}
- </div>
- <div class="security_m_r_o_jg widt">南昌市公安局</div>
- <div class="security_m_l_titlepaperTimenian widt">
- {{ certificateYear }}
- </div>
- <div class="security_m_l_titlepaperTimeyue widt">
- {{ certificateMonth }}
- </div>
- <div class="security_m_l_downsecuritynumber widt">
- {{ certificateObj.securityNumber }}
- </div>
- <div class="security_m_r_o_right widt">
- {{ certificateObj.realName }}
- </div>
- <div class="security_m_r_o_rightbirthday widt">
- {{
- certificateObj.idCardNo
- ? certificateObj.idCardNo.slice(6, 10) +
- "." +
- certificateObj.idCardNo.slice(10, 12) +
- "." +
- certificateObj.idCardNo.slice(12, 14)
- : ""
- }}
- </div>
- <div class="security_m_r_o_rightaddress security_m_r_o_l_r widt">
- {{ certificateObj.registered }}
- </div>
- <div class="security_m_r_o_rightcardid">
- {{ certificateObj.idCardNo }}
- </div>
- </div>
+ <div style="position: fixed; top: 9999px; width: 100%; height: 100%">
+ <div class="certificate_box" id="certificateDom">
+ <div class="security_main" ref="certificateBox">
+ <div class="security_m_l_titleName widt">
+ {{ certificateObj.realName }}
+ </div>
+ <div class="security_m_r_o_jg widt">南昌市公安局</div>
+ <div class="security_m_l_titlepaperTimenian widt">
+ {{ certificateYear }}
+ </div>
+ <div class="security_m_l_titlepaperTimeyue widt">
+ {{ certificateMonth }}
+ </div>
+ <div class="security_m_l_downsecuritynumber widt">
+ {{ certificateObj.securityNumber }}
+ </div>
+ <div class="security_m_r_o_right widt">
+ {{ certificateObj.realName }}
+ </div>
+ <div class="security_m_r_o_rightbirthday widt">
+ {{
+ certificateObj.idCardNo
+ ? certificateObj.idCardNo.slice(6, 10) +
+ "." +
+ certificateObj.idCardNo.slice(10, 12) +
+ "." +
+ certificateObj.idCardNo.slice(12, 14)
+ : ""
+ }}
+ </div>
+ <div class="security_m_r_o_rightaddress security_m_r_o_l_r widt">
+ {{ certificateObj.registered }}
+ </div>
+ <div class="security_m_r_o_rightcardid">
+ {{ certificateObj.idCardNo }}
</div>
</div>
+ </div>
+ </div>
</basic-container>
</template>
@@ -194,7 +197,7 @@
add,
getAccreditationRecords,
audit,
- batchAudit
+ batchAudit,
} from "@/api/accreditationRecords/accreditationRecords";
import { updatePaperTime } from "@/api/system/user";
import { getDept } from "@/api/system/dept";
@@ -206,7 +209,7 @@
export default {
data() {
return {
- check:false,
+ check: false,
certificateYear: null,
certificateMonth: null,
certificateFlag: false,
@@ -216,10 +219,10 @@
idCardNo: "",
registered: "",
},
-
+
Audit: {},
dialogFormVisible: false,
- dialogBatchAudit:false,
+ dialogBatchAudit: false,
optionAudit: {
height: "auto",
calcHeight: 30,
@@ -237,6 +240,7 @@
excelBtn: false,
menuWidth: 230,
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "审核状态",
@@ -297,6 +301,7 @@
excelBtn: false,
menuWidth: 380,
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "所选保安人数",
@@ -361,6 +366,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
selectionList: [],
option: {
@@ -384,6 +390,7 @@
saveBtnText: "发布",
menuWidth: 180,
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "申请时间",
@@ -416,7 +423,7 @@
// display: false,
},
// {
- // label: "所属保安公司",
+ // label: "企业名称",
// searchLabelWidth: "110",
// // prop: "deptName",
// prop: "deptId",
@@ -435,7 +442,7 @@
// minWidth: 260,
// },
{
- label: "所属保安公司",
+ label: "企业名称",
searchLabelWidth: "110",
prop: "deptName",
// type: "tree",
@@ -581,7 +588,7 @@
label: "有无照片",
prop: "isAvatar",
type: "select",
- search:true,
+ search: true,
searchLabelWidth: 90,
minWidth: 105,
searchSpan: 3,
@@ -589,20 +596,20 @@
editDisplay: false,
hide: true,
display: false,
- dicData:[
+ dicData: [
{
- label:"全部",
- value:3
+ label: "全部",
+ value: 3,
},
{
- label:"有",
- value:1
+ label: "有",
+ value: 1,
},
{
- label:"无",
- value:2
- }
- ]
+ label: "无",
+ value: 2,
+ },
+ ],
},
],
},
@@ -614,7 +621,10 @@
permissionList() {
return {
addBtn: this.vaildData(null, false),
- viewBtn: this.vaildData(this.permission.accreditationRecords_paper_view, false),
+ viewBtn: this.vaildData(
+ this.permission.accreditationRecords_paper_view,
+ false
+ ),
delBtn: this.vaildData(null, false),
editBtn: this.vaildData(null, false),
};
@@ -643,10 +653,10 @@
}
if (this.userInfo.role_name == "公安管理员") {
//判断是否为市局管理员
- if(this.userInfo.jurisdiction=="1372091709474910209"){
- this.check = true;
- // this.vaildData(this.permission.accreditationRecords_paper_delete, false);
- }else{
+ if (this.userInfo.jurisdiction == "1372091709474910209") {
+ this.check = true;
+ // this.vaildData(this.permission.accreditationRecords_paper_delete, false);
+ } else {
this.check = false;
// this.vaildData(null, false);
}
@@ -787,11 +797,11 @@
}
}
const data = {
- ids:str,
- auditStatus:row.auditStatus,
- auditDetail:row.auditDetail,
- auditUser:this.userInfo.Id,
- }
+ ids: str,
+ auditStatus: row.auditStatus,
+ auditDetail: row.auditDetail,
+ auditUser: this.userInfo.Id,
+ };
//提交申请
batchAudit(data).then(
() => {
@@ -962,41 +972,41 @@
window.localStorage.getItem("saber-userInfo")
).content.dept_id;
- const { releaseTimeRange } = this.query;
- // params["jurisdiction"] = this.jurisdiction;
- params["type"] = 2;
- if (this.userInfo.role_name == "保安公司管理员") {
- //如果是保安公司管理员
- params["deptId"] = this.userInfo.dept_id;
- }
- if (this.userInfo.role_name == "培训公司管理员") {
- //如果是培训公司管理员
- params["createUser"] = this.userInfo.Id;
- }
- if (this.userInfo.role_name == "公安管理员") {
- //如果是公安管理员
- params["jurisdiction"] = this.userInfo.jurisdiction;
- }
- let values = {
+ const { releaseTimeRange } = this.query;
+ // params["jurisdiction"] = this.jurisdiction;
+ params["type"] = 2;
+ if (this.userInfo.role_name == "保安公司管理员") {
+ //如果是保安公司管理员
+ params["deptId"] = this.userInfo.dept_id;
+ }
+ if (this.userInfo.role_name == "培训公司管理员") {
+ //如果是培训公司管理员
+ params["createUser"] = this.userInfo.Id;
+ }
+ if (this.userInfo.role_name == "公安管理员") {
+ //如果是公安管理员
+ params["jurisdiction"] = this.userInfo.jurisdiction;
+ }
+ let values = {
+ ...params,
+ };
+ if (releaseTimeRange) {
+ values = {
...params,
+ startTime: releaseTimeRange[0],
+ endTime: releaseTimeRange[1],
+ ...this.query,
};
- if (releaseTimeRange) {
- values = {
- ...params,
- startTime: releaseTimeRange[0],
- endTime: releaseTimeRange[1],
- ...this.query,
- };
- values.releaseTimeRange = null;
- }
- this.loading = true;
- getList(page.currentPage, page.pageSize, values).then((res) => {
- const data = res.data.data;
- this.page.total = data.total;
- this.data = data.records;
- this.loading = false;
- this.selectionClear();
- });
+ values.releaseTimeRange = null;
+ }
+ this.loading = true;
+ getList(page.currentPage, page.pageSize, values).then((res) => {
+ const data = res.data.data;
+ this.page.total = data.total;
+ this.data = data.records;
+ this.loading = false;
+ this.selectionClear();
+ });
},
//保安员证信息导出
handleExport() {
@@ -1012,10 +1022,10 @@
this.questionBankSearch["endTime"] = releaseTimeRange[1];
}
var data = {
- type:2,
- userType:this.questionBankSearch.userType,
- applyUnit:this.questionBankSearch.applyUnit,
- auditStatus:this.questionBankSearch.auditStatus,
+ type: 2,
+ userType: this.questionBankSearch.userType,
+ applyUnit: this.questionBankSearch.applyUnit,
+ auditStatus: this.questionBankSearch.auditStatus,
deptName: this.questionBankSearch.deptName,
idCardNo: this.questionBankSearch.idCardNo,
realName: this.questionBankSearch.realName,
@@ -1039,7 +1049,11 @@
}
//序列号url形式,用&拼接
data = Qs.stringify(data);
- window.open(`/api/accreditationRecords/export-security-book-paper?${this.website.tokenHeader}=${getToken()}&`+data);
+ window.open(
+ `/api/accreditationRecords/export-security-book-paper?${
+ this.website.tokenHeader
+ }=${getToken()}&` + data
+ );
});
},
//保安员证信息导出
@@ -1056,10 +1070,10 @@
this.questionBankSearch["endTime"] = releaseTimeRange[1];
}
var data = {
- type:2,
- userType:this.questionBankSearch.userType,
- applyUnit:this.questionBankSearch.applyUnit,
- auditStatus:this.questionBankSearch.auditStatus,
+ type: 2,
+ userType: this.questionBankSearch.userType,
+ applyUnit: this.questionBankSearch.applyUnit,
+ auditStatus: this.questionBankSearch.auditStatus,
deptName: this.questionBankSearch.deptName,
idCardNo: this.questionBankSearch.idCardNo,
realName: this.questionBankSearch.realName,
@@ -1082,7 +1096,11 @@
}
//序列号url形式,用&拼接
data = Qs.stringify(data);
- window.open(`/api/accreditationRecords/export-security-book-papers?${this.website.tokenHeader}=${getToken()}&`+data);
+ window.open(
+ `/api/accreditationRecords/export-security-book-papers?${
+ this.website.tokenHeader
+ }=${getToken()}&` + data
+ );
});
},
},
diff --git a/src/views/applydetailed/index.vue b/src/views/applydetailed/index.vue
index 9837881..a8870b2 100644
--- a/src/views/applydetailed/index.vue
+++ b/src/views/applydetailed/index.vue
@@ -7,7 +7,13 @@
*/
<template>
<el-row class="morpheus-box-apply-exam-1">
- <el-col :span="24" class="hasButOne">
+ <el-col
+ :span="24"
+ :class="[
+ 'hasButOne',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<el-card>
<div class="exam-card-body">
<avue-crud
@@ -53,7 +59,7 @@
:type="type"
size="small"
icon="el-icon-receiving"
- :disabled="row.candidateNo==''"
+ :disabled="row.candidateNo == ''"
@click="handlePrint(row)"
>准考证打印
</el-button>
@@ -443,6 +449,7 @@
pageSize: 10,
currentPage: 1,
total: 16,
+ ...this.$store.state.control.changePageSize,
},
questionBankQuery: {},
questionBankSelectionList: [],
@@ -462,7 +469,7 @@
res: "data",
},
tip: "请上传 .xls,.xlsx 标准格式文件",
- action: "/api/apply/import-applys?examId="+examId,
+ action: "/api/apply/import-applys?examId=" + examId,
},
{
label: "模板下载",
@@ -475,7 +482,6 @@
};
},
created() {
-
// if (this.userInfo.role_name.indexOf("ksxtadmin") != -1) {
// this.questionBankOption.column[0].dicUrl =
// "/api/blade-system/dept/lazy-tree-user?parentId=";
@@ -526,7 +532,7 @@
},
//清册生成
handleExport() {
- var obj ={};
+ var obj = {};
obj["name"] = "报名清册信息";
obj["examId"] = this.$route.query.id;
this.$router.push({
@@ -637,7 +643,6 @@
this.$refs.questionBankCrud.toggleSelection();
});
},
-
handleImport() {
this.excelBox = true;
diff --git a/src/views/applyexam/index.vue b/src/views/applyexam/index.vue
index a68a781..9f8dab8 100644
--- a/src/views/applyexam/index.vue
+++ b/src/views/applyexam/index.vue
@@ -1,34 +1,46 @@
/*
* @Author: Morpheus
* @Date: 2021-07-05 16:31:54
- * @Last Modified by: Morpheus
- * @Last Modified time: 2021-11-05 12:02:26
+ * @Last Modified by: liu
+ * @Last Modified time: 2021-11-23 14:19:17
* menu-name 报名考试
*/
<template>
- <el-row class="morpheus-box-apply-exam">
- <el-col :span="24"
- class="hasButOne">
- <el-card>
- <div class="exam-card-body">
- <avue-crud v-model="obj"
- class="company-box"
- :option="questionBankOption"
- :search.sync="questionBankSearch"
- :table-loading="questionBankLoading"
- :data="questionBankData"
- ref="questionBankCrud"
- :page.sync="questionBankPage"
- @on-load="questionBankOnLoad"
- @selection-change="questionBankSelectionChange"
- @search-change="questionBankSearchChange"
- @search-reset="questionBankSearchReset"
- @current-change="questionBankCurrentChange"
- @size-change="questionBankSizeChange"
- @row-save="questionBankRowSave"
- @row-del="questionBankRowDel">
- <!-- 自定义按钮 -->
- <!-- <template slot="menuLeft">
+ <el-row class="morpheus-box-apply-exam">
+ <el-col
+ :span="24"
+ :class="[
+ 'hasButOne',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
+ <el-card>
+ <div
+ :class="[
+ 'exam-card-body',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
+ <avue-crud
+ v-model="obj"
+ class="company-box"
+ :option="questionBankOption"
+ :search.sync="questionBankSearch"
+ :table-loading="questionBankLoading"
+ :data="questionBankData"
+ ref="questionBankCrud"
+ :page.sync="questionBankPage"
+ @on-load="questionBankOnLoad"
+ @selection-change="questionBankSelectionChange"
+ @search-change="questionBankSearchChange"
+ @search-reset="questionBankSearchReset"
+ @current-change="questionBankCurrentChange"
+ @size-change="questionBankSizeChange"
+ @row-save="questionBankRowSave"
+ @row-del="questionBankRowDel"
+ >
+ <!-- 自定义按钮 -->
+ <!-- <template slot="menuLeft">
<el-button type="danger"
size="mini"
icon="el-icon-delete"
@@ -49,1071 +61,1089 @@
</el-button>
</template> -->
- <!-- <template slot="menuLeft">
+ <!-- <template slot="menuLeft">
<el-button type="danger"
size="small"
icon="el-icon-delete"
@click="questionBankHandleDelete">删 除
</el-button>
</template> -->
- <!-- 自定义按钮 -->
- <template slot="menuLeft">
- <el-button type="primary"
- size="small"
- plain
- icon="el-icon-folder-checked"
- @click="handleBatchExam"
- v-if="permission.applyexam_exam">生成考试
- </el-button>
- <!-- v-if="examPersission" -->
- <el-button type="primary"
- size="small"
- plain
- icon="el-icon-folder-checked"
- v-if="permission.applyexam_import"
- @click="handleImport">批量报名
- </el-button>
- </template>
+ <!-- 自定义按钮 -->
+ <template slot="menuLeft">
+ <el-button
+ type="primary"
+ size="small"
+ plain
+ icon="el-icon-folder-checked"
+ @click="handleBatchExam"
+ v-if="permission.applyexam_exam"
+ >生成考试
+ </el-button>
+ <!-- v-if="examPersission" -->
+ <el-button
+ type="primary"
+ size="small"
+ plain
+ icon="el-icon-folder-checked"
+ v-if="permission.applyexam_import"
+ @click="handleImport"
+ >批量报名
+ </el-button>
+ </template>
- <template slot-scope="{ type, row }"
- slot="menu">
- <el-button :type="type"
- size="small"
- icon="el-icon-refresh-left"
- v-if="permission.applyexam_cancel"
- :disabled="row.isApply == 2"
- @click="handleCancel(row)">取消报名
- </el-button>
- <el-button style="display: none"
- :type="type"
- size="small"
- icon="el-icon-folder-checked"
- :disabled="row.applyStatus == 4"
- @click="handleAudit(row)">审核
- </el-button>
- <el-button :type="type"
- size="small"
- icon="el-icon-receiving"
- v-if="permission.applyexam_print && row.candidateNo!=''"
- @click="handlePrint(row)">准考证打印
- </el-button>
- </template>
+ <template slot-scope="{ type, row }" slot="menu">
+ <el-button
+ :type="type"
+ size="small"
+ icon="el-icon-refresh-left"
+ v-if="permission.applyexam_cancel"
+ :disabled="row.isApply == 2"
+ @click="handleCancel(row)"
+ >取消报名
+ </el-button>
+ <el-button
+ style="display: none"
+ :type="type"
+ size="small"
+ icon="el-icon-folder-checked"
+ :disabled="row.applyStatus == 4"
+ @click="handleAudit(row)"
+ >审核
+ </el-button>
+ <el-button
+ :type="type"
+ size="small"
+ icon="el-icon-receiving"
+ v-if="permission.applyexam_print && row.candidateNo != ''"
+ @click="handlePrint(row)"
+ >准考证打印
+ </el-button>
+ </template>
- <template slot-scope="{ row }"
- slot="age">
- {{ row.age == -1 ? "" : row.age }}
- </template>
- </avue-crud>
+ <template slot-scope="{ row }" slot="age">
+ {{ row.age == -1 ? "" : row.age }}
+ </template>
+ </avue-crud>
- <el-dialog title="考试资格审核"
- :visible.sync="dialogFormVisible"
- modal-append-to-body="false"
- append-to-body="true"
- :close-on-click-model="true">
- <avue-form ref="formAudit"
- v-model="Audit"
- :option="optionAudit"
- @reset-change="emptytChange"
- @submit="submit"></avue-form>
- </el-dialog>
+ <el-dialog
+ title="考试资格审核"
+ :visible.sync="dialogFormVisible"
+ modal-append-to-body="false"
+ append-to-body="true"
+ :close-on-click-model="true"
+ >
+ <avue-form
+ ref="formAudit"
+ v-model="Audit"
+ :option="optionAudit"
+ @reset-change="emptytChange"
+ @submit="submit"
+ ></avue-form>
+ </el-dialog>
- <el-dialog title="批量报名导入"
- append-to-body
- :visible.sync="excelBox"
- width="555px">
- <avue-form :option="excelOption"
- v-model="excelForm"
- :upload-after="uploadAfter">
- <template slot="excelTemplate">
- <el-button type="primary"
- @click="handleTemplate">
- 点击下载<i class="el-icon-download el-icon--right"></i>
- </el-button>
- </template>
- </avue-form>
- </el-dialog>
+ <el-dialog
+ title="批量报名导入"
+ append-to-body
+ :visible.sync="excelBox"
+ width="555px"
+ >
+ <avue-form
+ :option="excelOption"
+ v-model="excelForm"
+ :upload-after="uploadAfter"
+ >
+ <template slot="excelTemplate">
+ <el-button type="primary" @click="handleTemplate">
+ 点击下载<i class="el-icon-download el-icon--right"></i>
+ </el-button>
+ </template>
+ </avue-form>
+ </el-dialog>
- <el-dialog title="考试生成"
- append-to-body
- :visible.sync="dialogExamFormVisible"
- width="900px"
- @close="closeDialog">
- <avue-form ref="formExamApply"
- v-model="examApply"
- :option="optionExamApply"
- @reset-change="emptytChange"
- @submit="submitExamApply"></avue-form>
- </el-dialog>
- </div>
- </el-card>
- </el-col>
- </el-row>
+ <el-dialog
+ title="考试生成"
+ append-to-body
+ :visible.sync="dialogExamFormVisible"
+ width="900px"
+ @close="closeDialog"
+ >
+ <avue-form
+ ref="formExamApply"
+ v-model="examApply"
+ :option="optionExamApply"
+ @reset-change="emptytChange"
+ @submit="submitExamApply"
+ ></avue-form>
+ </el-dialog>
+ </div>
+ </el-card>
+ </el-col>
+ </el-row>
</template>
<script>
import {
- getApplyList,
- addApply,
- cancelApply,
- remove,
- addExam,
+ getApplyList,
+ addApply,
+ cancelApply,
+ remove,
+ addExam,
} from "@/api/examapi/applyexam";
import { mapState } from "vuex";
import { mapGetters } from "vuex";
import { getRoleDetail } from "@/api/system/role";
var DIC = {
- applyStatus: [
- {
- label: "已报名",
- value: 2,
- },
- {
- label: "已取消",
- value: 4,
- },
- ],
+ applyStatus: [
+ {
+ label: "已报名",
+ value: 2,
+ },
+ {
+ label: "已取消",
+ value: 4,
+ },
+ ],
};
export default {
- data () {
- return {
- dialogFormVisible: false,
- dialogExamFormVisible: false,
- examPersission: false,
- applyExport: false,
- excelBox: false,
- Audit: {},
- excelForm: {},
- excelOption: {
- submitBtn: false,
- emptyBtn: false,
- column: [
- {
- label: "模板上传",
- prop: "excelFile",
- type: "upload",
- drag: true,
- loadText: "模板上传中,请稍等",
- span: 24,
- propsHttp: {
- res: "data",
- },
- tip: "请上传 .xls,.xlsx 标准格式文件",
- action: "/api/apply/import-apply",
- },
- {
- label: "模板下载",
- prop: "excelTemplate",
- formslot: true,
- span: 24,
- },
- ],
+ data() {
+ return {
+ dialogFormVisible: false,
+ dialogExamFormVisible: false,
+ examPersission: false,
+ applyExport: false,
+ excelBox: false,
+ Audit: {},
+ excelForm: {},
+ excelOption: {
+ submitBtn: false,
+ emptyBtn: false,
+ column: [
+ {
+ label: "模板上传",
+ prop: "excelFile",
+ type: "upload",
+ drag: true,
+ loadText: "模板上传中,请稍等",
+ span: 24,
+ propsHttp: {
+ res: "data",
},
- optionAudit: {
- height: "auto",
- calcHeight: 30,
- dialogWidth: 1000,
- tip: false,
- searchShow: true,
- searchMenuSpan: 6,
- border: true, //liu
- index: true,
- stripe: true,
- viewBtn: true,
- addBtn: true,
- selection: true,
- excelBtn: false,
- menuWidth: 230,
- dialogClickModal: false,
- column: [
- {
- label: "审核状态",
- search: true,
- searchSpan: 5,
- span: 24,
- prop: "auditStatus",
- slot: true,
- editDisplay: false,
- addDisplay: false,
- type: "select",
- rules: [
- {
- required: true,
- message: "请选择审核类型",
- trigger: "blur",
- },
- ],
- dicData: [
- {
- label: "审核通过",
- value: 2,
- },
- {
- label: "不通过",
- value: 3,
- },
- ],
- },
- {
- label: "审核明细",
- span: 24,
- type: "textarea",
- prop: "auditDetail",
- },
- ],
+ tip: "请上传 .xls,.xlsx 标准格式文件",
+ action: "/api/apply/import-apply",
+ },
+ {
+ label: "模板下载",
+ prop: "excelTemplate",
+ formslot: true,
+ span: 24,
+ },
+ ],
+ },
+ optionAudit: {
+ height: "auto",
+ calcHeight: 30,
+ dialogWidth: 1000,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ border: true, //liu
+ index: true,
+ stripe: true,
+ viewBtn: true,
+ addBtn: true,
+ selection: true,
+ excelBtn: false,
+ menuWidth: 230,
+ dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
+ column: [
+ {
+ label: "审核状态",
+ search: true,
+ searchSpan: 5,
+ span: 24,
+ prop: "auditStatus",
+ slot: true,
+ editDisplay: false,
+ addDisplay: false,
+ type: "select",
+ rules: [
+ {
+ required: true,
+ message: "请选择审核类型",
+ trigger: "blur",
+ },
+ ],
+ dicData: [
+ {
+ label: "审核通过",
+ value: 2,
+ },
+ {
+ label: "不通过",
+ value: 3,
+ },
+ ],
+ },
+ {
+ label: "审核明细",
+ span: 24,
+ type: "textarea",
+ prop: "auditDetail",
+ },
+ ],
+ },
+ optionExamApply: {
+ height: "auto",
+ filterBtn: true,
+ calcHeight: 30,
+ dialogWidth: 950,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ border: true, //liu
+ index: true,
+ stripe: true,
+ viewBtn: true,
+ selection: true,
+ excelBtn: false,
+ menuWidth: 380,
+ dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
+ column: [
+ {
+ label: "考试人数",
+ prop: "number",
+ type: "number",
+ span: 12,
+ precision: 0,
+ step: 50,
+ mock: {
+ type: "number",
+ max: 1000,
+ min: 0,
+ precision: 0,
},
- optionExamApply: {
- height: "auto",
- filterBtn: true,
- calcHeight: 30,
- dialogWidth: 950,
- tip: false,
- searchShow: true,
- searchMenuSpan: 6,
- border: true, //liu
- index: true,
- stripe: true,
- viewBtn: true,
- selection: true,
- excelBtn: false,
- menuWidth: 380,
- dialogClickModal: false,
- column: [
- {
- label: "考试人数",
- prop: "number",
- type: 'number',
- span: 12,
- precision: 0,
- step: 50,
- mock: {
- type: 'number',
- max: 1000,
- min: 0,
- precision: 0
- },
- rules: [
- {
- required: true,
- message: "请输入考试人数",
- trigger: "blur",
- },
- ],
- minRows: 0,
- maxRows: 1000,
- value: 50,
- },
- {
- label: "序号开始",
- prop: "serialStart",
- span: 6,
- value: 1,
- mock: {
- type: 'number',
- max: 1000,
- min: 1,
- precision: 0
- },
- minRows: 1,
- maxRows: 1000,
- type: "number",
- rules: [
- {
- required: true,
- message: "请输入序号",
- trigger: "blur",
- },
- ],
- },
- {
- label: "序号结束",
- prop: "serialEnd",
- span: 6,
- value: 50,
- mock: {
- type: 'number',
- max: 1000,
- min: 1,
- precision: 0
- },
- minRows: 1,
- maxRows: 1000,
- type: "number",
- rules: [
- {
- required: true,
- message: "请输入序号",
- trigger: "blur",
- },
- ],
- },
- {
- label: "考试时间",
- prop: "startTime",
- type: "datetime",
- format: "yyyy-MM-dd HH:mm",
- valueFormat: "yyyy-MM-dd HH:mm",
- // 表单新增时是否禁止
- addDisabled: false,
- // 表单新增时是否可见
- addDisplay: true,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: false,
- // 表单编辑时是否可见
- editDisplay: true,
- // 表单编辑时是否为查看模式
- editDetail: false,
- rules: [
- {
- required: true,
- message: "请选择考试时间",
- trigger: "blur",
- },
- ],
- span: 12,
- },
- {
- label: "截止时间",
- prop: "endTime",
- type: "datetime",
- format: "yyyy-MM-dd HH:mm",
- valueFormat: "yyyy-MM-dd HH:mm",
- // 表单新增时是否禁止
- addDisabled: false,
- // 表单新增时是否可见
- addDisplay: true,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: false,
- // 表单编辑时是否可见
- editDisplay: true,
- // 表单编辑时是否为查看模式
- editDetail: false,
- rules: [
- {
- required: true,
- message: "请选择考试时间",
- trigger: "blur",
- },
- ],
- span: 12,
- },
- ],
+ rules: [
+ {
+ required: true,
+ message: "请输入考试人数",
+ trigger: "blur",
+ },
+ ],
+ minRows: 0,
+ maxRows: 1000,
+ value: 50,
+ },
+ {
+ label: "序号开始",
+ prop: "serialStart",
+ span: 6,
+ value: 1,
+ mock: {
+ type: "number",
+ max: 1000,
+ min: 1,
+ precision: 0,
},
- questionBankOption: {
- // 操作栏多余按钮去除
- delBtn: false,
- editBtn: false,
- addBtn: false,
- selection: false,
- menu: true,
- // 导出按钮
- // excelBtn: true,
- viewBtn: true,
-
- // title: '题库',
-
- align: "center",
- height: "auto",
- calcHeight: 80,
- tip: false,
- searchShow: true,
- searchMenuSpan: 4,
- index: true,
- indexLabel: "#",
- //dialogType: 'drawer',
- dialogClickModal: false,
- //tree 默认展开
- defaultExpandAll: true,
- // 操作栏宽度
- menuWidth: 250,
-
- column: [
- {
- label: "保安姓名",
- prop: "userId",
- type: "tree",
- dicUrl: "",
- hide: true,
- slot: true,
- searchSpan: 4,
- // 表单新增时是否禁止
- addDisabled: false,
- // 表单新增时是否可见
- addDisplay: true,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: true,
- viewDisabled: false,
- // 表单编辑时是否可见
- editDisplay: true,
- viewDisplay: false,
- // 表单编辑时是否为查看模式
- editDetail: false,
- props: {
- label: "title",
- value: "id",
- },
- rules: [
- {
- required: true,
- message: "请选择保安姓名",
- trigger: "blur",
- },
- ],
- width: 80,
- },
- {
- label: "保安姓名",
- prop: "realName",
- searchSpan: 4,
- search: true,
- // 表单新增时是否禁止
- addDisabled: false,
- // 表单新增时是否可见
- addDisplay: false,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: false,
- // 表单编辑时是否可见
- editDisplay: false,
- // 表单编辑时是否为查看模式
- editDetail: false,
- viewDisplay: true,
- props: {
- label: "title",
- value: "id",
- },
- rules: [
- {
- required: true,
- message: "请选择保安姓名",
- trigger: "blur",
- },
- ],
- },
- {
- label: "年龄",
- prop: "age",
- slot: true,
- // 表单新增时是否禁止
- addDisabled: false,
- // 表单新增时是否可见
- addDisplay: false,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: false,
- // 表单编辑时是否可见
- editDisplay: false,
- // 表单编辑时是否为查看模式
- editDetail: false,
- viewDisplay: true,
- },
- // {
- // label: "考试名称",
- // prop: "examName",
- // type: "tree",
- // dicUrl: "/api/exampaper/page-tree?examType=1",
- // // search: true,
- // slot: true,
- // // 表单新增时是否禁止
- // addDisabled: false,
- // // 表单新增时是否可见
- // addDisplay: true,
- // // 表单新增时是否为查看模式
- // addDetail: false,
- // // 表单编辑时是否禁止
- // editDisabled: true,
- // // 表单编辑时是否可见
- // editDisplay: true,
- // // 表单编辑时是否为查看模式
- // editDetail: false,
- // props: {
- // label: "examName",
- // value: "id",
- // },
- // rules: [
- // {
- // required: true,
- // message: "请选择试卷名称",
- // trigger: "blur",
- // },
- // ],
- // width: 220,
- // },
- {
- label: "所属公司",
- prop: "deptName",
- search: true,
- slot: true,
- searchSpan: 6,
- // 表单新增时是否禁止
- addDisabled: false,
- // 表单新增时是否可见
- addDisplay: false,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: true,
- // 表单编辑时是否可见
- editDisplay: true,
- // 表单编辑时是否为查看模式
- editDetail: false,
- rules: [
- {
- required: true,
- message: "请选择所属公司",
- trigger: "blur",
- },
- ],
- width: 220,
- },
- {
- label: "准考证号",
- prop: "candidateNo",
- slot: true,
- // 表单新增时是否禁止
- addDisabled: false,
- // 表单新增时是否可见
- addDisplay: false,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: false,
- // 表单编辑时是否可见
- editDisplay: true,
- // 表单编辑时是否为查看模式
- editDetail: false,
- rules: [
- {
- required: true,
- message: "请选择准考证号",
- trigger: "blur",
- },
- ],
- width: 100,
- },
- {
- label: "身份证号",
- prop: "idCardNo",
- slot: true,
- // 表单新增时是否禁止
- addDisabled: false,
- // 表单新增时是否可见
- addDisplay: false,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: false,
- // 表单编辑时是否可见
- editDisplay: true,
- // 表单编辑时是否为查看模式
- editDetail: false,
- rules: [
- {
- required: true,
- message: "请选择准考证号",
- trigger: "blur",
- },
- ],
- width: 150,
- },
- {
- label: "报考证件",
- prop: "applyCard",
- slot: true,
- // 表单新增时是否禁止
- addDisabled: false,
- // 表单新增时是否可见
- addDisplay: false,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: false,
- // 表单编辑时是否可见
- editDisplay: true,
- // 表单编辑时是否为查看模式
- editDetail: false,
- rules: [
- {
- required: true,
- message: "请选择准考证号",
- trigger: "blur",
- },
- ],
- },
- // {
- // label: "试卷分数",
- // prop: "paperScore",
- // slot: true,
- // // 表单新增时是否禁止
- // addDisabled: false,
- // // 表单新增时是否可见
- // addDisplay: false,
- // // 表单新增时是否为查看模式
- // addDetail: false,
- // // 表单编辑时是否禁止
- // editDisabled: true,
- // // 表单编辑时是否可见
- // editDisplay: true,
- // // 表单编辑时是否为查看模式
- // editDetail: false
- // },
- {
- label: "报名时间",
- prop: "applyTime",
- type: "datetime",
- // span: 24,
- format: "yyyy-MM-dd HH:mm:ss",
- valueFormat: "yyyy-MM-dd HH:mm:ss",
- // 表单新增时是否禁止
- addDisabled: true,
- // 表单新增时是否可见
- addDisplay: false,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: true,
- // 表单编辑时是否可见
- editDisplay: true,
- // 表单编辑时是否为查看模式
- editDetail: false,
- value:
- new Date().getFullYear() +
- "-" +
- (new Date().getMonth() + 1 < 10
- ? "0" + (new Date().getMonth() + 1)
- : new Date().getMonth() + 1) +
- "-" +
- (new Date().getDate() < 10
- ? "0" + new Date().getDate()
- : new Date().getDate()) +
- " " +
- (new Date().getHours() < 10
- ? "0" + new Date().getHours()
- : new Date().getHours()) +
- ":" +
- (new Date().getMinutes() < 10
- ? "0" + new Date().getMinutes()
- : new Date().getMinutes()) +
- ":" +
- (new Date().getSeconds() < 10
- ? "0" + new Date().getSeconds()
- : new Date().getSeconds()),
-
- width: 150,
- },
- // {
- // label: "考试时间",
- // prop: "examTime",
- // type: "datetime",
- // // span: 24,
- // format: "yyyy-MM-dd HH:mm:ss",
- // valueFormat: "yyyy-MM-dd HH:mm:ss",
- // // 表单新增时是否禁止
- // addDisabled: false,
- // // 表单新增时是否可见
- // addDisplay: false,
- // // 表单新增时是否为查看模式
- // addDetail: false,
- // // 表单编辑时是否禁止
- // editDisabled: false,
- // // 表单编辑时是否可见
- // editDisplay: true,
- // // 表单编辑时是否为查看模式
- // editDetail: false,
- // width: 150,
- // },
-
- // {
- // label: "审查状态",
- // prop: "examinationType",
- // slot: true,
- // searchSpan: 5,
- // // 表单新增时是否禁止
- // addDisabled: false,
- // // 表单新增时是否可见
- // addDisplay: false,
- // // 表单新增时是否为查看模式
- // addDetail: false,
- // // 表单编辑时是否禁止
- // editDisabled: false,
- // // 表单编辑时是否可见
- // editDisplay: true,
- // // 表单编辑时是否为查看模式
- // editDetail: false,
- // dicData: [
- // {
- // label: "正常",
- // value: "1",
- // },
- // {
- // label: "异常",
- // value: "2",
- // },
- // ],
- // search: true,
- // type: "select",
- // },
- // {
- // label: "审查明细",
- // prop: "examinationMx",
- // slot: true,
- // // 表单新增时是否禁止
- // addDisabled: false,
- // // 表单新增时是否可见
- // addDisplay: false,
- // // 表单新增时是否为查看模式
- // addDetail: false,
- // // 表单编辑时是否禁止
- // editDisabled: false,
- // // 表单编辑时是否可见
- // editDisplay: true,
- // // 表单编辑时是否为查看模式
- // editDetail: false,
- // overHidden: true,
- // width: 150,
- // },
- // {
- // label: "报名状态",
- // search: true,
- // type: "select",
- // searchSpan: 4,
- // prop: "applyStatus",
- // searchValue: 2,
- // dicData: [{
- // label: '全部',
- // value: 0,
- // },
- // {
- // label: '已报名',
- // value: 2,
- // },
- // {
- // label: '已取消',
- // value: 4,
- // }
- // ],
- // props: {
- // label: "label",
- // value: "value"
- // },
- // editDisplay: false,
- // addDisplay: false,
- // width: 100,
- // },
- ],
+ minRows: 1,
+ maxRows: 1000,
+ type: "number",
+ rules: [
+ {
+ required: true,
+ message: "请输入序号",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "序号结束",
+ prop: "serialEnd",
+ span: 6,
+ value: 50,
+ mock: {
+ type: "number",
+ max: 1000,
+ min: 1,
+ precision: 0,
},
- questionBankSearch: {},
- questionBankLoading: true,
- questionBankData: [],
- questionBankPage: {
- pageSize: 10,
- currentPage: 1,
- total: 16,
- },
- questionBankQuery: {},
- questionBankSelectionList: [],
- };
- },
+ minRows: 1,
+ maxRows: 1000,
+ type: "number",
+ rules: [
+ {
+ required: true,
+ message: "请输入序号",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "考试时间",
+ prop: "startTime",
+ type: "datetime",
+ format: "yyyy-MM-dd HH:mm",
+ valueFormat: "yyyy-MM-dd HH:mm",
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: true,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: false,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ rules: [
+ {
+ required: true,
+ message: "请选择考试时间",
+ trigger: "blur",
+ },
+ ],
+ span: 12,
+ },
+ {
+ label: "截止时间",
+ prop: "endTime",
+ type: "datetime",
+ format: "yyyy-MM-dd HH:mm",
+ valueFormat: "yyyy-MM-dd HH:mm",
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: true,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: false,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ rules: [
+ {
+ required: true,
+ message: "请选择考试时间",
+ trigger: "blur",
+ },
+ ],
+ span: 12,
+ },
+ ],
+ },
+ questionBankOption: {
+ // 操作栏多余按钮去除
+ delBtn: false,
+ editBtn: false,
+ addBtn: false,
+ selection: false,
+ menu: true,
+ // 导出按钮
+ // excelBtn: true,
+ viewBtn: true,
- watch: {
- "form.examname": {
- // form是表单或者表格绑定的数据集,v-model='form'
- handler (val) {
- if (val) {
- //地址截取,从县/区开始截取,并且取从县区第一个出现的位置开始
- var address = val.formattedAddress.toString();
- if (address.search("县") != -1) {
- this.form.address = address.substring(
- address.indexOf("县") + 1,
- address.length
- );
- }
- if (address.search("区") != -1) {
- this.form.address = address.substring(
- address.indexOf("区") + 1,
- address.length
- );
- }
- }
- },
- immediate: true,
- },
- },
- created () {
+ // title: '题库',
- if (this.userInfo.role_name.indexOf("ksxtadmin") != -1) {
- this.examPersission = true;
+ align: "center",
+ height: "auto",
+ calcHeight: 80,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 4,
+ index: true,
+ indexLabel: "#",
+ //dialogType: 'drawer',
+ dialogClickModal: false,
+ //tree 默认展开
+ defaultExpandAll: true,
+ // 操作栏宽度
+ menuWidth: 250,
+ ...this.$store.state.control.clearOtherBut,
+ column: [
+ {
+ label: "保安姓名",
+ prop: "userId",
+ type: "tree",
+ dicUrl: "",
+ hide: true,
+ slot: true,
+ searchSpan: 4,
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: true,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: true,
+ viewDisabled: false,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ viewDisplay: false,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ props: {
+ label: "title",
+ value: "id",
+ },
+ rules: [
+ {
+ required: true,
+ message: "请选择保安姓名",
+ trigger: "blur",
+ },
+ ],
+ width: 80,
+ },
+ {
+ label: "保安姓名",
+ prop: "realName",
+ searchSpan: 4,
+ search: true,
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: false,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: false,
+ // 表单编辑时是否可见
+ editDisplay: false,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ viewDisplay: true,
+ props: {
+ label: "title",
+ value: "id",
+ },
+ rules: [
+ {
+ required: true,
+ message: "请选择保安姓名",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "年龄",
+ prop: "age",
+ slot: true,
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: false,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: false,
+ // 表单编辑时是否可见
+ editDisplay: false,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ viewDisplay: true,
+ },
+ // {
+ // label: "考试名称",
+ // prop: "examName",
+ // type: "tree",
+ // dicUrl: "/api/exampaper/page-tree?examType=1",
+ // // search: true,
+ // slot: true,
+ // // 表单新增时是否禁止
+ // addDisabled: false,
+ // // 表单新增时是否可见
+ // addDisplay: true,
+ // // 表单新增时是否为查看模式
+ // addDetail: false,
+ // // 表单编辑时是否禁止
+ // editDisabled: true,
+ // // 表单编辑时是否可见
+ // editDisplay: true,
+ // // 表单编辑时是否为查看模式
+ // editDetail: false,
+ // props: {
+ // label: "examName",
+ // value: "id",
+ // },
+ // rules: [
+ // {
+ // required: true,
+ // message: "请选择试卷名称",
+ // trigger: "blur",
+ // },
+ // ],
+ // width: 220,
+ // },
+ {
+ label: "所属公司",
+ prop: "deptName",
+ search: true,
+ slot: true,
+ searchSpan: 6,
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: false,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: true,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ rules: [
+ {
+ required: true,
+ message: "请选择所属公司",
+ trigger: "blur",
+ },
+ ],
+ width: 220,
+ },
+ {
+ label: "准考证号",
+ prop: "candidateNo",
+ slot: true,
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: false,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: false,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ rules: [
+ {
+ required: true,
+ message: "请选择准考证号",
+ trigger: "blur",
+ },
+ ],
+ width: 100,
+ },
+ {
+ label: "身份证号",
+ prop: "idCardNo",
+ slot: true,
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: false,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: false,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ rules: [
+ {
+ required: true,
+ message: "请选择准考证号",
+ trigger: "blur",
+ },
+ ],
+ width: 150,
+ },
+ {
+ label: "报考证件",
+ prop: "applyCard",
+ slot: true,
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: false,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: false,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ rules: [
+ {
+ required: true,
+ message: "请选择准考证号",
+ trigger: "blur",
+ },
+ ],
+ },
+ // {
+ // label: "试卷分数",
+ // prop: "paperScore",
+ // slot: true,
+ // // 表单新增时是否禁止
+ // addDisabled: false,
+ // // 表单新增时是否可见
+ // addDisplay: false,
+ // // 表单新增时是否为查看模式
+ // addDetail: false,
+ // // 表单编辑时是否禁止
+ // editDisabled: true,
+ // // 表单编辑时是否可见
+ // editDisplay: true,
+ // // 表单编辑时是否为查看模式
+ // editDetail: false
+ // },
+ {
+ label: "报名时间",
+ prop: "applyTime",
+ type: "datetime",
+ // span: 24,
+ format: "yyyy-MM-dd HH:mm:ss",
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
+ // 表单新增时是否禁止
+ addDisabled: true,
+ // 表单新增时是否可见
+ addDisplay: false,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: true,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ value:
+ new Date().getFullYear() +
+ "-" +
+ (new Date().getMonth() + 1 < 10
+ ? "0" + (new Date().getMonth() + 1)
+ : new Date().getMonth() + 1) +
+ "-" +
+ (new Date().getDate() < 10
+ ? "0" + new Date().getDate()
+ : new Date().getDate()) +
+ " " +
+ (new Date().getHours() < 10
+ ? "0" + new Date().getHours()
+ : new Date().getHours()) +
+ ":" +
+ (new Date().getMinutes() < 10
+ ? "0" + new Date().getMinutes()
+ : new Date().getMinutes()) +
+ ":" +
+ (new Date().getSeconds() < 10
+ ? "0" + new Date().getSeconds()
+ : new Date().getSeconds()),
+
+ width: 150,
+ },
+ // {
+ // label: "考试时间",
+ // prop: "examTime",
+ // type: "datetime",
+ // // span: 24,
+ // format: "yyyy-MM-dd HH:mm:ss",
+ // valueFormat: "yyyy-MM-dd HH:mm:ss",
+ // // 表单新增时是否禁止
+ // addDisabled: false,
+ // // 表单新增时是否可见
+ // addDisplay: false,
+ // // 表单新增时是否为查看模式
+ // addDetail: false,
+ // // 表单编辑时是否禁止
+ // editDisabled: false,
+ // // 表单编辑时是否可见
+ // editDisplay: true,
+ // // 表单编辑时是否为查看模式
+ // editDetail: false,
+ // width: 150,
+ // },
+
+ // {
+ // label: "审查状态",
+ // prop: "examinationType",
+ // slot: true,
+ // searchSpan: 5,
+ // // 表单新增时是否禁止
+ // addDisabled: false,
+ // // 表单新增时是否可见
+ // addDisplay: false,
+ // // 表单新增时是否为查看模式
+ // addDetail: false,
+ // // 表单编辑时是否禁止
+ // editDisabled: false,
+ // // 表单编辑时是否可见
+ // editDisplay: true,
+ // // 表单编辑时是否为查看模式
+ // editDetail: false,
+ // dicData: [
+ // {
+ // label: "正常",
+ // value: "1",
+ // },
+ // {
+ // label: "异常",
+ // value: "2",
+ // },
+ // ],
+ // search: true,
+ // type: "select",
+ // },
+ // {
+ // label: "审查明细",
+ // prop: "examinationMx",
+ // slot: true,
+ // // 表单新增时是否禁止
+ // addDisabled: false,
+ // // 表单新增时是否可见
+ // addDisplay: false,
+ // // 表单新增时是否为查看模式
+ // addDetail: false,
+ // // 表单编辑时是否禁止
+ // editDisabled: false,
+ // // 表单编辑时是否可见
+ // editDisplay: true,
+ // // 表单编辑时是否为查看模式
+ // editDetail: false,
+ // overHidden: true,
+ // width: 150,
+ // },
+ // {
+ // label: "报名状态",
+ // search: true,
+ // type: "select",
+ // searchSpan: 4,
+ // prop: "applyStatus",
+ // searchValue: 2,
+ // dicData: [{
+ // label: '全部',
+ // value: 0,
+ // },
+ // {
+ // label: '已报名',
+ // value: 2,
+ // },
+ // {
+ // label: '已取消',
+ // value: 4,
+ // }
+ // ],
+ // props: {
+ // label: "label",
+ // value: "value"
+ // },
+ // editDisplay: false,
+ // addDisplay: false,
+ // width: 100,
+ // },
+ ],
+ },
+ questionBankSearch: {},
+ questionBankLoading: true,
+ questionBankData: [],
+ questionBankPage: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 16,
+ ...this.$store.state.control.changePageSize,
+ },
+ questionBankQuery: {},
+ questionBankSelectionList: [],
+ };
+ },
+
+ watch: {
+ "form.examname": {
+ // form是表单或者表格绑定的数据集,v-model='form'
+ handler(val) {
+ if (val) {
+ //地址截取,从县/区开始截取,并且取从县区第一个出现的位置开始
+ var address = val.formattedAddress.toString();
+ if (address.search("县") != -1) {
+ this.form.address = address.substring(
+ address.indexOf("县") + 1,
+ address.length
+ );
+ }
+ if (address.search("区") != -1) {
+ this.form.address = address.substring(
+ address.indexOf("区") + 1,
+ address.length
+ );
+ }
}
+ },
+ immediate: true,
+ },
+ },
+ created() {
+ if (this.userInfo.role_name.indexOf("ksxtadmin") != -1) {
+ this.examPersission = true;
+ }
- this.questionBankSearch['applyStatus'] = 2;
+ this.questionBankSearch["applyStatus"] = 2;
+ },
+ mounted() {},
+ computed: {
+ ...mapState({
+ userInfo: (state) => state.user.userInfo,
+ }),
+ ...mapGetters(["userInfo", "permission"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(null, false),
+ viewBtn: this.vaildData(this.permission.applyexam_view, false),
+ delBtn: this.vaildData(null, false),
+ editBtn: this.vaildData(null, false),
+ };
},
- mounted () { },
- computed: {
- ...mapState({
- userInfo: (state) => state.user.userInfo,
- }),
- ...mapGetters(["userInfo", "permission"]),
- permissionList () {
- return {
- addBtn: this.vaildData(null, false),
- viewBtn: this.vaildData(this.permission.applyexam_view, false),
- delBtn: this.vaildData(null, false),
- editBtn: this.vaildData(null, false),
- };
- },
- ids () {
- let ids = [];
- this.questionBankSelectionList.forEach((ele) => {
- ids.push(ele.id);
- });
- return ids.join(",");
- },
+ ids() {
+ let ids = [];
+ this.questionBankSelectionList.forEach((ele) => {
+ ids.push(ele.id);
+ });
+ return ids.join(",");
},
- methods: {
- //准考证查看
- handlePrint (row) {
- var obj = row;
- obj["name"] = "准考证信息";
- this.$router.push({
- path: `/applyexam/papers`,
- query: obj,
- });
- },
- questionBankOnLoad (page, params = {}) {
- params = this.questionBankSearch;
+ },
+ methods: {
+ //准考证查看
+ handlePrint(row) {
+ var obj = row;
+ obj["name"] = "准考证信息";
+ this.$router.push({
+ path: `/applyexam/papers`,
+ query: obj,
+ });
+ },
+ questionBankOnLoad(page, params = {}) {
+ params = this.questionBankSearch;
+ this.questionBankLoading = false;
+ this.loading = true;
+ //判断角色,如果是保安公司管理员或保安,只能查看当前公司的报名信息
+ var that = this;
+ //获取当前登录人员的角色信息
+ var roleIds = this.userInfo.role_id.split(",");
+ roleIds.forEach((roleId) => {
+ getRoleDetail(roleId).then((res) => {
+ var roleAlias = res.data.data.roleAlias;
+ if (roleAlias == "保安公司管理员" || roleAlias == "保安") {
+ //如果是保安公司管理员
+ params["deptId"] = that.userInfo.dept_id;
+ }
+ getApplyList(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, this.questionBankQuery)
+ ).then((res) => {
+ const data = res.data.data;
+ this.questionBankPage.total = data.total;
+ this.questionBankData = data.records;
this.questionBankLoading = false;
- this.loading = true;
- //判断角色,如果是保安公司管理员或保安,只能查看当前公司的报名信息
- var that = this;
- //获取当前登录人员的角色信息
- var roleIds = this.userInfo.role_id.split(",");
- roleIds.forEach((roleId) => {
- getRoleDetail(roleId).then((res) => {
- var roleAlias = res.data.data.roleAlias;
- if (
- roleAlias == "保安公司管理员" ||
- roleAlias == "保安"
- ) {
- //如果是保安公司管理员
- params["deptId"] = that.userInfo.dept_id;
- }
- getApplyList(
- page.currentPage,
- page.pageSize,
- Object.assign(params, this.questionBankQuery)
- ).then((res) => {
- const data = res.data.data;
- this.questionBankPage.total = data.total;
- this.questionBankData = data.records;
- this.questionBankLoading = false;
- this.questionBankSelectionClear();
- });
- })
- })
- },
- questionBankSelectionClear () {
- this.questionBankSelectionList = [];
- this.$refs.questionBankCrud.toggleSelection();
- },
- questionBankSelectionChange (list) {
- this.questionBankSelectionList = list;
- },
- questionBankSearchChange (params, done) {
- this.questionBankQuery = params;
- this.questionBankPage.currentPage = 1;
- this.questionBankOnLoad(this.questionBankPage, params);
- done();
- },
- questionBankSearchReset () {
- this.questionBankQuery = {};
- this.questionBankOnLoad(this.questionBankPage);
- },
- questionBankCurrentChange (currentPage) {
- this.questionBankPage.currentPage = currentPage;
- },
- questionBankSizeChange (pageSize) {
- this.questionBankPage.pageSize = pageSize;
- },
-
- // 新增
- questionBankRowSave (row, done, loading) {
- // debugger;
- addApply({
- userId: row.userId,
- examId: row.examName,
- applyTime: row.applyTime,
- }).then(
- (res) => {
- this.questionBankOnLoad(this.questionBankPage);
- if (res.data.data == 201) {
- this.$message({
- type: "warning",
- message: "已报名,不能重复报名",
- });
- } else if (res.data.data == 201) {
- this.$message({
- type: "warning",
- message: "报名失败",
- });
- } else {
- this.$message({
- type: "success",
- message: "报名成功",
- });
- }
- done();
- },
- (error) => {
- window.console.log(error);
- loading();
- }
- );
- },
-
- //生成考试弹窗
- handleBatchExam () {
- this.dialogExamFormVisible = true;
- if (this.questionBankSelectionList.length === 0) {
- this.ids = "";
- }
- },
- //生成考试
- submitExamApply (row, done, loading) {
- var that = this;
- row.startTime = row.startTime + ":00";
- row.endTime = row.endTime + ":00";
- if (row.number != ((row.serialEnd - row.serialStart) + 1)) {
- this.$message({
- type: "error",
- message: "考试人数与序号不匹配!",
- });
- done();
- return;
- }
-
- var s = new Date(row.startTime);
- var e = new Date(row.endTime);
- if (s > e) {
- this.$message({
- type: "error",
- message: "截止时间不能早于考试考试开始时间!",
- });
- done();
- return;
- }
- addExam(Object.assign(row, this.questionBankSearch)).then(
- () => {
- this.questionBankOnLoad(this.questionBankPage);
- this.$message({
- type: "success",
- message: "操作成功!",
- });
- that.$refs.formExamApply.resetFields();
- that.dialogExamFormVisible = false;
- done();
- },
- (error) => {
- window.console.log(error);
- loading();
- }
- );
- },
- //关闭窗口清除数据
- closeDialog () {
- this.$refs.formExamApply.resetFields();
- },
-
- questionBankRowDel (row) {
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- return remove(row.id);
- })
- .then(() => {
- this.questionBankOnLoad(this.questionBankPage);
- this.$message({
- type: "success",
- message: "操作成功!",
- });
- });
- },
-
- //取消报名
- handleCancel (row) {
- this.$confirm("确定取消报名?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- row.applyStatus = 4;
- return cancelApply(row);
- })
- .then(() => {
- this.questionBankOnLoad(this.questionBankPage);
- this.$message({
- type: "success",
- message: "操作成功!",
- });
- });
- },
-
- questionBankHandleDelete () {
- if (this.questionBankSelectionList.length === 0) {
- this.$message.warning("请选择至少一条数据");
- return;
- }
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- return remove(this.ids);
- })
- .then(() => {
- this.questionBankOnLoad(this.questionBankPage);
- this.$message({
- type: "success",
- message: "操作成功!",
- });
- this.$refs.questionBankCrud.toggleSelection();
- });
- },
- handleAudit (row) {
- this.dialogFormVisible = true;
- this.Audit = row;
- },
-
- handleImport () {
- this.excelBox = true;
- },
-
- handleTemplate () {
- window.open(`/api/apply/export-template`);
- },
- uploadAfter (res, done, loading, column) {
- window.console.log(column);
- this.excelBox = false;
- this.refreshChange();
- done();
- },
-
- refreshChange () {
- this.questionBankOnLoad(this.page, this.query);
- },
+ this.questionBankSelectionClear();
+ });
+ });
+ });
},
+ questionBankSelectionClear() {
+ this.questionBankSelectionList = [];
+ this.$refs.questionBankCrud.toggleSelection();
+ },
+ questionBankSelectionChange(list) {
+ this.questionBankSelectionList = list;
+ },
+ questionBankSearchChange(params, done) {
+ this.questionBankQuery = params;
+ this.questionBankPage.currentPage = 1;
+ this.questionBankOnLoad(this.questionBankPage, params);
+ done();
+ },
+ questionBankSearchReset() {
+ this.questionBankQuery = {};
+ this.questionBankOnLoad(this.questionBankPage);
+ },
+ questionBankCurrentChange(currentPage) {
+ this.questionBankPage.currentPage = currentPage;
+ },
+ questionBankSizeChange(pageSize) {
+ this.questionBankPage.pageSize = pageSize;
+ },
+
+ // 新增
+ questionBankRowSave(row, done, loading) {
+ // debugger;
+ addApply({
+ userId: row.userId,
+ examId: row.examName,
+ applyTime: row.applyTime,
+ }).then(
+ (res) => {
+ this.questionBankOnLoad(this.questionBankPage);
+ if (res.data.data == 201) {
+ this.$message({
+ type: "warning",
+ message: "已报名,不能重复报名",
+ });
+ } else if (res.data.data == 201) {
+ this.$message({
+ type: "warning",
+ message: "报名失败",
+ });
+ } else {
+ this.$message({
+ type: "success",
+ message: "报名成功",
+ });
+ }
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ },
+
+ //生成考试弹窗
+ handleBatchExam() {
+ this.dialogExamFormVisible = true;
+ if (this.questionBankSelectionList.length === 0) {
+ this.ids = "";
+ }
+ },
+ //生成考试
+ submitExamApply(row, done, loading) {
+ var that = this;
+ row.startTime = row.startTime + ":00";
+ row.endTime = row.endTime + ":00";
+ if (row.number != row.serialEnd - row.serialStart + 1) {
+ this.$message({
+ type: "error",
+ message: "考试人数与序号不匹配!",
+ });
+ done();
+ return;
+ }
+
+ var s = new Date(row.startTime);
+ var e = new Date(row.endTime);
+ if (s > e) {
+ this.$message({
+ type: "error",
+ message: "截止时间不能早于考试考试开始时间!",
+ });
+ done();
+ return;
+ }
+ addExam(Object.assign(row, this.questionBankSearch)).then(
+ () => {
+ this.questionBankOnLoad(this.questionBankPage);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ that.$refs.formExamApply.resetFields();
+ that.dialogExamFormVisible = false;
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ },
+ //关闭窗口清除数据
+ closeDialog() {
+ this.$refs.formExamApply.resetFields();
+ },
+
+ questionBankRowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(row.id);
+ })
+ .then(() => {
+ this.questionBankOnLoad(this.questionBankPage);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ });
+ },
+
+ //取消报名
+ handleCancel(row) {
+ this.$confirm("确定取消报名?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ row.applyStatus = 4;
+ return cancelApply(row);
+ })
+ .then(() => {
+ this.questionBankOnLoad(this.questionBankPage);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ });
+ },
+
+ questionBankHandleDelete() {
+ if (this.questionBankSelectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据");
+ return;
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(this.ids);
+ })
+ .then(() => {
+ this.questionBankOnLoad(this.questionBankPage);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ this.$refs.questionBankCrud.toggleSelection();
+ });
+ },
+ handleAudit(row) {
+ this.dialogFormVisible = true;
+ this.Audit = row;
+ },
+
+ handleImport() {
+ this.excelBox = true;
+ },
+
+ handleTemplate() {
+ window.open(`/api/apply/export-template`);
+ },
+ uploadAfter(res, done, loading, column) {
+ window.console.log(column);
+ this.excelBox = false;
+ this.refreshChange();
+ done();
+ },
+
+ refreshChange() {
+ this.questionBankOnLoad(this.page, this.query);
+ },
+ },
};
</script>
diff --git a/src/views/authority/apiscope.vue b/src/views/authority/apiscope.vue
index 40b4022..ed2a780 100644
--- a/src/views/authority/apiscope.vue
+++ b/src/views/authority/apiscope.vue
@@ -1,70 +1,84 @@
<template>
- <basic-container>
- <avue-crud :option="option"
- :table-loading="loading"
- :data="data"
- ref="crud"
- v-model="form"
- :permission="permissionList"
- :before-open="beforeOpen"
- @row-del="rowDel"
- @row-update="rowUpdate"
- @row-save="rowSave"
- @search-change="searchChange"
- @search-reset="searchReset"
- @selection-change="selectionChange"
- @current-change="currentChange"
- @size-change="sizeChange"
- @refresh-change="refreshChange"
- @on-load="onLoad"
- @tree-load="treeLoad">
- <template slot-scope="{row}" slot="menu">
- <el-button type="text"
- icon="el-icon-setting"
- size="small"
- v-if="permission.api_scope_setting"
- plain
- style="border: 0;background-color: transparent !important;"
- @click.stop="handleDataScope(row)">权限配置
+ <basic-container
+ :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
+ >
+ <avue-crud
+ :option="option"
+ :table-loading="loading"
+ :data="data"
+ ref="crud"
+ v-model="form"
+ :permission="permissionList"
+ :before-open="beforeOpen"
+ @row-del="rowDel"
+ @row-update="rowUpdate"
+ @row-save="rowSave"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @selection-change="selectionChange"
+ @current-change="currentChange"
+ @size-change="sizeChange"
+ @refresh-change="refreshChange"
+ @on-load="onLoad"
+ @tree-load="treeLoad"
+ >
+ <template slot-scope="{ row }" slot="menu">
+ <el-button
+ type="text"
+ icon="el-icon-setting"
+ size="small"
+ v-if="permission.api_scope_setting"
+ plain
+ style="border: 0; background-color: transparent !important"
+ @click.stop="handleDataScope(row)"
+ >权限配置
</el-button>
</template>
- <template slot-scope="{row}" slot="source">
- <div style="text-align:center">
- <i :class="row.source"/>
+ <template slot-scope="{ row }" slot="source">
+ <div style="text-align: center">
+ <i :class="row.source" />
</div>
</template>
</avue-crud>
- <el-drawer :title="`[${scopeMenuName}] 接口权限配置`" :visible.sync="drawerVisible" :direction="direction"
- append-to-body
- :before-close="handleDrawerClose" size="1000px">
+ <el-drawer
+ :title="`[${scopeMenuName}] 接口权限配置`"
+ :visible.sync="drawerVisible"
+ :direction="direction"
+ append-to-body
+ :before-close="handleDrawerClose"
+ size="1000px"
+ >
<basic-container>
- <avue-crud :option="optionScope"
- :data="dataScope"
- :page="pageScope"
- v-model="formScope"
- :table-loading="scopeLoading"
- ref="crudScope"
- @row-del="rowDelScope"
- @row-update="rowUpdateScope"
- @row-save="rowSaveScope"
- :before-open="beforeOpenScope"
- @search-change="searchChangeScope"
- @search-reset="searchResetScope"
- @selection-change="selectionChangeScope"
- @current-change="currentChangeScope"
- @size-change="sizeChangeScope"
- @on-load="onLoadScope">
+ <avue-crud
+ :option="optionScope"
+ :data="dataScope"
+ :page="pageScope"
+ v-model="formScope"
+ :table-loading="scopeLoading"
+ ref="crudScope"
+ @row-del="rowDelScope"
+ @row-update="rowUpdateScope"
+ @row-save="rowSaveScope"
+ :before-open="beforeOpenScope"
+ @search-change="searchChangeScope"
+ @search-reset="searchResetScope"
+ @selection-change="selectionChangeScope"
+ @current-change="currentChangeScope"
+ @size-change="sizeChangeScope"
+ @on-load="onLoadScope"
+ >
<template slot="menuLeft">
- <el-button type="danger"
- size="small"
- icon="el-icon-delete"
- plain
- @click="handleDeleteScope">删 除
+ <el-button
+ type="danger"
+ size="small"
+ icon="el-icon-delete"
+ plain
+ @click="handleDeleteScope"
+ >删 除
</el-button>
</template>
- <template slot-scope="{row}"
- slot="scopeType">
- <el-tag>{{row.scopeTypeName}}</el-tag>
+ <template slot-scope="{ row }" slot="scopeType">
+ <el-tag>{{ row.scopeTypeName }}</el-tag>
</template>
</avue-crud>
</basic-container>
@@ -73,571 +87,600 @@
</template>
<script>
- import {
- add,
- remove,
- update,
- getLazyMenuList,
- getMenu
- } from "@/api/system/menu";
- import {
- addApiScope,
- removeApiScope,
- updateApiScope,
- getListApiScope,
- getMenuApiScope
- } from "@/api/system/scope";
- import {mapGetters} from "vuex";
- import iconList from "@/config/iconList";
+import {
+ add,
+ remove,
+ update,
+ getLazyMenuList,
+ getMenu,
+} from "@/api/system/menu";
+import {
+ addApiScope,
+ removeApiScope,
+ updateApiScope,
+ getListApiScope,
+ getMenuApiScope,
+} from "@/api/system/scope";
+import { mapGetters } from "vuex";
+import iconList from "@/config/iconList";
- export default {
- data() {
- return {
- form: {},
- selectionList: [],
- query: {},
- loading: true,
- parentId: 0,
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- drawerVisible: false,
- direction: 'rtl',
- scopeLoading: false,
- scopeMenuId: 0,
- scopeMenuName: "菜单",
- menu: true,
- option: {
- lazy: true,
- tip: false,
- simplePage: true,
- searchShow: true,
- searchMenuSpan: 6,
- dialogWidth: "60%",
- tree: true,
- border: true,
- index: true,
- selection: true,
- viewBtn: false,
- editBtn: false,
- addBtn: false,
- delBtn: false,
- menuWidth: 150,
- dialogClickModal: false,
- column: [
- {
- label: "菜单名称",
- prop: "name",
- search: true,
- rules: [
- {
- required: true,
- message: "请输入菜单名称",
- trigger: "blur"
- }
- ]
- },
- {
- label: "路由地址",
- prop: "path",
- rules: [
- {
- required: true,
- message: "请输入路由地址",
- trigger: "blur"
- }
- ]
- },
- {
- label: "上级菜单",
- prop: "parentId",
- type: "tree",
- dicUrl: "/api/blade-system/menu/tree",
- hide: true,
- props: {
- label: "title"
+export default {
+ data() {
+ return {
+ form: {},
+ selectionList: [],
+ query: {},
+ loading: true,
+ parentId: 0,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ ...this.$store.state.control.changePageSize,
+ },
+ drawerVisible: false,
+ direction: "rtl",
+ scopeLoading: false,
+ scopeMenuId: 0,
+ scopeMenuName: "菜单",
+ menu: true,
+ option: {
+ lazy: true,
+ tip: false,
+ simplePage: true,
+ searchShow: true,
+ searchMenuSpan: 6,
+ dialogWidth: "60%",
+ tree: true,
+ border: true,
+ index: true,
+ selection: true,
+ viewBtn: false,
+ editBtn: false,
+ addBtn: false,
+ delBtn: false,
+ menuWidth: 150,
+ dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
+ column: [
+ {
+ label: "菜单名称",
+ prop: "name",
+ search: true,
+ rules: [
+ {
+ required: true,
+ message: "请输入菜单名称",
+ trigger: "blur",
},
- rules: [
- {
- required: false,
- message: "请选择上级菜单",
- trigger: "click"
- }
- ]
+ ],
+ },
+ {
+ label: "路由地址",
+ prop: "path",
+ rules: [
+ {
+ required: true,
+ message: "请输入路由地址",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "上级菜单",
+ prop: "parentId",
+ type: "tree",
+ dicUrl: "/api/blade-system/menu/tree",
+ hide: true,
+ props: {
+ label: "title",
},
- {
- label: "菜单图标",
- prop: "source",
- type: "icon",
- slot: true,
- width: 80,
- iconList: iconList,
- rules: [
- {
- required: true,
- message: "请输入菜单图标",
- trigger: "click"
- }
- ]
- },
- {
- label: "菜单编号",
- prop: "code",
- search: true,
- rules: [
- {
- required: true,
- message: "请输入菜单编号",
- trigger: "blur"
- }
- ]
- },
- {
- label: "菜单类型",
- prop: "category",
- type: "radio",
- dicData: [
- {
- label: "菜单",
- value: 1
- },
- {
- label: "按钮",
- value: 2
- }
- ],
- hide: true,
- rules: [
- {
- required: true,
- message: "请选择菜单类型",
- trigger: "blur"
- }
- ]
- },
- {
- label: "菜单别名",
- prop: "alias",
- rules: [
- {
- required: true,
- message: "请输入菜单别名",
- trigger: "blur"
- }
- ]
- },
- {
- label: "按钮功能",
- prop: "action",
- type: "radio",
- dicData: [
- {
- label: "工具栏",
- value: 0
- },
- {
- label: "操作栏",
- value: 1
- },
- {
- label: "工具操作栏",
- value: 2
- }
- ],
- hide: true,
- rules: [
- {
- required: true,
- message: "请选择按钮功能",
- trigger: "blur"
- }
- ]
- },
- {
- label: "菜单排序",
- prop: "sort",
- type: "number",
- width: 80,
- rules: [
- {
- required: true,
- message: "请输入菜单排序",
- trigger: "blur"
- }
- ]
- },
- {
- label: "新窗口",
- prop: "isOpen",
- type: "radio",
- dicData: [
- {
- label: "否",
- value: 0
- },
- {
- label: "是",
- value: 1
- },
- ],
- hide: true
- },
- {
- label: "菜单备注",
- prop: "remark",
- type: "textarea",
- span: 24,
- minRows: 6,
- hide: true
- }
- ]
- },
- data: [],
- formScope: {},
- selectionListScope: [],
- pageScope: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- optionScope: {
- tip: false,
- searchShow: true,
- searchMenuSpan: 6,
- border: true,
- index: true,
- viewBtn: true,
- selection: true,
- menuWidth: 200,
- dialogWidth: 900,
- dialogClickModal: false,
- column: [
- {
- label: "权限名称",
- prop: "scopeName",
- search: true,
- rules: [{
+ rules: [
+ {
+ required: false,
+ message: "请选择上级菜单",
+ trigger: "click",
+ },
+ ],
+ },
+ {
+ label: "菜单图标",
+ prop: "source",
+ type: "icon",
+ slot: true,
+ width: 80,
+ iconList: iconList,
+ rules: [
+ {
+ required: true,
+ message: "请输入菜单图标",
+ trigger: "click",
+ },
+ ],
+ },
+ {
+ label: "菜单编号",
+ prop: "code",
+ search: true,
+ rules: [
+ {
+ required: true,
+ message: "请输入菜单编号",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "菜单类型",
+ prop: "category",
+ type: "radio",
+ dicData: [
+ {
+ label: "菜单",
+ value: 1,
+ },
+ {
+ label: "按钮",
+ value: 2,
+ },
+ ],
+ hide: true,
+ rules: [
+ {
+ required: true,
+ message: "请选择菜单类型",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "菜单别名",
+ prop: "alias",
+ rules: [
+ {
+ required: true,
+ message: "请输入菜单别名",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "按钮功能",
+ prop: "action",
+ type: "radio",
+ dicData: [
+ {
+ label: "工具栏",
+ value: 0,
+ },
+ {
+ label: "操作栏",
+ value: 1,
+ },
+ {
+ label: "工具操作栏",
+ value: 2,
+ },
+ ],
+ hide: true,
+ rules: [
+ {
+ required: true,
+ message: "请选择按钮功能",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "菜单排序",
+ prop: "sort",
+ type: "number",
+ width: 80,
+ rules: [
+ {
+ required: true,
+ message: "请输入菜单排序",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "新窗口",
+ prop: "isOpen",
+ type: "radio",
+ dicData: [
+ {
+ label: "否",
+ value: 0,
+ },
+ {
+ label: "是",
+ value: 1,
+ },
+ ],
+ hide: true,
+ },
+ {
+ label: "菜单备注",
+ prop: "remark",
+ type: "textarea",
+ span: 24,
+ minRows: 6,
+ hide: true,
+ },
+ ],
+ },
+ data: [],
+ formScope: {},
+ selectionListScope: [],
+ pageScope: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+ optionScope: {
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ border: true,
+ index: true,
+ viewBtn: true,
+ selection: true,
+ menuWidth: 200,
+ dialogWidth: 900,
+ dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
+ column: [
+ {
+ label: "权限名称",
+ prop: "scopeName",
+ search: true,
+ rules: [
+ {
required: true,
message: "请输入数据权限名称",
- trigger: "blur"
- }]
- },
- {
- label: "权限编号",
- prop: "resourceCode",
- search: true,
- width: 180,
- rules: [{
- required: true,
- message: "请输入数据权限编号",
- trigger: "blur"
- }]
- },
- {
- label: "权限路径",
- prop: "scopePath",
- width: 180,
- rules: [{
- required: true,
- message: "请输入数据权限编号",
- trigger: "blur"
- }]
- },
- {
- label: "接口类型",
- type: "select",
- dicUrl: "/api/blade-system/dict/dictionary?code=api_scope_type",
- props: {
- label: "dictValue",
- value: "dictKey"
+ trigger: "blur",
},
- dataType: "number",
- slot: true,
- width: 100,
- prop: "scopeType",
- rules: [{
+ ],
+ },
+ {
+ label: "权限编号",
+ prop: "resourceCode",
+ search: true,
+ width: 180,
+ rules: [
+ {
+ required: true,
+ message: "请输入数据权限编号",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "权限路径",
+ prop: "scopePath",
+ width: 180,
+ rules: [
+ {
+ required: true,
+ message: "请输入数据权限编号",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "接口类型",
+ type: "select",
+ dicUrl: "/api/blade-system/dict/dictionary?code=api_scope_type",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ dataType: "number",
+ slot: true,
+ width: 100,
+ prop: "scopeType",
+ rules: [
+ {
required: true,
message: "请输入通知类型",
- trigger: "blur"
- }]
- },
- {
- label: "备注",
- prop: "remark",
- span: 24,
- hide: true,
- },
- ]
- },
- dataScope: []
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "备注",
+ prop: "remark",
+ span: 24,
+ hide: true,
+ },
+ ],
+ },
+ dataScope: [],
+ };
+ },
+
+ computed: {
+ ...mapGetters(["permission"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.menu_add, false),
+ viewBtn: this.vaildData(this.permission.menu_view, false),
+ delBtn: this.vaildData(this.permission.menu_delete, false),
+ editBtn: this.vaildData(this.permission.menu_edit, false),
};
},
-
- computed: {
- ...mapGetters(["permission"]),
- permissionList() {
- return {
- addBtn: this.vaildData(this.permission.menu_add, false),
- viewBtn: this.vaildData(this.permission.menu_view, false),
- delBtn: this.vaildData(this.permission.menu_delete, false),
- editBtn: this.vaildData(this.permission.menu_edit, false)
- };
- },
- ids() {
- let ids = [];
- this.selectionList.forEach(ele => {
- ids.push(ele.id);
- });
- return ids.join(",");
- },
- scopeIds() {
- let ids = [];
- this.selectionListScope.forEach(ele => {
- ids.push(ele.id);
- });
- return ids.join(",");
- }
+ ids() {
+ let ids = [];
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id);
+ });
+ return ids.join(",");
},
- methods: {
- // 菜单管理模块
- rowSave(row, done, loading) {
- add(row).then(() => {
+ scopeIds() {
+ let ids = [];
+ this.selectionListScope.forEach((ele) => {
+ ids.push(ele.id);
+ });
+ return ids.join(",");
+ },
+ },
+ methods: {
+ // 菜单管理模块
+ rowSave(row, done, loading) {
+ add(row).then(
+ () => {
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!"
+ message: "操作成功!",
});
done();
- }, error => {
+ },
+ (error) => {
window.console.log(error);
loading();
- });
- },
- rowUpdate(row, index, done, loading) {
- update(row).then(() => {
+ }
+ );
+ },
+ rowUpdate(row, index, done, loading) {
+ update(row).then(
+ () => {
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!"
+ message: "操作成功!",
});
done();
- }, error => {
+ },
+ (error) => {
window.console.log(error);
loading();
+ }
+ );
+ },
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(row.id);
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
});
- },
- rowDel(row) {
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
+ },
+ searchReset() {
+ this.query = {};
+ this.parentId = 0;
+ this.onLoad(this.page);
+ },
+ searchChange(params, done) {
+ this.query = params;
+ this.parentId = "";
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
+ selectionChange(list) {
+ this.selectionList = list;
+ },
+ selectionClear() {
+ this.selectionList = [];
+ this.$refs.crud.toggleSelection();
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据");
+ return;
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(this.ids);
})
- .then(() => {
- return remove(row.id);
- })
- .then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!"
- });
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
});
- },
- searchReset() {
- this.query = {};
- this.parentId = 0;
- this.onLoad(this.page);
- },
- searchChange(params, done) {
- this.query = params;
- this.parentId = '';
- this.page.currentPage = 1;
- this.onLoad(this.page, params);
- done();
- },
- selectionChange(list) {
- this.selectionList = list;
- },
- selectionClear() {
- this.selectionList = [];
- this.$refs.crud.toggleSelection();
- },
- handleDelete() {
- if (this.selectionList.length === 0) {
- this.$message.warning("请选择至少一条数据");
- return;
- }
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- return remove(this.ids);
- })
- .then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.$refs.crud.toggleSelection();
- });
- },
- beforeOpen(done, type) {
- if (["edit", "view"].includes(type)) {
- getMenu(this.form.id).then(res => {
- this.form = res.data.data;
- });
- }
- done();
- },
- currentChange(currentPage) {
- this.page.currentPage = currentPage;
- },
- sizeChange(pageSize) {
- this.page.pageSize = pageSize;
- },
- refreshChange() {
- this.onLoad(this.page, this.query);
- },
- onLoad(page, params = {}) {
- this.loading = true;
- getLazyMenuList(this.parentId, Object.assign(params, this.query)).then(res => {
+ this.$refs.crud.toggleSelection();
+ });
+ },
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ getMenu(this.form.id).then((res) => {
+ this.form = res.data.data;
+ });
+ }
+ done();
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage;
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize;
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query);
+ },
+ onLoad(page, params = {}) {
+ this.loading = true;
+ getLazyMenuList(this.parentId, Object.assign(params, this.query)).then(
+ (res) => {
this.data = res.data.data;
this.loading = false;
this.selectionClear();
- });
- },
- treeLoad(tree, treeNode, resolve) {
- const parentId = tree.id;
- getLazyMenuList(parentId).then(res => {
- resolve(res.data.data);
- });
- },
- // 数据权限模块
- handleDataScope(row) {
- this.drawerVisible = true;
- this.scopeMenuId = row.id;
- this.scopeMenuName = row.name;
- this.onLoadScope(this.pageScope)
- },
- handleDrawerClose(hide) {
- hide();
- },
- rowSaveScope(row, done, loading) {
- row = {
- ...row,
- menuId: this.scopeMenuId,
- };
- addApiScope(row).then(() => {
+ }
+ );
+ },
+ treeLoad(tree, treeNode, resolve) {
+ const parentId = tree.id;
+ getLazyMenuList(parentId).then((res) => {
+ resolve(res.data.data);
+ });
+ },
+ // 数据权限模块
+ handleDataScope(row) {
+ this.drawerVisible = true;
+ this.scopeMenuId = row.id;
+ this.scopeMenuName = row.name;
+ this.onLoadScope(this.pageScope);
+ },
+ handleDrawerClose(hide) {
+ hide();
+ },
+ rowSaveScope(row, done, loading) {
+ row = {
+ ...row,
+ menuId: this.scopeMenuId,
+ };
+ addApiScope(row).then(
+ () => {
this.onLoadScope(this.pageScope);
this.$message({
type: "success",
- message: "操作成功!"
+ message: "操作成功!",
});
done();
- }, error => {
+ },
+ (error) => {
window.console.log(error);
loading();
- });
- },
- rowUpdateScope(row, index, done, loading) {
- row = {
- ...row,
- menuId: this.scopeMenuId,
- };
- updateApiScope(row).then(() => {
+ }
+ );
+ },
+ rowUpdateScope(row, index, done, loading) {
+ row = {
+ ...row,
+ menuId: this.scopeMenuId,
+ };
+ updateApiScope(row).then(
+ () => {
this.onLoadScope(this.pageScope);
this.$message({
type: "success",
- message: "操作成功!"
+ message: "操作成功!",
});
done();
- }, error => {
+ },
+ (error) => {
window.console.log(error);
loading();
- });
- },
- rowDelScope(row) {
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
+ }
+ );
+ },
+ rowDelScope(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return removeApiScope(row.id);
})
- .then(() => {
- return removeApiScope(row.id);
- })
- .then(() => {
- this.onLoadScope(this.pageScope);
- this.$message({
- type: "success",
- message: "操作成功!"
- });
+ .then(() => {
+ this.onLoadScope(this.pageScope);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
});
- },
- handleDeleteScope() {
- if (this.selectionListScope.length === 0) {
- this.$message.warning("请选择至少一条数据");
- return;
- }
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- return removeApiScope(this.scopeIds);
- })
- .then(() => {
- this.onLoadScope(this.pageScope);
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.$refs.crudScope.toggleSelection();
- });
- },
- beforeOpenScope(done, type) {
- if (["edit", "view"].includes(type)) {
- getMenuApiScope(this.formScope.id).then(res => {
- this.formScope = res.data.data;
- });
- }
- done();
- },
- searchResetScope() {
- this.onLoadScope(this.pageScope);
- },
- searchChangeScope(params, done) {
- this.onLoadScope(this.pageScope, params);
- done();
- },
- selectionChangeScope(list) {
- this.selectionListScope = list;
- },
- currentChangeScope(currentPage) {
- this.pageScope.currentPage = currentPage;
- },
- sizeChangeScope(pageSize) {
- this.pageScope.pageSize = pageSize;
- },
- onLoadScope(page, params = {}) {
- this.scopeLoading = true;
- const values = {
- ...params,
- menuId: this.scopeMenuId,
- }
- getListApiScope(page.currentPage, page.pageSize, Object.assign(values, this.query)).then(res => {
- const data = res.data.data;
- this.pageScope.total = data.total;
- this.dataScope = data.records;
- this.selectionListScope = [];
- this.scopeLoading = false;
});
- },
- }
- };
+ },
+ handleDeleteScope() {
+ if (this.selectionListScope.length === 0) {
+ this.$message.warning("请选择至少一条数据");
+ return;
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return removeApiScope(this.scopeIds);
+ })
+ .then(() => {
+ this.onLoadScope(this.pageScope);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ this.$refs.crudScope.toggleSelection();
+ });
+ },
+ beforeOpenScope(done, type) {
+ if (["edit", "view"].includes(type)) {
+ getMenuApiScope(this.formScope.id).then((res) => {
+ this.formScope = res.data.data;
+ });
+ }
+ done();
+ },
+ searchResetScope() {
+ this.onLoadScope(this.pageScope);
+ },
+ searchChangeScope(params, done) {
+ this.onLoadScope(this.pageScope, params);
+ done();
+ },
+ selectionChangeScope(list) {
+ this.selectionListScope = list;
+ },
+ currentChangeScope(currentPage) {
+ this.pageScope.currentPage = currentPage;
+ },
+ sizeChangeScope(pageSize) {
+ this.pageScope.pageSize = pageSize;
+ },
+ onLoadScope(page, params = {}) {
+ this.scopeLoading = true;
+ const values = {
+ ...params,
+ menuId: this.scopeMenuId,
+ };
+ getListApiScope(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(values, this.query)
+ ).then((res) => {
+ const data = res.data.data;
+ this.pageScope.total = data.total;
+ this.dataScope = data.records;
+ this.selectionListScope = [];
+ this.scopeLoading = false;
+ });
+ },
+ },
+};
</script>
diff --git a/src/views/authority/datascope.vue b/src/views/authority/datascope.vue
index 330e8ac..8e60f81 100644
--- a/src/views/authority/datascope.vue
+++ b/src/views/authority/datascope.vue
@@ -1,70 +1,84 @@
<template>
- <basic-container>
- <avue-crud :option="option"
- :table-loading="loading"
- :data="data"
- ref="crud"
- v-model="form"
- :permission="permissionList"
- :before-open="beforeOpen"
- @row-del="rowDel"
- @row-update="rowUpdate"
- @row-save="rowSave"
- @search-change="searchChange"
- @search-reset="searchReset"
- @selection-change="selectionChange"
- @current-change="currentChange"
- @size-change="sizeChange"
- @refresh-change="refreshChange"
- @on-load="onLoad"
- @tree-load="treeLoad">
- <template slot-scope="{row}" slot="menu">
- <el-button type="text"
- icon="el-icon-setting"
- size="small"
- v-if="permission.data_scope_setting"
- plain
- style="border: 0;background-color: transparent !important;"
- @click.stop="handleDataScope(row)">权限配置
+ <basic-container
+ :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
+ >
+ <avue-crud
+ :option="option"
+ :table-loading="loading"
+ :data="data"
+ ref="crud"
+ v-model="form"
+ :permission="permissionList"
+ :before-open="beforeOpen"
+ @row-del="rowDel"
+ @row-update="rowUpdate"
+ @row-save="rowSave"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @selection-change="selectionChange"
+ @current-change="currentChange"
+ @size-change="sizeChange"
+ @refresh-change="refreshChange"
+ @on-load="onLoad"
+ @tree-load="treeLoad"
+ >
+ <template slot-scope="{ row }" slot="menu">
+ <el-button
+ type="text"
+ icon="el-icon-setting"
+ size="small"
+ v-if="permission.data_scope_setting"
+ plain
+ style="border: 0; background-color: transparent !important"
+ @click.stop="handleDataScope(row)"
+ >权限配置
</el-button>
</template>
- <template slot-scope="{row}" slot="source">
- <div style="text-align:center">
- <i :class="row.source"/>
+ <template slot-scope="{ row }" slot="source">
+ <div style="text-align: center">
+ <i :class="row.source" />
</div>
</template>
</avue-crud>
- <el-drawer :title="`[${scopeMenuName}] 数据权限配置`" :visible.sync="drawerVisible" :direction="direction"
- append-to-body
- :before-close="handleDrawerClose" size="1000px">
+ <el-drawer
+ :title="`[${scopeMenuName}] 数据权限配置`"
+ :visible.sync="drawerVisible"
+ :direction="direction"
+ append-to-body
+ :before-close="handleDrawerClose"
+ size="1000px"
+ >
<basic-container>
- <avue-crud :option="optionScope"
- :data="dataScope"
- :page="pageScope"
- v-model="formScope"
- :table-loading="scopeLoading"
- ref="crudScope"
- @row-del="rowDelScope"
- @row-update="rowUpdateScope"
- @row-save="rowSaveScope"
- :before-open="beforeOpenScope"
- @search-change="searchChangeScope"
- @search-reset="searchResetScope"
- @selection-change="selectionChangeScope"
- @current-change="currentChangeScope"
- @size-change="sizeChangeScope"
- @on-load="onLoadScope">
+ <avue-crud
+ :option="optionScope"
+ :data="dataScope"
+ :page="pageScope"
+ v-model="formScope"
+ :table-loading="scopeLoading"
+ ref="crudScope"
+ @row-del="rowDelScope"
+ @row-update="rowUpdateScope"
+ @row-save="rowSaveScope"
+ :before-open="beforeOpenScope"
+ @search-change="searchChangeScope"
+ @search-reset="searchResetScope"
+ @selection-change="selectionChangeScope"
+ @current-change="currentChangeScope"
+ @size-change="sizeChangeScope"
+ @on-load="onLoadScope"
+ >
<template slot="menuLeft">
- <el-button type="danger"
- size="small"
- icon="el-icon-delete"
- plain
- @click="handleDeleteScope">删 除
+ <el-button
+ type="danger"
+ size="small"
+ icon="el-icon-delete"
+ plain
+ @click="handleDeleteScope"
+ >删 除
</el-button>
</template>
- <template slot-scope="{row}"
- slot="scopeType">
- <el-tag>{{row.scopeTypeName}}</el-tag>
+ <template slot-scope="{ row }" slot="scopeType">
+ <el-tag>{{ row.scopeTypeName }}</el-tag>
</template>
</avue-crud>
</basic-container>
@@ -73,655 +87,689 @@
</template>
<script>
- import {
- add,
- remove,
- update,
- getLazyMenuList,
- getMenu
- } from "@/api/system/menu";
- import {
- addDataScope,
- removeDataScope,
- updateDataScope,
- getListDataScope,
- getMenuDataScope
- } from "@/api/system/scope";
- import {mapGetters} from "vuex";
- import iconList from "@/config/iconList";
- import func from "@/util/func";
+import {
+ add,
+ remove,
+ update,
+ getLazyMenuList,
+ getMenu,
+} from "@/api/system/menu";
+import {
+ addDataScope,
+ removeDataScope,
+ updateDataScope,
+ getListDataScope,
+ getMenuDataScope,
+} from "@/api/system/scope";
+import { mapGetters } from "vuex";
+import iconList from "@/config/iconList";
+import func from "@/util/func";
- export default {
- data() {
- return {
- form: {},
- selectionList: [],
- query: {},
- loading: true,
- parentId: 0,
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- drawerVisible: false,
- direction: 'rtl',
- scopeMenuId: 0,
- scopeMenuCode: '',
- scopeMenuName: "菜单",
- scopeLoading: false,
- menu: true,
- watchMode: true,
- option: {
- lazy: true,
- tip: false,
- simplePage: true,
- searchShow: true,
- searchMenuSpan: 6,
- dialogWidth: "60%",
- tree: true,
- border: true,
- index: true,
- selection: true,
- viewBtn: false,
- editBtn: false,
- addBtn: false,
- delBtn: false,
- menuWidth: 150,
- dialogClickModal: false,
- column: [
- {
- label: "菜单名称",
- prop: "name",
- search: true,
- rules: [
- {
- required: true,
- message: "请输入菜单名称",
- trigger: "blur"
- }
- ]
- },
- {
- label: "路由地址",
- prop: "path",
- rules: [
- {
- required: true,
- message: "请输入路由地址",
- trigger: "blur"
- }
- ]
- },
- {
- label: "上级菜单",
- prop: "parentId",
- type: "tree",
- dicUrl: "/api/blade-system/menu/tree",
- hide: true,
- props: {
- label: "title"
+export default {
+ data() {
+ return {
+ form: {},
+ selectionList: [],
+ query: {},
+ loading: true,
+ parentId: 0,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ ...this.$store.state.control.changePageSize,
+ },
+ drawerVisible: false,
+ direction: "rtl",
+ scopeMenuId: 0,
+ scopeMenuCode: "",
+ scopeMenuName: "菜单",
+ scopeLoading: false,
+ menu: true,
+ watchMode: true,
+ option: {
+ lazy: true,
+ tip: false,
+ simplePage: true,
+ searchShow: true,
+ searchMenuSpan: 6,
+ dialogWidth: "60%",
+ tree: true,
+ border: true,
+ index: true,
+ selection: true,
+ viewBtn: false,
+ editBtn: false,
+ addBtn: false,
+ delBtn: false,
+ menuWidth: 150,
+ dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
+ column: [
+ {
+ label: "菜单名称",
+ prop: "name",
+ search: true,
+ rules: [
+ {
+ required: true,
+ message: "请输入菜单名称",
+ trigger: "blur",
},
- rules: [
- {
- required: false,
- message: "请选择上级菜单",
- trigger: "click"
- }
- ]
+ ],
+ },
+ {
+ label: "路由地址",
+ prop: "path",
+ rules: [
+ {
+ required: true,
+ message: "请输入路由地址",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "上级菜单",
+ prop: "parentId",
+ type: "tree",
+ dicUrl: "/api/blade-system/menu/tree",
+ hide: true,
+ props: {
+ label: "title",
},
- {
- label: "菜单图标",
- prop: "source",
- type: "icon",
- slot: true,
- width: 80,
- iconList: iconList,
- rules: [
- {
- required: true,
- message: "请输入菜单图标",
- trigger: "click"
- }
- ]
- },
- {
- label: "菜单编号",
- prop: "code",
- search: true,
- rules: [
- {
- required: true,
- message: "请输入菜单编号",
- trigger: "blur"
- }
- ]
- },
- {
- label: "菜单类型",
- prop: "category",
- type: "radio",
- dicData: [
- {
- label: "菜单",
- value: 1
- },
- {
- label: "按钮",
- value: 2
- }
- ],
- hide: true,
- rules: [
- {
- required: true,
- message: "请选择菜单类型",
- trigger: "blur"
- }
- ]
- },
- {
- label: "菜单别名",
- prop: "alias",
- rules: [
- {
- required: true,
- message: "请输入菜单别名",
- trigger: "blur"
- }
- ]
- },
- {
- label: "按钮功能",
- prop: "action",
- type: "radio",
- dicData: [
- {
- label: "工具栏",
- value: 0
- },
- {
- label: "操作栏",
- value: 1
- },
- {
- label: "工具操作栏",
- value: 2
- }
- ],
- hide: true,
- rules: [
- {
- required: true,
- message: "请选择按钮功能",
- trigger: "blur"
- }
- ]
- },
- {
- label: "菜单排序",
- prop: "sort",
- type: "number",
- width: 80,
- rules: [
- {
- required: true,
- message: "请输入菜单排序",
- trigger: "blur"
- }
- ]
- },
- {
- label: "新窗口",
- prop: "isOpen",
- type: "radio",
- dicData: [
- {
- label: "否",
- value: 0
- },
- {
- label: "是",
- value: 1
- },
- ],
- hide: true
- },
- {
- label: "菜单备注",
- prop: "remark",
- type: "textarea",
- span: 24,
- minRows: 6,
- hide: true
- }
- ]
- },
- data: [],
- formScope: {},
- selectionListScope: [],
- pageScope: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- optionScope: {
- tip: false,
- searchShow: true,
- searchMenuSpan: 6,
- border: true,
- index: true,
- viewBtn: true,
- selection: true,
- menuWidth: 200,
- dialogWidth: 900,
- dialogClickModal: false,
- column: [
- {
- label: "权限名称",
- prop: "scopeName",
- search: true,
- value: "",
- rules: [{
+ rules: [
+ {
+ required: false,
+ message: "请选择上级菜单",
+ trigger: "click",
+ },
+ ],
+ },
+ {
+ label: "菜单图标",
+ prop: "source",
+ type: "icon",
+ slot: true,
+ width: 80,
+ iconList: iconList,
+ rules: [
+ {
+ required: true,
+ message: "请输入菜单图标",
+ trigger: "click",
+ },
+ ],
+ },
+ {
+ label: "菜单编号",
+ prop: "code",
+ search: true,
+ rules: [
+ {
+ required: true,
+ message: "请输入菜单编号",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "菜单类型",
+ prop: "category",
+ type: "radio",
+ dicData: [
+ {
+ label: "菜单",
+ value: 1,
+ },
+ {
+ label: "按钮",
+ value: 2,
+ },
+ ],
+ hide: true,
+ rules: [
+ {
+ required: true,
+ message: "请选择菜单类型",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "菜单别名",
+ prop: "alias",
+ rules: [
+ {
+ required: true,
+ message: "请输入菜单别名",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "按钮功能",
+ prop: "action",
+ type: "radio",
+ dicData: [
+ {
+ label: "工具栏",
+ value: 0,
+ },
+ {
+ label: "操作栏",
+ value: 1,
+ },
+ {
+ label: "工具操作栏",
+ value: 2,
+ },
+ ],
+ hide: true,
+ rules: [
+ {
+ required: true,
+ message: "请选择按钮功能",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "菜单排序",
+ prop: "sort",
+ type: "number",
+ width: 80,
+ rules: [
+ {
+ required: true,
+ message: "请输入菜单排序",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "新窗口",
+ prop: "isOpen",
+ type: "radio",
+ dicData: [
+ {
+ label: "否",
+ value: 0,
+ },
+ {
+ label: "是",
+ value: 1,
+ },
+ ],
+ hide: true,
+ },
+ {
+ label: "菜单备注",
+ prop: "remark",
+ type: "textarea",
+ span: 24,
+ minRows: 6,
+ hide: true,
+ },
+ ],
+ },
+ data: [],
+ formScope: {},
+ selectionListScope: [],
+ pageScope: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+ optionScope: {
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ border: true,
+ index: true,
+ viewBtn: true,
+ selection: true,
+ menuWidth: 200,
+ dialogWidth: 900,
+ dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
+ column: [
+ {
+ label: "权限名称",
+ prop: "scopeName",
+ search: true,
+ value: "",
+ rules: [
+ {
required: true,
message: "请输入数据权限名称",
- trigger: "blur"
- }]
- },
- {
- label: "权限编号",
- prop: "resourceCode",
- search: true,
- width: 100,
- rules: [{
- required: true,
- message: "请输入数据权限编号",
- trigger: "blur"
- }]
- },
- {
- label: "权限字段",
- prop: "scopeColumn",
- width: 130,
- rules: [{
- required: true,
- message: "请输入数据权限编号",
- trigger: "blur"
- }]
- },
- {
- label: "规则类型",
- type: "select",
- dicUrl: "/api/blade-system/dict/dictionary?code=data_scope_type",
- props: {
- label: "dictValue",
- value: "dictKey"
+ trigger: "blur",
},
- dataType: "number",
- slot: true,
- width: 140,
- prop: "scopeType",
- rules: [{
+ ],
+ },
+ {
+ label: "权限编号",
+ prop: "resourceCode",
+ search: true,
+ width: 100,
+ rules: [
+ {
+ required: true,
+ message: "请输入数据权限编号",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "权限字段",
+ prop: "scopeColumn",
+ width: 130,
+ rules: [
+ {
+ required: true,
+ message: "请输入数据权限编号",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "规则类型",
+ type: "select",
+ dicUrl: "/api/blade-system/dict/dictionary?code=data_scope_type",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ dataType: "number",
+ slot: true,
+ width: 140,
+ prop: "scopeType",
+ rules: [
+ {
required: true,
message: "请输入通知类型",
- trigger: "blur"
- }]
- },
- {
- label: "可见字段",
- prop: "scopeField",
- span: 24,
- hide: true,
- value: "*",
- rules: [{
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "可见字段",
+ prop: "scopeField",
+ span: 24,
+ hide: true,
+ value: "*",
+ rules: [
+ {
required: true,
message: "请输入数据权限可见的字段",
- trigger: "blur"
- }],
- },
- {
- label: "权限类名",
- prop: "scopeClass",
- span: 24,
- hide: true,
- rules: [{
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "权限类名",
+ prop: "scopeClass",
+ span: 24,
+ hide: true,
+ rules: [
+ {
required: true,
message: "请输入MybatisMapper对应方法的完整类名路径",
- trigger: "blur"
- }],
- },
- {
- label: "规则值",
- prop: "scopeValue",
- span: 24,
- minRows: 5,
- type: "textarea",
- display: true,
- hide: true,
- },
- {
- label: "备注",
- prop: "remark",
- span: 24,
- hide: true,
- },
- ]
- },
- dataScope: []
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "规则值",
+ prop: "scopeValue",
+ span: 24,
+ minRows: 5,
+ type: "textarea",
+ display: true,
+ hide: true,
+ },
+ {
+ label: "备注",
+ prop: "remark",
+ span: 24,
+ hide: true,
+ },
+ ],
+ },
+ dataScope: [],
+ };
+ },
+ watch: {
+ "formScope.scopeType"() {
+ this.initScope();
+ },
+ },
+ computed: {
+ ...mapGetters(["permission"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.menu_add, false),
+ viewBtn: this.vaildData(this.permission.menu_view, false),
+ delBtn: this.vaildData(this.permission.menu_delete, false),
+ editBtn: this.vaildData(this.permission.menu_edit, false),
};
},
- watch: {
- 'formScope.scopeType'() {
- this.initScope();
- }
+ ids() {
+ let ids = [];
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id);
+ });
+ return ids.join(",");
},
- computed: {
- ...mapGetters(["permission"]),
- permissionList() {
- return {
- addBtn: this.vaildData(this.permission.menu_add, false),
- viewBtn: this.vaildData(this.permission.menu_view, false),
- delBtn: this.vaildData(this.permission.menu_delete, false),
- editBtn: this.vaildData(this.permission.menu_edit, false)
- };
- },
- ids() {
- let ids = [];
- this.selectionList.forEach(ele => {
- ids.push(ele.id);
- });
- return ids.join(",");
- },
- scopeIds() {
- let ids = [];
- this.selectionListScope.forEach(ele => {
- ids.push(ele.id);
- });
- return ids.join(",");
- }
+ scopeIds() {
+ let ids = [];
+ this.selectionListScope.forEach((ele) => {
+ ids.push(ele.id);
+ });
+ return ids.join(",");
},
- methods: {
- initScope() {
- const scopeType = func.toInt(this.formScope.scopeType);
- const watchMode = this.watchMode;
- let column = "-", name = "暂无";
- if (scopeType === 1) {
- column = "-";
- name = "全部可见";
- } else if (scopeType === 2) {
- column = "create_user";
- name = "本人可见";
- } else if (scopeType === 3) {
- column = "create_dept";
- name = "所在机构可见";
- } else if (scopeType === 4) {
- column = "create_dept";
- name = "所在机构可见及子级可见";
- } else if (scopeType === 5) {
- column = "";
- name = "自定义";
+ },
+ methods: {
+ initScope() {
+ const scopeType = func.toInt(this.formScope.scopeType);
+ const watchMode = this.watchMode;
+ let column = "-",
+ name = "暂无";
+ if (scopeType === 1) {
+ column = "-";
+ name = "全部可见";
+ } else if (scopeType === 2) {
+ column = "create_user";
+ name = "本人可见";
+ } else if (scopeType === 3) {
+ column = "create_dept";
+ name = "所在机构可见";
+ } else if (scopeType === 4) {
+ column = "create_dept";
+ name = "所在机构可见及子级可见";
+ } else if (scopeType === 5) {
+ column = "";
+ name = "自定义";
+ }
+ this.$refs.crudScope.option.column.filter((item) => {
+ if (watchMode) {
+ if (item.prop === "scopeName") {
+ this.formScope.scopeName = `${this.scopeMenuName} [${name}]`;
+ }
+ if (item.prop === "resourceCode") {
+ this.formScope.resourceCode = this.scopeMenuCode;
+ }
+ if (item.prop === "scopeColumn") {
+ this.formScope.scopeColumn = column;
+ }
}
- this.$refs.crudScope.option.column.filter(item => {
- if (watchMode) {
- if (item.prop === "scopeName") {
- this.formScope.scopeName = `${this.scopeMenuName} [${name}]`;
- }
- if (item.prop === "resourceCode") {
- this.formScope.resourceCode = this.scopeMenuCode;
- }
- if (item.prop === "scopeColumn") {
- this.formScope.scopeColumn = column;
- }
- }
- if (item.prop === "scopeValue") {
- item.display = scopeType === 5;
- }
- });
- },
- // 菜单管理模块
- rowSave(row, done, loading) {
- add(row).then(() => {
+ if (item.prop === "scopeValue") {
+ item.display = scopeType === 5;
+ }
+ });
+ },
+ // 菜单管理模块
+ rowSave(row, done, loading) {
+ add(row).then(
+ () => {
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!"
+ message: "操作成功!",
});
done();
- }, error => {
+ },
+ (error) => {
window.console.log(error);
loading();
- });
- },
- rowUpdate(row, index, done, loading) {
- update(row).then(() => {
+ }
+ );
+ },
+ rowUpdate(row, index, done, loading) {
+ update(row).then(
+ () => {
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!"
+ message: "操作成功!",
});
done();
- }, error => {
+ },
+ (error) => {
window.console.log(error);
loading();
+ }
+ );
+ },
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(row.id);
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
});
- },
- rowDel(row) {
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
+ },
+ searchReset() {
+ this.query = {};
+ this.parentId = 0;
+ this.onLoad(this.page);
+ },
+ searchChange(params, done) {
+ this.query = params;
+ this.parentId = "";
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
+ selectionChange(list) {
+ this.selectionList = list;
+ },
+ selectionClear() {
+ this.selectionList = [];
+ this.$refs.crud.toggleSelection();
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据");
+ return;
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(this.ids);
})
- .then(() => {
- return remove(row.id);
- })
- .then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!"
- });
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
});
- },
- searchReset() {
- this.query = {};
- this.parentId = 0;
- this.onLoad(this.page);
- },
- searchChange(params, done) {
- this.query = params;
- this.parentId = '';
- this.page.currentPage = 1;
- this.onLoad(this.page, params);
- done();
- },
- selectionChange(list) {
- this.selectionList = list;
- },
- selectionClear() {
- this.selectionList = [];
- this.$refs.crud.toggleSelection();
- },
- handleDelete() {
- if (this.selectionList.length === 0) {
- this.$message.warning("请选择至少一条数据");
- return;
- }
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- return remove(this.ids);
- })
- .then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.$refs.crud.toggleSelection();
- });
- },
- beforeOpen(done, type) {
- if (["edit", "view"].includes(type)) {
- getMenu(this.form.id).then(res => {
- this.form = res.data.data;
- });
- }
- done();
- },
- currentChange(currentPage) {
- this.page.currentPage = currentPage;
- },
- sizeChange(pageSize) {
- this.page.pageSize = pageSize;
- },
- refreshChange() {
- this.onLoad(this.page, this.query);
- },
- onLoad(page, params = {}) {
- this.loading = true;
- getLazyMenuList(this.parentId, Object.assign(params, this.query)).then(res => {
+ this.$refs.crud.toggleSelection();
+ });
+ },
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ getMenu(this.form.id).then((res) => {
+ this.form = res.data.data;
+ });
+ }
+ done();
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage;
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize;
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query);
+ },
+ onLoad(page, params = {}) {
+ this.loading = true;
+ getLazyMenuList(this.parentId, Object.assign(params, this.query)).then(
+ (res) => {
this.data = res.data.data;
this.loading = false;
this.selectionClear();
- });
- },
- treeLoad(tree, treeNode, resolve) {
- const parentId = tree.id;
- getLazyMenuList(parentId).then(res => {
- resolve(res.data.data);
- });
- },
- // 数据权限模块
- handleDataScope(row) {
- this.drawerVisible = true;
- this.scopeMenuId = row.id;
- this.scopeMenuCode = row.code;
- this.scopeMenuName = row.name;
- this.onLoadScope(this.pageScope)
- },
- handleDrawerClose(hide) {
- hide();
- },
- rowSaveScope(row, done, loading) {
- row = {
- ...row,
- menuId: this.scopeMenuId,
- };
- addDataScope(row).then(() => {
+ }
+ );
+ },
+ treeLoad(tree, treeNode, resolve) {
+ const parentId = tree.id;
+ getLazyMenuList(parentId).then((res) => {
+ resolve(res.data.data);
+ });
+ },
+ // 数据权限模块
+ handleDataScope(row) {
+ this.drawerVisible = true;
+ this.scopeMenuId = row.id;
+ this.scopeMenuCode = row.code;
+ this.scopeMenuName = row.name;
+ this.onLoadScope(this.pageScope);
+ },
+ handleDrawerClose(hide) {
+ hide();
+ },
+ rowSaveScope(row, done, loading) {
+ row = {
+ ...row,
+ menuId: this.scopeMenuId,
+ };
+ addDataScope(row).then(
+ () => {
this.onLoadScope(this.pageScope);
this.$message({
type: "success",
- message: "操作成功!"
+ message: "操作成功!",
});
done();
- }, error => {
+ },
+ (error) => {
window.console.log(error);
loading();
- });
- },
- rowUpdateScope(row, index, done, loading) {
- row = {
- ...row,
- menuId: this.scopeMenuId,
- };
- updateDataScope(row).then(() => {
+ }
+ );
+ },
+ rowUpdateScope(row, index, done, loading) {
+ row = {
+ ...row,
+ menuId: this.scopeMenuId,
+ };
+ updateDataScope(row).then(
+ () => {
this.onLoadScope(this.pageScope);
this.$message({
type: "success",
- message: "操作成功!"
+ message: "操作成功!",
});
done();
- }, error => {
+ },
+ (error) => {
window.console.log(error);
loading();
- });
- },
- rowDelScope(row) {
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
+ }
+ );
+ },
+ rowDelScope(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return removeDataScope(row.id);
})
- .then(() => {
- return removeDataScope(row.id);
- })
- .then(() => {
- this.onLoadScope(this.pageScope);
- this.$message({
- type: "success",
- message: "操作成功!"
- });
+ .then(() => {
+ this.onLoadScope(this.pageScope);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
});
- },
- handleDeleteScope() {
- if (this.selectionListScope.length === 0) {
- this.$message.warning("请选择至少一条数据");
- return;
- }
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- return removeDataScope(this.scopeIds);
- })
- .then(() => {
- this.onLoadScope(this.pageScope);
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.$refs.crudScope.toggleSelection();
- });
- },
- beforeOpenScope(done, type) {
- if (["add"].includes(type)) {
- this.watchMode = true;
- this.initScope();
- }
- if (["edit", "view"].includes(type)) {
- this.watchMode = false;
- getMenuDataScope(this.formScope.id).then(res => {
- this.formScope = res.data.data;
- });
- }
- done();
- },
- searchResetScope() {
- this.onLoadScope(this.pageScope);
- },
- searchChangeScope(params, done) {
- this.onLoadScope(this.pageScope, params);
- done();
- },
- selectionChangeScope(list) {
- this.selectionListScope = list;
- },
- currentChangeScope(currentPage) {
- this.pageScope.currentPage = currentPage;
- },
- sizeChangeScope(pageSize) {
- this.pageScope.pageSize = pageSize;
- },
- onLoadScope(page, params = {}) {
- this.scopeLoading = true;
- const values = {
- ...params,
- menuId: this.scopeMenuId,
- }
- getListDataScope(page.currentPage, page.pageSize, Object.assign(values, this.query)).then(res => {
- const data = res.data.data;
- this.pageScope.total = data.total;
- this.dataScope = data.records;
- this.selectionListScope = [];
- this.scopeLoading = false;
});
- },
- }
- };
+ },
+ handleDeleteScope() {
+ if (this.selectionListScope.length === 0) {
+ this.$message.warning("请选择至少一条数据");
+ return;
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return removeDataScope(this.scopeIds);
+ })
+ .then(() => {
+ this.onLoadScope(this.pageScope);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ this.$refs.crudScope.toggleSelection();
+ });
+ },
+ beforeOpenScope(done, type) {
+ if (["add"].includes(type)) {
+ this.watchMode = true;
+ this.initScope();
+ }
+ if (["edit", "view"].includes(type)) {
+ this.watchMode = false;
+ getMenuDataScope(this.formScope.id).then((res) => {
+ this.formScope = res.data.data;
+ });
+ }
+ done();
+ },
+ searchResetScope() {
+ this.onLoadScope(this.pageScope);
+ },
+ searchChangeScope(params, done) {
+ this.onLoadScope(this.pageScope, params);
+ done();
+ },
+ selectionChangeScope(list) {
+ this.selectionListScope = list;
+ },
+ currentChangeScope(currentPage) {
+ this.pageScope.currentPage = currentPage;
+ },
+ sizeChangeScope(pageSize) {
+ this.pageScope.pageSize = pageSize;
+ },
+ onLoadScope(page, params = {}) {
+ this.scopeLoading = true;
+ const values = {
+ ...params,
+ menuId: this.scopeMenuId,
+ };
+ getListDataScope(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(values, this.query)
+ ).then((res) => {
+ const data = res.data.data;
+ this.pageScope.total = data.total;
+ this.dataScope = data.records;
+ this.selectionListScope = [];
+ this.scopeLoading = false;
+ });
+ },
+ },
+};
</script>
diff --git a/src/views/authority/role.vue b/src/views/authority/role.vue
index 4a2ecd0..b1d2282 100644
--- a/src/views/authority/role.vue
+++ b/src/views/authority/role.vue
@@ -1,5 +1,10 @@
<template>
- <basic-container class="hasButThree">
+ <basic-container
+ :class="[
+ 'hasButThree',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option"
:table-loading="loading"
@@ -126,6 +131,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
option: {
tip: false,
@@ -139,6 +145,7 @@
viewBtn: true,
dialogWidth: 900,
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "角色名称",
diff --git a/src/views/companyApply/index.vue b/src/views/companyApply/index.vue
index ae57961..6c0cf6b 100644
--- a/src/views/companyApply/index.vue
+++ b/src/views/companyApply/index.vue
@@ -1,15 +1,26 @@
/*
* @Author: Morpheus
* @Date: 2021-07-05 16:31:54
- * @Last Modified by: Morpheus
- * @Last Modified time: 2021-07-19 19:39:45
+ * @Last Modified by: liu
+ * @Last Modified time: 2021-11-23 14:16:07
* menu-name 报名考试
*/
<template>
<el-row class="morpheus-box-apply-exam">
- <el-col :span="24" class="hasButOne">
+ <el-col
+ :span="24"
+ :class="[
+ 'hasButOne',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<el-card>
- <div class="exam-card-body">
+ <div
+ :class="[
+ 'exam-card-body',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
v-model="obj"
class="company-box"
@@ -56,7 +67,7 @@
size="small"
icon="el-icon-folder-checked"
v-if="row.isApply != 1 && permission.company_add"
- :disabled="row.examinationType=='1'"
+ :disabled="row.examinationType == '1'"
@click="questionBankRowSave(row)"
>报名
</el-button>
@@ -158,6 +169,7 @@
excelBtn: false,
menuWidth: 230,
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "审核状态",
@@ -211,6 +223,7 @@
excelBtn: false,
menuWidth: 320,
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "姓名",
@@ -264,7 +277,7 @@
defaultExpandAll: true,
// 操作栏宽度
menuWidth: 200,
-
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "姓名",
@@ -415,6 +428,7 @@
pageSize: 10,
currentPage: 1,
total: 16,
+ ...this.$store.state.control.changePageSize,
},
questionBankQuery: {},
questionBankSelectionList: [],
diff --git a/src/views/desk/notice.vue b/src/views/desk/notice.vue
index fa52ade..375bc45 100644
--- a/src/views/desk/notice.vue
+++ b/src/views/desk/notice.vue
@@ -1,5 +1,10 @@
<template>
- <basic-container class="desk1">
+ <basic-container
+ :class="[
+ 'desk1',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option"
:table-loading="loading"
@@ -37,11 +42,11 @@
<el-tag>{{ row.categoryName }}</el-tag>
</template>
<template slot-scope="{ type, size, row }" slot="menu">
- <el-button
- :size="size"
- :type="type"
- v-if="permission.notice_upload"
- @click="handleUploadPage(row)"
+ <el-button
+ :size="size"
+ :type="type"
+ v-if="permission.notice_upload"
+ @click="handleUploadPage(row)"
>附件上传
</el-button>
<!-- <el-button
@@ -60,7 +65,7 @@
import { getListPage, remove, update, add, getNotice } from "@/api/desk/notice";
import { getDept } from "@/api/system/dept";
import { mapGetters } from "vuex";
-import { mapState } from 'vuex';
+import { mapState } from "vuex";
export default {
data() {
@@ -78,6 +83,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
selectionList: [],
option: {
@@ -99,6 +105,7 @@
saveBtnText: "发布",
menuWidth: 320,
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "通知标题",
@@ -170,7 +177,7 @@
editDisplay: false,
viewDisplay: false,
search: true,
- searchSpan:6,
+ searchSpan: 6,
rules: [
{
required: true,
@@ -231,8 +238,8 @@
return ids.join(",");
},
...mapState({
- userInfo: state => state.user.userInfo
- })
+ userInfo: (state) => state.user.userInfo,
+ }),
},
mounted() {
this.getDeptInfo(this.userInfo.dept_id);
@@ -246,7 +253,6 @@
deptCategory == 1
? (that.deptCategory = true)
: (that.deptCategory = false);
-
});
},
//跳转到附件列表页面
@@ -262,10 +268,10 @@
rowSave(row, done, loading) {
if (this.deptCategory) {
row.category = 1;
- }else{
+ } else {
row.category = 2;
}
- row['type'] = 1;
+ row["type"] = 1;
row.deptId = this.deptId;
add(row).then(
() => {
diff --git a/src/views/desk/notification.vue b/src/views/desk/notification.vue
index eb6f4c2..4c17b9b 100644
--- a/src/views/desk/notification.vue
+++ b/src/views/desk/notification.vue
@@ -1,5 +1,29 @@
<template>
- <basic-container class="desk1">
+ <basic-container
+ :class="[
+ 'desk1',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
+ <!--
+:class="[
+$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+]"
+:class="[
+'exam-card-body',
+$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+]"
+:class="[
+'dispatchChildoperable',
+$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+]"
+:class="[
+'securityUnit',
+$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+]"
+...this.$store.state.control.clearOtherBut,
+...this.$store.state.control.changePageSize,
+ -->
<avue-crud
:option="option"
:table-loading="loading"
@@ -37,11 +61,11 @@
<el-tag>{{ row.categoryName }}</el-tag>
</template>
<template slot-scope="{ type, size, row }" slot="menu">
- <el-button
- :size="size"
- :type="type"
- v-if="permission.notice_upload"
- @click="handleUploadPage(row)"
+ <el-button
+ :size="size"
+ :type="type"
+ v-if="permission.notice_upload"
+ @click="handleUploadPage(row)"
>附件上传
</el-button>
<!-- <el-button
@@ -60,7 +84,7 @@
import { getListPage, remove, update, add, getNotice } from "@/api/desk/notice";
import { getDept } from "@/api/system/dept";
import { mapGetters } from "vuex";
-import { mapState } from 'vuex';
+import { mapState } from "vuex";
export default {
data() {
@@ -78,6 +102,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
selectionList: [],
option: {
@@ -99,6 +124,7 @@
saveBtnText: "发布",
menuWidth: 320,
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "标题",
@@ -245,8 +271,8 @@
return ids.join(",");
},
...mapState({
- userInfo: state => state.user.userInfo
- })
+ userInfo: (state) => state.user.userInfo,
+ }),
},
mounted() {
this.getDeptInfo(this.userInfo.dept_id);
@@ -260,7 +286,6 @@
deptCategory == 1
? (that.deptCategory = true)
: (that.deptCategory = false);
-
});
},
//跳转到附件列表页面
@@ -274,7 +299,7 @@
});
},
rowSave(row, done, loading) {
- row['type'] = 3;
+ row["type"] = 3;
row.deptId = this.deptId;
add(row).then(
() => {
diff --git a/src/views/desk/policyRelease.vue b/src/views/desk/policyRelease.vue
index 09a007b..5b7db80 100644
--- a/src/views/desk/policyRelease.vue
+++ b/src/views/desk/policyRelease.vue
@@ -1,5 +1,10 @@
<template>
- <basic-container class="desk1">
+ <basic-container
+ :class="[
+ 'desk1',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option"
:table-loading="loading"
@@ -37,11 +42,11 @@
<el-tag>{{ row.categoryName }}</el-tag>
</template>
<template slot-scope="{ type, size, row }" slot="menu">
- <el-button
- :size="size"
- :type="type"
- v-if="permission.notice_upload"
- @click="handleUploadPage(row)"
+ <el-button
+ :size="size"
+ :type="type"
+ v-if="permission.notice_upload"
+ @click="handleUploadPage(row)"
>附件上传
</el-button>
<!-- <el-button
@@ -60,7 +65,7 @@
import { getListPage, remove, update, add, getNotice } from "@/api/desk/notice";
import { getDept } from "@/api/system/dept";
import { mapGetters } from "vuex";
-import { mapState } from 'vuex';
+import { mapState } from "vuex";
export default {
data() {
@@ -78,6 +83,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
selectionList: [],
option: {
@@ -99,6 +105,7 @@
saveBtnText: "发布",
menuWidth: 320,
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "标题",
@@ -245,8 +252,8 @@
return ids.join(",");
},
...mapState({
- userInfo: state => state.user.userInfo
- })
+ userInfo: (state) => state.user.userInfo,
+ }),
},
mounted() {
this.getDeptInfo(this.userInfo.dept_id);
@@ -260,7 +267,6 @@
deptCategory == 1
? (that.deptCategory = true)
: (that.deptCategory = false);
-
});
},
//跳转到附件列表页面
@@ -274,7 +280,7 @@
});
},
rowSave(row, done, loading) {
- row['type'] = 2;
+ row["type"] = 2;
row.deptId = this.deptId;
add(row).then(
() => {
diff --git a/src/views/dispatch/dispatch.vue b/src/views/dispatch/dispatch.vue
index bac9f77..ef72901 100644
--- a/src/views/dispatch/dispatch.vue
+++ b/src/views/dispatch/dispatch.vue
@@ -1,6 +1,11 @@
<template>
<basic-container>
- <div class="dispatch">
+ <div
+ :class="[
+ 'dispatch',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<!-- <avue-tabs :option="optionTABS" @change="handleChangeTABS"></avue-tabs>
<span v-if="typeTABS.prop === 'tab1'"> -->
<avue-crud
@@ -150,6 +155,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
query: {},
data: [],
@@ -216,10 +222,11 @@
menuWidth: 160,
align: "center",
selection: true,
+ ...this.$store.state.control.clearOtherBut,
column: [
//派遣服务公司登记
{
- label: "派遣单位名称",
+ label: "派遣企业名称",
prop: "name",
search: true,
searchLabelWidth: 110,
@@ -310,7 +317,7 @@
searchSpan: 4,
overHidden: true,
labelWidth: 138,
- parent:false,
+ parent: false,
type: "tree",
dicUrl: "/api/jurisdiction/lazy-tree",
props: {
diff --git a/src/views/dispatch/dispatchChildoperable.vue b/src/views/dispatch/dispatchChildoperable.vue
index c69138d..0e62499 100644
--- a/src/views/dispatch/dispatchChildoperable.vue
+++ b/src/views/dispatch/dispatchChildoperable.vue
@@ -1,6 +1,11 @@
<template>
<basic-container>
- <div class="dispatchChildoperable">
+ <div
+ :class="[
+ 'dispatchChildoperable',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option"
:data="data"
@@ -46,6 +51,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
form: {},
query1: {},
@@ -65,6 +71,7 @@
// menuWidth: 160,
align: "center",
selection: true,
+ ...this.$store.state.control.clearOtherBut,
column: [
// },
{
@@ -131,7 +138,7 @@
width: 70,
labelWidth: 120,
hide: true,
- defaultExpandAll:true,
+ defaultExpandAll: true,
// props: {
// label: "realName",
// value: "id",
@@ -144,7 +151,7 @@
value: "id",
},
//不包含父节点值
- leafOnly:true,
+ leafOnly: true,
multiple: true,
rules: [
{
@@ -360,10 +367,9 @@
if (this.useifid != 266) {
form["deptId"] = this.useifid;
}
- console.log(form,123456);
- form["ids"] = form.userIds.join(","),
- delete form.userIds;
- console.log(form,321);
+ console.log(form, 123456);
+ (form["ids"] = form.userIds.join(",")), delete form.userIds;
+ console.log(form, 321);
saveDispatcher(form).then(
(res) => {
this.onLoad(this.page);
@@ -459,18 +465,26 @@
this.onLoad(this.page, this.query1);
},
- beforeOpen(done, type,row) {
+ beforeOpen(done, type, row) {
this.initFlag = true;
- if(type=="edit"){
- console.log(row,123);
+ if (type == "edit") {
+ console.log(row, 123);
const userColumn = this.findObject(this.option.column, "userIds");
userColumn.multiple = false;
- userColumn.dicUrl = "/api/blade-user/security-dispatcher-tree?deptId="+this.userInfo.dept_id+"&id="+this.form.userIds+"&realName="+this.form.securityName;
+ userColumn.dicUrl =
+ "/api/blade-user/security-dispatcher-tree?deptId=" +
+ this.userInfo.dept_id +
+ "&id=" +
+ this.form.userIds +
+ "&realName=" +
+ this.form.securityName;
}
- if(type=="add"){
+ if (type == "add") {
const userColumn = this.findObject(this.option.column, "userIds");
userColumn.multiple = true;
- userColumn.dicUrl = "/api/blade-user/security-dispatcher-tree?deptId="+this.userInfo.dept_id;
+ userColumn.dicUrl =
+ "/api/blade-user/security-dispatcher-tree?deptId=" +
+ this.userInfo.dept_id;
}
done();
},
diff --git a/src/views/dispatch/dispatchChildoperableSee.vue b/src/views/dispatch/dispatchChildoperableSee.vue
index 602da19..5fa188e 100644
--- a/src/views/dispatch/dispatchChildoperableSee.vue
+++ b/src/views/dispatch/dispatchChildoperableSee.vue
@@ -1,6 +1,11 @@
<template>
<basic-container>
- <div class="dispatchChildoperable">
+ <div
+ :class="[
+ 'dispatchChildoperable',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option1"
:data="data1"
@@ -46,6 +51,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
form: {},
query1: {},
@@ -65,6 +71,7 @@
// menuWidth: 160,
align: "center",
selection: true,
+ ...this.$store.state.control.clearOtherBut,
column: [
// },
{
diff --git a/src/views/dispatchChild/data.js b/src/views/dispatchChild/data.js
index a40c7ef..9bcc932 100644
--- a/src/views/dispatchChild/data.js
+++ b/src/views/dispatchChild/data.js
@@ -20,7 +20,7 @@
}
},
{
- label: "派遣单位名称",
+ label: "派遣企业名称",
prop: "name",
span: 11,
labelWidth: 130,
diff --git a/src/views/dispatchChild/index.vue b/src/views/dispatchChild/index.vue
index c43af48..d1ff99c 100644
--- a/src/views/dispatchChild/index.vue
+++ b/src/views/dispatchChild/index.vue
@@ -120,6 +120,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
query1: {},
data1: [],
@@ -339,7 +340,6 @@
if (i == 1) {
// console.log("存在");
} else {
-
this.obj0 = {};
this.obj0.name = row.name + " 该派遣单位已删除";
window.localStorage.removeItem("paqiandata");
diff --git a/src/views/exam/addsubject.vue b/src/views/exam/addsubject.vue
index 0fb5896..e9cbc27 100644
--- a/src/views/exam/addsubject.vue
+++ b/src/views/exam/addsubject.vue
@@ -110,6 +110,7 @@
viewBtn: true,
defaultExpandAll: true,
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "题目名称",
@@ -280,6 +281,7 @@
viewBtn: true,
defaultExpandAll: true,
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "题目名称",
@@ -450,6 +452,7 @@
viewBtn: true,
defaultExpandAll: true,
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "题目名称",
@@ -573,6 +576,7 @@
viewBtn: true,
defaultExpandAll: true,
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "题目名称",
diff --git a/src/views/exam/examPayment.vue b/src/views/exam/examPayment.vue
index e19ccd6..25fa2ca 100644
--- a/src/views/exam/examPayment.vue
+++ b/src/views/exam/examPayment.vue
@@ -2,14 +2,25 @@
* @Author: Morpheus
* @Date: 2021-07-05 16:31:54
* @Last Modified by: liu
- * @Last Modified time: 2021-09-28 11:45:28
+ * @Last Modified time: 2021-11-23 14:20:02
* menu-name 考试缴费管理
*/
<template>
<el-row class="morpheus-box">
- <el-col :span="24" class="recruitmentManagement">
+ <el-col
+ :span="24"
+ :class="[
+ 'recruitmentManagement',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<el-card>
- <div class="exam-card-body">
+ <div
+ :class="[
+ 'exam-card-body',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
v-model="obj"
class="company-box"
@@ -127,7 +138,7 @@
menu: true,
menuWidth: 186,
labelWidth: 120,
-
+ ...this.$store.state.control.clearOtherBut,
column: [
// {
// label: "缴费类型",
@@ -238,6 +249,7 @@
pageSize: 10,
currentPage: 1,
total: 16,
+ ...this.$store.state.control.changePageSize,
},
questionBankQuery: {},
questionBankSelectionList: [],
diff --git a/src/views/exam/performance.vue b/src/views/exam/performance.vue
index b37e921..94b2325 100644
--- a/src/views/exam/performance.vue
+++ b/src/views/exam/performance.vue
@@ -2,14 +2,25 @@
* @Author: Morpheus
* @Date: 2021-07-05 16:31:54
* @Last Modified by: liu
- * @Last Modified time: 2021-10-25 15:10:09
+ * @Last Modified time: 2021-11-23 14:17:22
* menu-name 成绩管理
*/
<template>
<el-row class="morpheus-box">
- <el-col :span="24" class="recruitmentManagement">
+ <el-col
+ :span="24"
+ :class="[
+ 'recruitmentManagement',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<el-card>
- <div class="exam-card-body">
+ <div
+ :class="[
+ 'exam-card-body',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
v-model="obj"
class="company-box"
@@ -164,7 +175,7 @@
menu: true,
menuWidth: 186,
labelWidth: 120,
-
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "考试名称",
@@ -446,6 +457,7 @@
pageSize: 10,
currentPage: 1,
total: 16,
+ ...this.$store.state.control.changePageSize,
},
questionBankQuery: {},
questionBankSelectionList: [],
diff --git a/src/views/exam/singleperformance.vue b/src/views/exam/singleperformance.vue
index 8f4ed78..2818aa9 100644
--- a/src/views/exam/singleperformance.vue
+++ b/src/views/exam/singleperformance.vue
@@ -1,15 +1,20 @@
/*
* @Author: Morpheus
* @Date: 2021-07-05 16:31:54
- * @Last Modified by: Morpheus
- * @Last Modified time: 2021-07-18 21:02:10
+ * @Last Modified by: liu
+ * @Last Modified time: 2021-11-23 14:18:07
* menu-name 成绩查看
*/
<template>
<el-row class="morpheus-box-score">
<el-col :span="24">
<el-card>
- <div class="exam-card-body">
+ <div
+ :class="[
+ 'exam-card-body',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
v-model="obj"
class="company-box"
@@ -37,7 +42,15 @@
{{ row.learnGrade == -1 ? "" : row.allGrade }}
</template>
<template slot-scope="{ row }" slot="qualified">
- {{ row.learnGrade == -1 ? "" : row.qualified == 0?"合格":row.qualified==1?"不合格":'' }}
+ {{
+ row.learnGrade == -1
+ ? ""
+ : row.qualified == 0
+ ? "合格"
+ : row.qualified == 1
+ ? "不合格"
+ : ""
+ }}
</template>
<template slot-scope="{ row }" slot="menu">
@@ -46,7 +59,7 @@
size="mini"
icon="el-icon-collection"
class="start-kaoshi"
- :disabled="row.qualified==1"
+ :disabled="row.qualified == 1"
v-if="permission.singleperformance_print"
@click="securityPrint(row)"
>保安证打印
@@ -134,6 +147,7 @@
menu: true,
menuWidth: 136,
labelWidth: 120,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "考试名称",
@@ -141,7 +155,7 @@
search: true,
searchSpan: 4,
slot: true,
- viewDisplay:false,
+ viewDisplay: false,
// 表单新增时是否禁止
addDisabled: false,
// 表单新增时是否可见
@@ -162,7 +176,7 @@
},
],
// overHidden:true,
- width:230,
+ width: 230,
},
{
label: "用户名",
@@ -189,7 +203,7 @@
trigger: "blur",
},
],
- width:160,
+ width: 160,
},
{
label: "所属公司",
@@ -221,7 +235,7 @@
trigger: "blur",
},
],
- width:250,
+ width: 250,
},
{
label: "考试开始时间",
@@ -342,26 +356,28 @@
],
},
{
- label: "总成绩",
- prop: "allGrade",
- slot: true,
- // 表单新增时是否禁止
- addDisabled: false,
- // 表单新增时是否可见
- addDisplay: true,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: true,
- // 表单编辑时是否可见
- editDisplay: true,
- // 表单编辑时是否为查看模式
- editDetail: false,
- rules: [{
- required: true,
- message: "请输入考试名称",
- trigger: "blur"
- }]
+ label: "总成绩",
+ prop: "allGrade",
+ slot: true,
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: true,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: true,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ rules: [
+ {
+ required: true,
+ message: "请输入考试名称",
+ trigger: "blur",
+ },
+ ],
},
{
label: "是否合格",
@@ -413,12 +429,13 @@
pageSize: 10,
currentPage: 1,
total: 16,
+ ...this.$store.state.control.changePageSize,
},
questionBankQuery: {},
questionBankSelectionList: [],
};
},
- computed:{
+ computed: {
...mapGetters(["userInfo", "permission"]),
permissionList() {
return {
@@ -426,7 +443,10 @@
viewBtn: this.vaildData(null, false),
delBtn: this.vaildData(null, false),
editBtn: this.vaildData(this.permission.user_edit, false),
- excelBtn: this.vaildData(this.permission.singleperformance_export, false),
+ excelBtn: this.vaildData(
+ this.permission.singleperformance_export,
+ false
+ ),
};
},
},
@@ -449,31 +469,30 @@
var roleIds = this.userInfo.role_id.split(",");
roleIds.forEach((roleId) => {
getRoleDetail(roleId).then((res) => {
- var roleAlias = res.data.data.roleAlias;
- if (
- roleAlias == "保安公司管理员" ||
- roleAlias == "保安" ||
- roleAlias == "未持证保安"
- ) {
- //如果是保安公司管理员
- params["deptId"] = that.userInfo.dept_id;
- }
+ var roleAlias = res.data.data.roleAlias;
+ if (
+ roleAlias == "保安公司管理员" ||
+ roleAlias == "保安" ||
+ roleAlias == "未持证保安"
+ ) {
+ //如果是保安公司管理员
+ params["deptId"] = that.userInfo.dept_id;
+ }
+ that.questionBankLoading = false;
+ params["examType"] = 1;
+ getList(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, this.query)
+ ).then((res) => {
+ const data = res.data.data;
+ that.questionBankPage.total = data.total;
+ that.questionBankData = data.records;
that.questionBankLoading = false;
- params["examType"] = 1;
- getList(
- page.currentPage,
- page.pageSize,
- Object.assign(params, this.query)
- ).then((res) => {
- const data = res.data.data;
- that.questionBankPage.total = data.total;
- that.questionBankData = data.records;
- that.questionBankLoading = false;
- that.questionBankSelectionClear();
- });
- })
+ that.questionBankSelectionClear();
+ });
+ });
});
-
},
questionBankSelectionClear() {
this.questionBankSelectionList = [];
diff --git a/src/views/exam/startexam.vue b/src/views/exam/startexam.vue
index fc874e2..27bf0c0 100644
--- a/src/views/exam/startexam.vue
+++ b/src/views/exam/startexam.vue
@@ -1,15 +1,20 @@
/*
* @Author: Morpheus
* @Date: 2021-07-05 16:31:54
- * @Last Modified by: Morpheus
- * @Last Modified time: 2021-07-18 17:09:52
+ * @Last Modified by: liu
+ * @Last Modified time: 2021-11-23 14:16:42
* menu-name 考试管理
*/
<template>
<el-row class="morpheus-box-paper">
<el-col :span="24">
<el-card>
- <div class="exam-card-body">
+ <div
+ :class="[
+ 'exam-card-body',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
v-model="form"
class="company-box"
@@ -54,7 +59,7 @@
<template slot="menuLeft">
<el-button
- style="display:none"
+ style="display: none"
type="danger"
size="small"
icon="el-icon-delete"
@@ -134,7 +139,7 @@
menuWidth: 280,
labelWidth: 140,
-
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "考试名称",
@@ -327,6 +332,7 @@
pageSize: 10,
currentPage: 1,
total: 16,
+ ...this.$store.state.control.changePageSize,
},
questionBankQuery: {},
questionBankSelectionList: [],
@@ -356,7 +362,7 @@
methods: {
questionBankOnLoad(page, params = {}) {
this.questionBankLoading = false;
- params['examType'] = 1;
+ params["examType"] = 1;
getList(
page.currentPage,
page.pageSize,
@@ -412,8 +418,8 @@
},
// 新增
questionBankRowSave(row, done, loading) {
- row.startTime = row.startTime+":00";
- row['examType'] = 1;
+ row.startTime = row.startTime + ":00";
+ row["examType"] = 1;
// row.endTime = row.examTime[1];
// row.examTime = JSON.stringify(row.examTime);
add(row).then(
@@ -435,7 +441,7 @@
// if (Array.isArray(row.examTime) != true) {
// row.examTime = row.examTime.split(",");
// }
- row.startTime = row.startTime+":00";
+ row.startTime = row.startTime + ":00";
// row.endTime = row.examTime[1];
// row.examTime = JSON.stringify(row.examTime);
update(row).then(
diff --git a/src/views/exam/subject.vue b/src/views/exam/subject.vue
index bda1d9f..e0a2e3c 100644
--- a/src/views/exam/subject.vue
+++ b/src/views/exam/subject.vue
@@ -1,8 +1,8 @@
/*
* @Author: Morpheus
* @Date: 2021-07-05 16:31:54
- * @Last Modified by: Morpheus
- * @Last Modified time: 2021-07-18 16:04:26
+ * @Last Modified by: liu
+ * @Last Modified time: 2021-11-23 14:14:38
* menu-name 题库查询
*/
<template>
@@ -10,7 +10,12 @@
<el-row class="morpheus-box">
<el-col :span="24">
<el-card>
- <div class="exam-card-body">
+ <div
+ :class="[
+ 'exam-card-body',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
class="company-box"
:option="questionBankOption"
@@ -50,7 +55,7 @@
type="danger"
size="small"
icon="el-icon-delete"
- v-if="permission.subject_delete"
+ v-if="permission.subject_delete"
@click="questionBankHandleDelete"
>删 除
</el-button>
@@ -61,7 +66,7 @@
type="text"
size="mini"
icon="el-icon-edit"
- v-if="permission.subject_edit"
+ v-if="permission.subject_edit"
@click="questionBankHandleAdd(row)"
>编辑
</el-button>
@@ -69,7 +74,7 @@
type="text"
size="mini"
icon="el-icon-delete"
- v-if="permission.subject_delete"
+ v-if="permission.subject_delete"
@click="questionBankHandleDel(row)"
>删除
</el-button>
@@ -164,6 +169,7 @@
dialogClickModal: false,
// 操作栏宽度
menuWidth: 226,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "题目名称",
@@ -244,6 +250,7 @@
pageSize: 10,
currentPage: 1,
total: 16,
+ ...this.$store.state.control.changePageSize,
},
questionBankQuery: {},
questionBankSelectionList: [],
diff --git a/src/views/flow/follow.vue b/src/views/flow/follow.vue
index fbaa282..355b74a 100644
--- a/src/views/flow/follow.vue
+++ b/src/views/flow/follow.vue
@@ -1,203 +1,212 @@
<template>
- <basic-container>
- <avue-crud :option="option"
- :table-loading="loading"
- :data="data"
- ref="crud"
- v-model="form"
- :page.sync="page"
- :permission="permissionList"
- @row-del="rowDel"
- @search-change="searchChange"
- @search-reset="searchReset"
- @selection-change="selectionChange"
- @current-change="currentChange"
- @size-change="sizeChange"
- @refresh-change="refreshChange"
- @on-load="onLoad">
- <template slot-scope="{row}"
- slot="suspensionState">
- <el-tag>{{row.suspensionState===1?'激活':'挂起'}}</el-tag>
+ <basic-container
+ :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
+ >
+ <avue-crud
+ :option="option"
+ :table-loading="loading"
+ :data="data"
+ ref="crud"
+ v-model="form"
+ :page.sync="page"
+ :permission="permissionList"
+ @row-del="rowDel"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @selection-change="selectionChange"
+ @current-change="currentChange"
+ @size-change="sizeChange"
+ @refresh-change="refreshChange"
+ @on-load="onLoad"
+ >
+ <template slot-scope="{ row }" slot="suspensionState">
+ <el-tag>{{ row.suspensionState === 1 ? "激活" : "挂起" }}</el-tag>
</template>
</avue-crud>
- <el-dialog title="流程删除"
- append-to-body
- :visible.sync="followBox"
- width="20%">
- <el-form :model="form"
- ref="form"
- label-width="80px">
+ <el-dialog
+ title="流程删除"
+ append-to-body
+ :visible.sync="followBox"
+ width="20%"
+ >
+ <el-form :model="form" ref="form" label-width="80px">
<el-form-item label="删除理由">
- <el-input v-model="deleteReason"
- placeholder="请输入删除理由" />
+ <el-input v-model="deleteReason" placeholder="请输入删除理由" />
</el-form-item>
</el-form>
- <span slot="footer"
- class="dialog-footer">
+ <span slot="footer" class="dialog-footer">
<el-button @click="followBox = false">关 闭</el-button>
- <el-button type="primary"
- @click="handleDelete">确 定</el-button>
+ <el-button type="primary" @click="handleDelete">确 定</el-button>
</span>
</el-dialog>
</basic-container>
</template>
<script>
- import {mapGetters} from "vuex";
- import {followList, deleteProcessInstance} from "@/api/flow/flow";
+import { mapGetters } from "vuex";
+import { followList, deleteProcessInstance } from "@/api/flow/flow";
- export default {
- data() {
+export default {
+ data() {
+ return {
+ form: {},
+ selectionId: "",
+ processInstanceId: "",
+ selectionList: [],
+ query: {},
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ ...this.$store.state.control.changePageSize,
+ },
+ followBox: false,
+ deleteReason: "",
+ option: {
+ height: "auto",
+ calcHeight: 30,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ border: true,
+ index: true,
+ selection: true,
+ editBtn: false,
+ addBtn: false,
+ viewBtn: false,
+ dialogWidth: 900,
+ menuWidth: 100,
+ dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
+ column: [
+ {
+ label: "执行id",
+ prop: "executionId",
+ search: true,
+ width: 320,
+ },
+ {
+ label: "流程key",
+ prop: "processDefinitionKey",
+ search: true,
+ },
+ {
+ label: "实例id",
+ prop: "processInstanceId",
+ search: true,
+ width: 320,
+ },
+ {
+ label: "状态",
+ prop: "suspensionState",
+ slot: true,
+ width: 80,
+ },
+ {
+ label: "发起人",
+ prop: "startUser",
+ width: 100,
+ },
+ {
+ label: "开始时间",
+ prop: "startTime",
+ width: 165,
+ },
+ ],
+ },
+ data: [],
+ };
+ },
+ computed: {
+ ...mapGetters(["permission"]),
+ permissionList() {
return {
- form: {},
- selectionId: '',
- processInstanceId: '',
- selectionList: [],
- query: {},
- loading: true,
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- followBox: false,
- deleteReason: '',
- option: {
- height: 'auto',
- calcHeight: 30,
- tip: false,
- searchShow: true,
- searchMenuSpan: 6,
- border: true,
- index: true,
- selection: true,
- editBtn: false,
- addBtn: false,
- viewBtn: false,
- dialogWidth: 900,
- menuWidth: 100,
- dialogClickModal: false,
- column: [
- {
- label: "执行id",
- prop: "executionId",
- search: true,
- width: 320,
- },
- {
- label: "流程key",
- prop: "processDefinitionKey",
- search: true,
- },
- {
- label: "实例id",
- prop: "processInstanceId",
- search: true,
- width: 320,
- },
- {
- label: "状态",
- prop: "suspensionState",
- slot: true,
- width: 80,
- },
- {
- label: "发起人",
- prop: "startUser",
- width: 100,
- },
- {
- label: '开始时间',
- prop: 'startTime',
- width: 165,
- },
- ]
- },
- data: []
+ delBtn: this.vaildData(this.permission.flow_follow_delete, false),
};
},
- computed: {
- ...mapGetters(["permission"]),
- permissionList() {
- return {
- delBtn: this.vaildData(this.permission.flow_follow_delete, false),
- };
- },
- ids() {
- let ids = [];
- this.selectionList.forEach(ele => {
- ids.push(ele.id);
- });
- return ids.join(",");
- }
+ ids() {
+ let ids = [];
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id);
+ });
+ return ids.join(",");
},
- methods: {
- rowDel(row) {
- this.followBox = true;
- this.selectionId = row.id;
- this.processInstanceId = row.processInstanceId;
- },
- handleDelete() {
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- return deleteProcessInstance({deleteReason: this.deleteReason, processInstanceId: this.processInstanceId});
- })
- .then(() => {
- this.onLoad(this.page);
- this.followBox = false;
- this.$message({
- type: "success",
- message: "操作成功!"
- });
+ },
+ methods: {
+ rowDel(row) {
+ this.followBox = true;
+ this.selectionId = row.id;
+ this.processInstanceId = row.processInstanceId;
+ },
+ handleDelete() {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return deleteProcessInstance({
+ deleteReason: this.deleteReason,
+ processInstanceId: this.processInstanceId,
});
- },
- searchReset() {
- this.query = {};
- this.onLoad(this.page);
- },
- searchChange(params, done) {
- this.query = params;
- this.page.currentPage = 1;
- this.onLoad(this.page, params);
- done();
- },
- selectionChange(list) {
- this.selectionList = list;
- },
- selectionClear() {
- this.selectionList = [];
- this.$refs.crud.toggleSelection();
- },
- currentChange(currentPage) {
- this.page.currentPage = currentPage;
- },
- sizeChange(pageSize) {
- this.page.pageSize = pageSize;
- },
- refreshChange() {
- this.onLoad(this.page, this.query);
- },
- onLoad(page, params = {}) {
- this.loading = true;
- followList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
- const data = res.data.data;
- this.page.total = data.total;
- this.data = data.records;
- this.loading = false;
- this.selectionClear();
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.followBox = false;
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
});
- }
- }
- };
+ },
+ searchReset() {
+ this.query = {};
+ this.onLoad(this.page);
+ },
+ searchChange(params, done) {
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
+ selectionChange(list) {
+ this.selectionList = list;
+ },
+ selectionClear() {
+ this.selectionList = [];
+ this.$refs.crud.toggleSelection();
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage;
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize;
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query);
+ },
+ onLoad(page, params = {}) {
+ this.loading = true;
+ followList(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, this.query)
+ ).then((res) => {
+ const data = res.data.data;
+ this.page.total = data.total;
+ this.data = data.records;
+ this.loading = false;
+ this.selectionClear();
+ });
+ },
+ },
+};
</script>
<style>
- .none-border {
- border: 0;
- background-color: transparent !important;
- }
+.none-border {
+ border: 0;
+ background-color: transparent !important;
+}
</style>
diff --git a/src/views/flow/manager.vue b/src/views/flow/manager.vue
index 4a7cae5..cecf2d7 100644
--- a/src/views/flow/manager.vue
+++ b/src/views/flow/manager.vue
@@ -1,19 +1,23 @@
<template>
- <basic-container>
- <avue-crud :option="option"
- :table-loading="loading"
- :data="data"
- ref="crud"
- v-model="form"
- :page.sync="page"
- :permission="permissionList"
- @search-change="searchChange"
- @search-reset="searchReset"
- @selection-change="selectionChange"
- @current-change="currentChange"
- @size-change="sizeChange"
- @refresh-change="refreshChange"
- @on-load="onLoad">
+ <basic-container
+ :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
+ >
+ <avue-crud
+ :option="option"
+ :table-loading="loading"
+ :data="data"
+ ref="crud"
+ v-model="form"
+ :page.sync="page"
+ :permission="permissionList"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @selection-change="selectionChange"
+ @current-change="currentChange"
+ @size-change="sizeChange"
+ @refresh-change="refreshChange"
+ @on-load="onLoad"
+ >
<template slot="menuLeft">
<el-radio-group v-model="mode" size="small">
<el-radio-button label="1">通用流程</el-radio-button>
@@ -21,51 +25,55 @@
</el-radio-group>
</template>
<template slot-scope="scope" slot="menu">
- <el-button type="text"
- size="small"
- v-if="permission.flow_manager_state"
- plain
- class="none-border"
- @click.stop="handleState(scope.row,scope.index)">变更状态
+ <el-button
+ type="text"
+ size="small"
+ v-if="permission.flow_manager_state"
+ plain
+ class="none-border"
+ @click.stop="handleState(scope.row, scope.index)"
+ >变更状态
</el-button>
- <el-button type="text"
- size="small"
- v-if="permission.flow_manager_image"
- plain
- class="none-border"
- @click.stop="handleImage(scope.row,scope.index)">流程图
+ <el-button
+ type="text"
+ size="small"
+ v-if="permission.flow_manager_image"
+ plain
+ class="none-border"
+ @click.stop="handleImage(scope.row, scope.index)"
+ >流程图
</el-button>
- <el-button type="text"
- size="small"
- v-if="permission.flow_manager_remove"
- plain
- class="none-border"
- @click.stop="handleSlotDelete(scope.row,scope.index)">删除
+ <el-button
+ type="text"
+ size="small"
+ v-if="permission.flow_manager_remove"
+ plain
+ class="none-border"
+ @click.stop="handleSlotDelete(scope.row, scope.index)"
+ >删除
</el-button>
</template>
- <template slot-scope="{row}"
- slot="tenantId">
- <el-tag>{{row.tenantId===''?'通用':row.tenantId}}</el-tag>
+ <template slot-scope="{ row }" slot="tenantId">
+ <el-tag>{{ row.tenantId === "" ? "通用" : row.tenantId }}</el-tag>
</template>
- <template slot-scope="{row}"
- slot="version">
- <el-tag>v{{row.version}}</el-tag>
+ <template slot-scope="{ row }" slot="version">
+ <el-tag>v{{ row.version }}</el-tag>
</template>
- <template slot-scope="{row}"
- slot="suspensionState">
- <el-tag>{{row.suspensionState===1?'激活':'挂起'}}</el-tag>
+ <template slot-scope="{ row }" slot="suspensionState">
+ <el-tag>{{ row.suspensionState === 1 ? "激活" : "挂起" }}</el-tag>
</template>
- <template slot-scope="{row}"
- slot="category">
- <el-tag>{{row.categoryName}}</el-tag>
+ <template slot-scope="{ row }" slot="category">
+ <el-tag>{{ row.categoryName }}</el-tag>
</template>
</avue-crud>
- <el-dialog title="流程图"
- append-to-body
- :visible.sync="flowBox"
- :fullscreen="true">
+ <el-dialog
+ title="流程图"
+ append-to-body
+ :visible.sync="flowBox"
+ :fullscreen="true"
+ >
<iframe
- :src=flowUrl
+ :src="flowUrl"
width="100%"
height="700"
title="流程图"
@@ -74,295 +82,305 @@
marginWidth="0"
marginHeight="0"
scrolling="no"
- allowTransparency="yes">
+ allowTransparency="yes"
+ >
</iframe>
- <span slot="footer"
- class="dialog-footer">
+ <span slot="footer" class="dialog-footer">
<el-button @click="flowBox = false">关 闭</el-button>
</span>
</el-dialog>
- <el-dialog title="流程变更"
- append-to-body
- :visible.sync="stateBox"
- width="20%">
- <el-form :model="form"
- ref="form"
- label-width="80px">
+ <el-dialog
+ title="流程变更"
+ append-to-body
+ :visible.sync="stateBox"
+ width="20%"
+ >
+ <el-form :model="form" ref="form" label-width="80px">
<el-form-item label="流程状态">
<el-select v-model="flowState" placeholder="请选择" value="">
<el-option
v-for="item in stateOptions"
:key="item.value"
:label="item.label"
- :value="item.value">
+ :value="item.value"
+ >
</el-option>
</el-select>
</el-form-item>
</el-form>
- <span slot="footer"
- class="dialog-footer">
+ <span slot="footer" class="dialog-footer">
<el-button @click="stateBox = false">关 闭</el-button>
- <el-button type="primary"
- @click="handleDoState">确 定</el-button>
+ <el-button type="primary" @click="handleDoState">确 定</el-button>
</span>
</el-dialog>
</basic-container>
</template>
<script>
- import {mapGetters} from "vuex";
- import {managerList, changeState, deleteDeployment} from "@/api/flow/flow";
- import {flowCategory} from "@/util/flow";
+import { mapGetters } from "vuex";
+import { managerList, changeState, deleteDeployment } from "@/api/flow/flow";
+import { flowCategory } from "@/util/flow";
- export default {
- data() {
+export default {
+ data() {
+ return {
+ form: {},
+ mode: "1",
+ selectionId: "",
+ selectionList: [],
+ query: {},
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ ...this.$store.state.control.changePageSize,
+ },
+ flowBox: false,
+ flowUrl: "",
+ stateBox: false,
+ flowState: "",
+ stateOptions: [
+ {
+ value: "active",
+ label: "激活",
+ },
+ {
+ value: "suspend",
+ label: "挂起",
+ },
+ ],
+ option: {
+ height: "auto",
+ calcHeight: 30,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ border: true,
+ index: true,
+ selection: true,
+ editBtn: false,
+ addBtn: false,
+ viewBtn: false,
+ delBtn: false,
+ dialogWidth: 900,
+ menuWidth: 150,
+ dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
+ column: [
+ {
+ label: "保安单位编号",
+ prop: "tenantId",
+ slot: true,
+ width: 120,
+ },
+ {
+ label: "流程主键",
+ prop: "id",
+ },
+ {
+ label: "流程标识",
+ prop: "key",
+ search: true,
+ width: 150,
+ },
+ {
+ label: "流程名称",
+ prop: "name",
+ width: 150,
+ },
+ {
+ label: "流程分类",
+ type: "select",
+ row: true,
+ dicUrl: "/api/blade-system/dict/dictionary?code=flow",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ dataType: "number",
+ slot: true,
+ prop: "category",
+ search: true,
+ width: 100,
+ },
+ {
+ label: "流程版本",
+ prop: "version",
+ slot: true,
+ width: 80,
+ },
+ {
+ label: "状态",
+ prop: "suspensionState",
+ slot: true,
+ width: 80,
+ },
+ {
+ label: "部署时间",
+ prop: "deploymentTime",
+ width: 165,
+ },
+ ],
+ },
+ data: [],
+ };
+ },
+ watch: {
+ mode() {
+ this.onLoad(this.page);
+ },
+ },
+ computed: {
+ ...mapGetters(["permission"]),
+ permissionList() {
return {
- form: {},
- mode: '1',
- selectionId: '',
- selectionList: [],
- query: {},
- loading: true,
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- flowBox: false,
- flowUrl: '',
- stateBox: false,
- flowState: '',
- stateOptions: [{
- value: 'active',
- label: '激活'
- }, {
- value: 'suspend',
- label: '挂起'
- }],
- option: {
- height: 'auto',
- calcHeight: 30,
- tip: false,
- searchShow: true,
- searchMenuSpan: 6,
- border: true,
- index: true,
- selection: true,
- editBtn: false,
- addBtn: false,
- viewBtn: false,
- delBtn: false,
- dialogWidth: 900,
- menuWidth: 150,
- dialogClickModal: false,
- column: [
- {
- label: '保安单位编号',
- prop: 'tenantId',
- slot: true,
- width: 120,
- },
- {
- label: '流程主键',
- prop: 'id',
- },
- {
- label: '流程标识',
- prop: 'key',
- search: true,
- width: 150,
- },
- {
- label: '流程名称',
- prop: 'name',
- width: 150,
- },
- {
- label: "流程分类",
- type: "select",
- row: true,
- dicUrl: "/api/blade-system/dict/dictionary?code=flow",
- props: {
- label: "dictValue",
- value: "dictKey"
- },
- dataType: "number",
- slot: true,
- prop: "category",
- search: true,
- width: 100,
- },
- {
- label: '流程版本',
- prop: 'version',
- slot: true,
- width: 80,
- },
- {
- label: '状态',
- prop: 'suspensionState',
- slot: true,
- width: 80,
- },
- {
- label: '部署时间',
- prop: 'deploymentTime',
- width: 165,
- },
- ]
- },
- data: []
+ delBtn: this.vaildData(this.permission.flow_manager_remove, false),
};
},
- watch: {
- 'mode'() {
- this.onLoad(this.page);
- }
+ ids() {
+ let ids = [];
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id);
+ });
+ return ids.join(",");
},
- computed: {
- ...mapGetters(["permission"]),
- permissionList() {
- return {
- delBtn: this.vaildData(this.permission.flow_manager_remove, false),
- };
- },
- ids() {
- let ids = [];
- this.selectionList.forEach(ele => {
- ids.push(ele.id);
- });
- return ids.join(",");
- },
- deploymentIds() {
- let ids = [];
- this.selectionList.forEach(ele => {
- ids.push(ele.deploymentId);
- });
- return ids.join(",");
- }
+ deploymentIds() {
+ let ids = [];
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.deploymentId);
+ });
+ return ids.join(",");
},
- methods: {
- searchReset() {
- this.query = {};
- this.onLoad(this.page);
- },
- searchChange(params, done) {
- this.query = params;
- this.page.currentPage = 1;
- this.onLoad(this.page, params);
- done();
- },
- selectionChange(list) {
- this.selectionList = list;
- },
- selectionClear() {
- this.selectionList = [];
- this.$refs.crud.toggleSelection();
- },
- handleDelete() {
- if (this.selectionList.length === 0) {
- this.$message.warning("请选择至少一条数据");
- return;
- }
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
+ },
+ methods: {
+ searchReset() {
+ this.query = {};
+ this.onLoad(this.page);
+ },
+ searchChange(params, done) {
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
+ selectionChange(list) {
+ this.selectionList = list;
+ },
+ selectionClear() {
+ this.selectionList = [];
+ this.$refs.crud.toggleSelection();
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据");
+ return;
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return deleteDeployment(this.deploymentIds);
})
- .then(() => {
- return deleteDeployment(this.deploymentIds);
- })
- .then(() => {
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.$refs.crud.toggleSelection();
- this.onLoad(this.page);
- });
- },
- handleSlotDelete(row) {
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- return deleteDeployment(row.deploymentId);
- })
- .then(() => {
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.$refs.crud.toggleSelection();
- this.onLoad(this.page);
- });
- },
- handleState(row) {
- this.stateBox = true;
- this.selectionId = row.id;
- },
- handleDoState() {
- if (!this.flowState) {
+ .then(() => {
this.$message({
- type: "warn",
- message: "请先选择流程状态!"
+ type: "success",
+ message: "操作成功!",
});
- return;
- }
- changeState({processId: this.selectionId, state: this.flowState}).then(res => {
+ this.$refs.crud.toggleSelection();
+ this.onLoad(this.page);
+ });
+ },
+ handleSlotDelete(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return deleteDeployment(row.deploymentId);
+ })
+ .then(() => {
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ this.$refs.crud.toggleSelection();
+ this.onLoad(this.page);
+ });
+ },
+ handleState(row) {
+ this.stateBox = true;
+ this.selectionId = row.id;
+ },
+ handleDoState() {
+ if (!this.flowState) {
+ this.$message({
+ type: "warn",
+ message: "请先选择流程状态!",
+ });
+ return;
+ }
+ changeState({ processId: this.selectionId, state: this.flowState }).then(
+ (res) => {
const data = res.data;
if (data.success) {
this.$message({
type: "success",
- message: data.msg
+ message: data.msg,
});
this.stateBox = false;
this.onLoad(this.page);
} else {
this.$message({
type: "warn",
- message: data.msg
+ message: data.msg,
});
}
- })
- },
- handleImage(row) {
- this.flowUrl = `/api/blade-flow/process/resource-view?processDefinitionId=${row.id}`;
- this.flowBox = true;
- },
- currentChange(currentPage) {
- this.page.currentPage = currentPage;
- },
- sizeChange(pageSize) {
- this.page.pageSize = pageSize;
- },
- refreshChange() {
- this.onLoad(this.page, this.query);
- },
- onLoad(page, params = {}) {
- const values = {
- ...params,
- category: (params.category) ? flowCategory(params.category) : null,
- mode: this.mode
- };
- this.loading = true;
- managerList(page.currentPage, page.pageSize, Object.assign(values, this.query)).then(res => {
- const data = res.data.data;
- this.page.total = data.total;
- this.data = data.records;
- this.loading = false;
- this.selectionClear();
- });
- }
- }
- };
+ }
+ );
+ },
+ handleImage(row) {
+ this.flowUrl = `/api/blade-flow/process/resource-view?processDefinitionId=${row.id}`;
+ this.flowBox = true;
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage;
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize;
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query);
+ },
+ onLoad(page, params = {}) {
+ const values = {
+ ...params,
+ category: params.category ? flowCategory(params.category) : null,
+ mode: this.mode,
+ };
+ this.loading = true;
+ managerList(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(values, this.query)
+ ).then((res) => {
+ const data = res.data.data;
+ this.page.total = data.total;
+ this.data = data.records;
+ this.loading = false;
+ this.selectionClear();
+ });
+ },
+ },
+};
</script>
<style>
- .none-border {
- border: 0;
- background-color: transparent !important;
- }
+.none-border {
+ border: 0;
+ background-color: transparent !important;
+}
</style>
diff --git a/src/views/flow/model.vue b/src/views/flow/model.vue
index 873892e..b2db987 100644
--- a/src/views/flow/model.vue
+++ b/src/views/flow/model.vue
@@ -1,75 +1,92 @@
<template>
- <basic-container>
- <avue-crud :option="option"
- :table-loading="loading"
- :data="data"
- ref="crud"
- v-model="form"
- :page.sync="page"
- @search-change="searchChange"
- @search-reset="searchReset"
- @selection-change="selectionChange"
- @current-change="currentChange"
- @size-change="sizeChange"
- @refresh-change="refreshChange"
- @on-load="onLoad">
+ <basic-container
+ :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
+ >
+ <avue-crud
+ :option="option"
+ :table-loading="loading"
+ :data="data"
+ ref="crud"
+ v-model="form"
+ :page.sync="page"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @selection-change="selectionChange"
+ @current-change="currentChange"
+ @size-change="sizeChange"
+ @refresh-change="refreshChange"
+ @on-load="onLoad"
+ >
<template slot="menuLeft">
- <el-button type="primary"
- size="small"
- icon="el-icon-circle-plus"
- v-if="permission.flow_model_create"
- plain
- @click="handleCreate">创 建
+ <el-button
+ type="primary"
+ size="small"
+ icon="el-icon-circle-plus"
+ v-if="permission.flow_model_create"
+ plain
+ @click="handleCreate"
+ >创 建
</el-button>
- <el-button type="danger"
- size="small"
- icon="el-icon-delete"
- v-if="permission.flow_model_delete"
- plain
- @click="handleDelete">删 除
+ <el-button
+ type="danger"
+ size="small"
+ icon="el-icon-delete"
+ v-if="permission.flow_model_delete"
+ plain
+ @click="handleDelete"
+ >删 除
</el-button>
</template>
<template slot-scope="scope" slot="menu">
- <el-button type="text"
- size="small"
- v-if="permission.flow_model_update"
- plain
- class="none-border"
- @click.stop="handleUpdate(scope.row,scope.index)">配置
+ <el-button
+ type="text"
+ size="small"
+ v-if="permission.flow_model_update"
+ plain
+ class="none-border"
+ @click.stop="handleUpdate(scope.row, scope.index)"
+ >配置
</el-button>
- <el-button type="text"
- size="small"
- v-if="permission.flow_model_deploy"
- plain
- class="none-border"
- @click.stop="handleDeploy(scope.row,scope.index)">部署
+ <el-button
+ type="text"
+ size="small"
+ v-if="permission.flow_model_deploy"
+ plain
+ class="none-border"
+ @click.stop="handleDeploy(scope.row, scope.index)"
+ >部署
</el-button>
- <el-button type="text"
- size="small"
- v-if="permission.flow_model_download"
- plain
- class="none-border"
- @click.stop="handleDownload(scope.row,scope.index)">下载
+ <el-button
+ type="text"
+ size="small"
+ v-if="permission.flow_model_download"
+ plain
+ class="none-border"
+ @click.stop="handleDownload(scope.row, scope.index)"
+ >下载
</el-button>
- <el-button type="text"
- size="small"
- v-if="permission.flow_model_delete"
- plain
- class="none-border"
- @click.stop="handleSlotDelete(scope.row,scope.index)">删除
+ <el-button
+ type="text"
+ size="small"
+ v-if="permission.flow_model_delete"
+ plain
+ class="none-border"
+ @click.stop="handleSlotDelete(scope.row, scope.index)"
+ >删除
</el-button>
</template>
- <template slot-scope="{row}"
- slot="version">
- <el-tag>v{{row.version}}</el-tag>
+ <template slot-scope="{ row }" slot="version">
+ <el-tag>v{{ row.version }}</el-tag>
</template>
</avue-crud>
- <el-dialog title="流程配置"
- append-to-body
- :visible.sync="flowBox"
- :fullscreen="true">
+ <el-dialog
+ title="流程配置"
+ append-to-body
+ :visible.sync="flowBox"
+ :fullscreen="true"
+ >
<iframe
- :src=flowUrl
+ :src="flowUrl"
width="100%"
height="700"
title="流程设计器"
@@ -78,325 +95,344 @@
marginWidth="0"
marginHeight="0"
scrolling="no"
- allowTransparency="yes">
+ allowTransparency="yes"
+ >
</iframe>
- <span slot="footer"
- class="dialog-footer">
+ <span slot="footer" class="dialog-footer">
<el-button @click="flowBox = false">取 消</el-button>
<el-button type="primary" @click="handleRefresh">确 定</el-button>
</span>
</el-dialog>
- <el-dialog title="流程部署"
- append-to-body
- :visible.sync="deployBox"
- width="20%">
- <avue-form ref="form" :option="optionDeploy" v-model="form" @submit="handleSubmit"/>
- <span slot="footer"
- class="dialog-footer">
+ <el-dialog
+ title="流程部署"
+ append-to-body
+ :visible.sync="deployBox"
+ width="20%"
+ >
+ <avue-form
+ ref="form"
+ :option="optionDeploy"
+ v-model="form"
+ @submit="handleSubmit"
+ />
+ <span slot="footer" class="dialog-footer">
<el-button @click="deployBox = false">取 消</el-button>
- <el-button type="primary" @click="handleDoDeploy" :loading="deployLoading">确 定</el-button>
+ <el-button
+ type="primary"
+ @click="handleDoDeploy"
+ :loading="deployLoading"
+ >确 定</el-button
+ >
</span>
</el-dialog>
</basic-container>
</template>
<script>
- import {mapGetters} from "vuex";
- import website from '@/config/website';
- import {modelList, removeModel, deployModel} from "@/api/flow/flow";
- import {flowCategory} from "@/util/flow";
+import { mapGetters } from "vuex";
+import website from "@/config/website";
+import { modelList, removeModel, deployModel } from "@/api/flow/flow";
+import { flowCategory } from "@/util/flow";
- export default {
- data() {
- return {
- form: {},
- optionDeploy: {
- menuBtn: false,
- column: [
- {
- label: "流程类型",
- type: "select",
- dicUrl: "/api/blade-system/dict/dictionary?code=flow",
- props: {
- label: "dictValue",
- value: "dictKey"
- },
- dataType: "number",
- slot: true,
- prop: "categoryValue",
- search: true,
- span: 24,
- rules: [{
+export default {
+ data() {
+ return {
+ form: {},
+ optionDeploy: {
+ menuBtn: false,
+ column: [
+ {
+ label: "流程类型",
+ type: "select",
+ dicUrl: "/api/blade-system/dict/dictionary?code=flow",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ dataType: "number",
+ slot: true,
+ prop: "categoryValue",
+ search: true,
+ span: 24,
+ rules: [
+ {
required: true,
message: "请选择流程类型",
- trigger: "blur"
- }]
- },
- {
- label: "流程模式",
- prop: "flowMode",
- type: "radio",
- dicData: [
- {
- label: "通用流程",
- value: 1
- },
- {
- label: "定制流程",
- value: 2
- }
- ],
- value: 1,
- span: 24,
- rules: [
- {
- required: true,
- message: '请选择流程模式',
- trigger: 'blur'
- }
- ],
- },
- {
- label: "所属保安单位",
- prop: "tenantId",
- type: "tree",
- multiple: true,
- dicUrl: "/api/blade-system/tenant/select",
- props: {
- label: "tenantName",
- value: "tenantId"
+ trigger: "blur",
},
- display: false,
- span: 24,
- rules: [
- {
- required: true,
- message: '请选择所属保安单位',
- trigger: 'blur'
- }
- ],
+ ],
+ },
+ {
+ label: "流程模式",
+ prop: "flowMode",
+ type: "radio",
+ dicData: [
+ {
+ label: "通用流程",
+ value: 1,
+ },
+ {
+ label: "定制流程",
+ value: 2,
+ },
+ ],
+ value: 1,
+ span: 24,
+ rules: [
+ {
+ required: true,
+ message: "请选择流程模式",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "所属保安单位",
+ prop: "tenantId",
+ type: "tree",
+ multiple: true,
+ dicUrl: "/api/blade-system/tenant/select",
+ props: {
+ label: "tenantName",
+ value: "tenantId",
},
- ],
- },
- selectionId: '',
- selectionList: [],
- query: {},
- loading: true,
- deployLoading: false,
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- deployBox: false,
- flowBox: false,
- flowUrl: '',
- option: {
- height: 'auto',
- calcHeight: 30,
- tip: false,
- searchShow: true,
- searchMenuSpan: 6,
- border: true,
- index: true,
- selection: true,
- editBtn: false,
- addBtn: false,
- viewBtn: false,
- delBtn: false,
- dialogWidth: 900,
- menuWidth: 150,
- dialogClickModal: false,
- column: [
- {
- label: '模型主键',
- prop: 'id',
- },
- {
- label: '模型标识',
- prop: 'modelKey',
- search: true,
- width: 150,
- },
- {
- label: '模型名称',
- prop: 'name',
- search: true,
- width: 150,
- },
- {
- label: '流程版本',
- prop: 'version',
- slot: true,
- width: 80,
- },
- {
- label: '创建时间',
- prop: 'created',
- width: 165,
- },
- {
- label: '更新时间',
- prop: 'lastUpdated',
- width: 165,
- },
- ]
- },
- data: []
- };
- },
- watch: {
- 'form.flowMode'() {
- this.$refs.form.option.column.filter(item => {
- if (item.prop === "tenantId") {
- item.display = this.form.flowMode === 2;
- }
- });
- }
- },
- computed: {
- ...mapGetters(["permission"]),
- ids() {
- let ids = [];
- this.selectionList.forEach(ele => {
- ids.push(ele.id);
- });
- return ids.join(",");
- }
- },
- methods: {
- handleSubmit(form, done) {
- this.deployLoading = true;
- deployModel({
- modelId: this.selectionId,
- category: flowCategory(form.categoryValue),
- tenantIds: form.tenantId.join(",")
- }).then(res => {
- const data = res.data;
- if (data.success) {
- this.$message({
- type: "success",
- message: data.msg
- });
- done();
- this.$refs.form.resetForm();
- this.deployBox = false;
- this.deployLoading = false;
- } else {
- done();
- this.deployLoading = false;
- this.$message({
- type: "warn",
- message: data.msg
- });
- }
- })
+ display: false,
+ span: 24,
+ rules: [
+ {
+ required: true,
+ message: "请选择所属保安单位",
+ trigger: "blur",
+ },
+ ],
+ },
+ ],
},
- searchReset() {
- this.query = {};
- this.onLoad(this.page);
+ selectionId: "",
+ selectionList: [],
+ query: {},
+ loading: true,
+ deployLoading: false,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ ...this.$store.state.control.changePageSize,
},
- searchChange(params, done) {
- this.query = params;
- this.page.currentPage = 1;
- this.onLoad(this.page, params);
- done();
+ deployBox: false,
+ flowBox: false,
+ flowUrl: "",
+ option: {
+ height: "auto",
+ calcHeight: 30,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ border: true,
+ index: true,
+ selection: true,
+ editBtn: false,
+ addBtn: false,
+ viewBtn: false,
+ delBtn: false,
+ dialogWidth: 900,
+ menuWidth: 150,
+ dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
+ column: [
+ {
+ label: "模型主键",
+ prop: "id",
+ },
+ {
+ label: "模型标识",
+ prop: "modelKey",
+ search: true,
+ width: 150,
+ },
+ {
+ label: "模型名称",
+ prop: "name",
+ search: true,
+ width: 150,
+ },
+ {
+ label: "流程版本",
+ prop: "version",
+ slot: true,
+ width: 80,
+ },
+ {
+ label: "创建时间",
+ prop: "created",
+ width: 165,
+ },
+ {
+ label: "更新时间",
+ prop: "lastUpdated",
+ width: 165,
+ },
+ ],
},
- selectionChange(list) {
- this.selectionList = list;
- },
- selectionClear() {
- this.selectionList = [];
- this.$refs.crud.toggleSelection();
- },
- handleDelete() {
- if (this.selectionList.length === 0) {
- this.$message.warning("请选择至少一条数据");
- return;
+ data: [],
+ };
+ },
+ watch: {
+ "form.flowMode"() {
+ this.$refs.form.option.column.filter((item) => {
+ if (item.prop === "tenantId") {
+ item.display = this.form.flowMode === 2;
}
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- return removeModel(this.ids);
- })
- .then(() => {
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.$refs.crud.toggleSelection();
- this.onLoad(this.page);
+ });
+ },
+ },
+ computed: {
+ ...mapGetters(["permission"]),
+ ids() {
+ let ids = [];
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id);
+ });
+ return ids.join(",");
+ },
+ },
+ methods: {
+ handleSubmit(form, done) {
+ this.deployLoading = true;
+ deployModel({
+ modelId: this.selectionId,
+ category: flowCategory(form.categoryValue),
+ tenantIds: form.tenantId.join(","),
+ }).then((res) => {
+ const data = res.data;
+ if (data.success) {
+ this.$message({
+ type: "success",
+ message: data.msg,
});
- },
- handleCreate() {
- this.flowUrl = `${website.flowDesignUrl}/index.html`;
- this.flowBox = true;
- },
- handleUpdate(row) {
- this.flowUrl = `${website.flowDesignUrl}/index.html#/editor/${row.id}`;
- this.flowBox = true;
- },
- handleDeploy(row) {
- this.deployBox = true;
- this.selectionId = row.id;
- },
- handleDoDeploy() {
- this.$refs.form.submit();
- },
- handleDownload(row) {
- window.open(`${website.flowDesignUrl}/app/rest/models/${row.id}/bpmn20`);
- },
- handleSlotDelete(row) {
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- return removeModel(row.id);
- })
- .then(() => {
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.$refs.crud.toggleSelection();
- this.onLoad(this.page);
+ done();
+ this.$refs.form.resetForm();
+ this.deployBox = false;
+ this.deployLoading = false;
+ } else {
+ done();
+ this.deployLoading = false;
+ this.$message({
+ type: "warn",
+ message: data.msg,
});
- },
- handleRefresh() {
- this.flowBox = false;
- this.onLoad(this.page);
- },
- currentChange(currentPage) {
- this.page.currentPage = currentPage;
- },
- sizeChange(pageSize) {
- this.page.pageSize = pageSize;
- },
- refreshChange() {
- this.onLoad(this.page, this.query);
- },
- onLoad(page, params = {}) {
- this.loading = true;
- modelList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
- const data = res.data.data;
- this.page.total = data.total;
- this.data = data.records;
- this.loading = false;
- this.selectionClear();
- });
+ }
+ });
+ },
+ searchReset() {
+ this.query = {};
+ this.onLoad(this.page);
+ },
+ searchChange(params, done) {
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
+ selectionChange(list) {
+ this.selectionList = list;
+ },
+ selectionClear() {
+ this.selectionList = [];
+ this.$refs.crud.toggleSelection();
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据");
+ return;
}
- }
- };
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return removeModel(this.ids);
+ })
+ .then(() => {
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ this.$refs.crud.toggleSelection();
+ this.onLoad(this.page);
+ });
+ },
+ handleCreate() {
+ this.flowUrl = `${website.flowDesignUrl}/index.html`;
+ this.flowBox = true;
+ },
+ handleUpdate(row) {
+ this.flowUrl = `${website.flowDesignUrl}/index.html#/editor/${row.id}`;
+ this.flowBox = true;
+ },
+ handleDeploy(row) {
+ this.deployBox = true;
+ this.selectionId = row.id;
+ },
+ handleDoDeploy() {
+ this.$refs.form.submit();
+ },
+ handleDownload(row) {
+ window.open(`${website.flowDesignUrl}/app/rest/models/${row.id}/bpmn20`);
+ },
+ handleSlotDelete(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return removeModel(row.id);
+ })
+ .then(() => {
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ this.$refs.crud.toggleSelection();
+ this.onLoad(this.page);
+ });
+ },
+ handleRefresh() {
+ this.flowBox = false;
+ this.onLoad(this.page);
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage;
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize;
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query);
+ },
+ onLoad(page, params = {}) {
+ this.loading = true;
+ modelList(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, this.query)
+ ).then((res) => {
+ const data = res.data.data;
+ this.page.total = data.total;
+ this.data = data.records;
+ this.loading = false;
+ this.selectionClear();
+ });
+ },
+ },
+};
</script>
<style>
- .none-border {
- border: 0;
- background-color: transparent !important;
- }
+.none-border {
+ border: 0;
+ background-color: transparent !important;
+}
</style>
diff --git a/src/views/licenseApproval/branchOffice.vue b/src/views/licenseApproval/branchOffice.vue
index 9b8f7a3..fde3670 100644
--- a/src/views/licenseApproval/branchOffice.vue
+++ b/src/views/licenseApproval/branchOffice.vue
@@ -2,13 +2,18 @@
* @Author: liu
* @Date: 2021-08-26 17:00:55
* @Last Modified by: liu
- * @Last Modified time: 2021-11-05 14:51:45
+ * @Last Modified time: 2021-11-23 14:41:23
*/
<template>
<div>
- <basic-container class="permit">
+ <basic-container
+ :class="[
+ 'permit',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option"
:table-loading="loading"
@@ -193,6 +198,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
selectionList: [],
option: {
@@ -214,6 +220,7 @@
selection: true,
dialogClickModal: false,
column: column,
+ ...this.$store.state.control.clearOtherBut,
},
data: [],
userData: "",
diff --git a/src/views/licenseApproval/cancellationOfFiling.vue b/src/views/licenseApproval/cancellationOfFiling.vue
index 5df956d..f6ada44 100644
--- a/src/views/licenseApproval/cancellationOfFiling.vue
+++ b/src/views/licenseApproval/cancellationOfFiling.vue
@@ -8,7 +8,12 @@
<template>
<div>
- <basic-container class="permit">
+ <basic-container
+ :class="[
+ 'permit',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option"
:table-loading="loading"
@@ -132,6 +137,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
selectionList: [],
option: {
@@ -153,6 +159,7 @@
selection: true,
dialogClickModal: false,
column: column,
+ ...this.$store.state.control.clearOtherBut,
},
data: [],
userData: "",
diff --git a/src/views/licenseApproval/crossRegion.vue b/src/views/licenseApproval/crossRegion.vue
index c0dc50e..d6526b9 100644
--- a/src/views/licenseApproval/crossRegion.vue
+++ b/src/views/licenseApproval/crossRegion.vue
@@ -8,7 +8,12 @@
<template>
<div>
- <basic-container class="permit">
+ <basic-container
+ :class="[
+ 'permit',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option"
:table-loading="loading"
@@ -191,6 +196,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
selectionList: [],
option: {
@@ -212,6 +218,7 @@
selection: true,
dialogClickModal: false,
column: column,
+ ...this.$store.state.control.clearOtherBut,
},
data: [],
userData: "",
diff --git a/src/views/licenseApproval/securityGuard.vue b/src/views/licenseApproval/securityGuard.vue
index 4ac5b13..969c0a4 100644
--- a/src/views/licenseApproval/securityGuard.vue
+++ b/src/views/licenseApproval/securityGuard.vue
@@ -8,7 +8,12 @@
<template>
<div>
- <basic-container class="permit">
+ <basic-container
+ :class="[
+ 'permit',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option"
:table-loading="loading"
@@ -280,6 +285,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
selectionList: [],
option: {
@@ -301,6 +307,7 @@
selection: true,
dialogClickModal: false,
column: column,
+ ...this.$store.state.control.clearOtherBut,
},
data: [],
diff --git a/src/views/licenseApproval/securityPermit.vue b/src/views/licenseApproval/securityPermit.vue
index 859f63c..dbdfe67 100644
--- a/src/views/licenseApproval/securityPermit.vue
+++ b/src/views/licenseApproval/securityPermit.vue
@@ -8,7 +8,12 @@
<template>
<div>
- <basic-container class="permit">
+ <basic-container
+ :class="[
+ 'permit',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option"
:table-loading="loading"
@@ -244,6 +249,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
selectionList: [],
option: {
@@ -265,6 +271,7 @@
selection: true,
dialogClickModal: false,
column: column,
+ ...this.$store.state.control.clearOtherBut,
},
data: [],
diff --git a/src/views/licenseApproval/securityTraining.vue b/src/views/licenseApproval/securityTraining.vue
index 19a6be2..646a2ff 100644
--- a/src/views/licenseApproval/securityTraining.vue
+++ b/src/views/licenseApproval/securityTraining.vue
@@ -8,7 +8,12 @@
<template>
<div>
- <basic-container class="permit">
+ <basic-container
+ :class="[
+ 'permit',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option"
:table-loading="loading"
@@ -244,6 +249,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
selectionList: [],
option: {
@@ -265,6 +271,7 @@
selection: true,
dialogClickModal: false,
column: column,
+ ...this.$store.state.control.clearOtherBut,
},
data: [],
userData: "",
diff --git a/src/views/map/carGps.vue b/src/views/map/carGps.vue
index cbbdca2..e3aadb4 100644
--- a/src/views/map/carGps.vue
+++ b/src/views/map/carGps.vue
@@ -158,6 +158,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
detailFlag: false,
loading: true,
diff --git a/src/views/map/gunGps.vue b/src/views/map/gunGps.vue
index 2d43106..4662d31 100644
--- a/src/views/map/gunGps.vue
+++ b/src/views/map/gunGps.vue
@@ -153,6 +153,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
detailFlag: false,
loading: true,
diff --git a/src/views/map/peopleGps.vue b/src/views/map/peopleGps.vue
index 819719c..0e38055 100644
--- a/src/views/map/peopleGps.vue
+++ b/src/views/map/peopleGps.vue
@@ -150,6 +150,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
detailFlag: false,
loading: true,
diff --git a/src/views/monitor/log/api.vue b/src/views/monitor/log/api.vue
index bef4765..adb6e3a 100644
--- a/src/views/monitor/log/api.vue
+++ b/src/views/monitor/log/api.vue
@@ -1,160 +1,169 @@
<template>
- <basic-container>
- <avue-crud :option="option"
- :table-loading="loading"
- :data="data"
- ref="crud"
- v-model="form"
- :permission="permissionList"
- :before-open="beforeOpen"
- :page.sync="page"
- @search-change="searchChange"
- @search-reset="searchReset"
- @current-change="currentChange"
- @size-change="sizeChange"
- @refresh-change="refreshChange"
- @on-load="onLoad">
+ <basic-container
+ :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
+ >
+ <avue-crud
+ :option="option"
+ :table-loading="loading"
+ :data="data"
+ ref="crud"
+ v-model="form"
+ :permission="permissionList"
+ :before-open="beforeOpen"
+ :page.sync="page"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @current-change="currentChange"
+ @size-change="sizeChange"
+ @refresh-change="refreshChange"
+ @on-load="onLoad"
+ >
</avue-crud>
</basic-container>
</template>
<script>
- import {getApiList, getApiLogs} from "@/api/logs";
- import {mapGetters} from "vuex";
+import { getApiList, getApiLogs } from "@/api/logs";
+import { mapGetters } from "vuex";
- export default {
- data() {
+export default {
+ data() {
+ return {
+ form: {},
+ selectionList: [],
+ query: {},
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ ...this.$store.state.control.changePageSize,
+ },
+ option: {
+ height: "auto",
+ calcHeight: 30,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ border: true,
+ index: true,
+ viewBtn: true,
+ editBtn: false,
+ addBtn: false,
+ delBtn: false,
+ menuWidth: 120,
+ dialogType: "drawer",
+ column: [
+ {
+ label: "服务id",
+ prop: "serviceId",
+ width: "120",
+ search: true,
+ },
+ {
+ label: "服务host",
+ prop: "serverHost",
+ search: true,
+ },
+ {
+ label: "服务ip",
+ prop: "serverIp",
+ width: "160",
+ },
+ {
+ label: "软件环境",
+ prop: "env",
+ width: "80",
+ },
+ {
+ label: "日志名",
+ prop: "title",
+ },
+ {
+ label: "请求方法",
+ prop: "method",
+ width: "80",
+ },
+ {
+ label: "请求接口",
+ prop: "requestUri",
+ },
+ {
+ label: "日志时间",
+ prop: "createTime",
+ width: "180",
+ },
+ {
+ label: "用户代理",
+ prop: "userAgent",
+ span: 24,
+ hide: true,
+ },
+ {
+ label: "请求数据",
+ prop: "params",
+ type: "textarea",
+ span: 24,
+ minRows: 2,
+ hide: true,
+ },
+ ],
+ },
+ data: [],
+ };
+ },
+
+ computed: {
+ ...mapGetters(["permission"]),
+ permissionList() {
return {
- form: {},
- selectionList: [],
- query: {},
- loading: true,
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- option: {
- height: 'auto',
- calcHeight: 30,
- tip: false,
- searchShow: true,
- searchMenuSpan: 6,
- border: true,
- index: true,
- viewBtn: true,
- editBtn: false,
- addBtn: false,
- delBtn: false,
- menuWidth: 120,
- dialogType: 'drawer',
- column: [
- {
- label: "服务id",
- prop: "serviceId",
- width:'120',
- search: true
- },
- {
- label: "服务host",
- prop: "serverHost",
- search: true
- },
- {
- label: "服务ip",
- prop: "serverIp",
- width:'160'
- },
- {
- label: "软件环境",
- prop: "env",
- width:'80',
- },
- {
- label: "日志名",
- prop: "title"
- },
- {
- label: "请求方法",
- prop: "method",
- width:'80'
- },
- {
- label: "请求接口",
- prop: "requestUri"
- },
- {
- label: "日志时间",
- prop: "createTime",
- width:'180'
- },
- {
- label: "用户代理",
- prop: "userAgent",
- span: 24,
- hide: true
- },
- {
- label: "请求数据",
- prop: "params",
- type: "textarea",
- span: 24,
- minRows: 2,
- hide: true
- }
- ]
- },
- data: []
+ viewBtn: this.vaildData(this.permission.log_api_view, false),
};
},
-
- computed: {
- ...mapGetters(["permission"]),
- permissionList() {
- return {
- viewBtn: this.vaildData(this.permission.log_api_view, false)
- };
- }
+ },
+ methods: {
+ searchReset() {
+ this.query = {};
+ this.onLoad(this.page);
},
- methods: {
- searchReset() {
- this.query = {};
- this.onLoad(this.page);
- },
- searchChange(params, done) {
- this.query = params;
- this.page.currentPage = 1;
- this.onLoad(this.page, params);
- done();
- },
- beforeOpen(done, type) {
- if (["edit", "view"].includes(type)) {
- getApiLogs(this.form.id).then(res => {
- this.form = res.data.data;
- });
- }
- done();
- },
- currentChange(currentPage){
- this.page.currentPage = currentPage;
- },
- sizeChange(pageSize){
- this.page.pageSize = pageSize;
- },
- refreshChange() {
- this.onLoad(this.page, this.query);
- },
- onLoad(page, params = {}) {
- this.loading = true;
- getApiList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
- const data = res.data.data;
- this.page.total = data.total;
- this.data = data.records;
- this.loading = false;
+ searchChange(params, done) {
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ getApiLogs(this.form.id).then((res) => {
+ this.form = res.data.data;
});
}
- }
- };
+ done();
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage;
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize;
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query);
+ },
+ onLoad(page, params = {}) {
+ this.loading = true;
+ getApiList(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, this.query)
+ ).then((res) => {
+ const data = res.data.data;
+ this.page.total = data.total;
+ this.data = data.records;
+ this.loading = false;
+ });
+ },
+ },
+};
</script>
<style>
diff --git a/src/views/monitor/log/error.vue b/src/views/monitor/log/error.vue
index 3196839..4e8f9b0 100644
--- a/src/views/monitor/log/error.vue
+++ b/src/views/monitor/log/error.vue
@@ -1,164 +1,173 @@
<template>
- <basic-container>
- <avue-crud :option="option"
- :table-loading="loading"
- :data="data"
- ref="crud"
- :before-open="beforeOpen"
- v-model="form"
- :permission="permissionList"
- :page.sync="page"
- @search-change="searchChange"
- @search-reset="searchReset"
- @current-change="currentChange"
- @size-change="sizeChange"
- @refresh-change="refreshChange"
- @on-load="onLoad">
+ <basic-container
+ :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
+ >
+ <avue-crud
+ :option="option"
+ :table-loading="loading"
+ :data="data"
+ ref="crud"
+ :before-open="beforeOpen"
+ v-model="form"
+ :permission="permissionList"
+ :page.sync="page"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @current-change="currentChange"
+ @size-change="sizeChange"
+ @refresh-change="refreshChange"
+ @on-load="onLoad"
+ >
</avue-crud>
</basic-container>
</template>
<script>
- import {getErrorList, getErrorLogs} from "@/api/logs";
- import {mapGetters} from "vuex";
+import { getErrorList, getErrorLogs } from "@/api/logs";
+import { mapGetters } from "vuex";
- export default {
- data() {
+export default {
+ data() {
+ return {
+ form: {},
+ selectionList: [],
+ query: {},
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ ...this.$store.state.control.changePageSize,
+ },
+ option: {
+ height: "auto",
+ calcHeight: 30,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ border: true,
+ index: true,
+ viewBtn: true,
+ editBtn: false,
+ addBtn: false,
+ delBtn: false,
+ menuWidth: 120,
+ dialogType: "drawer",
+ column: [
+ {
+ label: "服务id",
+ prop: "serviceId",
+ search: true,
+ width: "120",
+ },
+ {
+ label: "服务host",
+ prop: "serverHost",
+ search: true,
+ width: "150",
+ },
+ {
+ label: "服务ip",
+ prop: "serverIp",
+ width: "160",
+ },
+ {
+ label: "软件环境",
+ prop: "env",
+ width: "80",
+ },
+ {
+ label: "请求方法",
+ prop: "method",
+ width: "80",
+ },
+ {
+ label: "请求接口",
+ prop: "requestUri",
+ },
+ {
+ label: "日志时间",
+ prop: "createTime",
+ width: "180",
+ },
+ {
+ label: "用户代理",
+ prop: "userAgent",
+ span: 24,
+ hide: true,
+ },
+ {
+ label: "请求数据",
+ prop: "params",
+ type: "textarea",
+ span: 24,
+ minRows: 2,
+ hide: true,
+ },
+ {
+ label: "日志数据",
+ prop: "stackTrace",
+ type: "textarea",
+ span: 24,
+ minRows: 16,
+ hide: true,
+ },
+ ],
+ },
+ data: [],
+ };
+ },
+ computed: {
+ ...mapGetters(["permission"]),
+ permissionList() {
return {
- form: {},
- selectionList: [],
- query: {},
- loading: true,
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- option: {
- height: 'auto',
- calcHeight: 30,
- tip: false,
- searchShow: true,
- searchMenuSpan: 6,
- border: true,
- index: true,
- viewBtn: true,
- editBtn: false,
- addBtn: false,
- delBtn: false,
- menuWidth: 120,
- dialogType: 'drawer',
- column: [
- {
- label: "服务id",
- prop: "serviceId",
- search: true,
- width:'120'
- },
- {
- label: "服务host",
- prop: "serverHost",
- search: true,
- width:'150'
- },
- {
- label: "服务ip",
- prop: "serverIp",
- width:'160'
- },
- {
- label: "软件环境",
- prop: "env",
- width:'80'
- },
- {
- label: "请求方法",
- prop: "method",
- width:'80'
- },
- {
- label: "请求接口",
- prop: "requestUri"
- },
- {
- label: "日志时间",
- prop: "createTime",
- width:'180'
- },
- {
- label: "用户代理",
- prop: "userAgent",
- span: 24,
- hide: true
- },
- {
- label: "请求数据",
- prop: "params",
- type: "textarea",
- span: 24,
- minRows: 2,
- hide: true
- },
- {
- label: "日志数据",
- prop: "stackTrace",
- type: "textarea",
- span: 24,
- minRows: 16,
- hide: true
- }
- ]
- },
- data: []
+ viewBtn: this.vaildData(this.permission.log_error_view, false),
};
},
- computed: {
- ...mapGetters(["permission"]),
- permissionList() {
- return {
- viewBtn: this.vaildData(this.permission.log_error_view, false)
- };
- }
+ },
+ methods: {
+ searchReset() {
+ this.query = {};
+ this.onLoad(this.page);
},
- methods: {
- searchReset() {
- this.query = {};
- this.onLoad(this.page);
- },
- searchChange(params, done) {
- this.query = params;
- this.page.currentPage = 1;
- this.onLoad(this.page, params);
- done();
- },
- beforeOpen(done, type) {
- if (["edit", "view"].includes(type)) {
- getErrorLogs(this.form.id).then(res => {
- this.form = res.data.data;
- });
- }
- done();
- },
- currentChange(currentPage){
- this.page.currentPage = currentPage;
- },
- sizeChange(pageSize){
- this.page.pageSize = pageSize;
- },
- refreshChange() {
- this.onLoad(this.page, this.query);
- },
- onLoad(page, params = {}) {
- this.loading = true;
- getErrorList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
- const data = res.data.data;
- this.page.total = data.total;
- this.data = data.records;
- this.loading = false;
+ searchChange(params, done) {
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ getErrorLogs(this.form.id).then((res) => {
+ this.form = res.data.data;
});
}
- }
- };
+ done();
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage;
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize;
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query);
+ },
+ onLoad(page, params = {}) {
+ this.loading = true;
+ getErrorList(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, this.query)
+ ).then((res) => {
+ const data = res.data.data;
+ this.page.total = data.total;
+ this.data = data.records;
+ this.loading = false;
+ });
+ },
+ },
+};
</script>
<style>
diff --git a/src/views/monitor/log/usual.vue b/src/views/monitor/log/usual.vue
index 329f77b..5480e80 100644
--- a/src/views/monitor/log/usual.vue
+++ b/src/views/monitor/log/usual.vue
@@ -1,164 +1,173 @@
<template>
- <basic-container>
- <avue-crud :option="option"
- :table-loading="loading"
- :data="data"
- ref="crud"
- v-model="form"
- :permission="permissionList"
- :page.sync="page"
- :before-open="beforeOpen"
- @search-change="searchChange"
- @search-reset="searchReset"
- @current-change="currentChange"
- @size-change="sizeChange"
- @refresh-change="refreshChange"
- @on-load="onLoad">
+ <basic-container
+ :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
+ >
+ <avue-crud
+ :option="option"
+ :table-loading="loading"
+ :data="data"
+ ref="crud"
+ v-model="form"
+ :permission="permissionList"
+ :page.sync="page"
+ :before-open="beforeOpen"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @current-change="currentChange"
+ @size-change="sizeChange"
+ @refresh-change="refreshChange"
+ @on-load="onLoad"
+ >
</avue-crud>
</basic-container>
</template>
<script>
- import {getUsualList, getUsualLogs} from "@/api/logs";
- import {mapGetters} from "vuex";
+import { getUsualList, getUsualLogs } from "@/api/logs";
+import { mapGetters } from "vuex";
- export default {
- data() {
+export default {
+ data() {
+ return {
+ form: {},
+ selectionList: [],
+ query: {},
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ ...this.$store.state.control.changePageSize,
+ },
+ option: {
+ height: "auto",
+ calcHeight: 30,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ border: true,
+ index: true,
+ viewBtn: true,
+ editBtn: false,
+ addBtn: false,
+ delBtn: false,
+ menuWidth: 120,
+ dialogType: "drawer",
+ column: [
+ {
+ label: "服务id",
+ prop: "serviceId",
+ search: true,
+ },
+ {
+ label: "服务host",
+ prop: "serverHost",
+ search: true,
+ },
+ {
+ label: "服务ip",
+ prop: "serverIp",
+ },
+ {
+ label: "软件环境",
+ prop: "env",
+ width: "80",
+ },
+ {
+ label: "日志级别",
+ prop: "logLevel",
+ },
+ {
+ label: "日志id",
+ prop: "logId",
+ },
+ {
+ label: "请求接口",
+ prop: "requestUri",
+ },
+ {
+ label: "日志时间",
+ prop: "createTime",
+ width: "180",
+ },
+ {
+ label: "用户代理",
+ prop: "userAgent",
+ span: 24,
+ hide: true,
+ },
+ {
+ label: "日志数据",
+ prop: "logData",
+ type: "textarea",
+ span: 24,
+ minRows: 2,
+ hide: true,
+ },
+ {
+ label: "请求数据",
+ prop: "params",
+ type: "textarea",
+ span: 24,
+ minRows: 2,
+ hide: true,
+ },
+ ],
+ },
+ data: [],
+ };
+ },
+ computed: {
+ ...mapGetters(["permission"]),
+ permissionList() {
return {
- form: {},
- selectionList: [],
- query: {},
- loading: true,
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- option: {
- height: 'auto',
- calcHeight: 30,
- tip: false,
- searchShow: true,
- searchMenuSpan: 6,
- border: true,
- index: true,
- viewBtn: true,
- editBtn: false,
- addBtn: false,
- delBtn: false,
- menuWidth: 120,
- dialogType: 'drawer',
- column: [
- {
- label: "服务id",
- prop: "serviceId",
- search: true
- },
- {
- label: "服务host",
- prop: "serverHost",
- search: true
- },
- {
- label: "服务ip",
- prop: "serverIp"
- },
- {
- label: "软件环境",
- prop: "env",
- width:'80'
- },
- {
- label: "日志级别",
- prop: "logLevel"
- },
- {
- label: "日志id",
- prop: "logId"
- },
- {
- label: "请求接口",
- prop: "requestUri"
- },
- {
- label: "日志时间",
- prop: "createTime",
- width:'180'
- },
- {
- label: "用户代理",
- prop: "userAgent",
- span: 24,
- hide: true
- },
- {
- label: "日志数据",
- prop: "logData",
- type: "textarea",
- span: 24,
- minRows: 2,
- hide: true
- },
- {
- label: "请求数据",
- prop: "params",
- type: "textarea",
- span: 24,
- minRows: 2,
- hide: true
- }
- ]
- },
- data: []
+ viewBtn: this.vaildData(this.permission.log_usual_view, false),
};
},
- computed: {
- ...mapGetters(["permission"]),
- permissionList() {
- return {
- viewBtn: this.vaildData(this.permission.log_usual_view, false)
- };
- }
+ },
+ methods: {
+ searchReset() {
+ this.query = {};
+ this.onLoad(this.page);
},
- methods: {
- searchReset() {
- this.query = {};
- this.onLoad(this.page);
- },
- searchChange(params, done) {
- this.query = params;
- this.page.currentPage = 1;
- this.onLoad(this.page, params);
- done();
- },
- beforeOpen(done, type) {
- if (["edit", "view"].includes(type)) {
- getUsualLogs(this.form.id).then(res => {
- this.form = res.data.data;
- });
- }
- done();
- },
- currentChange(currentPage){
- this.page.currentPage = currentPage;
- },
- sizeChange(pageSize){
- this.page.pageSize = pageSize;
- },
- refreshChange() {
- this.onLoad(this.page, this.query);
- },
- onLoad(page, params = {}) {
- this.loading = true;
- getUsualList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
- const data = res.data.data;
- this.page.total = data.total;
- this.data = data.records;
- this.loading = false;
+ searchChange(params, done) {
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ getUsualLogs(this.form.id).then((res) => {
+ this.form = res.data.data;
});
}
- }
- };
+ done();
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage;
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize;
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query);
+ },
+ onLoad(page, params = {}) {
+ this.loading = true;
+ getUsualList(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, this.query)
+ ).then((res) => {
+ const data = res.data.data;
+ this.page.total = data.total;
+ this.data = data.records;
+ this.loading = false;
+ });
+ },
+ },
+};
</script>
<style>
diff --git a/src/views/onSiteInspection/company.vue b/src/views/onSiteInspection/company.vue
index 5261db3..6f1cb9b 100644
--- a/src/views/onSiteInspection/company.vue
+++ b/src/views/onSiteInspection/company.vue
@@ -46,6 +46,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
query: {},
data: [],
diff --git a/src/views/onSiteInspection/securityStaff.vue b/src/views/onSiteInspection/securityStaff.vue
index 24646fb..927f69c 100644
--- a/src/views/onSiteInspection/securityStaff.vue
+++ b/src/views/onSiteInspection/securityStaff.vue
@@ -46,6 +46,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
query: {},
data: [],
diff --git a/src/views/ownerFeedback/owner.vue b/src/views/ownerFeedback/owner.vue
index bec813e..801e095 100644
--- a/src/views/ownerFeedback/owner.vue
+++ b/src/views/ownerFeedback/owner.vue
@@ -1,286 +1,310 @@
<template>
- <basic-container>
- <avue-crud :option="option"
- :table-loading="loading"
- :data="data"
- :page.sync="page"
- ref="crud"
- @row-del="rowDel"
- v-model="form"
- :permission="permissionList"
- @row-update="rowUpdate"
- @row-save="rowSave"
- :before-open="beforeOpen"
- @search-change="searchChange"
- @search-reset="searchReset"
- @selection-change="selectionChange"
- @current-change="currentChange"
- @size-change="sizeChange"
- @refresh-change="refreshChange"
- @on-load="onLoad">
+ <basic-container
+ :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
+ >
+ <avue-crud
+ :option="option"
+ :table-loading="loading"
+ :data="data"
+ :page.sync="page"
+ ref="crud"
+ @row-del="rowDel"
+ v-model="form"
+ :permission="permissionList"
+ @row-update="rowUpdate"
+ @row-save="rowSave"
+ :before-open="beforeOpen"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @selection-change="selectionChange"
+ @current-change="currentChange"
+ @size-change="sizeChange"
+ @refresh-change="refreshChange"
+ @on-load="onLoad"
+ >
<template slot="menuLeft">
- <el-button type="danger"
- size="small"
- icon="el-icon-delete"
- plain
- v-if="permission.owner_delete"
- @click="handleDelete">删 除
+ <el-button
+ type="danger"
+ size="small"
+ icon="el-icon-delete"
+ plain
+ v-if="permission.owner_delete"
+ @click="handleDelete"
+ >删 除
</el-button>
</template>
- <template slot-scope="{row}"
- slot="category">
- <el-tag>{{row.categoryName}}</el-tag>
+ <template slot-scope="{ row }" slot="category">
+ <el-tag>{{ row.categoryName }}</el-tag>
</template>
</avue-crud>
</basic-container>
</template>
<script>
- import {getList, remove, update, add, getNotice} from "@/api/owner/owner";
- import {mapGetters} from "vuex";
+import { getList, remove, update, add, getNotice } from "@/api/owner/owner";
+import { mapGetters } from "vuex";
- export default {
- data() {
- return {
- form: {},
- query: {},
- loading: true,
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- selectionList: [],
- option: {
- height: 'auto',
- calcHeight: 54,
- dialogWidth: 950,
- tip: false,
- searchShow: true,
- labelWidth: 120,
- searchMenuSpan: 6,
- border: true,
- index: true,
- viewBtn: true,
- selection: true,
- excelBtn: true,
- dialogClickModal: false,
- column: [
- {
- label: "服务单位",
- prop: "company",
- search: true,
- rules: [{
+export default {
+ data() {
+ return {
+ form: {},
+ query: {},
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ ...this.$store.state.control.changePageSize,
+ },
+ selectionList: [],
+ option: {
+ height: "auto",
+ calcHeight: 54,
+ dialogWidth: 950,
+ tip: false,
+ searchShow: true,
+ labelWidth: 120,
+ searchMenuSpan: 6,
+ border: true,
+ index: true,
+ viewBtn: true,
+ selection: true,
+ excelBtn: true,
+ dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
+ column: [
+ {
+ label: "服务单位",
+ prop: "company",
+ search: true,
+ rules: [
+ {
required: true,
message: "请输入服务单位",
- trigger: "blur"
- }]
- },
- {
- label: "联系方式",
- prop: "companyContact",
- },
- {
- label: "反馈时间",
- prop: "releaseTimeRange",
- type: "datetime",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- searchRange: true,
- hide: true,
- addDisplay: false,
- editDisplay: false,
- viewDisplay: false,
- search: true,
- rules: [
- {
- required: true,
- message: "请输入通知时间",
- trigger: "blur",
- },
- ],
- },
- {
- label: "反馈时间",
- prop: "feedbackTime",
- type: "date",
- format: "yyyy-MM-dd hh:mm:ss",
- valueFormat: "yyyy-MM-dd hh:mm:ss",
- rules: [{
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "联系方式",
+ prop: "companyContact",
+ },
+ {
+ label: "反馈时间",
+ prop: "releaseTimeRange",
+ type: "datetime",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ searchRange: true,
+ hide: true,
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ search: true,
+ rules: [
+ {
+ required: true,
+ message: "请输入通知时间",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "反馈时间",
+ prop: "feedbackTime",
+ type: "date",
+ format: "yyyy-MM-dd hh:mm:ss",
+ valueFormat: "yyyy-MM-dd hh:mm:ss",
+ rules: [
+ {
required: true,
message: "请输入反馈时间",
- trigger: "click"
- }]
- }, {
- label: "反馈意见",
- prop: "opinion",
- }, {
- label: "业主",
- prop: "owner",
- search: true,
- rules: [{
+ trigger: "click",
+ },
+ ],
+ },
+ {
+ label: "反馈意见",
+ prop: "opinion",
+ },
+ {
+ label: "业主",
+ prop: "owner",
+ search: true,
+ rules: [
+ {
required: true,
message: "请输入反馈时间",
- trigger: "click"
- }]
- }, {
- label: "业主联系方式",
- prop: "ownerContact",
- }, {
- label: "备注",
- prop: "remarks",
- }, {
- label: "处置结果",
- prop: "result",
- }
- ]
- },
- data: []
+ trigger: "click",
+ },
+ ],
+ },
+ {
+ label: "业主联系方式",
+ prop: "ownerContact",
+ },
+ {
+ label: "备注",
+ prop: "remarks",
+ },
+ {
+ label: "处置结果",
+ prop: "result",
+ },
+ ],
+ },
+ data: [],
+ };
+ },
+ computed: {
+ ...mapGetters(["permission"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.owner_add, false),
+ viewBtn: this.vaildData(this.permission.owner_view, false),
+ delBtn: this.vaildData(this.permission.owner_delete, false),
+ editBtn: this.vaildData(this.permission.owner_edit, false),
};
},
- computed: {
- ...mapGetters(["permission"]),
- permissionList() {
- return {
- addBtn: this.vaildData(this.permission.owner_add, false),
- viewBtn: this.vaildData(this.permission.owner_view, false),
- delBtn: this.vaildData(this.permission.owner_delete, false),
- editBtn: this.vaildData(this.permission.owner_edit, false)
- };
- },
- ids() {
- let ids = [];
- this.selectionList.forEach(ele => {
- ids.push(ele.id);
- });
- return ids.join(",");
- }
+ ids() {
+ let ids = [];
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id);
+ });
+ return ids.join(",");
},
- methods: {
- rowSave(row, done, loading) {
- add(row).then(() => {
+ },
+ methods: {
+ rowSave(row, done, loading) {
+ add(row).then(
+ () => {
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!"
+ message: "操作成功!",
});
done();
- }, error => {
+ },
+ (error) => {
window.console.log(error);
loading();
- });
- },
- rowUpdate(row, index, done, loading) {
- update(row).then(() => {
+ }
+ );
+ },
+ rowUpdate(row, index, done, loading) {
+ update(row).then(
+ () => {
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!"
+ message: "操作成功!",
});
done();
- }, error => {
+ },
+ (error) => {
window.console.log(error);
loading();
+ }
+ );
+ },
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(row.id);
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
});
- },
- rowDel(row) {
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
+ },
+ searchReset() {
+ this.query = {};
+ this.onLoad(this.page);
+ },
+ searchChange(params, done) {
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
+ selectionChange(list) {
+ this.selectionList = list;
+ },
+ selectionClear() {
+ this.selectionList = [];
+ this.$refs.crud.toggleSelection();
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据");
+ return;
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(this.ids);
})
- .then(() => {
- return remove(row.id);
- })
- .then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!"
- });
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
});
- },
- searchReset() {
- this.query = {};
- this.onLoad(this.page);
- },
- searchChange(params, done) {
- this.query = params;
- this.page.currentPage = 1;
- this.onLoad(this.page, params);
- done();
- },
- selectionChange(list) {
- this.selectionList = list;
- },
- selectionClear() {
- this.selectionList = [];
- this.$refs.crud.toggleSelection();
- },
- handleDelete() {
- if (this.selectionList.length === 0) {
- this.$message.warning("请选择至少一条数据");
- return;
- }
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- return remove(this.ids);
- })
- .then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.$refs.crud.toggleSelection();
- });
- },
- beforeOpen(done, type) {
- if (["edit", "view"].includes(type)) {
- getNotice(this.form.id).then(res => {
- this.form = res.data.data;
- });
- }
- done();
- },
- currentChange(currentPage) {
- this.page.currentPage = currentPage;
- },
- sizeChange(pageSize) {
- this.page.pageSize = pageSize;
- },
- refreshChange() {
- this.onLoad(this.page, this.query);
- },
- onLoad(page, params = {}) {
- const {releaseTimeRange} = this.query;
- let values = {
- ...params,
- };
- if (releaseTimeRange) {
- values = {
- ...params,
- startTime: releaseTimeRange[0],
- endTime: releaseTimeRange[1],
- ...this.query
- };
- values.releaseTimeRange = null;
- }
- this.loading = true;
- getList(page.currentPage, page.pageSize, values).then(res => {
- const data = res.data.data;
- this.page.total = data.total;
- this.data = data.records;
- this.loading = false;
- this.selectionClear();
+ this.$refs.crud.toggleSelection();
+ });
+ },
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ getNotice(this.form.id).then((res) => {
+ this.form = res.data.data;
});
}
- }
- };
+ done();
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage;
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize;
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query);
+ },
+ onLoad(page, params = {}) {
+ const { releaseTimeRange } = this.query;
+ let values = {
+ ...params,
+ };
+ if (releaseTimeRange) {
+ values = {
+ ...params,
+ startTime: releaseTimeRange[0],
+ endTime: releaseTimeRange[1],
+ ...this.query,
+ };
+ values.releaseTimeRange = null;
+ }
+ this.loading = true;
+ getList(page.currentPage, page.pageSize, values).then((res) => {
+ const data = res.data.data;
+ this.page.total = data.total;
+ this.data = data.records;
+ this.loading = false;
+ this.selectionClear();
+ });
+ },
+ },
+};
</script>
<style>
diff --git a/src/views/people/data.js b/src/views/people/data.js
index eb76ef3..4445de2 100644
--- a/src/views/people/data.js
+++ b/src/views/people/data.js
@@ -10,7 +10,7 @@
}
},
{
- label: "所属保安公司",
+ label: "企业名称",
prop: "deptName",
disabled: true,
span: 24,
@@ -313,7 +313,7 @@
editDisplay: false,
addDisplay: false
}, {
- label: '单位名称',
+ label: '企业名称',
prop: "companyname",
formslot: true,
}, {
@@ -350,7 +350,7 @@
export var practitionersColumns = [{
width: 200,
- label: '单位名称',
+ label: '企业名称',
prop: "companyname",
formslot: true,
}, {
@@ -468,7 +468,7 @@
display: false
},
{
- label: "所属保安公司",
+ label: "企业名称",
searchLabelWidth: "110",
// prop: "deptName",
prop: "deptId",
diff --git a/src/views/people/expression.vue b/src/views/people/expression.vue
index fc586f5..dcc9738 100644
--- a/src/views/people/expression.vue
+++ b/src/views/people/expression.vue
@@ -5,7 +5,12 @@
<template>
- <basic-container class="dispatchChildoperable">
+ <basic-container
+ :class="[
+ 'dispatchChildoperable',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option1"
:data="data1"
@@ -46,6 +51,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
query1: {},
data1: [],
@@ -65,6 +71,7 @@
headerAlign: "center",
align: "center",
column: trackRecordColumn,
+ ...this.$store.state.control.clearOtherBut,
},
};
},
diff --git a/src/views/people/job.vue b/src/views/people/job.vue
index 4b84cee..54419c6 100644
--- a/src/views/people/job.vue
+++ b/src/views/people/job.vue
@@ -5,7 +5,12 @@
<template>
- <basic-container class="dispatchChildoperable">
+ <basic-container
+ :class="[
+ 'dispatchChildoperable',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option1"
:data="data1"
@@ -52,6 +57,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
query1: {},
data1: [],
@@ -71,6 +77,7 @@
headerAlign: "center",
align: "center",
column: practitionersColumn,
+ ...this.$store.state.control.clearOtherBut,
},
};
},
diff --git a/src/views/recruitmentManagement/index.vue b/src/views/recruitmentManagement/index.vue
index 3c182c0..e2ecf79 100644
--- a/src/views/recruitmentManagement/index.vue
+++ b/src/views/recruitmentManagement/index.vue
@@ -1,6 +1,11 @@
<template>
<basic-container>
- <div class="recruitmentManagement">
+ <div
+ :class="[
+ 'recruitmentManagement',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option"
:data="data"
@@ -50,6 +55,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
query: {},
data: [],
@@ -65,6 +71,7 @@
align: "center",
selection: true,
column: column,
+ ...this.$store.state.control.clearOtherBut,
},
useifid: 266,
};
diff --git a/src/views/report/reportlist.vue b/src/views/report/reportlist.vue
index b33c12b..3aa14fb 100644
--- a/src/views/report/reportlist.vue
+++ b/src/views/report/reportlist.vue
@@ -1,26 +1,32 @@
<template>
- <basic-container>
- <avue-crud :option="option"
- :table-loading="loading"
- :data="data"
- ref="crud"
- v-model="form"
- :page.sync="page"
- :permission="permissionList"
- @row-del="rowDel"
- @search-change="searchChange"
- @search-reset="searchReset"
- @selection-change="selectionChange"
- @current-change="currentChange"
- @size-change="sizeChange"
- @refresh-change="refreshChange"
- @on-load="onLoad">
+ <basic-container
+ :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
+ >
+ <avue-crud
+ :option="option"
+ :table-loading="loading"
+ :data="data"
+ ref="crud"
+ v-model="form"
+ :page.sync="page"
+ :permission="permissionList"
+ @row-del="rowDel"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @selection-change="selectionChange"
+ @current-change="currentChange"
+ @size-change="sizeChange"
+ @refresh-change="refreshChange"
+ @on-load="onLoad"
+ >
<template slot="menuLeft">
- <el-button type="danger"
- size="small"
- icon="el-icon-delete"
- plain
- @click="handleDelete">删 除
+ <el-button
+ type="danger"
+ size="small"
+ icon="el-icon-delete"
+ plain
+ @click="handleDelete"
+ >删 除
</el-button>
</template>
<template slot-scope="scope" slot="menu">
@@ -30,7 +36,7 @@
size="small"
@click.stop="handleDesign(scope.row.name)"
v-if="userInfo.role_name.includes('admin')"
- >设计
+ >设计
</el-button>
<el-button
type="text"
@@ -38,19 +44,21 @@
size="small"
@click.stop="handlePreview(scope.row.name)"
v-if="userInfo.role_name.includes('admin')"
- >预览
+ >预览
</el-button>
</template>
- <template slot-scope="{row}" slot="name">
- <el-tag style="cursor:pointer" @click="handlePreview(row.name)">{{ row.name }}</el-tag>
+ <template slot-scope="{ row }" slot="name">
+ <el-tag style="cursor: pointer" @click="handlePreview(row.name)">{{
+ row.name
+ }}</el-tag>
</template>
</avue-crud>
</basic-container>
</template>
<script>
-import {getList, remove} from "@/api/report/report";
-import {mapGetters} from "vuex";
+import { getList, remove } from "@/api/report/report";
+import { mapGetters } from "vuex";
export default {
data() {
@@ -62,10 +70,10 @@
page: {
pageSize: 10,
currentPage: 1,
- total: 0
+ total: 0,
},
option: {
- height: 'auto',
+ height: "auto",
calcHeight: 30,
tip: false,
searchShow: true,
@@ -75,6 +83,7 @@
selection: true,
viewBtn: true,
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "文件名",
@@ -89,10 +98,10 @@
{
label: "更新时间",
prop: "updateTime",
- }
- ]
+ },
+ ],
},
- data: []
+ data: [],
};
},
computed: {
@@ -102,29 +111,33 @@
addBtn: false,
viewBtn: false,
delBtn: true,
- editBtn: false
+ editBtn: false,
};
},
ids() {
let ids = [];
- this.selectionList.forEach(ele => {
+ this.selectionList.forEach((ele) => {
ids.push(ele.id);
});
return ids.join(",");
- }
+ },
},
methods: {
handlePreview(name) {
- this.$router.push({path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}`});
+ this.$router.push({
+ path: `/myiframe/urlPath?name=preview-${name}&src=${this.website.reportUrl}/preview?_u=blade-${name}`,
+ });
},
handleDesign(name) {
- this.$router.push({path: `/myiframe/urlPath?name=designer-${name}&src=${this.website.reportUrl}/designer?_u=blade-${name}`});
+ this.$router.push({
+ path: `/myiframe/urlPath?name=designer-${name}&src=${this.website.reportUrl}/designer?_u=blade-${name}`,
+ });
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
- type: "warning"
+ type: "warning",
})
.then(() => {
return remove(row.id);
@@ -133,7 +146,7 @@
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!"
+ message: "操作成功!",
});
});
},
@@ -162,7 +175,7 @@
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
- type: "warning"
+ type: "warning",
})
.then(() => {
return remove(this.ids);
@@ -171,7 +184,7 @@
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!"
+ message: "操作成功!",
});
this.$refs.crud.toggleSelection();
});
@@ -187,15 +200,19 @@
},
onLoad(page, params = {}) {
this.loading = true;
- getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+ getList(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, this.query)
+ ).then((res) => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
- }
- }
+ },
+ },
};
</script>
diff --git a/src/views/resource/attach.vue b/src/views/resource/attach.vue
index d189cce..de23d2f 100644
--- a/src/views/resource/attach.vue
+++ b/src/views/resource/attach.vue
@@ -1,5 +1,10 @@
<template>
- <basic-container class="hasButTwo">
+ <basic-container
+ :class="[
+ 'hasButTwo',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option"
:table-loading="loading"
@@ -103,6 +108,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
attachBox: false,
selectionList: [],
@@ -118,6 +124,7 @@
viewBtn: true,
selection: true,
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "附件地址",
diff --git a/src/views/resource/attachCopy.vue b/src/views/resource/attachCopy.vue
index c46bb3c..d4d62e2 100644
--- a/src/views/resource/attachCopy.vue
+++ b/src/views/resource/attachCopy.vue
@@ -1,5 +1,10 @@
<template>
- <basic-container class="hasButTwo">
+ <basic-container
+ :class="[
+ 'hasButTwo',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option"
:table-loading="loading"
@@ -103,6 +108,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
attachBox: false,
selectionList: [],
@@ -118,6 +124,7 @@
viewBtn: true,
selection: true,
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "附件地址",
diff --git a/src/views/resource/attachOnce copy.vue b/src/views/resource/attachOnce copy.vue
index 23a9051..4c11908 100644
--- a/src/views/resource/attachOnce copy.vue
+++ b/src/views/resource/attachOnce copy.vue
@@ -1,5 +1,7 @@
<template>
- <basic-container>
+ <basic-container
+ :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
+ >
<avue-crud
:option="option"
:table-loading="loading"
@@ -95,6 +97,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
attachBox: false,
selectionList: [],
@@ -111,6 +114,7 @@
viewBtn: true,
selection: true,
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "附件地址",
diff --git a/src/views/resource/attachOnce.vue b/src/views/resource/attachOnce.vue
index 1815ee5..a9cf45f 100644
--- a/src/views/resource/attachOnce.vue
+++ b/src/views/resource/attachOnce.vue
@@ -109,6 +109,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
attachBox: false,
selectionList: [],
@@ -127,6 +128,7 @@
viewBtn: true,
selection: true,
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "附件名称",
diff --git a/src/views/resource/oss.vue b/src/views/resource/oss.vue
index 6bbccf1..59e34e3 100644
--- a/src/views/resource/oss.vue
+++ b/src/views/resource/oss.vue
@@ -1,5 +1,10 @@
<template>
- <basic-container class="hasButOne">
+ <basic-container
+ :class="[
+ 'hasButOne',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option"
:table-loading="loading"
@@ -95,6 +100,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
selectionList: [],
option: {
@@ -111,6 +117,7 @@
labelWidth: 100,
dialogWidth: 880,
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "分类",
diff --git a/src/views/resource/sms.vue b/src/views/resource/sms.vue
index feca9f2..b881c16 100644
--- a/src/views/resource/sms.vue
+++ b/src/views/resource/sms.vue
@@ -1,438 +1,487 @@
<template>
- <basic-container>
- <avue-crud :option="option"
- :table-loading="loading"
- :data="data"
- :page.sync="page"
- :permission="permissionList"
- :before-open="beforeOpen"
- v-model="form"
- ref="crud"
- @row-update="rowUpdate"
- @row-save="rowSave"
- @row-del="rowDel"
- @search-change="searchChange"
- @search-reset="searchReset"
- @selection-change="selectionChange"
- @current-change="currentChange"
- @size-change="sizeChange"
- @refresh-change="refreshChange"
- @on-load="onLoad">
+ <basic-container
+ :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
+ >
+ <avue-crud
+ :option="option"
+ :table-loading="loading"
+ :data="data"
+ :page.sync="page"
+ :permission="permissionList"
+ :before-open="beforeOpen"
+ v-model="form"
+ ref="crud"
+ @row-update="rowUpdate"
+ @row-save="rowSave"
+ @row-del="rowDel"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @selection-change="selectionChange"
+ @current-change="currentChange"
+ @size-change="sizeChange"
+ @refresh-change="refreshChange"
+ @on-load="onLoad"
+ >
<template slot="menuLeft">
- <el-button type="danger"
- size="small"
- icon="el-icon-delete"
- plain
- v-if="permission.sms_delete"
- @click="handleDelete">删 除
+ <el-button
+ type="danger"
+ size="small"
+ icon="el-icon-delete"
+ plain
+ v-if="permission.sms_delete"
+ @click="handleDelete"
+ >删 除
</el-button>
</template>
<template slot-scope="scope" slot="menu">
- <el-button type="text"
- icon="el-icon-video-play"
- size="small"
- v-if="userInfo.role_name.includes('admin')"
- @click="handleDebug(scope.row)">调试
+ <el-button
+ type="text"
+ icon="el-icon-video-play"
+ size="small"
+ v-if="userInfo.role_name.includes('admin')"
+ @click="handleDebug(scope.row)"
+ >调试
</el-button>
- <el-button type="text"
- icon="el-icon-circle-check"
- size="small"
- v-if="permission.sms_enable"
- @click.stop="handleEnable(scope.row)">启用
+ <el-button
+ type="text"
+ icon="el-icon-circle-check"
+ size="small"
+ v-if="permission.sms_enable"
+ @click.stop="handleEnable(scope.row)"
+ >启用
</el-button>
</template>
- <template slot-scope="{row}"
- slot="status">
- <el-tag>{{row.statusName}}</el-tag>
+ <template slot-scope="{ row }" slot="status">
+ <el-tag>{{ row.statusName }}</el-tag>
</template>
- <template slot-scope="{row}"
- slot="category">
- <el-tag>{{row.categoryName}}</el-tag>
+ <template slot-scope="{ row }" slot="category">
+ <el-tag>{{ row.categoryName }}</el-tag>
</template>
</avue-crud>
- <el-dialog title="手机短信发送调试"
- append-to-body
- :visible.sync="box"
- width="550px">
- <avue-form :option="debugOption" v-model="debugForm" @submit="handleSend"/>
+ <el-dialog
+ title="手机短信发送调试"
+ append-to-body
+ :visible.sync="box"
+ width="550px"
+ >
+ <avue-form
+ :option="debugOption"
+ v-model="debugForm"
+ @submit="handleSend"
+ />
</el-dialog>
</basic-container>
</template>
<script>
- import {getList, getDetail, add, update, remove, enable, send} from "@/api/resource/sms";
- import {mapGetters} from "vuex";
- import func from "@/util/func";
+import {
+ getList,
+ getDetail,
+ add,
+ update,
+ remove,
+ enable,
+ send,
+} from "@/api/resource/sms";
+import { mapGetters } from "vuex";
+import func from "@/util/func";
- export default {
- data() {
- return {
- form: {},
- query: {},
- loading: true,
- box: false,
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- selectionList: [],
- option: {
- height: 'auto',
- calcHeight: 30,
- tip: false,
- searchShow: true,
- searchMenuSpan: 6,
- border: true,
- index: true,
- viewBtn: true,
- selection: true,
- menuWidth: 300,
- labelWidth: 100,
- dialogWidth: 880,
- dialogClickModal: false,
- column: [
- {
- label: "分类",
- type: "radio",
- value: 1,
- span: 24,
- width: 100,
- searchLabelWidth: 50,
- row: true,
- dicUrl: "/api/blade-system/dict/dictionary?code=sms",
- props: {
- label: "dictValue",
- value: "dictKey"
- },
- dataType: "number",
- slot: true,
- prop: "category",
- search: true,
- rules: [{
+export default {
+ data() {
+ return {
+ form: {},
+ query: {},
+ loading: true,
+ box: false,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ ...this.$store.state.control.changePageSize,
+ },
+ selectionList: [],
+ option: {
+ height: "auto",
+ calcHeight: 30,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ border: true,
+ index: true,
+ viewBtn: true,
+ selection: true,
+ menuWidth: 300,
+ labelWidth: 100,
+ dialogWidth: 880,
+ dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
+ column: [
+ {
+ label: "分类",
+ type: "radio",
+ value: 1,
+ span: 24,
+ width: 100,
+ searchLabelWidth: 50,
+ row: true,
+ dicUrl: "/api/blade-system/dict/dictionary?code=sms",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ dataType: "number",
+ slot: true,
+ prop: "category",
+ search: true,
+ rules: [
+ {
required: true,
message: "请选择分类",
- trigger: "blur"
- }]
- },
- {
- label: "资源编号",
- prop: "smsCode",
- span: 24,
- width: 200,
- search: true,
- rules: [{
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "资源编号",
+ prop: "smsCode",
+ span: 24,
+ width: 200,
+ search: true,
+ rules: [
+ {
required: true,
message: "请输入资源编号",
- trigger: "blur"
- }]
- },
- {
- label: "模版ID",
- prop: "templateId",
- span: 24,
- width: 200,
- search: true,
- rules: [{
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "模版ID",
+ prop: "templateId",
+ span: 24,
+ width: 200,
+ search: true,
+ rules: [
+ {
required: true,
message: "请输入模版ID",
- trigger: "blur"
- }]
- },
- {
- label: "accessKey",
- prop: "accessKey",
- span: 24,
- overHidden: true,
- rules: [{
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "accessKey",
+ prop: "accessKey",
+ span: 24,
+ overHidden: true,
+ rules: [
+ {
required: true,
message: "请输入accessKey",
- trigger: "blur"
- }],
- },
- {
- label: "secretKey",
- prop: "secretKey",
- span: 24,
- overHidden: true,
- display: true,
- hide: true,
- rules: [{
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "secretKey",
+ prop: "secretKey",
+ span: 24,
+ overHidden: true,
+ display: true,
+ hide: true,
+ rules: [
+ {
required: true,
message: "请输入secretKey",
- trigger: "blur"
- }],
- },
- {
- label: "regionId",
- prop: "regionId",
- span: 24,
- value: "cn-hangzhou",
- hide: true,
- display: false
- },
- {
- label: "短信签名",
- prop: "signName",
- span: 24,
- width: 200,
- rules: [{
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "regionId",
+ prop: "regionId",
+ span: 24,
+ value: "cn-hangzhou",
+ hide: true,
+ display: false,
+ },
+ {
+ label: "短信签名",
+ prop: "signName",
+ span: 24,
+ width: 200,
+ rules: [
+ {
required: true,
message: "请输入短信签名",
- trigger: "blur"
- }],
- },
- {
- label: "是否启用",
- prop: "status",
- span: 24,
- width: 80,
- align: "center",
- slot: true,
- addDisplay: false,
- editDisplay: false,
- viewDisplay: false,
- },
- {
- label: "备注",
- prop: "remark",
- span: 24,
- hide: true
- },
- ]
- },
- data: [],
- debugForm: {
- code: '',
- },
- debugOption: {
- submitText: "发送",
- column: [
- {
- label: "资源编号",
- prop: "code",
- disabled: true,
- span: 24,
- },
- {
- label: "发送手机",
- prop: "phones",
- span: 24,
- },
- {
- label: "发送参数",
- prop: "params",
- span: 24,
- placeholder: "例: {'code':2333,'title':'通知标题'}",
- },
- ]
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "是否启用",
+ prop: "status",
+ span: 24,
+ width: 80,
+ align: "center",
+ slot: true,
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ },
+ {
+ label: "备注",
+ prop: "remark",
+ span: 24,
+ hide: true,
+ },
+ ],
+ },
+ data: [],
+ debugForm: {
+ code: "",
+ },
+ debugOption: {
+ submitText: "发送",
+ column: [
+ {
+ label: "资源编号",
+ prop: "code",
+ disabled: true,
+ span: 24,
+ },
+ {
+ label: "发送手机",
+ prop: "phones",
+ span: 24,
+ },
+ {
+ label: "发送参数",
+ prop: "params",
+ span: 24,
+ placeholder: "例: {'code':2333,'title':'通知标题'}",
+ },
+ ],
+ },
+ };
+ },
+ watch: {
+ "form.category"() {
+ const category = func.toInt(this.form.category);
+ this.$refs.crud.option.column.filter((item) => {
+ if (item.prop === "templateId") {
+ if (category === 1) {
+ item.label = "模版内容";
+ } else {
+ item.label = "模版ID";
+ }
}
+ if (item.prop === "accessKey") {
+ if (category === 1) {
+ item.label = "apiKey";
+ } else if (category === 4) {
+ item.label = "appId";
+ } else {
+ item.label = "accessKey";
+ }
+ }
+ if (item.prop === "secretKey") {
+ item.display = category !== 1;
+ if (category === 4) {
+ item.label = "appKey";
+ } else {
+ item.label = "secretKey";
+ }
+ }
+ if (item.prop === "regionId") {
+ if (category === 3) {
+ item.display = true;
+ item.value = "cn-hangzhou";
+ } else {
+ item.display = false;
+ }
+ }
+ });
+ },
+ },
+ computed: {
+ ...mapGetters(["userInfo", "permission"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.sms_add, false),
+ viewBtn: this.vaildData(this.permission.sms_view, false),
+ delBtn: this.vaildData(this.permission.sms_delete, false),
+ editBtn: this.vaildData(this.permission.sms_edit, false),
};
},
- watch: {
- 'form.category'() {
- const category = func.toInt(this.form.category);
- this.$refs.crud.option.column.filter(item => {
- if (item.prop === "templateId") {
- if (category === 1) {
- item.label = "模版内容";
- } else {
- item.label = "模版ID";
- }
- }
- if (item.prop === "accessKey") {
- if (category === 1) {
- item.label = "apiKey";
- } else if (category === 4) {
- item.label = "appId";
- } else {
- item.label = "accessKey";
- }
- }
- if (item.prop === "secretKey") {
- item.display = category !== 1;
- if (category === 4) {
- item.label = "appKey";
- } else {
- item.label = "secretKey";
- }
- }
- if (item.prop === "regionId") {
- if (category === 3) {
- item.display = true;
- item.value = "cn-hangzhou";
- } else {
- item.display = false;
- }
- }
- });
- }
+ ids() {
+ let ids = [];
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id);
+ });
+ return ids.join(",");
},
- computed: {
- ...mapGetters(["userInfo", "permission"]),
- permissionList() {
- return {
- addBtn: this.vaildData(this.permission.sms_add, false),
- viewBtn: this.vaildData(this.permission.sms_view, false),
- delBtn: this.vaildData(this.permission.sms_delete, false),
- editBtn: this.vaildData(this.permission.sms_edit, false)
- };
- },
- ids() {
- let ids = [];
- this.selectionList.forEach(ele => {
- ids.push(ele.id);
- });
- return ids.join(",");
- }
- },
- methods: {
- rowSave(row, done, loading) {
- add(row).then(() => {
+ },
+ methods: {
+ rowSave(row, done, loading) {
+ add(row).then(
+ () => {
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!"
+ message: "操作成功!",
});
done();
- }, error => {
+ },
+ (error) => {
window.console.log(error);
loading();
- });
- },
- rowUpdate(row, index, done, loading) {
- update(row).then(() => {
+ }
+ );
+ },
+ rowUpdate(row, index, done, loading) {
+ update(row).then(
+ () => {
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!"
+ message: "操作成功!",
});
done();
- }, error => {
+ },
+ (error) => {
window.console.log(error);
loading();
- });
- },
- rowDel(row) {
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
+ }
+ );
+ },
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(row.id);
})
- .then(() => {
- return remove(row.id);
- })
- .then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- });
- },
- handleEnable(row) {
- this.$confirm("是否确定启用这条配置?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- return enable(row.id);
- })
- .then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.$refs.crud.toggleSelection();
- });
- },
- handleDebug(row) {
- this.box = true;
- this.debugForm.code = row.smsCode;
- },
- handleSend(form, done, loading) {
- send(form.code, form.phones, form.params).then((res) => {
+ .then(() => {
+ this.onLoad(this.page);
this.$message({
type: "success",
- message: "发送成功!"
+ message: "操作成功!",
+ });
+ });
+ },
+ handleEnable(row) {
+ this.$confirm("是否确定启用这条配置?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return enable(row.id);
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ this.$refs.crud.toggleSelection();
+ });
+ },
+ handleDebug(row) {
+ this.box = true;
+ this.debugForm.code = row.smsCode;
+ },
+ handleSend(form, done, loading) {
+ send(form.code, form.phones, form.params).then(
+ (res) => {
+ this.$message({
+ type: "success",
+ message: "发送成功!",
});
done();
window.console.log(res);
this.box = false;
- }, error => {
+ },
+ (error) => {
window.console.log(error);
loading();
- });
- },
- handleDelete() {
- if (this.selectionList.length === 0) {
- this.$message.warning("请选择至少一条数据");
- return;
}
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
+ );
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据");
+ return;
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(this.ids);
})
- .then(() => {
- return remove(this.ids);
- })
- .then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.$refs.crud.toggleSelection();
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
});
- },
- beforeOpen(done, type) {
- if (["edit", "view"].includes(type)) {
- getDetail(this.form.id).then(res => {
- this.form = res.data.data;
- });
- }
- done();
- },
- searchReset() {
- this.query = {};
- this.onLoad(this.page);
- },
- searchChange(params, done) {
- this.query = params;
- this.page.currentPage = 1;
- this.onLoad(this.page, params);
- done();
- },
- selectionChange(list) {
- this.selectionList = list;
- },
- selectionClear() {
- this.selectionList = [];
- this.$refs.crud.toggleSelection();
- },
- currentChange(currentPage) {
- this.page.currentPage = currentPage;
- },
- sizeChange(pageSize) {
- this.page.pageSize = pageSize;
- },
- refreshChange() {
- this.onLoad(this.page, this.query);
- },
- onLoad(page, params = {}) {
- this.loading = true;
- getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
- const data = res.data.data;
- this.page.total = data.total;
- this.data = data.records;
- this.loading = false;
- this.selectionClear();
+ this.$refs.crud.toggleSelection();
+ });
+ },
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ getDetail(this.form.id).then((res) => {
+ this.form = res.data.data;
});
}
- }
- };
+ done();
+ },
+ searchReset() {
+ this.query = {};
+ this.onLoad(this.page);
+ },
+ searchChange(params, done) {
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
+ selectionChange(list) {
+ this.selectionList = list;
+ },
+ selectionClear() {
+ this.selectionList = [];
+ this.$refs.crud.toggleSelection();
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage;
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize;
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query);
+ },
+ onLoad(page, params = {}) {
+ this.loading = true;
+ getList(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, this.query)
+ ).then((res) => {
+ const data = res.data.data;
+ this.page.total = data.total;
+ this.data = data.records;
+ this.loading = false;
+ this.selectionClear();
+ });
+ },
+ },
+};
</script>
diff --git a/src/views/resource/uploadNotice.vue b/src/views/resource/uploadNotice.vue
index 84d884e..b99b0c1 100644
--- a/src/views/resource/uploadNotice.vue
+++ b/src/views/resource/uploadNotice.vue
@@ -1,5 +1,10 @@
<template>
- <basic-container class="hasButTwo">
+ <basic-container
+ :class="[
+ 'hasButTwo',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option"
:table-loading="loading"
@@ -101,6 +106,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
attachBox: false,
selectionList: [],
@@ -117,6 +123,7 @@
viewBtn: true,
selection: true,
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "附件地址",
diff --git a/src/views/resource/uploadNotification.vue b/src/views/resource/uploadNotification.vue
index a0b3460..dc6d140 100644
--- a/src/views/resource/uploadNotification.vue
+++ b/src/views/resource/uploadNotification.vue
@@ -1,5 +1,10 @@
<template>
- <basic-container class="hasButTwo">
+ <basic-container
+ :class="[
+ 'hasButTwo',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option"
:table-loading="loading"
@@ -101,6 +106,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
attachBox: false,
selectionList: [],
@@ -117,6 +123,7 @@
viewBtn: true,
selection: true,
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "附件地址",
diff --git a/src/views/resource/uploadPolicyRelease.vue b/src/views/resource/uploadPolicyRelease.vue
index ad976c2..f02e473 100644
--- a/src/views/resource/uploadPolicyRelease.vue
+++ b/src/views/resource/uploadPolicyRelease.vue
@@ -1,5 +1,10 @@
<template>
- <basic-container class="hasButTwo">
+ <basic-container
+ :class="[
+ 'hasButTwo',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option"
:table-loading="loading"
@@ -101,6 +106,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
attachBox: false,
selectionList: [],
@@ -117,6 +123,7 @@
viewBtn: true,
selection: true,
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "附件地址",
diff --git a/src/views/securityAnalysis/child/assignment.vue b/src/views/securityAnalysis/child/assignment.vue
index 7c72a76..92e99fc 100644
--- a/src/views/securityAnalysis/child/assignment.vue
+++ b/src/views/securityAnalysis/child/assignment.vue
@@ -1,6 +1,11 @@
<template>
<basic-container>
- <div class="dispatchChildoperable">
+ <div
+ :class="[
+ 'dispatchChildoperable',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option1"
:data="data1"
@@ -95,6 +100,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
form1: {},
query1: {},
@@ -332,6 +338,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
form2: {},
query2: {},
diff --git a/src/views/securityAnalysis/child/certificate.vue b/src/views/securityAnalysis/child/certificate.vue
index b5f2087..da3f807 100644
--- a/src/views/securityAnalysis/child/certificate.vue
+++ b/src/views/securityAnalysis/child/certificate.vue
@@ -40,6 +40,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
query1: {},
data1: [],
@@ -72,7 +73,7 @@
search: true,
},
{
- label: "所属保安公司",
+ label: "企业名称",
searchLabelWidth: "110",
// prop: "deptName",
prop: "deptId",
diff --git a/src/views/securityAnalysis/child/dispatch.vue b/src/views/securityAnalysis/child/dispatch.vue
index 455326f..0a9dc89 100644
--- a/src/views/securityAnalysis/child/dispatch.vue
+++ b/src/views/securityAnalysis/child/dispatch.vue
@@ -40,6 +40,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
query1: {},
data1: [],
@@ -63,7 +64,7 @@
column: [
//派遣服务公司登记
{
- label: "派遣单位名称",
+ label: "派遣企业名称",
prop: "name",
search: true,
searchLabelWidth: 110,
diff --git a/src/views/securityAnalysis/child/examination.vue b/src/views/securityAnalysis/child/examination.vue
index 971aafc..b3c8f3b 100644
--- a/src/views/securityAnalysis/child/examination.vue
+++ b/src/views/securityAnalysis/child/examination.vue
@@ -29,6 +29,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
query1: {},
data1: [],
diff --git a/src/views/securityAnalysis/child/situation.vue b/src/views/securityAnalysis/child/situation.vue
index 0ba7cd5..545f853 100644
--- a/src/views/securityAnalysis/child/situation.vue
+++ b/src/views/securityAnalysis/child/situation.vue
@@ -41,6 +41,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
query1: {},
data1: [],
@@ -73,7 +74,7 @@
search: true,
},
{
- label: "所属保安公司",
+ label: "企业名称",
searchLabelWidth: "110",
// prop: "deptName",
prop: "deptId",
diff --git a/src/views/securityAnalysis/child/socialSecurity.vue b/src/views/securityAnalysis/child/socialSecurity.vue
index ee4ba8b..b29f9f9 100644
--- a/src/views/securityAnalysis/child/socialSecurity.vue
+++ b/src/views/securityAnalysis/child/socialSecurity.vue
@@ -1,5 +1,7 @@
<template>
- <basic-container>
+ <basic-container
+ :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
+ >
<avue-crud
:option="option"
:table-loading="loading"
@@ -114,6 +116,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
selectionList: [],
option: {
@@ -131,6 +134,7 @@
menu: false,
selection: true,
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "姓名",
diff --git a/src/views/securityEquipment/car.js b/src/views/securityEquipment/car.js
index a8dbd52..e376d6e 100644
--- a/src/views/securityEquipment/car.js
+++ b/src/views/securityEquipment/car.js
@@ -66,13 +66,13 @@
}]
},
{
- label: "所属保安公司",
+ label: "企业名称",
prop: "deptId",
searchSpan: 6,
searchLabelWidth: 110,
rules: [{
required: true,
- message: "请输入所属保安公司",
+ message: "请输入企业名称",
trigger: "blur"
}],
hide: true,
diff --git a/src/views/securityEquipment/car.vue b/src/views/securityEquipment/car.vue
index 6a108a9..1c27f22 100644
--- a/src/views/securityEquipment/car.vue
+++ b/src/views/securityEquipment/car.vue
@@ -1,6 +1,11 @@
<template>
<basic-container>
- <div class="equipments">
+ <div
+ :class="[
+ 'equipments',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option"
:data="data"
@@ -116,6 +121,7 @@
selection: true,
labelWidth: 110,
column: column,
+ ...this.$store.state.control.clearOtherBut,
},
useifid: 266,
};
@@ -334,14 +340,14 @@
).then((res) => {
const data = res.data.data;
this.page.total = data.total;
- data.records.forEach(item=>{
- if(item.numberType==-1){
- item.numberType=null;
+ data.records.forEach((item) => {
+ if (item.numberType == -1) {
+ item.numberType = null;
}
- if(item.carType==-1){
- item.carType=null;
+ if (item.carType == -1) {
+ item.carType = null;
}
- })
+ });
this.data = data.records;
console.log(this.data);
this.loading = false;
diff --git a/src/views/securityEquipment/equipments.js b/src/views/securityEquipment/equipments.js
index 54debc3..16bbe00 100644
--- a/src/views/securityEquipment/equipments.js
+++ b/src/views/securityEquipment/equipments.js
@@ -62,13 +62,13 @@
width: 70,
},
{
- label: "所属保安公司",
+ label: "企业名称",
prop: "deptId",
searchSpan: 6,
searchLabelWidth: 110,
rules: [{
required: true,
- message: "请输入所属保安公司",
+ message: "请输入企业名称",
trigger: "blur"
}],
hide: true,
diff --git a/src/views/securityEquipment/equipments.vue b/src/views/securityEquipment/equipments.vue
index 9a0e02c..124d3af 100644
--- a/src/views/securityEquipment/equipments.vue
+++ b/src/views/securityEquipment/equipments.vue
@@ -1,6 +1,11 @@
<template>
<basic-container>
- <div class="equipments">
+ <div
+ :class="[
+ 'equipments',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option"
:data="data"
@@ -99,6 +104,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
query: {},
data: [],
@@ -114,7 +120,9 @@
align: "center",
selection: true,
column: column,
+ ...this.$store.state.control.clearOtherBut,
labelWidth: 110,
+ ...this.$store.state.control.clearOtherBut,
},
useifid: 266,
diff --git a/src/views/securityEquipment/gun.js b/src/views/securityEquipment/gun.js
index dfe44db..8c89ae2 100644
--- a/src/views/securityEquipment/gun.js
+++ b/src/views/securityEquipment/gun.js
@@ -1,128 +1,128 @@
export var column = [{
- label: "id",
- prop: "id",
- hide: true,
- editDisplay: false,
- addDisplay: false,
- labelWidth: 160,
+ label: "id",
+ prop: "id",
+ hide: true,
+ editDisplay: false,
+ addDisplay: false,
+ labelWidth: 160,
+},
+// {
+// label: "公务用枪证编号",
+// prop: "gunCardNumber",
+// labelWidth: 160,
+// searchSpan: 4,
+// searchLabelWidth: 130,
+// search: true,
+// rules: [{
+// required: true,
+// message: "请输入公务用枪证编号",
+// trigger: "blur"
+// }]
+// },
+{
+ label: "发证企业名称",
+ searchLabelWidth: 110,
+ labelWidth: 160,
+ prop: "issueUnit",
+ searchSpan: 4,
+ rules: [{
+ required: false,
+ message: "请输入发证企业名称",
+ trigger: "blur"
+ }],
+ search: true,
+}, //上面不显示
+{
+ label: "公务用枪编号",
+ prop: "cardNumber",
+ labelWidth: 160,
+ search: true,
+ searchSpan: 4,
+ searchLabelWidth: 110,
+ rules: [{
+ required: true,
+ message: "请输入公务用枪编号",
+ trigger: "blur"
+ }]
+ // search: true,
+},
+{
+ label: "枪型",
+ prop: "gunMode",
+ // searchSpan: 4,
+ width: 70,
+ labelWidth: 160,
+ rules: [{
+ required: false,
+ message: "请输入枪型",
+ trigger: "blur"
+ }],
+ // search: true,
+},
+{
+ label: "企业名称",
+ prop: "deptId",
+ searchSpan: 6,
+ searchLabelWidth: 110,
+ rules: [{
+ required: true,
+ message: "请输入企业名称",
+ trigger: "blur"
+ }],
+ hide: true,
+ addDisplay: false,
+ editDisplay: false,
+ search: false,
+ overHidden: true,
+ dicUrl: "",
+ props: {
+ label: "title",
+ value: "id"
},
- // {
- // label: "公务用枪证编号",
- // prop: "gunCardNumber",
- // labelWidth: 160,
- // searchSpan: 4,
- // searchLabelWidth: 130,
- // search: true,
- // rules: [{
- // required: true,
- // message: "请输入公务用枪证编号",
- // trigger: "blur"
- // }]
- // },
- {
- label: "发证单位名称",
- searchLabelWidth: 110,
- labelWidth: 160,
- prop: "issueUnit",
- searchSpan: 4,
- rules: [{
- required: false,
- message: "请输入发证单位名称",
- trigger: "blur"
- }],
- search: true,
- }, //上面不显示
- {
- label: "公务用枪编号",
- prop: "cardNumber",
- labelWidth: 160,
- search: true,
- searchSpan: 4,
- searchLabelWidth: 110,
- rules: [{
- required: true,
- message: "请输入公务用枪编号",
- trigger: "blur"
- }]
- // search: true,
- },
- {
- label: "枪型",
- prop: "gunMode",
- // searchSpan: 4,
- width: 70,
- labelWidth: 160,
- rules: [{
- required: false,
- message: "请输入枪型",
- trigger: "blur"
- }],
- // search: true,
- },
- {
- label: "所属保安公司",
- prop: "deptId",
- searchSpan: 6,
- searchLabelWidth: 110,
- rules: [{
- required: true,
- message: "请输入所属保安公司",
- trigger: "blur"
- }],
- hide: true,
- addDisplay: false,
- editDisplay: false,
- search: false,
- overHidden: true,
- dicUrl: "",
- props: {
- label: "title",
- value: "id"
- },
- type: "tree",
- width: 250,
- },
- {
- label: "责任人",
- prop: "personInCharge",
- labelWidth: 160,
- rules: [{
- required: false,
- message: "请输入责任人",
- trigger: "blur"
- }]
- },
- {
- label: "发证日期",
- labelWidth: 160,
- prop: "issueTime",
- // search: true,
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- // width: 110,
- // overHidden: true,
- // search: true,
- rules: [{
- required: true,
- message: "请输入发证日期",
- trigger: "blur"
- }]
- },
- {
- label: "有效日期",
- prop: "validTime",
- labelWidth: 160,
- // search: true,
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- searchSpan: 4,
- overHidden: true,
- rules: [{
- required: true,
- message: "请输入有效日期",
- trigger: "blur"
- }]
- }
+ type: "tree",
+ width: 250,
+},
+{
+ label: "责任人",
+ prop: "personInCharge",
+ labelWidth: 160,
+ rules: [{
+ required: false,
+ message: "请输入责任人",
+ trigger: "blur"
+ }]
+},
+{
+ label: "发证日期",
+ labelWidth: 160,
+ prop: "issueTime",
+ // search: true,
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ // width: 110,
+ // overHidden: true,
+ // search: true,
+ rules: [{
+ required: true,
+ message: "请输入发证日期",
+ trigger: "blur"
+ }]
+},
+{
+ label: "有效日期",
+ prop: "validTime",
+ labelWidth: 160,
+ // search: true,
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ searchSpan: 4,
+ overHidden: true,
+ rules: [{
+ required: true,
+ message: "请输入有效日期",
+ trigger: "blur"
+ }]
+}
]
\ No newline at end of file
diff --git a/src/views/securityEquipment/gun.vue b/src/views/securityEquipment/gun.vue
index 4a3b3db..f51f667 100644
--- a/src/views/securityEquipment/gun.vue
+++ b/src/views/securityEquipment/gun.vue
@@ -1,6 +1,11 @@
<template>
<basic-container>
- <div class="equipments">
+ <div
+ :class="[
+ 'equipments',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option"
:data="data"
@@ -94,12 +99,13 @@
},
],
},
- deptIds:"",
+ deptIds: "",
selectionList: [],
page: {
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
query: {},
data: [],
@@ -116,6 +122,7 @@
selection: true,
labelWidth: 110,
column: column,
+ ...this.$store.state.control.clearOtherBut,
},
useifid: 266,
};
diff --git a/src/views/securityGuard/data.js b/src/views/securityGuard/data.js
index b23b603..41ee77e 100644
--- a/src/views/securityGuard/data.js
+++ b/src/views/securityGuard/data.js
@@ -1,314 +1,314 @@
//保安员基本信息
export var securityBaseInfoColumn = [{
- label: "",
- labelWidth: "20",
- type: 'title',
- prop: "title",
- span: 24,
- styles: {
- fontSize: '24px'
- }
- },
- {
- label: "所属保安公司",
- prop: "deptId",
- type: "tree",
- dicUrl: "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
- // dicUrl: "/api/blade-system/dept/lazy-tree?parentId=0",
- props: {
- label: "title",
- value: "id",
- },
- disabled: true,
- span: 24,
- },
- {
- label: "登录账号",
- prop: "account",
- disabled: true
- },
- {
- label: "用户姓名",
- prop: "realName",
- disabled: true,
- },
- {
- label: "用户昵称",
- prop: "name",
- disabled: true
- },
- {
- label: "手机号码",
- prop: "phone",
- disabled: true
- },
- {
- label: "电子邮箱",
- prop: "email",
- disabled: true
- },
- {
- label: "身份证号",
- prop: "cardid",
- disabled: true
- },
- {
- label: "籍贯",
- prop: "nativeplace",
- disabled: true
- },
- {
- label: "民族",
- prop: "nation",
- disabled: true
- },
- {
- label: "是否持证",
- prop: "hold",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=equipage",
- props: {
- label: "dictValue",
- value: "dictKey",
- },
- type: "select",
- disabled: true
- },
- {
- label: "保安员证编号",
- prop: "securitynumber",
- disabled: true
- },
- {
- label: "所属辖区",
- prop: "jurisdiction",
- // multiple: true,
- type: "tree",
- dicUrl: "/api/jurisdiction/lazy-tree",
- props: {
- label: "title",
- value: "id",
- },
- disabled: true
- },
- {
- label: "最高学历",
- prop: "education",
- type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=educationType",
- props: {
- label: "dictValue",
- value: "dictKey"
- },
- dataType: "number",
- slot: true,
- disabled: true
- },
- {
- label: "政治面貌",
- prop: "politicaloutlook",
- disabled: true
- },
- {
- label: "身高",
- prop: "height",
- disabled: true
- },
- {
- label: "联系地址",
- prop: "address",
- disabled: true
- },
- {
- label: "户口所在地",
- prop: "registered",
- disabled: true
- },
- {
- label: "入职时间",
- prop: "rtime",
- type: 'date',
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- disabled: true
- },
- {
- label: "用户性别",
- prop: "sex",
- type: "select",
- dicData: [{
- label: "男",
- value: 1
- },
- {
- label: "女",
- value: 2
- },
- {
- label: "未知",
- value: 3
- }
- ],
- disabled: true
- },
- {
- label: "用户生日",
- type: "date",
- prop: "birthday",
- disabled: true
+ label: "",
+ labelWidth: "20",
+ type: 'title',
+ prop: "title",
+ span: 24,
+ styles: {
+ fontSize: '24px'
}
+},
+{
+ label: "企业名称",
+ prop: "deptId",
+ type: "tree",
+ dicUrl: "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
+ // dicUrl: "/api/blade-system/dept/lazy-tree?parentId=0",
+ props: {
+ label: "title",
+ value: "id",
+ },
+ disabled: true,
+ span: 24,
+},
+{
+ label: "登录账号",
+ prop: "account",
+ disabled: true
+},
+{
+ label: "用户姓名",
+ prop: "realName",
+ disabled: true,
+},
+{
+ label: "用户昵称",
+ prop: "name",
+ disabled: true
+},
+{
+ label: "手机号码",
+ prop: "phone",
+ disabled: true
+},
+{
+ label: "电子邮箱",
+ prop: "email",
+ disabled: true
+},
+{
+ label: "身份证号",
+ prop: "cardid",
+ disabled: true
+},
+{
+ label: "籍贯",
+ prop: "nativeplace",
+ disabled: true
+},
+{
+ label: "民族",
+ prop: "nation",
+ disabled: true
+},
+{
+ label: "是否持证",
+ prop: "hold",
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=equipage",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ type: "select",
+ disabled: true
+},
+{
+ label: "保安员证编号",
+ prop: "securitynumber",
+ disabled: true
+},
+{
+ label: "所属辖区",
+ prop: "jurisdiction",
+ // multiple: true,
+ type: "tree",
+ dicUrl: "/api/jurisdiction/lazy-tree",
+ props: {
+ label: "title",
+ value: "id",
+ },
+ disabled: true
+},
+{
+ label: "最高学历",
+ prop: "education",
+ type: "select",
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=educationType",
+ props: {
+ label: "dictValue",
+ value: "dictKey"
+ },
+ dataType: "number",
+ slot: true,
+ disabled: true
+},
+{
+ label: "政治面貌",
+ prop: "politicaloutlook",
+ disabled: true
+},
+{
+ label: "身高",
+ prop: "height",
+ disabled: true
+},
+{
+ label: "联系地址",
+ prop: "address",
+ disabled: true
+},
+{
+ label: "户口所在地",
+ prop: "registered",
+ disabled: true
+},
+{
+ label: "入职时间",
+ prop: "rtime",
+ type: 'date',
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ disabled: true
+},
+{
+ label: "用户性别",
+ prop: "sex",
+ type: "select",
+ dicData: [{
+ label: "男",
+ value: 1
+ },
+ {
+ label: "女",
+ value: 2
+ },
+ {
+ label: "未知",
+ value: 3
+ }
+ ],
+ disabled: true
+},
+{
+ label: "用户生日",
+ type: "date",
+ prop: "birthday",
+ disabled: true
+}
]
export var securityBaseInfoColumns = [{
- label: "所属保安单位",
- prop: "tenantId",
- type: "tree",
- dicUrl: "/api/blade-system/tenant/select",
- props: {
- label: "tenantName",
- value: "tenantId"
- },
- disabled: true,
- span: 24,
+ label: "所属保安单位",
+ prop: "tenantId",
+ type: "tree",
+ dicUrl: "/api/blade-system/tenant/select",
+ props: {
+ label: "tenantName",
+ value: "tenantId"
+ },
+ disabled: true,
+ span: 24,
+},
+{
+ label: "登录账号",
+ prop: "account",
+ disabled: true
+},
+{
+ label: "用户姓名",
+ prop: "realName",
+ rules: [{
+ required: true,
+ message: "请输入用户姓名",
+ trigger: "blur"
+ }, {
+ min: 2,
+ max: 5,
+ message: '姓名长度在2到5个字符'
+ }]
+},
+{
+ label: "用户昵称",
+ prop: "name"
+},
+{
+ label: "手机号码",
+ prop: "phone",
+ overHidden: true,
+ rules: [{
+ required: true,
+ message: "请输入手机号",
+ trigger: "blur"
+ }]
+},
+{
+ label: "电子邮箱",
+ prop: "email",
+ hide: true,
+ overHidden: true
+},
+{
+ label: "身份证号",
+ prop: "cardid",
+ hide: true,
+ overHidden: true,
+ rules: [{
+ required: true,
+ message: "请输入身份证号",
+ trigger: "blur"
+ }]
+},
+{
+ label: "籍贯",
+ prop: "nativeplace",
+ hide: true,
+ overHidden: true
+},
+{
+ label: "民族",
+ prop: "nation",
+ hide: true,
+ overHidden: true
+},
+{
+ label: "最高学历",
+ prop: "education",
+ type: "select",
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=educationType",
+ props: {
+ label: "dictValue",
+ value: "dictKey"
+ },
+ dataType: "number",
+ slot: true,
+ rules: [{
+ required: true,
+ message: "请选择学历",
+ trigger: "blur"
+ }]
+},
+{
+ label: "政治面貌",
+ prop: "politicaloutlook",
+ hide: true,
+ overHidden: true
+},
+{
+ label: "身高",
+ prop: "height",
+ hide: true,
+ overHidden: true
+},
+{
+ label: "联系地址",
+ prop: "address",
+ hide: true,
+ overHidden: true
+},
+{
+ label: "户口所在地",
+ prop: "registered",
+ hide: true,
+ overHidden: true
+},
+{
+ label: "入职时间",
+ prop: "rtime",
+ type: 'date',
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ hide: true,
+ overHidden: true
+},
+{
+ label: "用户性别",
+ prop: "sex",
+ type: "select",
+ dicData: [{
+ label: "男",
+ value: 1
},
{
- label: "登录账号",
- prop: "account",
- disabled: true
+ label: "女",
+ value: 2
},
{
- label: "用户姓名",
- prop: "realName",
- rules: [{
- required: true,
- message: "请输入用户姓名",
- trigger: "blur"
- }, {
- min: 2,
- max: 5,
- message: '姓名长度在2到5个字符'
- }]
- },
- {
- label: "用户昵称",
- prop: "name"
- },
- {
- label: "手机号码",
- prop: "phone",
- overHidden: true,
- rules: [{
- required: true,
- message: "请输入手机号",
- trigger: "blur"
- }]
- },
- {
- label: "电子邮箱",
- prop: "email",
- hide: true,
- overHidden: true
- },
- {
- label: "身份证号",
- prop: "cardid",
- hide: true,
- overHidden: true,
- rules: [{
- required: true,
- message: "请输入身份证号",
- trigger: "blur"
- }]
- },
- {
- label: "籍贯",
- prop: "nativeplace",
- hide: true,
- overHidden: true
- },
- {
- label: "民族",
- prop: "nation",
- hide: true,
- overHidden: true
- },
- {
- label: "最高学历",
- prop: "education",
- type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=educationType",
- props: {
- label: "dictValue",
- value: "dictKey"
- },
- dataType: "number",
- slot: true,
- rules: [{
- required: true,
- message: "请选择学历",
- trigger: "blur"
- }]
- },
- {
- label: "政治面貌",
- prop: "politicaloutlook",
- hide: true,
- overHidden: true
- },
- {
- label: "身高",
- prop: "height",
- hide: true,
- overHidden: true
- },
- {
- label: "联系地址",
- prop: "address",
- hide: true,
- overHidden: true
- },
- {
- label: "户口所在地",
- prop: "registered",
- hide: true,
- overHidden: true
- },
- {
- label: "入职时间",
- prop: "rtime",
- type: 'date',
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- hide: true,
- overHidden: true
- },
- {
- label: "用户性别",
- prop: "sex",
- type: "select",
- dicData: [{
- label: "男",
- value: 1
- },
- {
- label: "女",
- value: 2
- },
- {
- label: "未知",
- value: 3
- }
- ],
- hide: true
- },
- {
- label: "用户生日",
- type: "date",
- prop: "birthday",
- hide: true
+ label: "未知",
+ value: 3
}
+ ],
+ hide: true
+},
+{
+ label: "用户生日",
+ type: "date",
+ prop: "birthday",
+ hide: true
+}
]
@@ -320,7 +320,7 @@
editDisplay: false,
addDisplay: false
}, {
- label: '单位名称',
+ label: '企业名称',
prop: "companyname",
formslot: true,
}, {
@@ -357,7 +357,7 @@
export var practitionersColumns = [{
width: 200,
- label: '单位名称',
+ label: '企业名称',
prop: "companyname",
formslot: true,
}, {
@@ -400,62 +400,62 @@
//表现
export var trackRecordColumn = [{
- label: "id",
- prop: "id",
- hide: true,
- editDisplay: false,
- addDisplay: false
- }, {
- label: '时间',
- type: 'date',
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- prop: "time",
- formslot: true,
- },
- // {
- // label: '工作态度',
- // prop: "workingattitude",
- // formslot: true,
+ label: "id",
+ prop: "id",
+ hide: true,
+ editDisplay: false,
+ addDisplay: false
+}, {
+ label: '时间',
+ type: 'date',
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ prop: "time",
+ formslot: true,
+},
+// {
+// label: '工作态度',
+// prop: "workingattitude",
+// formslot: true,
+// },
+{
+ label: '工作表现',
+ prop: "achievements",
+ formslot: true,
+}, {
+ label: '表现评定',
+ prop: "score",
+ type: "select",
+ // dicUrl: "/api/blade-system/dict-biz/dictionary?code=scoreType",
+ // props: {
+ // label: "dictValue",
+ // value: "dictKey"
// },
+ dicData: [{
+ label: "优秀",
+ value: 0
+ },
{
- label: '工作表现',
- prop: "achievements",
- formslot: true,
- }, {
- label: '表现评定',
- prop: "score",
- type: "select",
- // dicUrl: "/api/blade-system/dict-biz/dictionary?code=scoreType",
- // props: {
- // label: "dictValue",
- // value: "dictKey"
- // },
- dicData: [{
- label: "优秀",
- value: 0
- },
- {
- label: "良好",
- value: 1
- },
- {
- label: "一般",
- value: 2
- },
- {
- label: "差",
- value: 3
- },
- ],
- dataType: "number",
- slot: true,
- rules: [{
- required: true,
- message: "请选择表现",
- trigger: "blur"
- }]
- }
+ label: "良好",
+ value: 1
+ },
+ {
+ label: "一般",
+ value: 2
+ },
+ {
+ label: "差",
+ value: 3
+ },
+ ],
+ dataType: "number",
+ slot: true,
+ rules: [{
+ required: true,
+ message: "请选择表现",
+ trigger: "blur"
+ }]
+}
// {
// label: '服务公司',
// prop: "departmentName",
@@ -465,265 +465,265 @@
export var securityFormPageColumn = [{
- label: "姓名",
- prop: "realName",
- search: true,
- searchSpan: 3,
- width: 60,
- searchLabelWidth: 50,
- display: false
+ label: "姓名",
+ prop: "realName",
+ search: true,
+ searchSpan: 3,
+ width: 60,
+ searchLabelWidth: 50,
+ display: false
+},
+{
+ label: "企业名称",
+ searchLabelWidth: "110",
+ // prop: "deptName",
+ prop: "deptId",
+ type: "tree",
+ dicUrl: "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
+ props: {
+ label: "title",
+ value: "id",
+ },
+ // hide: true,
+ slot: true,
+ searchSpan: 5,
+ display: false,
+ search: true,
+ minWidth: 260
+},
+{
+ label: "性别",
+ prop: "sexs",
+ width: 80,
+ type: "select",
+ dicData: [{
+ label: "男",
+ value: 1,
},
{
- label: "所属保安公司",
- searchLabelWidth: "110",
- // prop: "deptName",
- prop: "deptId",
- type: "tree",
- dicUrl: "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
- props: {
- label: "title",
- value: "id",
- },
- // hide: true,
- slot: true,
- searchSpan: 5,
- display: false,
- search: true,
- minWidth: 260
+ label: "女",
+ value: 2,
},
- {
- label: "性别",
- prop: "sexs",
- width: 80,
- type: "select",
- dicData: [{
- label: "男",
- value: 1,
- },
- {
- label: "女",
- value: 2,
- },
- // {
- // label: "未知",
- // value: 3,
- // },
- ],
- display: false
- },
- {
- label: "身份证号码",
- prop: "cardid",
- search: true,
- searchLabelWidth: 90,
- searchSpan: 4,
- minWidth: 140,
- display: false
- },
+ // {
+ // label: "未知",
+ // value: 3,
+ // },
+ ],
+ display: false
+},
+{
+ label: "身份证号码",
+ prop: "cardid",
+ search: true,
+ searchLabelWidth: 90,
+ searchSpan: 4,
+ minWidth: 140,
+ display: false
+},
- {
- label: "籍贯",
- prop: "nativeplace",
- hide: true,
- display: false
- },
- {
- label: "民族",
- prop: "nation",
- hide: true,
- width: 55,
- display: false
- },
+{
+ label: "籍贯",
+ prop: "nativeplace",
+ hide: true,
+ display: false
+},
+{
+ label: "民族",
+ prop: "nation",
+ hide: true,
+ width: 55,
+ display: false
+},
- {
- label: "出生日期",
- prop: "birthday",
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- display: false,
- hide: true,
+{
+ label: "出生日期",
+ prop: "birthday",
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ display: false,
+ hide: true,
+},
+{
+ label: "年龄",
+ prop: "age",
+ width: 55,
+ display: false
+},
+{
+ label: "学历",
+ prop: "education",
+ display: false,
+ width: 90,
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=educationType",
+ props: {
+ label: "dictValue",
+ value: "dictKey"
+ },
+ type: "select",
+ // hide: true,
+ rules: [{
+ required: true,
+ message: "请选择学历",
+ trigger: "blur"
+ }],
+},
+{
+ label: "联系电话",
+ prop: "phone",
+ minWidth: 100,
+ display: false
+},
+{
+ label: "健康状态",
+ prop: "healstats",
+ hide: true,
+ display: false
+},
+{
+ label: "保安证编号",
+ prop: "securitynumber",
+ search: true,
+ searchLabelWidth: 90,
+ minWidth: 105,
+ searchSpan: 3,
+ addDisplay: false,
+ editDisplay: false,
+ // hide: true,
+},
+{
+ label: "入职时间",
+ prop: "rtime",
+ hide: true,
+ display: false
+},
+{
+ label: '是否派遣',
+ prop: 'dispatch',
+ type: 'select',
+ editDisplay: false,
+ addDisplay: false,
+ dicData: [{
+ label: '未派遣',
+ value: '1'
+ }, {
+ label: '已派遣',
+ value: '0'
+ }]
+},
+{
+ label: "是否持证",
+ prop: "hold",
+ slot: true,
+ search: true,
+ searchSpan: 3,
+ width: 69,
+ type: "select",
+ dicData: [{
+ label: "是",
+ value: "1",
},
{
- label: "年龄",
- prop: "age",
- width: 55,
- display: false
+ label: "否",
+ value: "2",
},
{
- label: "学历",
- prop: "education",
- display: false,
- width: 90,
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=educationType",
- props: {
- label: "dictValue",
- value: "dictKey"
- },
- type: "select",
- // hide: true,
- rules: [{
- required: true,
- message: "请选择学历",
- trigger: "blur"
- }],
+ label: "已吊销",
+ value: "3",
},
- {
- label: "联系电话",
- prop: "phone",
- minWidth: 100,
- display: false
- },
- {
- label: "健康状态",
- prop: "healstats",
- hide: true,
- display: false
- },
- {
- label: "保安证编号",
- prop: "securitynumber",
- search: true,
- searchLabelWidth: 90,
- minWidth: 105,
- searchSpan: 3,
- addDisplay: false,
- editDisplay: false,
- // hide: true,
- },
- {
- label: "入职时间",
- prop: "rtime",
- hide: true,
- display: false
- },
- {
- label: '是否派遣',
- prop: 'dispatch',
- type: 'select',
- editDisplay: false,
- addDisplay: false,
- dicData: [{
- label: '未派遣',
- value: '1'
- }, {
- label: '已派遣',
- value: '0'
- }]
- },
- {
- label: "是否持证",
- prop: "hold",
- slot: true,
- search: true,
- searchSpan: 3,
- width: 69,
- type: "select",
- dicData: [{
- label: "是",
- value: "1",
- },
- {
- label: "否",
- value: "2",
- },
- {
- label: "已吊销",
- value: "3",
- },
- ],
- display: false,
- rules: [{
- required: true,
- message: "请选择",
- trigger: "blur"
- }],
- },
+ ],
+ display: false,
+ rules: [{
+ required: true,
+ message: "请选择",
+ trigger: "blur"
+ }],
+},
- {
- label: "是否制证",
- prop: "userType",
- type: "select",
- slot: true,
- search: true,
- // searchValue: 7,
- editDisplay: false,
- addDisplay: false,
- searchSpan: 3,
- width: 69,
- dicData: [{
- label: "已制证",
- value: 6,
- },
- {
- label: "未制证",
- value: 7,
- }
- ],
+{
+ label: "是否制证",
+ prop: "userType",
+ type: "select",
+ slot: true,
+ search: true,
+ // searchValue: 7,
+ editDisplay: false,
+ addDisplay: false,
+ searchSpan: 3,
+ width: 69,
+ dicData: [{
+ label: "已制证",
+ value: 6,
},
+ {
+ label: "未制证",
+ value: 7,
+ }
+ ],
+},
- // {
- // label: "发证日期",
- // prop: "papertime",
- // type: "date",
- // format: "yyyy-MM-dd",
- // valueFormat: "yyyy-MM-dd",
- // // searchRange: true,
- // // searchSpan: 6,
- // // hide: true,
- // // addDisplay: false,
- // // editDisplay: false,
- // // viewDisplay: false,
- // // search: true,
- // // rules: [{
- // // required: true,
- // // message: "请输入时间",
- // // trigger: "blur"
- // // }]
- // },
- {
- label: "在职状态",
- prop: "status",
- type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=workerState",
- props: {
- label: "dictValue",
- value: "dictKey"
- },
- dataType: "number",
- searchValue: 1,
- display: false,
- hide: true,
- searchSpan: 3,
- width: 80,
- search: true,
- rules: [{
- required: true,
- message: "请选择在职状态",
- trigger: "blur"
- }]
+// {
+// label: "发证日期",
+// prop: "papertime",
+// type: "date",
+// format: "yyyy-MM-dd",
+// valueFormat: "yyyy-MM-dd",
+// // searchRange: true,
+// // searchSpan: 6,
+// // hide: true,
+// // addDisplay: false,
+// // editDisplay: false,
+// // viewDisplay: false,
+// // search: true,
+// // rules: [{
+// // required: true,
+// // message: "请输入时间",
+// // trigger: "blur"
+// // }]
+// },
+{
+ label: "在职状态",
+ prop: "status",
+ type: "select",
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=workerState",
+ props: {
+ label: "dictValue",
+ value: "dictKey"
+ },
+ dataType: "number",
+ searchValue: 1,
+ display: false,
+ hide: true,
+ searchSpan: 3,
+ width: 80,
+ search: true,
+ rules: [{
+ required: true,
+ message: "请选择在职状态",
+ trigger: "blur"
+ }]
+},
+{
+ label: "审查状态",
+ prop: "examinationType",
+ type: "select",
+ display: false,
+ searchSpan: 3,
+ search: false,
+ hide: true,
+ width: 80,
+ dicData: [{
+ label: "全部",
+ value: 6,
},
{
- label: "审查状态",
- prop: "examinationType",
- type: "select",
- display: false,
- searchSpan: 3,
- search: false,
- hide: true,
- width: 80,
- dicData: [{
- label: "全部",
- value: 6,
- },
- {
- label: "正常",
- value: "0",
- },
- {
- label: "异常",
- value: 1,
- }
- ],
+ label: "正常",
+ value: "0",
},
+ {
+ label: "异常",
+ value: 1,
+ }
+ ],
+},
]
\ No newline at end of file
diff --git a/src/views/securityGuard/securityGuardOnce copy.vue b/src/views/securityGuard/securityGuardOnce copy.vue
index 76c2dd1..4b0303b 100644
--- a/src/views/securityGuard/securityGuardOnce copy.vue
+++ b/src/views/securityGuard/securityGuardOnce copy.vue
@@ -341,6 +341,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
roleId: "1412226235153731586",
deptId: "1413470343230877697",
@@ -348,6 +349,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
init: {
roleTree: [],
@@ -416,7 +418,7 @@
icon: "el-icon-user-solid",
column: [
{
- label: "所属保安公司",
+ label: "企业名称",
prop: "deptId",
type: "tree",
// dicUrl:
@@ -723,7 +725,7 @@
column: [
{
width: 200,
- label: "单位名称",
+ label: "企业名称",
prop: "companyname",
formslot: true,
},
diff --git a/src/views/securityGuard/securityGuardOnce.vue b/src/views/securityGuard/securityGuardOnce.vue
index ba8b143..f4b1dd6 100644
--- a/src/views/securityGuard/securityGuardOnce.vue
+++ b/src/views/securityGuard/securityGuardOnce.vue
@@ -417,6 +417,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
roleId: "1412226235153731586",
deptId: "1413470343230877697",
@@ -424,6 +425,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
init: {
roleTree: [],
@@ -493,7 +495,7 @@
icon: "el-icon-user-solid",
column: [
{
- label: "所属保安公司",
+ label: "企业名称",
prop: "deptId",
type: "tree",
// dicUrl:
diff --git a/src/views/securityGuard/securityGuardRegistration.vue b/src/views/securityGuard/securityGuardRegistration.vue
index 624bf0e..d134497 100644
--- a/src/views/securityGuard/securityGuardRegistration.vue
+++ b/src/views/securityGuard/securityGuardRegistration.vue
@@ -341,7 +341,7 @@
column: [
{
width: 200,
- label: "单位名称",
+ label: "企业名称",
prop: "companyname",
formslot: true,
},
diff --git "a/src/views/securityGuard/securityGuard\346\214\207\347\272\271\350\207\252\345\212\250\350\257\206\345\210\253\357\274\210\351\233\206\346\210\220VUE\346\212\245\351\224\231\357\274\211-9.vue" "b/src/views/securityGuard/securityGuard\346\214\207\347\272\271\350\207\252\345\212\250\350\257\206\345\210\253\357\274\210\351\233\206\346\210\220VUE\346\212\245\351\224\231\357\274\211-9.vue"
index 3a4c06f..46d1d95 100644
--- "a/src/views/securityGuard/securityGuard\346\214\207\347\272\271\350\207\252\345\212\250\350\257\206\345\210\253\357\274\210\351\233\206\346\210\220VUE\346\212\245\351\224\231\357\274\211-9.vue"
+++ "b/src/views/securityGuard/securityGuard\346\214\207\347\272\271\350\207\252\345\212\250\350\257\206\345\210\253\357\274\210\351\233\206\346\210\220VUE\346\212\245\351\224\231\357\274\211-9.vue"
@@ -557,6 +557,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
roleId: "1412226235153731586",
deptId: "1413470343230877697",
@@ -565,6 +566,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
init: {
roleTree: [],
@@ -641,7 +643,7 @@
icon: "el-icon-user-solid",
column: [
{
- label: "所属保安公司",
+ label: "企业名称",
prop: "deptId",
type: "tree",
// dicUrl:
diff --git a/src/views/securityGuard/sfzJS.js b/src/views/securityGuard/sfzJS.js
index 4bd044e..c7c95a4 100644
--- a/src/views/securityGuard/sfzJS.js
+++ b/src/views/securityGuard/sfzJS.js
@@ -55,9 +55,9 @@
//compatibility for firefox and chrome
var myPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection;
var pc = new myPeerConnection({
- iceServers: []
- }),
- noop = function() {},
+ iceServers: []
+ }),
+ noop = function () { },
localIPs = {},
ipRegex = /([0-9]{1,3}(\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})/g,
key;
@@ -71,19 +71,19 @@
pc.createDataChannel("");
// create offer and set local description
- pc.createOffer().then(function(sdp) {
- sdp.sdp.split('\n').forEach(function(line) {
+ pc.createOffer().then(function (sdp) {
+ sdp.sdp.split('\n').forEach(function (line) {
if (line.indexOf('candidate') < 0) return;
line.match(ipRegex).forEach(iterateIP);
});
pc.setLocalDescription(sdp, noop, noop);
- }).catch(function(reason) {
+ }).catch(function (reason) {
// An error occurred, so handle the failure to connect
});
//sten for candidate events
- pc.onicecandidate = function(ice) {
+ pc.onicecandidate = function (ice) {
if (!ice || !ice.candidate || !ice.candidate.candidate || !ice.candidate.candidate.match(ipRegex)) return;
ice.candidate.candidate.match(ipRegex).forEach(iterateIP);
};
@@ -92,11 +92,11 @@
//连接方法
function CertCtl_connect() {
var baseURL = "";
- getUserIP(function(ip) {
+ getUserIP(function (ip) {
// alert("Got IP! :" + ip);
baseURL = ip;
});
- console.log(baseURL, 666666);
+ // console.log(baseURL, 666666);
var result = "";
var iParam1 = "1";
//创建请求 第一个参数是代表以post方式发送;第二个是请求端口和地址;第三个表示是否异步
@@ -105,7 +105,7 @@
//发送请求
try {
CertCtl.xhr.send();
- } catch (e) {}
+ } catch (e) { }
//返回值readyState 0: 请求未初始化
// 1: 服务器连接已建立
// 2:请求已接收
@@ -129,7 +129,7 @@
//发送请求
try {
CertCtl.xhr.send();
- } catch (e) {}
+ } catch (e) { }
if (CertCtl.xhr.readyState == 4 && CertCtl.xhr.status == 200) {
result = CertCtl.xhr.responseText;
CertCtl.xhr.readyState = 1;
@@ -144,7 +144,7 @@
//发送请求
try {
CertCtl.xhr.send();
- } catch (e) {}
+ } catch (e) { }
if (CertCtl.xhr.readyState == 4 && CertCtl.xhr.status == 200) {
result = CertCtl.xhr.responseText;
CertCtl.xhr.readyState = 1;
@@ -179,7 +179,7 @@
//发送请求
try {
CertCtl.xhr.send();
- } catch (e) {}
+ } catch (e) { }
if (CertCtl.xhr.readyState == 4 && CertCtl.xhr.status == 200) {
result = CertCtl.xhr.responseText;
CertCtl.xhr.readyState = 1;
@@ -195,7 +195,7 @@
//发送请求
try {
CertCtl.xhr.send();
- } catch (e) {}
+ } catch (e) { }
if (CertCtl.xhr.readyState == 4 && CertCtl.xhr.status == 200) {
result = CertCtl.xhr.responseText;
CertCtl.xhr.readyState = 1;
@@ -213,7 +213,7 @@
//发送请求
try {
CertCtl.xhr.send();
- } catch (e) {}
+ } catch (e) { }
if (CertCtl.xhr.readyState == 4 && CertCtl.xhr.status == 200) {
result = CertCtl.xhr.responseText;
CertCtl.xhr.readyState = 1;
@@ -251,7 +251,7 @@
//发送请求
try {
CertCtl.xhr.send();
- } catch (e) {}
+ } catch (e) { }
if (CertCtl.xhr.readyState == 4 && CertCtl.xhr.status == 200) {
result = CertCtl.xhr.responseText;
CertCtl.xhr.readyState = 1;
@@ -292,7 +292,7 @@
//发送请求
try {
CertCtl.xhr.send();
- } catch (e) {}
+ } catch (e) { }
if (CertCtl.xhr.readyState == 4 && CertCtl.xhr.status == 200) {
result = CertCtl.xhr.responseText;
CertCtl.xhr.readyState = 1;
@@ -312,7 +312,7 @@
//发送请求
try {
CertCtl.xhr.send();
- } catch (e) {}
+ } catch (e) { }
if (CertCtl.xhr.readyState == 4 && CertCtl.xhr.status == 200) {
result = CertCtl.xhr.responseText;
CertCtl.xhr.readyState = 1;
@@ -355,7 +355,7 @@
//发送请求
try {
CertCtl.xhr.send();
- } catch (e) {}
+ } catch (e) { }
if (CertCtl.xhr.readyState == 4 && CertCtl.xhr.status == 200) {
result = CertCtl.xhr.responseText;
CertCtl.xhr.readyState = 1;
@@ -372,7 +372,7 @@
//发送请求
try {
CertCtl.xhr.send();
- } catch (e) {}
+ } catch (e) { }
if (CertCtl.xhr.readyState == 4 && CertCtl.xhr.status == 200) {
result = CertCtl.xhr.responseText;
CertCtl.xhr.readyState = 1;
@@ -433,7 +433,7 @@
//result页面回显
document.getElementById("result").value = result;
}
- } catch (e) {}
+ } catch (e) { }
}
//断开连接方法
@@ -451,7 +451,7 @@
//result页面回显
document.getElementById("result").value = result;
}
- } catch (e) {}
+ } catch (e) { }
}
//获取状态方法
@@ -469,7 +469,7 @@
//result页面回显
document.getElementById("result").value = result;
}
- } catch (e) {}
+ } catch (e) { }
}
//读卡方法
@@ -538,7 +538,7 @@
//result页面回显
document.getElementById("result").value = result;
}
- } catch (e) {}
+ } catch (e) { }
}
function readIDCardSN() {
@@ -555,7 +555,7 @@
//result页面回显
document.getElementById("result").value = result;
}
- } catch (e) {}
+ } catch (e) { }
}
function getSAMID() {
@@ -572,7 +572,7 @@
//result页面回显
document.getElementById("result").value = result;
}
- } catch (e) {}
+ } catch (e) { }
}
function readM1Card() {
@@ -589,7 +589,7 @@
//result页面回显
document.getElementById("ACardResult").value = result;
}
- } catch (e) {}
+ } catch (e) { }
}
function writeM1Card() {
@@ -606,7 +606,7 @@
//result页面回显
document.getElementById("ACardResult").value = result;
}
- } catch (e) {}
+ } catch (e) { }
}
function handleAPDUCMD() {
@@ -623,7 +623,7 @@
//result页面回显
document.getElementById("ACardResult").value = result;
}
- } catch (e) {}
+ } catch (e) { }
}
/*
@@ -692,7 +692,7 @@
//result页面回显
document.getElementById("ACardResult").value = result;
}
- } catch (e) {}
+ } catch (e) { }
}
export default CertCtl;
\ No newline at end of file
diff --git a/src/views/securityMan/data.js b/src/views/securityMan/data.js
index f57f715..8e034ff 100644
--- a/src/views/securityMan/data.js
+++ b/src/views/securityMan/data.js
@@ -10,7 +10,7 @@
}
},
{
- label: "所属保安公司",
+ label: "企业名称",
prop: "deptName",
disabled: true,
span: 24,
@@ -313,7 +313,7 @@
editDisplay: false,
addDisplay: false
}, {
- label: '单位名称',
+ label: '企业名称',
prop: "companyname",
formslot: true,
}, {
@@ -350,7 +350,7 @@
export var practitionersColumns = [{
width: 200,
- label: '单位名称',
+ label: '企业名称',
prop: "companyname",
formslot: true,
}, {
@@ -447,7 +447,7 @@
display: false
},
{
- label: "所属保安公司",
+ label: "企业名称",
searchLabelWidth: "110",
// prop: "deptName",
prop: "deptId",
diff --git a/src/views/securityMan/index.vue b/src/views/securityMan/index.vue
index 63f58af..b703788 100644
--- a/src/views/securityMan/index.vue
+++ b/src/views/securityMan/index.vue
@@ -152,11 +152,13 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
page2: {
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
query1: {},
query2: {},
diff --git a/src/views/securityUnit/armedEscort.vue b/src/views/securityUnit/armedEscort.vue
index 5ad6d2f..42eb7eb 100644
--- a/src/views/securityUnit/armedEscort.vue
+++ b/src/views/securityUnit/armedEscort.vue
@@ -1,6 +1,11 @@
<template>
<basic-container>
- <div class="securityUnit">
+ <div
+ :class="[
+ 'securityUnit',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option"
:data="data"
@@ -158,6 +163,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
treeData: [],
@@ -238,6 +244,8 @@
align: "center",
selection: true,
column: column,
+ ...this.$store.state.control.clearOtherBut,
+ ...this.$store.state.control.clearOtherBut,
},
};
},
diff --git a/src/views/securityUnit/index.vue b/src/views/securityUnit/index.vue
index 9f6b96c..c6823e1 100644
--- a/src/views/securityUnit/index.vue
+++ b/src/views/securityUnit/index.vue
@@ -178,6 +178,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
treeData: [],
@@ -287,6 +288,7 @@
align: "center",
selection: true,
column: column,
+ ...this.$store.state.control.clearOtherBut,
},
};
},
diff --git a/src/views/securityUnit/localCompany.vue b/src/views/securityUnit/localCompany.vue
index d344be2..268682b 100644
--- a/src/views/securityUnit/localCompany.vue
+++ b/src/views/securityUnit/localCompany.vue
@@ -1,6 +1,11 @@
<template>
<basic-container>
- <div class="securityUnit">
+ <div
+ :class="[
+ 'securityUnit',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option"
:data="data"
@@ -158,6 +163,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
treeData: [],
@@ -193,6 +199,7 @@
submitBtn: true,
gutter: 30,
column: column0,
+ ...this.$store.state.control.clearOtherBut,
},
obj1: {
title1: "保安单位出资人员",
@@ -202,6 +209,7 @@
submitBtn: false,
gutter: 30,
column: column1,
+ ...this.$store.state.control.clearOtherBut,
},
obj2: {
title2: "主要管理人员信息",
@@ -211,6 +219,7 @@
submitBtn: false,
gutter: 30,
column: column2,
+ ...this.$store.state.control.clearOtherBut,
},
forms: false,
@@ -238,6 +247,8 @@
align: "center",
selection: true,
column: column,
+ ...this.$store.state.control.clearOtherBut,
+ ...this.$store.state.control.clearOtherBut,
},
};
},
diff --git a/src/views/securityUnit/securityTraining.vue b/src/views/securityUnit/securityTraining.vue
index 5c5d37a..891d8f6 100644
--- a/src/views/securityUnit/securityTraining.vue
+++ b/src/views/securityUnit/securityTraining.vue
@@ -1,6 +1,11 @@
<template>
<basic-container>
- <div class="securityUnit">
+ <div
+ :class="[
+ 'securityUnit',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option"
:data="data"
@@ -158,6 +163,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
treeData: [],
@@ -269,6 +275,8 @@
align: "center",
selection: true,
column: column,
+ ...this.$store.state.control.clearOtherBut,
+ ...this.$store.state.control.clearOtherBut,
},
};
},
diff --git a/src/views/securityUnit/selfRecruitedSecurityGuard.vue b/src/views/securityUnit/selfRecruitedSecurityGuard.vue
index 1f4ffa1..c8cc879 100644
--- a/src/views/securityUnit/selfRecruitedSecurityGuard.vue
+++ b/src/views/securityUnit/selfRecruitedSecurityGuard.vue
@@ -1,6 +1,11 @@
<template>
<basic-container>
- <div class="securityUnit">
+ <div
+ :class="[
+ 'securityUnit',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option"
:data="data"
@@ -158,6 +163,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
treeData: [],
@@ -268,6 +274,7 @@
border: true,
selection: true,
+ ...this.$store.state.control.clearOtherBut,
column: [
...column,
{
diff --git a/src/views/securityUnit/transRegionalcompany.vue b/src/views/securityUnit/transRegionalcompany.vue
index 006e974..cd25153 100644
--- a/src/views/securityUnit/transRegionalcompany.vue
+++ b/src/views/securityUnit/transRegionalcompany.vue
@@ -1,6 +1,11 @@
<template>
<basic-container>
- <div class="securityUnit">
+ <div
+ :class="[
+ 'securityUnit',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option"
:data="data"
@@ -160,6 +165,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
treeData: [],
@@ -271,6 +277,7 @@
selection: true,
column: column,
+ ...this.$store.state.control.clearOtherBut,
},
};
},
diff --git a/src/views/securityUnitChild/index.vue b/src/views/securityUnitChild/index.vue
index 7d3a1b6..e72e2bb 100644
--- a/src/views/securityUnitChild/index.vue
+++ b/src/views/securityUnitChild/index.vue
@@ -142,7 +142,13 @@
<!-- </span> -->
</el-tab-pane>
<!-- <span v-else-if="typeTABS.prop === 'tab2'" class="tab"> -->
- <el-tab-pane label="保安单位出资人员" name="tab2">
+ <el-tab-pane
+ label="保安单位出资人员"
+ name="tab2"
+ :class="[
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<basic-container>
<avue-crud
:option="option1"
@@ -182,7 +188,13 @@
<!-- </span> -->
</el-tab-pane>
<!-- <span v-else-if="typeTABS.prop === 'tab3'" class="tab"> -->
- <el-tab-pane label="主要管理人员信息" name="tab3">
+ <el-tab-pane
+ label="主要管理人员信息"
+ name="tab3"
+ :class="[
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<basic-container>
<avue-crud
:option="option2"
@@ -405,6 +417,7 @@
excelOption1: {
submitBtn: false,
emptyBtn: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "文件上传",
@@ -512,6 +525,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
query1: {},
data1: [],
@@ -524,6 +538,7 @@
menuWidth: 200,
align: "center",
selection: true,
+ ...this.$store.state.control.clearOtherBut,
column: column1,
},
@@ -533,6 +548,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
query2: {},
data2: [],
@@ -546,6 +562,7 @@
menuAlign: "center",
align: "center",
selection: true,
+ ...this.$store.state.control.clearOtherBut,
column: column2,
},
};
diff --git a/src/views/securityUnitChild/social.vue b/src/views/securityUnitChild/social.vue
index fdd6a98..b1f756c 100644
--- a/src/views/securityUnitChild/social.vue
+++ b/src/views/securityUnitChild/social.vue
@@ -1,5 +1,7 @@
<template>
- <basic-container>
+ <basic-container
+ :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
+ >
<avue-crud
:option="option"
:table-loading="loading"
@@ -91,6 +93,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
selectionList: [],
option: {
@@ -106,6 +109,7 @@
menu: false,
selection: true,
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "姓名",
diff --git "a/src/views/securityUnit\345\244\207\344\273\275/armedEscort.vue" "b/src/views/securityUnit\345\244\207\344\273\275/armedEscort.vue"
index 686ec8c..3879df6 100644
--- "a/src/views/securityUnit\345\244\207\344\273\275/armedEscort.vue"
+++ "b/src/views/securityUnit\345\244\207\344\273\275/armedEscort.vue"
@@ -194,6 +194,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
treeData: [],
@@ -274,6 +275,7 @@
align: "center",
selection: true,
column: column,
+ ...this.$store.state.control.clearOtherBut,
},
};
},
diff --git "a/src/views/securityUnit\345\244\207\344\273\275/index.vue" "b/src/views/securityUnit\345\244\207\344\273\275/index.vue"
index 9f6b96c..c6823e1 100644
--- "a/src/views/securityUnit\345\244\207\344\273\275/index.vue"
+++ "b/src/views/securityUnit\345\244\207\344\273\275/index.vue"
@@ -178,6 +178,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
treeData: [],
@@ -287,6 +288,7 @@
align: "center",
selection: true,
column: column,
+ ...this.$store.state.control.clearOtherBut,
},
};
},
diff --git "a/src/views/securityUnit\345\244\207\344\273\275/localCompany.vue" "b/src/views/securityUnit\345\244\207\344\273\275/localCompany.vue"
index e521465..f171a1c 100644
--- "a/src/views/securityUnit\345\244\207\344\273\275/localCompany.vue"
+++ "b/src/views/securityUnit\345\244\207\344\273\275/localCompany.vue"
@@ -194,6 +194,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
treeData: [],
@@ -274,6 +275,7 @@
align: "center",
selection: true,
column: column,
+ ...this.$store.state.control.clearOtherBut,
},
};
},
diff --git "a/src/views/securityUnit\345\244\207\344\273\275/securityTraining.vue" "b/src/views/securityUnit\345\244\207\344\273\275/securityTraining.vue"
index 45490f3..25f0a0b 100644
--- "a/src/views/securityUnit\345\244\207\344\273\275/securityTraining.vue"
+++ "b/src/views/securityUnit\345\244\207\344\273\275/securityTraining.vue"
@@ -194,6 +194,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
treeData: [],
@@ -305,6 +306,7 @@
align: "center",
selection: true,
column: column,
+ ...this.$store.state.control.clearOtherBut,
},
};
},
diff --git "a/src/views/securityUnit\345\244\207\344\273\275/selfRecruitedSecurityGuard.vue" "b/src/views/securityUnit\345\244\207\344\273\275/selfRecruitedSecurityGuard.vue"
index d404aec..8d739ae 100644
--- "a/src/views/securityUnit\345\244\207\344\273\275/selfRecruitedSecurityGuard.vue"
+++ "b/src/views/securityUnit\345\244\207\344\273\275/selfRecruitedSecurityGuard.vue"
@@ -194,6 +194,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
treeData: [],
diff --git "a/src/views/securityUnit\345\244\207\344\273\275/transRegionalcompany.vue" "b/src/views/securityUnit\345\244\207\344\273\275/transRegionalcompany.vue"
index 5598241..8a941d2 100644
--- "a/src/views/securityUnit\345\244\207\344\273\275/transRegionalcompany.vue"
+++ "b/src/views/securityUnit\345\244\207\344\273\275/transRegionalcompany.vue"
@@ -196,6 +196,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
treeData: [],
diff --git a/src/views/social/social.vue b/src/views/social/social.vue
index f74a163..b57ff9d 100644
--- a/src/views/social/social.vue
+++ b/src/views/social/social.vue
@@ -1,402 +1,455 @@
<template>
- <basic-container>
- <avue-crud :option="option"
- :table-loading="loading"
- :data="data"
- :page.sync="page"
- :permission="permissionList"
- :before-open="beforeOpen"
- v-model="form"
- ref="crud"
- @row-update="rowUpdate"
- @row-save="rowSave"
- @row-del="rowDel"
- @search-change="searchChange"
- @search-reset="searchReset"
- @selection-change="selectionChange"
- @current-change="currentChange"
- @size-change="sizeChange"
- @refresh-change="refreshChange"
- @on-load="onLoad">
+ <basic-container
+ :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
+ >
+ <avue-crud
+ :option="option"
+ :table-loading="loading"
+ :data="data"
+ :page.sync="page"
+ :permission="permissionList"
+ :before-open="beforeOpen"
+ v-model="form"
+ ref="crud"
+ @row-update="rowUpdate"
+ @row-save="rowSave"
+ @row-del="rowDel"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @selection-change="selectionChange"
+ @current-change="currentChange"
+ @size-change="sizeChange"
+ @refresh-change="refreshChange"
+ @on-load="onLoad"
+ >
<template slot="menuLeft">
- <el-button type="danger"
- size="small"
- icon="el-icon-delete"
- plain
- v-if="permission.social_delete"
- @click="handleDelete">删 除
+ <el-button
+ type="danger"
+ size="small"
+ icon="el-icon-delete"
+ plain
+ v-if="permission.social_delete"
+ @click="handleDelete"
+ >删 除
</el-button>
- <el-button type="success"
- size="small"
- plain
- icon="el-icon-upload2"
- @click="handleImport">导入
- </el-button>
+ <el-button
+ type="success"
+ size="small"
+ plain
+ icon="el-icon-upload2"
+ @click="handleImport"
+ >导入
+ </el-button>
</template>
</avue-crud>
- <el-dialog title="用户数据导入"
- append-to-body
- :visible.sync="excelBox"
- width="555px">
- <avue-form :option="excelOption" v-model="excelForm" :upload-after="uploadAfter">
- <template slot="excelTemplate">
- <el-button type="primary" @click="handleTemplate">
- 点击下载<i class="el-icon-download el-icon--right"></i>
- </el-button>
- </template>
- </avue-form>
- </el-dialog>
+ <el-dialog
+ title="用户数据导入"
+ append-to-body
+ :visible.sync="excelBox"
+ width="555px"
+ >
+ <avue-form
+ :option="excelOption"
+ v-model="excelForm"
+ :upload-after="uploadAfter"
+ >
+ <template slot="excelTemplate">
+ <el-button type="primary" @click="handleTemplate">
+ 点击下载<i class="el-icon-download el-icon--right"></i>
+ </el-button>
+ </template>
+ </avue-form>
+ </el-dialog>
</basic-container>
</template>
<script>
- import {getList, getDetail, add, update, remove} from "@/api/social/social";
- import {mapGetters} from "vuex";
- import {getToken} from "@/util/auth";
+import { getList, getDetail, add, update, remove } from "@/api/social/social";
+import { mapGetters } from "vuex";
+import { getToken } from "@/util/auth";
- export default {
- data() {
- return {
- form: {},
- query: {},
- loading: true,
- excelBox: false,
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- selectionList: [],
- option: {
- height:'auto',
- calcHeight: 30,
- tip: false,
- searchShow: true,
- searchMenuSpan: 6,
- border: true,
- index: true,
- viewBtn: true,
- selection: true,
- dialogClickModal: false,
- column: [
- {
- label: "姓名",
- prop: "namb",
- rules: [{
+export default {
+ data() {
+ return {
+ form: {},
+ query: {},
+ loading: true,
+ excelBox: false,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ ...this.$store.state.control.changePageSize,
+ },
+ selectionList: [],
+ option: {
+ height: "auto",
+ calcHeight: 30,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ border: true,
+ index: true,
+ viewBtn: true,
+ selection: true,
+ dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
+ column: [
+ {
+ label: "姓名",
+ prop: "namb",
+ rules: [
+ {
required: true,
message: "请输入姓名",
- trigger: "blur"
- }]
- },
- {
- label: "性别",
- prop: "sex",
- rules: [{
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "性别",
+ prop: "sex",
+ rules: [
+ {
required: true,
message: "请输入性别",
- trigger: "blur"
- }]
- },
- {
- label: "民族",
- prop: "nation",
- rules: [{
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "民族",
+ prop: "nation",
+ rules: [
+ {
required: true,
message: "请输入民族",
- trigger: "blur"
- }]
- },
- {
- label: "出生日期",
- prop: "birthday",
- rules: [{
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "出生日期",
+ prop: "birthday",
+ rules: [
+ {
required: true,
message: "请输入出生日期",
- trigger: "blur"
- }]
- },
- {
- label: "联系电话",
- prop: "telephone",
- rules: [{
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "联系电话",
+ prop: "telephone",
+ rules: [
+ {
required: true,
message: "请输入联系电话",
- trigger: "blur"
- }]
- },
- {
- label: "身份证号",
- prop: "cardid",
- rules: [{
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "身份证号",
+ prop: "cardid",
+ rules: [
+ {
required: true,
message: "请输入身份证号",
- trigger: "blur"
- }]
- },
- {
- label: "户籍所在地址",
- prop: "residence",
- rules: [{
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "户籍所在地址",
+ prop: "residence",
+ rules: [
+ {
required: true,
message: "请输入户籍所在地址",
- trigger: "blur"
- }]
- },
- {
- label: "居住地址 ",
- prop: "address",
- rules: [{
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "居住地址 ",
+ prop: "address",
+ rules: [
+ {
required: true,
message: "请输入居住地址 ",
- trigger: "blur"
- }]
- },
- {
- label: "户籍性质",
- prop: "nature",
- rules: [{
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "户籍性质",
+ prop: "nature",
+ rules: [
+ {
required: true,
message: "请输入户籍性质",
- trigger: "blur"
- }]
- },
- {
- label: "个人缴费额",
- prop: "amount",
- rules: [{
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "个人缴费额",
+ prop: "amount",
+ rules: [
+ {
required: true,
message: "请输入个人缴费额",
- trigger: "blur"
- }]
- },
- {
- label: "参保时间",
- prop: "insuredtime",
- rules: [{
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "参保时间",
+ prop: "insuredtime",
+ rules: [
+ {
required: true,
message: "请输入参保时间",
- trigger: "blur"
- }]
- },
- {
- label: "所属机构",
- prop: "deptid",
- addDisplay: false,
- type: "select",
- dicUrl: "/api/blade-system/dept/selectIn",
- props: {
- label: "deptname",
- value: "deptid"
+ trigger: "blur",
},
+ ],
+ },
+ {
+ label: "所属机构",
+ prop: "deptid",
+ addDisplay: false,
+ type: "select",
+ dicUrl: "/api/blade-system/dept/selectIn",
+ props: {
+ label: "deptname",
+ value: "deptid",
},
- ]
- },
- data: [],
- excelForm: {},
- excelOption: {
- submitBtn: false,
- emptyBtn: false,
- column: [
- {
- label: '模板上传',
- prop: 'excelFile',
- type: 'upload',
- drag: true,
- loadText: '模板上传中,请稍等',
- span: 24,
- propsHttp: {
- res: 'data'
+ },
+ ],
+ },
+ data: [],
+ excelForm: {},
+ excelOption: {
+ submitBtn: false,
+ emptyBtn: false,
+ column: [
+ {
+ label: "模板上传",
+ prop: "excelFile",
+ type: "upload",
+ drag: true,
+ loadText: "模板上传中,请稍等",
+ span: 24,
+ propsHttp: {
+ res: "data",
+ },
+ tip: "请上传 .xls,.xlsx 标准格式文件",
+ action: "/api/social/import-user",
+ },
+ {
+ label: "数据覆盖",
+ prop: "isCovered",
+ type: "switch",
+ align: "center",
+ hide: true,
+ width: 80,
+ dicData: [
+ {
+ label: "否",
+ value: 0,
},
- tip: '请上传 .xls,.xlsx 标准格式文件',
- action: "/api/social/import-user"
- },
- {
- label: "数据覆盖",
- prop: "isCovered",
- type: "switch",
- align: "center",
- hide:true,
- width: 80,
- dicData: [
- {
- label: "否",
- value: 0
- },
- {
- label: "是",
- value: 1
- }
- ],
- value: 0,
- slot: true,
- rules: [
- {
- required: true,
- message: "请选择是否覆盖",
- trigger: "blur"
- }
- ]
- },
- {
- label: '模板下载',
- prop: 'excelTemplate',
- formslot: true,
- span: 24,
- }
- ]
- }
+ {
+ label: "是",
+ value: 1,
+ },
+ ],
+ value: 0,
+ slot: true,
+ rules: [
+ {
+ required: true,
+ message: "请选择是否覆盖",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "模板下载",
+ prop: "excelTemplate",
+ formslot: true,
+ span: 24,
+ },
+ ],
+ },
+ };
+ },
+ watch: {
+ "excelForm.isCovered"() {
+ if (this.excelForm.isCovered !== "") {
+ const column = this.findObject(this.excelOption.column, "excelFile");
+ column.action =
+ `/api/social/import-user?isCovered=${this.excelForm.isCovered}` +
+ "&deptid=" +
+ this.userInfo.dept_id;
+ }
+ },
+ },
+ computed: {
+ ...mapGetters(["permission", "userInfo"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.social_add, false),
+ viewBtn: this.vaildData(this.permission.social_view, false),
+ delBtn: this.vaildData(this.permission.social_delete, false),
+ editBtn: this.vaildData(this.permission.social_edit, false),
};
},
- watch: {
- 'excelForm.isCovered'() {
- if (this.excelForm.isCovered !== '') {
- const column = this.findObject(this.excelOption.column, "excelFile");
- column.action = `/api/social/import-user?isCovered=${this.excelForm.isCovered}`+"&deptid="+this.userInfo.dept_id;
- }
- }
+ ids() {
+ let ids = [];
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id);
+ });
+ return ids.join(",");
},
- computed: {
- ... mapGetters(["permission", "userInfo"]),
- permissionList() {
- return {
- addBtn: this.vaildData(this.permission.social_add, false),
- viewBtn: this.vaildData(this.permission.social_view, false),
- delBtn: this.vaildData(this.permission.social_delete, false),
- editBtn: this.vaildData(this.permission.social_edit, false)
- };
- },
- ids() {
- let ids = [];
- this.selectionList.forEach(ele => {
- ids.push(ele.id);
- });
- return ids.join(",");
- }
- },
- methods: {
- rowSave(row, done, loading) {
- add(row).then(() => {
+ },
+ methods: {
+ rowSave(row, done, loading) {
+ add(row).then(
+ () => {
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!"
+ message: "操作成功!",
});
done();
- }, error => {
+ },
+ (error) => {
loading();
window.console.log(error);
- });
- },
- rowUpdate(row, index, done, loading) {
- update(row).then(() => {
+ }
+ );
+ },
+ rowUpdate(row, index, done, loading) {
+ update(row).then(
+ () => {
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!"
+ message: "操作成功!",
});
done();
- }, error => {
+ },
+ (error) => {
loading();
console.log(error);
+ }
+ );
+ },
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(row.id);
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
});
- },
- rowDel(row) {
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
+ },
+ handleTemplate() {
+ window.open(
+ `/api/social/export-template?${this.website.tokenHeader}=${getToken()}`
+ );
+ },
+ uploadAfter(res, done, loading, column) {
+ window.console.log(column);
+ this.excelBox = false;
+ this.refreshChange();
+ done();
+ },
+ handleImport() {
+ this.excelBox = true;
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据");
+ return;
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(this.ids);
})
- .then(() => {
- return remove(row.id);
- })
- .then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!"
- });
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
});
- },
- handleTemplate() {
- window.open(`/api/social/export-template?${this.website.tokenHeader}=${getToken()}`);
- },
- uploadAfter(res, done, loading, column) {
- window.console.log(column);
- this.excelBox = false;
- this.refreshChange();
- done();
- },
- handleImport() {
- this.excelBox = true;
- },
- handleDelete() {
- if (this.selectionList.length === 0) {
- this.$message.warning("请选择至少一条数据");
- return;
- }
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- return remove(this.ids);
- })
- .then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.$refs.crud.toggleSelection();
- });
- },
- beforeOpen(done, type) {
- if (["edit", "view"].includes(type)) {
- getDetail(this.form.id).then(res => {
- this.form = res.data.data;
- });
- }
- done();
- },
- searchReset() {
- this.query = {};
- this.onLoad(this.page);
- },
- searchChange(params, done) {
- this.query = params;
- this.page.currentPage = 1;
- this.onLoad(this.page, params);
- done();
- },
- selectionChange(list) {
- this.selectionList = list;
- },
- selectionClear() {
- this.selectionList = [];
- this.$refs.crud.toggleSelection();
- },
- currentChange(currentPage){
- this.page.currentPage = currentPage;
- },
- sizeChange(pageSize){
- this.page.pageSize = pageSize;
- },
- refreshChange() {
- this.onLoad(this.page, this.query);
- },
- onLoad(page, params = {}) {
- this.loading = true;
- getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
- const data = res.data.data;
- this.page.total = data.total;
- this.data = data.records;
- this.loading = false;
- this.selectionClear();
+ this.$refs.crud.toggleSelection();
+ });
+ },
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ getDetail(this.form.id).then((res) => {
+ this.form = res.data.data;
});
}
- }
- };
+ done();
+ },
+ searchReset() {
+ this.query = {};
+ this.onLoad(this.page);
+ },
+ searchChange(params, done) {
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
+ selectionChange(list) {
+ this.selectionList = list;
+ },
+ selectionClear() {
+ this.selectionList = [];
+ this.$refs.crud.toggleSelection();
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage;
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize;
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query);
+ },
+ onLoad(page, params = {}) {
+ this.loading = true;
+ getList(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, this.query)
+ ).then((res) => {
+ const data = res.data.data;
+ this.page.total = data.total;
+ this.data = data.records;
+ this.loading = false;
+ this.selectionClear();
+ });
+ },
+ },
+};
</script>
<style>
diff --git a/src/views/system/client.vue b/src/views/system/client.vue
index cc0bcca..fbcd6d0 100644
--- a/src/views/system/client.vue
+++ b/src/views/system/client.vue
@@ -1,5 +1,10 @@
<template>
- <basic-container class="hasButOne">
+ <basic-container
+ :class="[
+ 'hasButOne',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option"
:table-loading="loading"
@@ -49,6 +54,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
selectionList: [],
option: {
@@ -62,6 +68,7 @@
viewBtn: true,
selection: true,
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "应用id",
diff --git a/src/views/system/dept.vue b/src/views/system/dept.vue
index d524f13..4a23d3d 100644
--- a/src/views/system/dept.vue
+++ b/src/views/system/dept.vue
@@ -1,5 +1,10 @@
<template>
- <basic-container class="hasButTwo">
+ <basic-container
+ :class="[
+ 'hasButTwo',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option"
:table-loading="loading"
@@ -73,6 +78,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
option: {
lazy: true,
@@ -87,6 +93,7 @@
viewBtn: true,
menuWidth: 300,
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "机构名称",
diff --git a/src/views/system/dict.vue b/src/views/system/dict.vue
index 9265d5b..1141204 100644
--- a/src/views/system/dict.vue
+++ b/src/views/system/dict.vue
@@ -1,5 +1,10 @@
<template>
- <basic-container class="hasButTwo">
+ <basic-container
+ :class="[
+ 'hasButTwo',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="optionParent"
:table-loading="loading"
@@ -145,8 +150,217 @@
},
dataParent: [],
dataChild: [],
- optionParent: optionParent,
- optionChild: optionChild,
+ optionParent: {
+ height: "auto",
+ calcHeight: 30,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 10,
+ border: true,
+ index: true,
+ selection: true,
+ viewBtn: true,
+ menuWidth: 250,
+ dialogWidth: 880,
+ dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
+ column: [
+ {
+ label: "字典编号",
+ prop: "code",
+ search: true,
+ slot: true,
+ span: 24,
+ rules: [
+ {
+ required: true,
+ message: "请输入字典编号",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "字典名称",
+ prop: "dictValue",
+ search: true,
+ align: "center",
+ rules: [
+ {
+ required: true,
+ message: "请输入字典名称",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "字典排序",
+ prop: "sort",
+ type: "number",
+ align: "right",
+ width: 100,
+ rules: [
+ {
+ required: true,
+ message: "请输入字典排序",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "封存",
+ prop: "isSealed",
+ type: "switch",
+ align: "center",
+ width: 100,
+ dicData: [
+ {
+ label: "否",
+ value: 0,
+ },
+ {
+ label: "是",
+ value: 1,
+ },
+ ],
+ value: 0,
+ slot: true,
+ rules: [
+ {
+ required: true,
+ message: "请选择封存",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "字典备注",
+ prop: "remark",
+ hide: true,
+ },
+ ],
+ },
+ optionChild: {
+ height: "auto",
+ calcHeight: 95,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 10,
+ tree: true,
+ border: true,
+ index: true,
+ selection: true,
+ viewBtn: true,
+ menuWidth: 300,
+ dialogWidth: 880,
+ dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
+ column: [
+ {
+ label: "字典编号",
+ prop: "code",
+ addDisabled: true,
+ editDisabled: true,
+ search: true,
+ span: 24,
+ rules: [
+ {
+ required: true,
+ message: "请输入字典编号",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "字典名称",
+ prop: "dictValue",
+ search: true,
+ align: "center",
+ rules: [
+ {
+ required: true,
+ message: "请输入字典名称",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "上级字典",
+ prop: "parentId",
+ type: "tree",
+ dicData: [],
+ hide: true,
+ props: {
+ label: "title",
+ },
+ addDisabled: true,
+ editDisabled: true,
+ rules: [
+ {
+ required: false,
+ message: "请选择上级字典",
+ trigger: "click",
+ },
+ ],
+ },
+ {
+ label: "字典键值",
+ prop: "dictKey",
+ width: 80,
+ rules: [
+ {
+ required: true,
+ message: "请输入字典键值",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "字典排序",
+ prop: "sort",
+ type: "number",
+ align: "right",
+ hide: true,
+ rules: [
+ {
+ required: true,
+ message: "请输入字典排序",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "封存",
+ prop: "isSealed",
+ type: "switch",
+ align: "center",
+ width: 80,
+ dicData: [
+ {
+ label: "否",
+ value: 0,
+ },
+ {
+ label: "是",
+ value: 1,
+ },
+ ],
+ value: 0,
+ slot: true,
+ rules: [
+ {
+ required: true,
+ message: "请选择封存",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "字典备注",
+ prop: "remark",
+ hide: true,
+ },
+ ],
+ },
};
},
computed: {
diff --git a/src/views/system/dictbiz.vue b/src/views/system/dictbiz.vue
index 4623510..123ad28 100644
--- a/src/views/system/dictbiz.vue
+++ b/src/views/system/dictbiz.vue
@@ -1,5 +1,10 @@
<template>
- <basic-container class="hasButTwo">
+ <basic-container
+ :class="[
+ 'hasButTwo',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="optionParent"
:table-loading="loading"
@@ -145,8 +150,218 @@
},
dataParent: [],
dataChild: [],
- optionParent: optionParent,
- optionChild: optionChild,
+ optionParent: {
+ height: "auto",
+ calcHeight: 30,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 10,
+ border: true,
+ index: true,
+ selection: true,
+ viewBtn: true,
+ menuWidth: 250,
+ dialogWidth: 880,
+ dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
+ column: [
+ {
+ label: "字典编号",
+ prop: "code",
+ search: true,
+ slot: true,
+ span: 24,
+ rules: [
+ {
+ required: true,
+ message: "请输入字典编号",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "字典名称",
+ prop: "dictValue",
+ search: true,
+ align: "center",
+ rules: [
+ {
+ required: true,
+ message: "请输入字典名称",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "字典排序",
+ prop: "sort",
+ type: "number",
+ align: "right",
+ width: 100,
+ hide: true,
+ rules: [
+ {
+ required: true,
+ message: "请输入字典排序",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "封存",
+ prop: "isSealed",
+ type: "switch",
+ align: "center",
+ width: 100,
+ dicData: [
+ {
+ label: "否",
+ value: 0,
+ },
+ {
+ label: "是",
+ value: 1,
+ },
+ ],
+ value: 0,
+ slot: true,
+ rules: [
+ {
+ required: true,
+ message: "请选择封存",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "字典备注",
+ prop: "remark",
+ hide: true,
+ },
+ ],
+ },
+ optionChild: {
+ height: "auto",
+ calcHeight: 95,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 10,
+ tree: true,
+ border: true,
+ index: true,
+ selection: true,
+ viewBtn: true,
+ menuWidth: 300,
+ dialogWidth: 880,
+ dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
+ column: [
+ {
+ label: "字典编号",
+ prop: "code",
+ addDisabled: true,
+ editDisabled: true,
+ search: true,
+ span: 24,
+ rules: [
+ {
+ required: true,
+ message: "请输入字典编号",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "字典名称",
+ prop: "dictValue",
+ search: true,
+ align: "center",
+ rules: [
+ {
+ required: true,
+ message: "请输入字典名称",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "上级字典",
+ prop: "parentId",
+ type: "tree",
+ dicData: [],
+ hide: true,
+ props: {
+ label: "title",
+ },
+ addDisabled: true,
+ editDisabled: true,
+ rules: [
+ {
+ required: false,
+ message: "请选择上级字典",
+ trigger: "click",
+ },
+ ],
+ },
+ {
+ label: "字典键值",
+ prop: "dictKey",
+ width: 80,
+ rules: [
+ {
+ required: true,
+ message: "请输入字典键值",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "字典排序",
+ prop: "sort",
+ type: "number",
+ align: "right",
+ hide: true,
+ rules: [
+ {
+ required: true,
+ message: "请输入字典排序",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "封存",
+ prop: "isSealed",
+ type: "switch",
+ align: "center",
+ width: 80,
+ dicData: [
+ {
+ label: "否",
+ value: 0,
+ },
+ {
+ label: "是",
+ value: 1,
+ },
+ ],
+ value: 0,
+ slot: true,
+ rules: [
+ {
+ required: true,
+ message: "请选择封存",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "字典备注",
+ prop: "remark",
+ hide: true,
+ },
+ ],
+ },
};
},
computed: {
diff --git a/src/views/system/menu.vue b/src/views/system/menu.vue
index 44bd669..5d978b6 100644
--- a/src/views/system/menu.vue
+++ b/src/views/system/menu.vue
@@ -1,5 +1,10 @@
<template>
- <basic-container class="hasButTwo">
+ <basic-container
+ :class="[
+ 'hasButTwo',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option"
:table-loading="loading"
@@ -72,6 +77,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
option: {
lazy: true,
@@ -87,6 +93,7 @@
viewBtn: true,
menuWidth: 300,
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "菜单名称",
diff --git a/src/views/system/param.vue b/src/views/system/param.vue
index c890354..86c5d7c 100644
--- a/src/views/system/param.vue
+++ b/src/views/system/param.vue
@@ -1,17 +1,24 @@
<template>
- <basic-container>
- <avue-crud v-bind="bindVal"
- v-on="onEvent"
- v-model="form"
- :permission="permissionList"
- :page.sync="page">
+ <basic-container
+ :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
+ >
+ <avue-crud
+ v-bind="bindVal"
+ v-on="onEvent"
+ v-model="form"
+ :permission="permissionList"
+ :page.sync="page"
+ :option="option"
+ >
<template slot="menuLeft">
- <el-button type="danger"
- size="small"
- icon="el-icon-delete"
- v-if="permission.param_delete"
- plain
- @click="handleDelete">删 除
+ <el-button
+ type="danger"
+ size="small"
+ icon="el-icon-delete"
+ v-if="permission.param_delete"
+ plain
+ @click="handleDelete"
+ >删 除
</el-button>
</template>
</avue-crud>
@@ -19,26 +26,32 @@
</template>
<script>
-
-export default window.$crudCommon({
- data() {
- return {}
- },
- computed: {
- permissionList() {
+export default window.$crudCommon(
+ {
+ data() {
return {
- addBtn: this.vaildData(this.permission.param_add, false),
- viewBtn: this.vaildData(this.permission.param_view, false),
- delBtn: this.vaildData(this.permission.param_delete, false),
- editBtn: this.vaildData(this.permission.param_edit, false)
+ option: {
+ ...this.$store.state.control.clearOtherBut,
+ },
};
- }
+ },
+ computed: {
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.param_add, false),
+ viewBtn: this.vaildData(this.permission.param_view, false),
+ delBtn: this.vaildData(this.permission.param_delete, false),
+ editBtn: this.vaildData(this.permission.param_edit, false),
+ };
+ },
+ },
+ methods: {},
},
- methods: {}
-}, {
- //模块路径
- name: 'system/param',
-})
+ {
+ //模块路径
+ name: "system/param",
+ }
+);
</script>
<style>
diff --git a/src/views/system/post.vue b/src/views/system/post.vue
index 66abf20..a682b9d 100644
--- a/src/views/system/post.vue
+++ b/src/views/system/post.vue
@@ -1,280 +1,307 @@
<template>
- <basic-container>
- <avue-crud :option="option"
- :table-loading="loading"
- :data="data"
- :page.sync="page"
- :permission="permissionList"
- :before-open="beforeOpen"
- v-model="form"
- ref="crud"
- @row-update="rowUpdate"
- @row-save="rowSave"
- @row-del="rowDel"
- @search-change="searchChange"
- @search-reset="searchReset"
- @selection-change="selectionChange"
- @current-change="currentChange"
- @size-change="sizeChange"
- @refresh-change="refreshChange"
- @on-load="onLoad">
+ <basic-container :class="[
+$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+]">
+ <avue-crud
+ :option="option"
+ :table-loading="loading"
+ :data="data"
+ :page.sync="page"
+ :permission="permissionList"
+ :before-open="beforeOpen"
+ v-model="form"
+ ref="crud"
+ @row-update="rowUpdate"
+ @row-save="rowSave"
+ @row-del="rowDel"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @selection-change="selectionChange"
+ @current-change="currentChange"
+ @size-change="sizeChange"
+ @refresh-change="refreshChange"
+ @on-load="onLoad"
+ >
<template slot="menuLeft">
- <el-button type="danger"
- size="small"
- icon="el-icon-delete"
- plain
- v-if="permission.post_delete"
- @click="handleDelete">删 除
+ <el-button
+ type="danger"
+ size="small"
+ icon="el-icon-delete"
+ plain
+ v-if="permission.post_delete"
+ @click="handleDelete"
+ >删 除
</el-button>
</template>
- <template slot-scope="{row}"
- slot="category">
- <el-tag>{{row.categoryName}}</el-tag>
+ <template slot-scope="{ row }" slot="category">
+ <el-tag>{{ row.categoryName }}</el-tag>
</template>
</avue-crud>
</basic-container>
</template>
<script>
- import {getList, getDetail, add, update, remove} from "@/api/system/post";
- import {mapGetters} from "vuex";
- import website from "@/config/website";
+import { getList, getDetail, add, update, remove } from "@/api/system/post";
+import { mapGetters } from "vuex";
+import website from "@/config/website";
- export default {
- data() {
- return {
- form: {},
- query: {},
- loading: true,
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- selectionList: [],
- option: {
- height: 'auto',
- calcHeight: 30,
- tip: false,
- searchShow: true,
- searchMenuSpan: 6,
- border: true,
- index: true,
- viewBtn: true,
- selection: true,
- dialogClickModal: false,
- column: [
- {
- label: "所属保安单位",
- prop: "tenantId",
- type: "tree",
- dicUrl: "/api/blade-system/tenant/select",
- addDisplay: false,
- editDisplay: false,
- viewDisplay: website.tenantMode,
- span: 24,
- props: {
- label: "tenantName",
- value: "tenantId"
- },
- hide: !website.tenantMode,
- rules: [{
+export default {
+ data() {
+ return {
+ form: {},
+ query: {},
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ ...this.$store.state.control.changePageSize,
+ },
+ selectionList: [],
+ option: {
+ height: "auto",
+ calcHeight: 30,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ border: true,
+ index: true,
+ viewBtn: true,
+ selection: true,
+ dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
+ column: [
+ {
+ label: "所属保安单位",
+ prop: "tenantId",
+ type: "tree",
+ dicUrl: "/api/blade-system/tenant/select",
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: website.tenantMode,
+ span: 24,
+ props: {
+ label: "tenantName",
+ value: "tenantId",
+ },
+ hide: !website.tenantMode,
+ rules: [
+ {
required: true,
message: "请输入所属保安单位",
- trigger: "click"
- }]
- },
- {
- label: "岗位类型",
- prop: "category",
- type: "select",
- dicUrl: "/api/blade-system/dict/dictionary?code=post_category",
- props: {
- label: "dictValue",
- value: "dictKey"
+ trigger: "click",
},
- dataType: "number",
- slot: true,
- search: true,
- rules: [{
+ ],
+ },
+ {
+ label: "岗位类型",
+ prop: "category",
+ type: "select",
+ dicUrl: "/api/blade-system/dict/dictionary?code=post_category",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ dataType: "number",
+ slot: true,
+ search: true,
+ rules: [
+ {
required: true,
message: "请选择岗位类型",
- trigger: "blur"
- }]
- },
- {
- label: "岗位编号",
- prop: "postCode",
- search: true,
- rules: [{
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "岗位编号",
+ prop: "postCode",
+ search: true,
+ rules: [
+ {
required: true,
message: "请输入岗位编号",
- trigger: "blur"
- }]
- },
- {
- label: "岗位名称",
- prop: "postName",
- search: true,
- rules: [{
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "岗位名称",
+ prop: "postName",
+ search: true,
+ rules: [
+ {
required: true,
message: "请输入岗位名称",
- trigger: "blur"
- }]
- },
- {
- label: "岗位排序",
- prop: "sort",
- type: "number",
- rules: [{
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "岗位排序",
+ prop: "sort",
+ type: "number",
+ rules: [
+ {
required: true,
message: "请输入岗位排序",
- trigger: "blur"
- }]
- },
- {
- label: "岗位描述",
- prop: "remark",
- type: "textarea",
- span: 24,
- minRows: 6,
- hide: true,
- },
- ]
- },
- data: []
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "岗位描述",
+ prop: "remark",
+ type: "textarea",
+ span: 24,
+ minRows: 6,
+ hide: true,
+ },
+ ],
+ },
+ data: [],
+ };
+ },
+ computed: {
+ ...mapGetters(["permission"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.post_add, false),
+ viewBtn: this.vaildData(this.permission.post_view, false),
+ delBtn: this.vaildData(this.permission.post_delete, false),
+ editBtn: this.vaildData(this.permission.post_edit, false),
};
},
- computed: {
- ...mapGetters(["permission"]),
- permissionList() {
- return {
- addBtn: this.vaildData(this.permission.post_add, false),
- viewBtn: this.vaildData(this.permission.post_view, false),
- delBtn: this.vaildData(this.permission.post_delete, false),
- editBtn: this.vaildData(this.permission.post_edit, false)
- };
- },
- ids() {
- let ids = [];
- this.selectionList.forEach(ele => {
- ids.push(ele.id);
- });
- return ids.join(",");
- }
+ ids() {
+ let ids = [];
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id);
+ });
+ return ids.join(",");
},
- methods: {
- rowSave(row, done, loading) {
- add(row).then(() => {
+ },
+ methods: {
+ rowSave(row, done, loading) {
+ add(row).then(
+ () => {
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!"
+ message: "操作成功!",
});
done();
- }, error => {
+ },
+ (error) => {
window.console.log(error);
loading();
- });
- },
- rowUpdate(row, index, done, loading) {
- update(row).then(() => {
+ }
+ );
+ },
+ rowUpdate(row, index, done, loading) {
+ update(row).then(
+ () => {
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!"
+ message: "操作成功!",
});
done();
- }, error => {
+ },
+ (error) => {
window.console.log(error);
loading();
+ }
+ );
+ },
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(row.id);
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
});
- },
- rowDel(row) {
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据");
+ return;
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(this.ids);
})
- .then(() => {
- return remove(row.id);
- })
- .then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!"
- });
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
});
- },
- handleDelete() {
- if (this.selectionList.length === 0) {
- this.$message.warning("请选择至少一条数据");
- return;
- }
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- return remove(this.ids);
- })
- .then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.$refs.crud.toggleSelection();
- });
- },
- beforeOpen(done, type) {
- if (["edit", "view"].includes(type)) {
- getDetail(this.form.id).then(res => {
- this.form = res.data.data;
- });
- }
- done();
- },
- searchReset() {
- this.query = {};
- this.onLoad(this.page);
- },
- searchChange(params, done) {
- this.query = params;
- this.page.currentPage = 1;
- this.onLoad(this.page, params);
- done();
- },
- selectionChange(list) {
- this.selectionList = list;
- },
- selectionClear() {
- this.selectionList = [];
- this.$refs.crud.toggleSelection();
- },
- currentChange(currentPage) {
- this.page.currentPage = currentPage;
- },
- sizeChange(pageSize) {
- this.page.pageSize = pageSize;
- },
- refreshChange() {
- this.onLoad(this.page, this.query);
- },
- onLoad(page, params = {}) {
- this.loading = true;
- getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
- const data = res.data.data;
- this.page.total = data.total;
- this.data = data.records;
- this.loading = false;
- this.selectionClear();
+ this.$refs.crud.toggleSelection();
+ });
+ },
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ getDetail(this.form.id).then((res) => {
+ this.form = res.data.data;
});
}
- }
- };
+ done();
+ },
+ searchReset() {
+ this.query = {};
+ this.onLoad(this.page);
+ },
+ searchChange(params, done) {
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
+ selectionChange(list) {
+ this.selectionList = list;
+ },
+ selectionClear() {
+ this.selectionList = [];
+ this.$refs.crud.toggleSelection();
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage;
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize;
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query);
+ },
+ onLoad(page, params = {}) {
+ this.loading = true;
+ getList(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, this.query)
+ ).then((res) => {
+ const data = res.data.data;
+ this.page.total = data.total;
+ this.data = data.records;
+ this.loading = false;
+ this.selectionClear();
+ });
+ },
+ },
+};
</script>
<style>
diff --git a/src/views/system/tenant.vue b/src/views/system/tenant.vue
index a52356b..95bd359 100644
--- a/src/views/system/tenant.vue
+++ b/src/views/system/tenant.vue
@@ -1,71 +1,101 @@
<template>
- <basic-container>
- <avue-crud :option="option"
- :table-loading="loading"
- :data="data"
- ref="crud"
- v-model="form"
- :page.sync="page"
- :permission="permissionList"
- :before-open="beforeOpen"
- @row-del="rowDel"
- @row-update="rowUpdate"
- @row-save="rowSave"
- @search-change="searchChange"
- @search-reset="searchReset"
- @selection-change="selectionChange"
- @current-change="currentChange"
- @size-change="sizeChange"
- @refresh-change="refreshChange"
- @on-load="onLoad">
+ <basic-container
+ :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
+ >
+ <avue-crud
+ :option="option"
+ :table-loading="loading"
+ :data="data"
+ ref="crud"
+ v-model="form"
+ :page.sync="page"
+ :permission="permissionList"
+ :before-open="beforeOpen"
+ @row-del="rowDel"
+ @row-update="rowUpdate"
+ @row-save="rowSave"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @selection-change="selectionChange"
+ @current-change="currentChange"
+ @size-change="sizeChange"
+ @refresh-change="refreshChange"
+ @on-load="onLoad"
+ >
<template slot="menuLeft">
- <el-button type="danger"
- size="small"
- icon="el-icon-delete"
- v-if="permission.tenant_delete"
- plain
- @click="handleDelete">删 除
+ <el-button
+ type="danger"
+ size="small"
+ icon="el-icon-delete"
+ v-if="permission.tenant_delete"
+ plain
+ @click="handleDelete"
+ >删 除
</el-button>
- <el-button size="small"
- plain
- v-if="userInfo.role_name.includes('administrator')"
- icon="el-icon-setting"
- @click="handleSetting">授权配置
+ <el-button
+ size="small"
+ plain
+ v-if="userInfo.role_name.includes('administrator')"
+ icon="el-icon-setting"
+ @click="handleSetting"
+ >授权配置
</el-button>
- <el-button size="small"
- plain
- v-if="userInfo.role_name.includes('administrator')"
- icon="el-icon-coin"
- @click="handleDatasource">数据源配置
+ <el-button
+ size="small"
+ plain
+ v-if="userInfo.role_name.includes('administrator')"
+ icon="el-icon-coin"
+ @click="handleDatasource"
+ >数据源配置
</el-button>
</template>
- <template slot-scope="{row}"
- slot="accountNumber">
- <el-tag>{{ row.accountNumber > 0 ? row.accountNumber : '不限制' }}</el-tag>
+ <template slot-scope="{ row }" slot="accountNumber">
+ <el-tag>{{
+ row.accountNumber > 0 ? row.accountNumber : "不限制"
+ }}</el-tag>
</template>
- <template slot-scope="{row}"
- slot="expireTime">
- <el-tag>{{ row.expireTime ? row.expireTime : '不限制' }}</el-tag>
+ <template slot-scope="{ row }" slot="expireTime">
+ <el-tag>{{ row.expireTime ? row.expireTime : "不限制" }}</el-tag>
</template>
</avue-crud>
- <el-dialog title="保安单位授权配置"
- append-to-body
- :visible.sync="box"
- width="450px">
- <avue-form :option="settingOption" v-model="settingForm" @submit="handleSubmit"/>
+ <el-dialog
+ title="保安单位授权配置"
+ append-to-body
+ :visible.sync="box"
+ width="450px"
+ >
+ <avue-form
+ :option="settingOption"
+ v-model="settingForm"
+ @submit="handleSubmit"
+ />
</el-dialog>
- <el-dialog title="保安单位数据源配置"
- append-to-body
- :visible.sync="datasourceBox"
- width="450px">
- <avue-form :option="datasourceOption" v-model="datasourceForm" @submit="handleDatasourceSubmit"/>
+ <el-dialog
+ title="保安单位数据源配置"
+ append-to-body
+ :visible.sync="datasourceBox"
+ width="450px"
+ >
+ <avue-form
+ :option="datasourceOption"
+ v-model="datasourceForm"
+ @submit="handleDatasourceSubmit"
+ />
</el-dialog>
</basic-container>
</template>
<script>
-import {getList, getDetail, remove, update, add, setting, datasource} from "@/api/system/tenant";
-import {mapGetters} from "vuex";
+import {
+ getList,
+ getDetail,
+ remove,
+ update,
+ add,
+ setting,
+ datasource,
+} from "@/api/system/tenant";
+import { mapGetters } from "vuex";
export default {
data() {
@@ -79,12 +109,13 @@
page: {
pageSize: 10,
currentPage: 1,
- total: 0
+ total: 0,
+ ...this.$store.state.control.changePageSize,
},
option: {
- height: 'auto',
+ height: "auto",
calcHeight: 30,
- labelWidth: '125',
+ labelWidth: "125",
tip: false,
searchShow: true,
searchMenuSpan: 6,
@@ -94,49 +125,56 @@
viewBtn: true,
dialogWidth: 900,
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "保安单位ID",
prop: "tenantId",
width: 130,
- searchLabelWidth:"150",
- searchSpan:5,
+ searchLabelWidth: "150",
+ searchSpan: 5,
search: true,
addDisplay: false,
editDisplay: false,
span: 24,
- rules: [{
- required: true,
- message: "请输入保安单位ID",
- trigger: "blur"
- }]
+ rules: [
+ {
+ required: true,
+ message: "请输入保安单位ID",
+ trigger: "blur",
+ },
+ ],
},
{
- label: "保安单位名称",
- searchLabelWidth:"150",
+ label: "保安企业名称",
+ searchLabelWidth: "150",
prop: "tenantName",
- searchSpan:5,
+ searchSpan: 5,
search: true,
width: 280,
span: 24,
- rules: [{
- required: true,
- message: "请输入参数名称",
- trigger: "blur"
- }]
+ rules: [
+ {
+ required: true,
+ message: "请输入参数名称",
+ trigger: "blur",
+ },
+ ],
},
{
label: "联系人",
- searchLabelWidth:"100",
+ searchLabelWidth: "100",
prop: "linkman",
width: 200,
search: true,
- searchSpan:5,
- rules: [{
- required: true,
- message: "请输入联系人",
- trigger: "blur"
- }]
+ searchSpan: 5,
+ rules: [
+ {
+ required: true,
+ message: "请输入联系人",
+ trigger: "blur",
+ },
+ ],
},
{
label: "联系电话",
@@ -175,17 +213,17 @@
{
label: "系统背景",
prop: "backgroundUrl",
- type: 'upload',
- listType: 'picture-img',
- action: '/api/blade-resource/oss/endpoint/put-file',
+ type: "upload",
+ listType: "picture-img",
+ action: "/api/blade-resource/oss/endpoint/put-file",
propsHttp: {
- res: 'data',
- url: 'link',
+ res: "data",
+ url: "link",
},
hide: true,
span: 24,
},
- ]
+ ],
},
data: [],
settingForm: {},
@@ -205,7 +243,7 @@
valueFormat: "yyyy-MM-dd hh:mm:ss",
span: 24,
},
- ]
+ ],
},
datasourceForm: {},
datasourceOption: {
@@ -219,16 +257,18 @@
dicUrl: "/api/blade-develop/datasource/select",
props: {
label: "name",
- value: "id"
+ value: "id",
},
- rules: [{
- required: true,
- message: "请选择数据源",
- trigger: "blur"
- }]
+ rules: [
+ {
+ required: true,
+ message: "请选择数据源",
+ trigger: "blur",
+ },
+ ],
},
- ]
- }
+ ],
+ },
};
},
computed: {
@@ -238,52 +278,58 @@
addBtn: this.vaildData(this.permission.tenant_add, false),
viewBtn: this.vaildData(this.permission.tenant_view, false),
delBtn: this.vaildData(this.permission.tenant_delete, false),
- editBtn: this.vaildData(this.permission.tenant_edit, false)
+ editBtn: this.vaildData(this.permission.tenant_edit, false),
};
},
ids() {
let ids = [];
- this.selectionList.forEach(ele => {
+ this.selectionList.forEach((ele) => {
ids.push(ele.id);
});
return ids.join(",");
},
tenantId() {
return this.selectionList[0].tenantId;
- }
+ },
},
methods: {
rowSave(row, done, loading) {
- add(row).then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- done();
- }, error => {
- window.console.log(error);
- loading();
- });
+ add(row).then(
+ () => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
},
rowUpdate(row, index, done, loading) {
- update(row).then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- done();
- }, error => {
- window.console.log(error);
- loading();
- });
+ update(row).then(
+ () => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
},
rowDel(row) {
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
- type: "warning"
+ type: "warning",
})
.then(() => {
return remove(row.id);
@@ -292,13 +338,13 @@
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!"
+ message: "操作成功!",
});
});
},
beforeOpen(done, type) {
if (["view"].includes(type)) {
- getDetail(this.form.id).then(res => {
+ getDetail(this.form.id).then((res) => {
const data = res.data.data;
if (!(data.accountNumber > 0)) {
data.accountNumber = "不限制";
@@ -336,7 +382,7 @@
this.$confirm("确定将选择数据删除?", {
confirmButtonText: "确定",
cancelButtonText: "取消",
- type: "warning"
+ type: "warning",
})
.then(() => {
return remove(this.ids);
@@ -345,7 +391,7 @@
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!"
+ message: "操作成功!",
});
this.$refs.crud.toggleSelection();
});
@@ -356,14 +402,14 @@
return;
}
if (this.selectionList.length === 1) {
- getDetail(this.selectionList[0].id).then(res => {
+ getDetail(this.selectionList[0].id).then((res) => {
const data = res.data.data;
this.settingForm.accountNumber = data.accountNumber;
this.settingForm.expireTime = data.expireTime;
});
} else {
this.settingForm.accountNumber = -1;
- this.settingForm.expireTime = '';
+ this.settingForm.expireTime = "";
}
this.box = true;
},
@@ -376,38 +422,44 @@
this.$message.warning("只能选择一条数据");
return;
}
- getDetail(this.selectionList[0].id).then(res => {
+ getDetail(this.selectionList[0].id).then((res) => {
const data = res.data.data;
this.datasourceForm.datasourceId = data.datasourceId;
});
this.datasourceBox = true;
},
handleSubmit(form, done, loading) {
- setting(this.ids, form).then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "配置成功!"
- });
- done();
- this.box = false;
- }, error => {
- window.console.log(error);
- loading();
- });
+ setting(this.ids, form).then(
+ () => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "配置成功!",
+ });
+ done();
+ this.box = false;
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
},
handleDatasourceSubmit(form, done, loading) {
- datasource(this.tenantId, form.datasourceId).then(() => {
- this.$message({
- type: "success",
- message: "配置成功!"
- });
- done();
- this.datasourceBox = false;
- }, error => {
- window.console.log(error);
- loading();
- });
+ datasource(this.tenantId, form.datasourceId).then(
+ () => {
+ this.$message({
+ type: "success",
+ message: "配置成功!",
+ });
+ done();
+ this.datasourceBox = false;
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
},
currentChange(currentPage) {
this.page.currentPage = currentPage;
@@ -420,15 +472,19 @@
},
onLoad(page, params = {}) {
this.loading = true;
- getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+ getList(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, this.query)
+ ).then((res) => {
const data = res.data.data;
this.page.total = data.total;
this.data = data.records;
this.loading = false;
this.selectionClear();
});
- }
- }
+ },
+ },
};
</script>
diff --git a/src/views/system/topmenu.vue b/src/views/system/topmenu.vue
index 934883d..45d00c4 100644
--- a/src/views/system/topmenu.vue
+++ b/src/views/system/topmenu.vue
@@ -1,5 +1,10 @@
<template>
- <basic-container class="topmenu">
+ <basic-container
+ :class="[
+ 'topmenu',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option"
:table-loading="loading"
@@ -106,6 +111,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
selectionList: [],
menuGrantList: [],
@@ -122,6 +128,7 @@
selection: true,
dialogWidth: 900,
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "菜单名",
diff --git a/src/views/system/user copy.vue b/src/views/system/user copy.vue
index df38d65..9f89963 100644
--- a/src/views/system/user copy.vue
+++ b/src/views/system/user copy.vue
@@ -196,7 +196,7 @@
grant,
resetPassword,
getJurisdiction,
- getJurisdictionDetail
+ getJurisdictionDetail,
} from "@/api/system/user";
import { getDeptTree, getDeptLazyTree } from "@/api/system/dept";
import { getRoleTree } from "@/api/system/role";
@@ -244,11 +244,13 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
platformPage: {
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
init: {
roleTree: [],
@@ -322,6 +324,7 @@
viewBtn: true,
//dialogType: 'drawer',
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "登录账号",
@@ -997,16 +1000,16 @@
}
// getJurisdictionDetail(this.userInfo.jurisdiction).then((res)=>{
- // console.log(res.data.data,123);
- // })
- var parentId = this.userInfo.dept_id;
- if (parentId == "1123598813738675201") {
- parentId = 0;
- }
- getDeptLazyTree(parentId).then((res) => {
- const column = this.findObject(this.option.group, "deptId");
- column.dicData = res.data.data;
- });
+ // console.log(res.data.data,123);
+ // })
+ var parentId = this.userInfo.dept_id;
+ if (parentId == "1123598813738675201") {
+ parentId = 0;
+ }
+ getDeptLazyTree(parentId).then((res) => {
+ const column = this.findObject(this.option.group, "deptId");
+ column.dicData = res.data.data;
+ });
getUser(this.form.id).then((res) => {
this.form = res.data.data;
@@ -1028,13 +1031,13 @@
}
var parentId1 = this.userInfo.dept_id;
- if (parentId1 == "1123598813738675201") {
- parentId = 0;
- }
+ if (parentId1 == "1123598813738675201") {
+ parentId = 0;
+ }
getDeptLazyTree(parentId1).then((res) => {
- const column = this.findObject(this.option.group, "deptId");
- column.dicData = res.data.data;
- });
+ const column = this.findObject(this.option.group, "deptId");
+ column.dicData = res.data.data;
+ });
}
this.initFlag = true;
done();
diff --git a/src/views/system/user.vue b/src/views/system/user.vue
index 49b4684..6371b30 100644
--- a/src/views/system/user.vue
+++ b/src/views/system/user.vue
@@ -14,7 +14,11 @@
</div>
</el-col>
<el-col :span="sizes[1]">
- <basic-container>
+ <basic-container
+ :class="[
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option"
:search.sync="search"
@@ -242,11 +246,13 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
platformPage: {
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
init: {
roleTree: [],
@@ -324,6 +330,7 @@
viewBtn: true,
//dialogType: 'drawer',
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "登录账号",
@@ -691,7 +698,10 @@
},
created() {
console.log(this.userInfo.role_name);
- if (this.userInfo.role_name == "保安公司管理员" || this.userInfo.role_name == "分公司管理员") {
+ if (
+ this.userInfo.role_name == "保安公司管理员" ||
+ this.userInfo.role_name == "分公司管理员"
+ ) {
this.deptids = this.userInfo.dept_id;
this.sizes = [0, 24];
this.isguanli = false;
diff --git a/src/views/talk/talk.vue b/src/views/talk/talk.vue
index 6c1bc57..2a94313 100644
--- a/src/views/talk/talk.vue
+++ b/src/views/talk/talk.vue
@@ -1,5 +1,7 @@
<template>
- <basic-container>
+ <basic-container
+ :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
+ >
<avue-crud
:option="option"
:table-loading="loading"
@@ -67,6 +69,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
selectionList: [],
option: {
@@ -81,6 +84,7 @@
viewBtn: true,
selection: true,
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "标题",
diff --git a/src/views/tool/code.vue b/src/views/tool/code.vue
index 7bfdfd2..973e516 100644
--- a/src/views/tool/code.vue
+++ b/src/views/tool/code.vue
@@ -1,45 +1,55 @@
<template>
- <basic-container>
- <avue-crud :option="option"
- :table-loading="loading"
- :data="data"
- ref="crud"
- v-model="form"
- :permission="permissionList"
- :page.sync="page"
- @row-del="rowDel"
- @row-update="rowUpdate"
- @row-save="rowSave"
- :before-open="beforeOpen"
- @search-change="searchChange"
- @search-reset="searchReset"
- @selection-change="selectionChange"
- @current-change="currentChange"
- @size-change="sizeChange"
- @refresh-change="refreshChange"
- @on-load="onLoad">
+ <basic-container
+ :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
+ >
+ <avue-crud
+ :option="option"
+ :table-loading="loading"
+ :data="data"
+ ref="crud"
+ v-model="form"
+ :permission="permissionList"
+ :page.sync="page"
+ @row-del="rowDel"
+ @row-update="rowUpdate"
+ @row-save="rowSave"
+ :before-open="beforeOpen"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @selection-change="selectionChange"
+ @current-change="currentChange"
+ @size-change="sizeChange"
+ @refresh-change="refreshChange"
+ @on-load="onLoad"
+ >
<template slot="menuLeft">
- <el-button type="danger"
- size="small"
- icon="el-icon-delete"
- v-if="permission.code_delete"
- plain
- @click="handleDelete">删 除
+ <el-button
+ type="danger"
+ size="small"
+ icon="el-icon-delete"
+ v-if="permission.code_delete"
+ plain
+ @click="handleDelete"
+ >删 除
</el-button>
- <el-button type="primary"
- size="small"
- plain
- icon="el-icon-refresh"
- @click="handleBuild">代码生成
+ <el-button
+ type="primary"
+ size="small"
+ plain
+ icon="el-icon-refresh"
+ @click="handleBuild"
+ >代码生成
</el-button>
</template>
<template slot-scope="scope" slot="menu">
- <el-button type="text"
- size="small"
- icon="el-icon-document-copy"
- v-if="permission.code_edit"
- class="none-border"
- @click.stop="handleCopy(scope.row)">复制
+ <el-button
+ type="text"
+ size="small"
+ icon="el-icon-document-copy"
+ v-if="permission.code_edit"
+ class="none-border"
+ @click.stop="handleCopy(scope.row)"
+ >复制
</el-button>
</template>
</avue-crud>
@@ -47,333 +57,375 @@
</template>
<script>
- import {getList, getCode, build, remove, add, update, copy} from "@/api/tool/code";
- import {mapGetters} from "vuex";
+import {
+ getList,
+ getCode,
+ build,
+ remove,
+ add,
+ update,
+ copy,
+} from "@/api/tool/code";
+import { mapGetters } from "vuex";
- export default {
- data() {
- return {
- form: {},
- selectionList: [],
- loading: true,
- query: {},
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- option: {
- height: 'auto',
- calcHeight: 30,
- dialogWidth: 900,
- tip: false,
- searchShow: true,
- searchMenuSpan: 6,
- border: true,
- index: true,
- selection: true,
- labelWidth: 120,
- menuWidth: 250,
- viewBtn: true,
- dialogClickModal: false,
- column: [
- {
- label: "数据源",
- prop: "datasourceId",
- search: true,
- span: 24,
- type: "select",
- dicUrl: "/api/blade-develop/datasource/select",
- props: {
- label: "name",
- value: "id"
- },
- rules: [{
+export default {
+ data() {
+ return {
+ form: {},
+ selectionList: [],
+ loading: true,
+ query: {},
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ ...this.$store.state.control.changePageSize,
+ },
+ option: {
+ height: "auto",
+ calcHeight: 30,
+ dialogWidth: 900,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ border: true,
+ index: true,
+ selection: true,
+ labelWidth: 120,
+ menuWidth: 250,
+ viewBtn: true,
+ dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
+ column: [
+ {
+ label: "数据源",
+ prop: "datasourceId",
+ search: true,
+ span: 24,
+ type: "select",
+ dicUrl: "/api/blade-develop/datasource/select",
+ props: {
+ label: "name",
+ value: "id",
+ },
+ rules: [
+ {
required: true,
message: "请选择数据源",
- trigger: "blur"
- }]
- },
- {
- label: "模块名",
- prop: "codeName",
- search: true,
- rules: [{
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "模块名",
+ prop: "codeName",
+ search: true,
+ rules: [
+ {
required: true,
message: "请输入模块名",
- trigger: "blur"
- }]
- },
- {
- label: "服务名",
- prop: "serviceName",
- search: true,
- rules: [{
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "服务名",
+ prop: "serviceName",
+ search: true,
+ rules: [
+ {
required: true,
message: "请输入服务名",
- trigger: "blur"
- }]
- },
- {
- label: "表名",
- prop: "tableName",
- rules: [{
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "表名",
+ prop: "tableName",
+ rules: [
+ {
required: true,
message: "请输入表名",
- trigger: "blur"
- }]
- },
- {
- label: "表前缀",
- prop: "tablePrefix",
- hide: true,
- rules: [{
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "表前缀",
+ prop: "tablePrefix",
+ hide: true,
+ rules: [
+ {
required: true,
message: "请输入表前缀",
- trigger: "blur"
- }]
- },
- {
- label: "主键名",
- prop: "pkName",
- hide: true,
- rules: [{
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "主键名",
+ prop: "pkName",
+ hide: true,
+ rules: [
+ {
required: true,
message: "请输入主键名",
- trigger: "blur"
- }]
- },
- {
- label: "包名",
- prop: "packageName",
- overHidden: true,
- rules: [{
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "包名",
+ prop: "packageName",
+ overHidden: true,
+ rules: [
+ {
required: true,
message: "请输入包名",
- trigger: "blur"
- }]
- },
- {
- label: "基础业务",
- prop: "baseMode",
- type: 'radio',
- dicUrl: "/api/blade-system/dict/dictionary?code=yes_no",
- props: {
- label: "dictValue",
- value: "dictKey"
+ trigger: "blur",
},
- dataType: "number",
- hide: true,
- rules: [{
+ ],
+ },
+ {
+ label: "基础业务",
+ prop: "baseMode",
+ type: "radio",
+ dicUrl: "/api/blade-system/dict/dictionary?code=yes_no",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ dataType: "number",
+ hide: true,
+ rules: [
+ {
required: true,
message: "请选择基础业务",
- trigger: "blur"
- }]
- },
- {
- label: "包装器",
- prop: "wrapMode",
- type: 'radio',
- dicUrl: "/api/blade-system/dict/dictionary?code=yes_no",
- props: {
- label: "dictValue",
- value: "dictKey"
+ trigger: "blur",
},
- dataType: "number",
- hide: true,
- rules: [{
+ ],
+ },
+ {
+ label: "包装器",
+ prop: "wrapMode",
+ type: "radio",
+ dicUrl: "/api/blade-system/dict/dictionary?code=yes_no",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ dataType: "number",
+ hide: true,
+ rules: [
+ {
required: true,
message: "请选择包装器",
- trigger: "blur"
- }]
- },
- {
- label: "后端生成路径",
- prop: "apiPath",
- span: 24,
- hide: true,
- rules: [{
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "后端生成路径",
+ prop: "apiPath",
+ span: 24,
+ hide: true,
+ rules: [
+ {
required: true,
message: "请输入后端生成路径",
- trigger: "blur"
- }]
- },
- {
- label: "前端生成路径",
- prop: "webPath",
- span: 24,
- hide: true,
- rules: [{
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "前端生成路径",
+ prop: "webPath",
+ span: 24,
+ hide: true,
+ rules: [
+ {
required: true,
message: "请输入前端生成路径",
- trigger: "blur"
- }]
- }
- ]
- },
- data: []
+ trigger: "blur",
+ },
+ ],
+ },
+ ],
+ },
+ data: [],
+ };
+ },
+ computed: {
+ ...mapGetters(["permission"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.code_add, false),
+ viewBtn: this.vaildData(this.permission.code_view, false),
+ delBtn: this.vaildData(this.permission.code_delete, false),
+ editBtn: this.vaildData(this.permission.code_edit, false),
};
},
- computed: {
- ...mapGetters(["permission"]),
- permissionList() {
- return {
- addBtn: this.vaildData(this.permission.code_add, false),
- viewBtn: this.vaildData(this.permission.code_view, false),
- delBtn: this.vaildData(this.permission.code_delete, false),
- editBtn: this.vaildData(this.permission.code_edit, false)
- };
- },
- ids() {
- let ids = [];
- this.selectionList.forEach(ele => {
- ids.push(ele.id);
- });
- return ids.join(",");
- }
+ ids() {
+ let ids = [];
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id);
+ });
+ return ids.join(",");
},
- methods: {
- rowSave(row, done, loading) {
- add(row).then(() => {
+ },
+ methods: {
+ rowSave(row, done, loading) {
+ add(row).then(
+ () => {
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!"
+ message: "操作成功!",
});
done();
- }, error => {
+ },
+ (error) => {
window.console.log(error);
loading();
- });
- },
- rowUpdate(row, index, done, loading) {
- update(row).then(() => {
+ }
+ );
+ },
+ rowUpdate(row, index, done, loading) {
+ update(row).then(
+ () => {
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!"
+ message: "操作成功!",
});
done();
- }, error => {
+ },
+ (error) => {
window.console.log(error);
loading();
- });
- },
- rowDel(row) {
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
+ }
+ );
+ },
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(row.id);
})
- .then(() => {
- return remove(row.id);
- })
- .then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!"
- });
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
});
- },
- searchReset() {
- this.query = {};
+ });
+ },
+ searchReset() {
+ this.query = {};
+ this.onLoad(this.page);
+ },
+ searchChange(params, done) {
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
+ selectionChange(list) {
+ this.selectionList = list;
+ },
+ selectionClear() {
+ this.selectionList = [];
+ this.$refs.crud.toggleSelection();
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据");
+ return;
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(this.ids);
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ this.$refs.crud.toggleSelection();
+ });
+ },
+ handleBuild() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据");
+ return;
+ }
+ this.$confirm("是否生成选中模块的代码?", {
+ title: "代码生成确认",
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return build(this.ids);
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ this.$refs.crud.toggleSelection();
+ });
+ },
+ handleCopy(row) {
+ copy(row.id).then(() => {
this.onLoad(this.page);
- },
- searchChange(params, done) {
- this.query = params;
- this.page.currentPage = 1;
- this.onLoad(this.page, params);
- done();
- },
- selectionChange(list) {
- this.selectionList = list;
- },
- selectionClear() {
- this.selectionList = [];
- this.$refs.crud.toggleSelection();
- },
- handleDelete() {
- if (this.selectionList.length === 0) {
- this.$message.warning("请选择至少一条数据");
- return;
- }
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- return remove(this.ids);
- })
- .then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.$refs.crud.toggleSelection();
- });
- },
- handleBuild() {
- if (this.selectionList.length === 0) {
- this.$message.warning("请选择至少一条数据");
- return;
- }
- this.$confirm("是否生成选中模块的代码?", {
- title: "代码生成确认",
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- return build(this.ids);
- })
- .then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.$refs.crud.toggleSelection();
- });
- },
- handleCopy(row) {
- copy(row.id).then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "复制成功!"
- });
+ this.$message({
+ type: "success",
+ message: "复制成功!",
});
- },
- beforeOpen(done, type) {
- if (["edit", "view"].includes(type)) {
- getCode(this.form.id).then(res => {
- this.form = res.data.data;
- });
- }
- done();
- },
- currentChange(currentPage) {
- this.page.currentPage = currentPage;
- },
- sizeChange(pageSize) {
- this.page.pageSize = pageSize;
- },
- refreshChange() {
- this.onLoad(this.page, this.query);
- },
- onLoad(page, params = {}) {
- this.loading = true;
- getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
- const data = res.data.data;
- this.page.total = data.total;
- this.data = data.records;
- this.loading = false;
- this.selectionClear();
+ });
+ },
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ getCode(this.form.id).then((res) => {
+ this.form = res.data.data;
});
}
- }
- };
+ done();
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage;
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize;
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query);
+ },
+ onLoad(page, params = {}) {
+ this.loading = true;
+ getList(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, this.query)
+ ).then((res) => {
+ const data = res.data.data;
+ this.page.total = data.total;
+ this.data = data.records;
+ this.loading = false;
+ this.selectionClear();
+ });
+ },
+ },
+};
</script>
diff --git a/src/views/tool/datasource.vue b/src/views/tool/datasource.vue
index 47e8d00..8a85a51 100644
--- a/src/views/tool/datasource.vue
+++ b/src/views/tool/datasource.vue
@@ -1,30 +1,36 @@
<template>
- <basic-container>
- <avue-crud :option="option"
- :table-loading="loading"
- :data="data"
- :page.sync="page"
- :permission="permissionList"
- :before-open="beforeOpen"
- v-model="form"
- ref="crud"
- @row-update="rowUpdate"
- @row-save="rowSave"
- @row-del="rowDel"
- @search-change="searchChange"
- @search-reset="searchReset"
- @selection-change="selectionChange"
- @current-change="currentChange"
- @size-change="sizeChange"
- @refresh-change="refreshChange"
- @on-load="onLoad">
+ <basic-container
+ :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
+ >
+ <avue-crud
+ :option="option"
+ :table-loading="loading"
+ :data="data"
+ :page.sync="page"
+ :permission="permissionList"
+ :before-open="beforeOpen"
+ v-model="form"
+ ref="crud"
+ @row-update="rowUpdate"
+ @row-save="rowSave"
+ @row-del="rowDel"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @selection-change="selectionChange"
+ @current-change="currentChange"
+ @size-change="sizeChange"
+ @refresh-change="refreshChange"
+ @on-load="onLoad"
+ >
<template slot="menuLeft">
- <el-button type="danger"
- size="small"
- icon="el-icon-delete"
- plain
- v-if="permission.datasource_delete"
- @click="handleDelete">删 除
+ <el-button
+ type="danger"
+ size="small"
+ icon="el-icon-delete"
+ plain
+ v-if="permission.datasource_delete"
+ @click="handleDelete"
+ >删 除
</el-button>
</template>
</avue-crud>
@@ -32,240 +38,264 @@
</template>
<script>
- import {getList, getDetail, add, update, remove} from "@/api/tool/datasource";
- import {mapGetters} from "vuex";
+import { getList, getDetail, add, update, remove } from "@/api/tool/datasource";
+import { mapGetters } from "vuex";
- export default {
- data() {
- return {
- form: {},
- query: {},
- loading: true,
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- selectionList: [],
- option: {
- height: 'auto',
- calcHeight: 30,
- dialogWidth: 900,
- tip: false,
- searchShow: true,
- searchMenuSpan: 6,
- border: true,
- index: true,
- viewBtn: true,
- selection: true,
- dialogClickModal: false,
- column: [
- {
- label: "名称",
- prop: "name",
- width: 120,
- rules: [{
+export default {
+ data() {
+ return {
+ form: {},
+ query: {},
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ ...this.$store.state.control.changePageSize,
+ },
+ selectionList: [],
+ option: {
+ height: "auto",
+ calcHeight: 30,
+ dialogWidth: 900,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ border: true,
+ index: true,
+ viewBtn: true,
+ selection: true,
+ dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
+ column: [
+ {
+ label: "名称",
+ prop: "name",
+ width: 120,
+ rules: [
+ {
required: true,
message: "请输入数据源名称",
- trigger: "blur"
- }]
- },
- {
- label: "驱动类",
- prop: "driverClass",
- type: 'select',
- dicData: [
- {
- label: 'com.mysql.cj.jdbc.Driver',
- value: 'com.mysql.cj.jdbc.Driver',
- }, {
- label: 'org.postgresql.Driver',
- value: 'org.postgresql.Driver',
- }, {
- label: 'oracle.jdbc.OracleDriver',
- value: 'oracle.jdbc.OracleDriver',
- }
- ],
- width: 200,
- rules: [{
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "驱动类",
+ prop: "driverClass",
+ type: "select",
+ dicData: [
+ {
+ label: "com.mysql.cj.jdbc.Driver",
+ value: "com.mysql.cj.jdbc.Driver",
+ },
+ {
+ label: "org.postgresql.Driver",
+ value: "org.postgresql.Driver",
+ },
+ {
+ label: "oracle.jdbc.OracleDriver",
+ value: "oracle.jdbc.OracleDriver",
+ },
+ ],
+ width: 200,
+ rules: [
+ {
required: true,
message: "请输入驱动类",
- trigger: "blur"
- }]
- },
- {
- label: "用户名",
- prop: "username",
- width: 120,
- rules: [{
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "用户名",
+ prop: "username",
+ width: 120,
+ rules: [
+ {
required: true,
message: "请输入用户名",
- trigger: "blur"
- }]
- },
- {
- label: "密码",
- prop: "password",
- hide: true,
- rules: [{
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "密码",
+ prop: "password",
+ hide: true,
+ rules: [
+ {
required: true,
message: "请输入密码",
- trigger: "blur"
- }]
- },
- {
- label: "连接地址",
- prop: "url",
- span: 24,
- rules: [{
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "连接地址",
+ prop: "url",
+ span: 24,
+ rules: [
+ {
required: true,
message: "请输入连接地址",
- trigger: "blur"
- }]
- },
- {
- label: "备注",
- prop: "remark",
- span: 24,
- minRows: 3,
- hide: true,
- type: "textarea"
- },
- ]
- },
- data: []
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "备注",
+ prop: "remark",
+ span: 24,
+ minRows: 3,
+ hide: true,
+ type: "textarea",
+ },
+ ],
+ },
+ data: [],
+ };
+ },
+ computed: {
+ ...mapGetters(["permission"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.datasource_add, false),
+ viewBtn: this.vaildData(this.permission.datasource_view, false),
+ delBtn: this.vaildData(this.permission.datasource_delete, false),
+ editBtn: this.vaildData(this.permission.datasource_edit, false),
};
},
- computed: {
- ...mapGetters(["permission"]),
- permissionList() {
- return {
- addBtn: this.vaildData(this.permission.datasource_add, false),
- viewBtn: this.vaildData(this.permission.datasource_view, false),
- delBtn: this.vaildData(this.permission.datasource_delete, false),
- editBtn: this.vaildData(this.permission.datasource_edit, false)
- };
- },
- ids() {
- let ids = [];
- this.selectionList.forEach(ele => {
- ids.push(ele.id);
- });
- return ids.join(",");
- }
+ ids() {
+ let ids = [];
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id);
+ });
+ return ids.join(",");
},
- methods: {
- rowSave(row, done, loading) {
- add(row).then(() => {
+ },
+ methods: {
+ rowSave(row, done, loading) {
+ add(row).then(
+ () => {
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!"
+ message: "操作成功!",
});
done();
- }, error => {
+ },
+ (error) => {
window.console.log(error);
loading();
- });
- },
- rowUpdate(row, index, done, loading) {
- update(row).then(() => {
+ }
+ );
+ },
+ rowUpdate(row, index, done, loading) {
+ update(row).then(
+ () => {
this.onLoad(this.page);
this.$message({
type: "success",
- message: "操作成功!"
+ message: "操作成功!",
});
done();
- }, error => {
+ },
+ (error) => {
window.console.log(error);
loading();
+ }
+ );
+ },
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(row.id);
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
});
- },
- rowDel(row) {
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据");
+ return;
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(this.ids);
})
- .then(() => {
- return remove(row.id);
- })
- .then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!"
- });
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
});
- },
- handleDelete() {
- if (this.selectionList.length === 0) {
- this.$message.warning("请选择至少一条数据");
- return;
- }
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- return remove(this.ids);
- })
- .then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.$refs.crud.toggleSelection();
- });
- },
- beforeOpen(done, type) {
- if (["edit", "view"].includes(type)) {
- getDetail(this.form.id).then(res => {
- this.form = res.data.data;
- });
- }
- done();
- },
- searchReset() {
- this.query = {};
- this.onLoad(this.page);
- },
- searchChange(params, done) {
- this.query = params;
- this.page.currentPage = 1;
- this.onLoad(this.page, params);
- done();
- },
- selectionChange(list) {
- this.selectionList = list;
- },
- selectionClear() {
- this.selectionList = [];
- this.$refs.crud.toggleSelection();
- },
- currentChange(currentPage) {
- this.page.currentPage = currentPage;
- },
- sizeChange(pageSize) {
- this.page.pageSize = pageSize;
- },
- refreshChange() {
- this.onLoad(this.page, this.query);
- },
- onLoad(page, params = {}) {
- this.loading = true;
- getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
- const data = res.data.data;
- this.page.total = data.total;
- this.data = data.records;
- this.loading = false;
- this.selectionClear();
+ this.$refs.crud.toggleSelection();
+ });
+ },
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ getDetail(this.form.id).then((res) => {
+ this.form = res.data.data;
});
}
- }
- };
+ done();
+ },
+ searchReset() {
+ this.query = {};
+ this.onLoad(this.page);
+ },
+ searchChange(params, done) {
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
+ selectionChange(list) {
+ this.selectionList = list;
+ },
+ selectionClear() {
+ this.selectionList = [];
+ this.$refs.crud.toggleSelection();
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage;
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize;
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query);
+ },
+ onLoad(page, params = {}) {
+ this.loading = true;
+ getList(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, this.query)
+ ).then((res) => {
+ const data = res.data.data;
+ this.page.total = data.total;
+ this.data = data.records;
+ this.loading = false;
+ this.selectionClear();
+ });
+ },
+ },
+};
</script>
<style>
diff --git a/src/views/trainApply/index.vue b/src/views/trainApply/index.vue
index 82aa27c..53d1f50 100644
--- a/src/views/trainApply/index.vue
+++ b/src/views/trainApply/index.vue
@@ -7,7 +7,13 @@
*/
<template>
<el-row class="morpheus-box-apply-exam-1">
- <el-col :span="24" class="hasButOne">
+ <el-col
+ :span="24"
+ :class="[
+ 'hasButOne',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<el-card>
<div class="exam-card-body">
<avue-crud
@@ -529,6 +535,7 @@
pageSize: 10,
currentPage: 1,
total: 16,
+ ...this.$store.state.control.changePageSize,
},
questionBankQuery: {},
questionBankSelectionList: [],
diff --git a/src/views/trainExam/data.js b/src/views/trainExam/data.js
index 5b314b3..cc093c9 100644
--- a/src/views/trainExam/data.js
+++ b/src/views/trainExam/data.js
@@ -1,164 +1,164 @@
export var infoColumn = [{
- label: "申请单位名称",
+ label: "申请企业名称",
- prop: "deptId",
- type: "tree",
- dicUrl: "/api/blade-system/dept/lazy-tree-type?deptCategory=3&parentId=1418458374477549569",
- width: 180,
- hide: true,
- viewDisplay: false,
- props: {
- label: "title",
- value: "id"
- },
- rules: [{
- required: true,
- message: "请选择申请单位名称",
- trigger: "blur"
- }]
- }, {
- label: "申请单位名称",
- prop: "deptName",
- type: "select",
- dicUrl: "/api/blade-system/dept/tree",
- width: 180,
- editDisplay: false,
- addDisplay: false
+ prop: "deptId",
+ type: "tree",
+ dicUrl: "/api/blade-system/dept/lazy-tree-type?deptCategory=3&parentId=1418458374477549569",
+ width: 180,
+ hide: true,
+ viewDisplay: false,
+ props: {
+ label: "title",
+ value: "id"
},
- {
- label: "考试名称",
- searchSpan: 4,
- width: 180,
- prop: "trainExamName",
- search: true,
- },
+ rules: [{
+ required: true,
+ message: "请选择申请企业名称",
+ trigger: "blur"
+ }]
+}, {
+ label: "申请企业名称",
+ prop: "deptName",
+ type: "select",
+ dicUrl: "/api/blade-system/dept/tree",
+ width: 180,
+ editDisplay: false,
+ addDisplay: false
+},
+{
+ label: "考试名称",
+ searchSpan: 4,
+ width: 180,
+ prop: "trainExamName",
+ search: true,
+},
- {
- label: "开始时间",
- prop: "startTime",
- type: "datetime",
- format: "yyyy-MM-dd HH:mm:ss",
- valueFormat: "yyyy-MM-dd HH:mm:ss",
- width: 180,
- rules: [{
- required: true,
- message: "请选择开始时间",
- trigger: "blur"
- }]
+{
+ label: "开始时间",
+ prop: "startTime",
+ type: "datetime",
+ format: "yyyy-MM-dd HH:mm:ss",
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
+ width: 180,
+ rules: [{
+ required: true,
+ message: "请选择开始时间",
+ trigger: "blur"
+ }]
+},
+{
+ label: "结束时间",
+ prop: "endTime",
+ type: "datetime",
+ width: 180,
+ format: "yyyy-MM-dd HH:mm:ss",
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
+ rules: [{
+ required: true,
+ message: "请选择结束时间",
+ trigger: "click"
+ }]
+},
+{
+ label: "申请时间",
+ prop: "createTime",
+ type: "datetime",
+ width: 180,
+ editDisplay: false,
+ addDisplay: false,
+ format: "yyyy-MM-dd HH:mm:ss",
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
+ rules: [{
+ required: true,
+ message: "请选择结束时间",
+ trigger: "click"
+ }]
+},
+{
+ label: "审核时间",
+ prop: "auditTime",
+ type: "datetime",
+ width: 180,
+ editDisplay: false,
+ addDisplay: false,
+ format: "yyyy-MM-dd HH:mm:ss",
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
+ rules: [{
+ required: true,
+ message: "请选择结束时间",
+ trigger: "click"
+ }]
+},
+{
+ label: "审核状态",
+ search: true,
+ searchSpan: 4,
+ prop: "auditStatus",
+ slot: true,
+ editDisplay: false,
+ addDisplay: false,
+ type: "select",
+ rules: [{
+ required: true,
+ message: "请选择审核类型",
+ trigger: "blur"
+ }],
+ dicData: [{
+ label: "审核通过",
+ value: 1
},
{
- label: "结束时间",
- prop: "endTime",
- type: "datetime",
- width: 180,
- format: "yyyy-MM-dd HH:mm:ss",
- valueFormat: "yyyy-MM-dd HH:mm:ss",
- rules: [{
- required: true,
- message: "请选择结束时间",
- trigger: "click"
- }]
+ label: "不通过",
+ value: 2
},
{
- label: "申请时间",
- prop: "createTime",
- type: "datetime",
- width: 180,
- editDisplay: false,
- addDisplay: false,
- format: "yyyy-MM-dd HH:mm:ss",
- valueFormat: "yyyy-MM-dd HH:mm:ss",
- rules: [{
- required: true,
- message: "请选择结束时间",
- trigger: "click"
- }]
- },
- {
- label: "审核时间",
- prop: "auditTime",
- type: "datetime",
- width: 180,
- editDisplay: false,
- addDisplay: false,
- format: "yyyy-MM-dd HH:mm:ss",
- valueFormat: "yyyy-MM-dd HH:mm:ss",
- rules: [{
- required: true,
- message: "请选择结束时间",
- trigger: "click"
- }]
- },
- {
- label: "审核状态",
- search: true,
- searchSpan: 4,
- prop: "auditStatus",
- slot: true,
- editDisplay: false,
- addDisplay: false,
- type: "select",
- rules: [{
- required: true,
- message: "请选择审核类型",
- trigger: "blur"
- }],
- dicData: [{
- label: "审核通过",
- value: 1
- },
- {
- label: "不通过",
- value: 2
- },
- {
- label: "待审核",
- value: 3
- }
- ]
- },
- {
- label: "审核明细",
- editDisplay: false,
- addDisplay: false,
- prop: "auditDetail"
+ label: "待审核",
+ value: 3
}
+ ]
+},
+{
+ label: "审核明细",
+ editDisplay: false,
+ addDisplay: false,
+ prop: "auditDetail"
+}
]
export var auditColumn = [{
- label: "审核状态",
- search: true,
- searchSpan: 5,
- span: 24,
- prop: "auditStatus",
- slot: true,
- editDisplay: false,
- addDisplay: false,
- type: "select",
- rules: [{
- required: true,
- message: "请选择审核类型",
- trigger: "blur"
- }],
- dicData: [{
- label: "审核通过",
- value: 1
- },
- {
- label: "不通过",
- value: 2
- },
- {
- label: "待审核",
- value: 3
- }
- ]
+ label: "审核状态",
+ search: true,
+ searchSpan: 5,
+ span: 24,
+ prop: "auditStatus",
+ slot: true,
+ editDisplay: false,
+ addDisplay: false,
+ type: "select",
+ rules: [{
+ required: true,
+ message: "请选择审核类型",
+ trigger: "blur"
+ }],
+ dicData: [{
+ label: "审核通过",
+ value: 1
},
{
- label: "审核明细",
- span: 24,
- type: "textarea",
- prop: "auditDetail"
+ label: "不通过",
+ value: 2
+ },
+ {
+ label: "待审核",
+ value: 3
}
+ ]
+},
+{
+ label: "审核明细",
+ span: 24,
+ type: "textarea",
+ prop: "auditDetail"
+}
]
\ No newline at end of file
diff --git a/src/views/trainExam/index.vue b/src/views/trainExam/index.vue
index f588891..487a60c 100644
--- a/src/views/trainExam/index.vue
+++ b/src/views/trainExam/index.vue
@@ -1,15 +1,20 @@
/*
* @Author: Morpheus
* @Date: 2021-07-05 16:31:54
- * @Last Modified by: Morpheus
- * @Last Modified time: 2021-07-18 17:09:52
+ * @Last Modified by: liu
+ * @Last Modified time: 2021-11-23 14:12:55
* menu-name 考试管理
*/
<template>
<el-row class="morpheus-box-paper">
<el-col :span="24">
<el-card>
- <div class="exam-card-body">
+ <div
+ :class="[
+ 'exam-card-body',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
v-model="form"
class="company-box"
@@ -53,7 +58,7 @@
<template slot="menuLeft">
<el-button
- style="display:none"
+ style="display: none"
type="danger"
size="small"
icon="el-icon-delete"
@@ -164,6 +169,7 @@
menuWidth: 230,
dialogClickModal: false,
column: auditColumn,
+ ...this.$store.state.control.clearOtherBut,
},
questionBankOption: {
// 操作栏多余按钮去除
@@ -191,7 +197,7 @@
// 操作栏宽度
menuWidth: 280,
labelWidth: 140,
-
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "考试名称",
@@ -217,7 +223,7 @@
trigger: "blur",
},
],
- span:24,
+ span: 24,
width: 200,
},
// {
@@ -327,7 +333,7 @@
editDetail: false,
// hide: true,
display: false,
- width: 80
+ width: 80,
},
{
label: "申请人所属学校",
@@ -373,7 +379,7 @@
type: "textarea",
span: 24,
slot: true,
- hide:true,
+ hide: true,
// 表单新增时是否禁止
addDisabled: false,
// 表单新增时是否可见
@@ -489,6 +495,7 @@
pageSize: 10,
currentPage: 1,
total: 16,
+ ...this.$store.state.control.changePageSize,
},
questionBankQuery: {},
questionBankSelectionList: [],
@@ -519,8 +526,8 @@
this.questionBankLoading = false;
params["examType"] = 2;
//如果是培训公司管理员,则只能看到当前培训公司申请的考试
- if(this.userInfo.role_name =="培训公司管理员"){
- params['deptId'] = this.userInfo.dept_id;
+ if (this.userInfo.role_name == "培训公司管理员") {
+ params["deptId"] = this.userInfo.dept_id;
}
getList(
page.currentPage,
@@ -592,7 +599,7 @@
});
}
},
- examScoreViews(row){
+ examScoreViews(row) {
//模拟考试
if (row.examType == 2) {
this.$router.push({
@@ -604,7 +611,7 @@
// 新增
questionBankRowSave(row, done, loading) {
row.startTime = row.startTime + ":00";
- row['examType'] = 2;
+ row["examType"] = 2;
// row.endTime = row.examTime[1];
// row.examTime = JSON.stringify(row.examTime);
add(row).then(
@@ -627,10 +634,10 @@
// row.examTime = row.examTime.split(",");
// }
const data = {
- id:row.id,
- startTime:row.startTime + ":00",
- endTime:row.endTime + ":00",
- }
+ id: row.id,
+ startTime: row.startTime + ":00",
+ endTime: row.endTime + ":00",
+ };
// row.startTime = row.startTime + ":00";
// row.endTime = row.endTime + ":00";
// row.endTime = row.examTime[1];
diff --git a/src/views/trainExam/modifiedGrades.vue b/src/views/trainExam/modifiedGrades.vue
index 8239982..4428587 100644
--- a/src/views/trainExam/modifiedGrades.vue
+++ b/src/views/trainExam/modifiedGrades.vue
@@ -1,642 +1,678 @@
/*
* @Author: Morpheus
* @Date: 2021-07-05 16:31:54
- * @Last Modified by: Morpheus
- * @Last Modified time: 2021-11-04 18:54:44
+ * @Last Modified by: liu
+ * @Last Modified time: 2021-11-23 13:55:09
* menu-name 成绩修改管理
*/
<template>
- <el-row class="morpheus-box">
- <el-col :span="24"
- class="recruitmentManagement">
- <el-card>
- <div class="exam-card-body">
- <avue-crud v-model="obj"
- class="company-box"
- :option="questionBankOption"
- :search.sync="questionBankSearch"
- :table-loading="questionBankLoading"
- :data="questionBankData"
- :permission="permissionList"
- ref="questionBankCrud"
- :page.sync="questionBankPage"
- @on-load="questionBankOnLoad"
- @selection-change="questionBankSelectionChange"
- @search-change="questionBankSearchChange"
- @search-reset="questionBankSearchReset"
- @current-change="questionBankCurrentChange"
- @size-change="questionBankSizeChange"
- @row-update="questionBankRowUpdate"
- @refresh-change="refreshChange">
-
- <!-- 自定义按钮 -->
- <template slot="menuLeft">
- <!-- <el-button type="danger"
+ <el-row class="morpheus-box">
+ <el-col
+ :span="24"
+ :class="[
+ 'recruitmentManagement',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
+ <el-card>
+ <div
+ :class="[
+ 'exam-card-body',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
+ <avue-crud
+ v-model="obj"
+ class="company-box"
+ :option="questionBankOption"
+ :search.sync="questionBankSearch"
+ :table-loading="questionBankLoading"
+ :data="questionBankData"
+ :permission="permissionList"
+ ref="questionBankCrud"
+ :page.sync="questionBankPage"
+ @on-load="questionBankOnLoad"
+ @selection-change="questionBankSelectionChange"
+ @search-change="questionBankSearchChange"
+ @search-reset="questionBankSearchReset"
+ @current-change="questionBankCurrentChange"
+ @size-change="questionBankSizeChange"
+ @row-update="questionBankRowUpdate"
+ @refresh-change="refreshChange"
+ >
+ <!-- 自定义按钮 -->
+ <template slot="menuLeft">
+ <!-- <el-button type="danger"
size="mini"
icon="el-icon-delete"
plain
@click="handleDelete">新增
</el-button> -->
- <!-- <el-button type="danger"
+ <!-- <el-button type="danger"
size="mini"
icon="el-icon-delete"
plain
@click="handleDelete">删除
</el-button> -->
+ </template>
- </template>
+ <template slot-scope="{ type, size, row }" slot="menu">
+ <el-button
+ :type="type"
+ :size="size"
+ icon="el-icon-folder-checked"
+ v-if="permission.score_audit_check || check"
+ @click="handleAudit(row)"
+ >审核
+ </el-button>
+ </template>
+ </avue-crud>
+ </div>
+ </el-card>
+ </el-col>
- <template slot-scope="{ type, size, row }"
- slot="menu">
-
- <el-button :type="type"
- :size="size"
- icon="el-icon-folder-checked"
- v-if="permission.score_audit_check || check"
- @click="handleAudit(row)">审核
- </el-button>
- </template>
-
- </avue-crud>
-
- </div>
- </el-card>
- </el-col>
-
- <el-dialog title="成绩修改审核"
- :visible.sync="dialogFormVisible"
- modal-append-to-body="false"
- append-to-body="true"
- :close-on-click-model="true">
- <avue-form ref="formAudit"
- v-model="Audit"
- :option="optionAudit"
- @reset-change="emptytChange"
- @submit="submit"></avue-form>
- </el-dialog>
-
- </el-row>
+ <el-dialog
+ title="成绩修改审核"
+ :visible.sync="dialogFormVisible"
+ modal-append-to-body="false"
+ append-to-body="true"
+ :close-on-click-model="true"
+ >
+ <avue-form
+ ref="formAudit"
+ v-model="Audit"
+ :option="optionAudit"
+ @reset-change="emptytChange"
+ @submit="submit"
+ ></avue-form>
+ </el-dialog>
+ </el-row>
</template>
<script>
-import { getList, update,applyAudit } from "@/api/examapi/modifiedGrades";
+import { getList, update, applyAudit } from "@/api/examapi/modifiedGrades";
import { mapGetters } from "vuex";
import { getRoleDetail } from "@/api/system/role";
export default {
+ data() {
+ return {
+ Audit: {},
+ dialogFormVisible: false,
+ optionAudit: {
+ height: "auto",
+ calcHeight: 30,
+ dialogWidth: 1000,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ border: true, //liu
+ index: true,
+ stripe: true,
+ viewBtn: false,
+ addBtn: false,
+ editBtn: false,
+ selection: true,
+ excelBtn: false,
+ menuWidth: 230,
+ dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
+ column: [
+ {
+ label: "审核状态",
+ search: true,
+ searchSpan: 5,
+ span: 24,
+ prop: "status",
+ slot: true,
+ editDisplay: false,
+ addDisplay: false,
+ type: "select",
+ rules: [
+ {
+ required: true,
+ message: "请选择审核类型",
+ trigger: "blur",
+ },
+ ],
+ dicData: [
+ {
+ label: "待审核",
+ value: 1,
+ },
+ {
+ label: "审核通过",
+ value: 2,
+ },
+ {
+ label: "审核不通过",
+ value: 3,
+ },
+ ],
+ },
+ {
+ label: "审核明细",
+ span: 24,
+ type: "textarea",
+ prop: "auditDetail",
+ },
+ ],
+ },
+ obj: {
+ name: "张三",
+ },
+ questionBankOption: {
+ // 操作栏多余按钮去除
+ delBtn: false,
+ editBtn: true,
+ addBtn: false,
+ selection: false,
+ check: false,
+ // 导出按钮
+ // excelBtn: true,
+ // excelBtnText: "成绩导出",
+ viewBtn: true,
+ // title: '成绩',
+ align: "center",
+ height: "auto",
+ calcHeight: 80,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 4,
+ index: true,
+ indexLabel: "序号",
+ //dialogType: 'drawer',
+ dialogClickModal: false,
+ // 操作栏宽度
+ menu: true,
+ menuWidth: 295,
+ labelWidth: 120,
+ ...this.$store.state.control.clearOtherBut,
+ column: [
+ {
+ label: "考试名称",
+ prop: "examName",
+ search: true,
+ searchSpan: 5,
+ slot: true,
+ viewDisplay: true,
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: true,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: true,
+ viewDisabled: true,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ rules: [
+ {
+ required: true,
+ message: "请输入试卷名称",
+ trigger: "blur",
+ },
+ ],
+ width: 210,
+ // overHidden:true,
+ },
- data () {
+ {
+ label: "姓名",
+ prop: "realName",
+ search: true,
+ searchSpan: 3,
+ slot: true,
+ viewDisplay: true,
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: true,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: true,
+ viewDisabled: true,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ rules: [
+ {
+ required: true,
+ message: "请输入试卷名称",
+ trigger: "blur",
+ },
+ ],
+ width: 80,
+ // overHidden:true,
+ },
- return {
- Audit: {},
- dialogFormVisible: false,
- optionAudit: {
- height: "auto",
- calcHeight: 30,
- dialogWidth: 1000,
- tip: false,
- searchShow: true,
- searchMenuSpan: 6,
- border: true, //liu
- index: true,
- stripe: true,
- viewBtn: false,
- addBtn: false,
- editBtn: false,
- selection: true,
- excelBtn: false,
- menuWidth: 230,
- dialogClickModal: false,
- column: [{
- label: "审核状态",
- search: true,
- searchSpan: 5,
- span: 24,
- prop: "status",
- slot: true,
- editDisplay: false,
- addDisplay: false,
- type: "select",
- rules: [{
- required: true,
- message: "请选择审核类型",
- trigger: "blur"
- }],
- dicData: [{
- label: "待审核",
- value: 1,
- },
- {
- label: "审核通过",
- value: 2,
- },
- {
- label: "审核不通过",
- value: 3,
- }
- ]
- },
- {
- label: "审核明细",
- span: 24,
- type: "textarea",
- prop: "auditDetail"
- }
- ],
- },
- obj: {
- name: "张三",
- },
- questionBankOption: {
- // 操作栏多余按钮去除
- delBtn: false,
- editBtn: true,
- addBtn: false,
- selection: false,
- check:false,
- // 导出按钮
- // excelBtn: true,
- // excelBtnText: "成绩导出",
- viewBtn: true,
- // title: '成绩',
- align: "center",
- height: "auto",
- calcHeight: 80,
- tip: false,
- searchShow: true,
- searchMenuSpan: 4,
- index: true,
- indexLabel: "序号",
- //dialogType: 'drawer',
- dialogClickModal: false,
- // 操作栏宽度
- menu: true,
- menuWidth: 295,
- labelWidth: 120,
- column: [
- {
- label: "考试名称",
- prop: "examName",
- search: true,
- searchSpan: 5,
- slot: true,
- viewDisplay: true,
- // 表单新增时是否禁止
- addDisabled: false,
- // 表单新增时是否可见
- addDisplay: true,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: true,
- viewDisabled: true,
- // 表单编辑时是否可见
- editDisplay: true,
- // 表单编辑时是否为查看模式
- editDetail: false,
- rules: [
- {
- required: true,
- message: "请输入试卷名称",
- trigger: "blur",
- },
- ],
- width: 210,
- // overHidden:true,
- },
+ {
+ label: "所属公司",
+ prop: "deptName",
+ search: true,
+ searchSpan: 4,
+ // dicUrl: '/api/blade-system/dept/tree',
+ // props: {
+ // label: "title",
+ // value: "id",
+ // },
+ slot: true,
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: true,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: true,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ rules: [
+ {
+ required: true,
+ message: "请输入所属公司",
+ trigger: "blur",
+ },
+ ],
+ width: 230,
+ },
- {
- label: "姓名",
- prop: "realName",
- search: true,
- searchSpan: 3,
- slot: true,
- viewDisplay: true,
- // 表单新增时是否禁止
- addDisabled: false,
- // 表单新增时是否可见
- addDisplay: true,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: true,
- viewDisabled: true,
- // 表单编辑时是否可见
- editDisplay: true,
- // 表单编辑时是否为查看模式
- editDetail: false,
- rules: [
- {
- required: true,
- message: "请输入试卷名称",
- trigger: "blur",
- },
- ],
- width: 80,
- // overHidden:true,
- },
+ {
+ label: "身份证号",
+ prop: "idCardNo",
+ search: true,
+ searchSpan: 4,
+ slot: true,
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: true,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: true,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ rules: [
+ {
+ required: true,
+ message: "请输入保安姓名",
+ trigger: "blur",
+ },
+ ],
+ width: 140,
+ },
- {
- label: "所属公司",
- prop: "deptName",
- search: true,
- searchSpan: 4,
- // dicUrl: '/api/blade-system/dept/tree',
- // props: {
- // label: "title",
- // value: "id",
- // },
- slot: true,
- // 表单新增时是否禁止
- addDisabled: false,
- // 表单新增时是否可见
- addDisplay: true,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: true,
- // 表单编辑时是否可见
- editDisplay: true,
- // 表单编辑时是否为查看模式
- editDetail: false,
- rules: [
- {
- required: true,
- message: "请输入所属公司",
- trigger: "blur",
- },
- ],
- width: 230,
- },
+ {
+ label: "原理论成绩",
+ prop: "oldScore",
+ slot: true,
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: true,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: true,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ width: 88,
+ },
- {
- label: "身份证号",
- prop: "idCardNo",
- search: true,
- searchSpan: 4,
- slot: true,
- // 表单新增时是否禁止
- addDisabled: false,
- // 表单新增时是否可见
- addDisplay: true,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: true,
- // 表单编辑时是否可见
- editDisplay: true,
- // 表单编辑时是否为查看模式
- editDetail: false,
- rules: [
- {
- required: true,
- message: "请输入保安姓名",
- trigger: "blur",
- },
- ],
- width: 140,
- },
+ {
+ label: "修改后理论成绩",
+ prop: "newScore",
+ slot: true,
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: true,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: false,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ width: 88,
+ },
- {
- label: "原理论成绩",
- prop: "oldScore",
- slot: true,
- // 表单新增时是否禁止
- addDisabled: false,
- // 表单新增时是否可见
- addDisplay: true,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: true,
- // 表单编辑时是否可见
- editDisplay: true,
- // 表单编辑时是否为查看模式
- editDetail: false,
- width: 88
- },
+ {
+ label: "申请理由",
+ prop: "applyCause",
+ slot: true,
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: true,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: true,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ },
- {
- label: "修改后理论成绩",
- prop: "newScore",
- slot: true,
- // 表单新增时是否禁止
- addDisabled: false,
- // 表单新增时是否可见
- addDisplay: true,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: false,
- // 表单编辑时是否可见
- editDisplay: true,
- // 表单编辑时是否为查看模式
- editDetail: false,
- width: 88
- },
+ {
+ label: "修改申请时间",
+ prop: "createTime",
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ slot: true,
+ searchSpan: 4,
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: false,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: false,
+ // 表单编辑时是否可见
+ editDisplay: false,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ viewDisplay: false,
+ width: 120,
+ },
- {
- label: "申请理由",
- prop: "applyCause",
- slot: true,
- // 表单新增时是否禁止
- addDisabled: false,
- // 表单新增时是否可见
- addDisplay: true,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: true,
- // 表单编辑时是否可见
- editDisplay: true,
- // 表单编辑时是否为查看模式
- editDetail: false,
- },
+ {
+ label: "审核时间",
+ prop: "auditTime",
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ slot: true,
+ searchSpan: 4,
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: false,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: false,
+ // 表单编辑时是否可见
+ editDisplay: false,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ viewDisplay: false,
+ width: 120,
+ },
- {
- label: "修改申请时间",
- prop: "createTime",
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- slot: true,
- searchSpan: 4,
- // 表单新增时是否禁止
- addDisabled: false,
- // 表单新增时是否可见
- addDisplay: false,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: false,
- // 表单编辑时是否可见
- editDisplay: false,
- // 表单编辑时是否为查看模式
- editDetail: false,
- viewDisplay: false,
- width: 120
- },
+ {
+ label: "审核状态",
+ prop: "status",
+ type: "select",
+ slot: true,
+ search: true,
+ searchSpan: 3,
+ dicData: [
+ {
+ label: "待审核",
+ value: 1,
+ },
+ {
+ label: "审核通过",
+ value: 2,
+ },
+ {
+ label: "审核不通过",
+ value: 3,
+ },
+ ],
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: true,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: true,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ width: 96,
+ },
- {
- label: "审核时间",
- prop: "auditTime",
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- slot: true,
- searchSpan: 4,
- // 表单新增时是否禁止
- addDisabled: false,
- // 表单新增时是否可见
- addDisplay: false,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: false,
- // 表单编辑时是否可见
- editDisplay: false,
- // 表单编辑时是否为查看模式
- editDetail: false,
- viewDisplay: false,
- width: 120
- },
-
- {
- label: "审核状态",
- prop: "status",
- type: "select",
- slot: true,
- search: true,
- searchSpan: 3,
- dicData: [
- {
- label: "待审核",
- value: 1,
- },
- {
- label: "审核通过",
- value: 2,
- },
- {
- label: "审核不通过",
- value: 3,
- }
- ],
- // 表单新增时是否禁止
- addDisabled: false,
- // 表单新增时是否可见
- addDisplay: true,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: true,
- // 表单编辑时是否可见
- editDisplay: true,
- // 表单编辑时是否为查看模式
- editDetail: false,
- width: 96
- },
-
- {
- label: "审核明细",
- prop: "auditDetail",
- slot: true,
- // 表单新增时是否禁止
- addDisabled: false,
- // 表单新增时是否可见
- addDisplay: true,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: true,
- // 表单编辑时是否可见
- editDisplay: true,
- // 表单编辑时是否为查看模式
- editDetail: false,
- width: 68,
- }
- ],
- },
- questionBankSearch: {},
- questionBankLoading: true,
- questionBankData: [],
- questionBankPage: {
- pageSize: 10,
- currentPage: 1,
- total: 16,
- },
- questionBankQuery: {},
- questionBankSelectionList: [],
-
- };
- },
- created(){
- if (this.userInfo.role_name == "公安管理员") {
- //判断是否为市局管理员
- if(this.userInfo.jurisdiction=="1372091709474910209"){
- this.check = true;
- }else{
- this.check = false;
- }
+ {
+ label: "审核明细",
+ prop: "auditDetail",
+ slot: true,
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: true,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: true,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ width: 68,
+ },
+ ],
+ },
+ questionBankSearch: {},
+ questionBankLoading: true,
+ questionBankData: [],
+ questionBankPage: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 16,
+ ...this.$store.state.control.changePageSize,
+ },
+ questionBankQuery: {},
+ questionBankSelectionList: [],
+ };
+ },
+ created() {
+ if (this.userInfo.role_name == "公安管理员") {
+ //判断是否为市局管理员
+ if (this.userInfo.jurisdiction == "1372091709474910209") {
+ this.check = true;
+ } else {
+ this.check = false;
}
+ }
+ },
+ mounted() {},
+ computed: {
+ ...mapGetters(["userInfo", "permission"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(null, false),
+ viewBtn: this.vaildData(this.permission.score_audit_view, false),
+ delBtn: this.vaildData(null, false),
+ editBtn: this.vaildData(this.permission.score_audit_edit, false),
+ };
},
- mounted () { },
- computed: {
- ...mapGetters(["userInfo", "permission"]),
- permissionList () {
- return {
- addBtn: this.vaildData(null, false),
- viewBtn: this.vaildData(
- this.permission.score_audit_view,
- false
- ),
- delBtn: this.vaildData(null, false),
- editBtn: this.vaildData(
- this.permission.score_audit_edit,
- false
- ),
- };
- },
+ },
+ methods: {
+ getNewTime() {
+ var nowTime = new Date();
+
+ var oneHoursAgo = new Date(
+ new Date(nowTime).getTime() - 1 * 60 * 60 * 1000
+ );
+ var oneHoursAgoY = oneHoursAgo.getFullYear();
+ var oneHoursAgoM =
+ oneHoursAgo.getMonth() + 1 < 10
+ ? "0" + (oneHoursAgo.getMonth() + 1)
+ : oneHoursAgo.getMonth() + 1;
+ var oneHoursAgoD =
+ oneHoursAgo.getDate() < 10
+ ? "0" + oneHoursAgo.getDate()
+ : oneHoursAgo.getDate();
+ var oneHoursAgoH =
+ oneHoursAgo.getHours() < 10
+ ? "0" + oneHoursAgo.getHours()
+ : oneHoursAgo.getHours();
+ var oneHoursAgom =
+ oneHoursAgo.getMinutes() < 10
+ ? "0" + oneHoursAgo.getMinutes()
+ : oneHoursAgo.getMinutes();
+ var oneHoursAgos =
+ oneHoursAgo.getSeconds() < 10
+ ? "0" + oneHoursAgo.getSeconds()
+ : oneHoursAgo.getSeconds();
+
+ /**
+ * @return 返回1小时,2小时,3小时,4小时,24小时
+ */
+ return (
+ oneHoursAgoY +
+ "-" +
+ oneHoursAgoM +
+ "-" +
+ oneHoursAgoD +
+ " " +
+ oneHoursAgoH +
+ ":" +
+ oneHoursAgom +
+ ":" +
+ oneHoursAgos
+ );
},
- methods: {
- getNewTime () {
- var nowTime = new Date()
- var oneHoursAgo = new Date(new Date(nowTime).getTime() - 1 * 60 * 60 * 1000)
- var oneHoursAgoY = oneHoursAgo.getFullYear()
- var oneHoursAgoM = oneHoursAgo.getMonth() + 1 < 10 ? '0' + (oneHoursAgo.getMonth() + 1) : oneHoursAgo.getMonth() + 1
- var oneHoursAgoD = oneHoursAgo.getDate() < 10 ? '0' + oneHoursAgo.getDate() : oneHoursAgo.getDate()
- var oneHoursAgoH = oneHoursAgo.getHours() < 10 ? '0' + oneHoursAgo.getHours() : oneHoursAgo.getHours()
- var oneHoursAgom = oneHoursAgo.getMinutes() < 10 ? '0' + oneHoursAgo.getMinutes() : oneHoursAgo.getMinutes()
- var oneHoursAgos = oneHoursAgo.getSeconds() < 10 ? '0' + oneHoursAgo.getSeconds() : oneHoursAgo.getSeconds()
-
- /**
- * @return 返回1小时,2小时,3小时,4小时,24小时
- */
- return oneHoursAgoY + '-' + oneHoursAgoM + '-' + oneHoursAgoD + ' ' + oneHoursAgoH + ':' + oneHoursAgom + ':' + oneHoursAgos
- },
-
- handleAudit (row) {
- this.dialogFormVisible = true;
- this.Audit = row;
- },
- //审核
- submit (row, done, loading) {
-
- row.auditTime = this.getNewTime()
- const data = {
- id:row.id,
- status:row.status,
- auditDetail:row.auditDetail,
- auditUser:this.userInfo.Id
- }
-
- applyAudit(data).then(
- () => {
- this.dialogFormVisible = false;
- this.questionBankOnLoad(this.questionBankPage);
- this.$message({
- type: "success",
- message: "操作成功!",
- });
- done();
- },
- (error) => {
- window.console.log(error);
- loading();
- }
- );
- },
-
- questionBankOnLoad (page, params = {}) {
- //判断角色,如果是保安公司管理员或保安,只能查看当前公司的考试成绩
- var that = this;
- //获取当前登录人员的角色信息
- var roleIds = this.userInfo.role_id.split(",");
- roleIds.forEach((roleId) => {
- getRoleDetail(roleId).then((res) => {
- var roleAlias = res.data.data.roleAlias;
- if (roleAlias == "保安公司管理员" || roleAlias == "保安") {
- //如果是保安公司管理员
- params["deptId"] = that.userInfo.dept_id;
- }
- if (roleAlias == "培训公司管理员") {
- //如果是培训公司管理员
- params["trainUnitId"] = that.userInfo.dept_id;
- }
- if (this.userInfo.role_name == "公安管理员") {
- //如果是公安管理员
- params["jurisdiction"] = this.userInfo.jurisdiction;
- }
- that.questionBankLoading = false;
- getList(
- page.currentPage,
- page.pageSize,
- Object.assign(params, this.questionBankQuery)
- ).then((res) => {
- const data = res.data.data;
- that.questionBankPage.total = data.total;
- that.questionBankData = data.records;
- that.questionBankLoading = false;
- that.questionBankSelectionClear();
- });
- });
- });
- },
-
- questionBankSelectionClear () {
- this.questionBankSelectionList = [];
- this.$refs.questionBankCrud.toggleSelection();
- },
- questionBankSelectionChange (list) {
- this.questionBankSelectionList = list;
- },
- questionBankSearchChange (params, done) {
- this.questionBankQuery = params;
- this.questionBankPage.currentPage = 1;
- this.questionBankOnLoad(this.questionBankPage, params);
- done();
- },
- questionBankSearchReset () {
- this.questionBankQuery = {};
- this.questionBankOnLoad(this.questionBankPage);
- },
- questionBankCurrentChange (currentPage) {
- this.questionBankPage.currentPage = currentPage;
- },
- questionBankSizeChange (pageSize) {
- this.questionBankPage.pageSize = pageSize;
- },
-
- questionBankRowUpdate (row, index, done, loading) {
- update({
- id: row.id,
- newScore: row.newScore
- }).then(
- () => {
- this.questionBankOnLoad(this.questionBankPage);
- this.$message({
- type: "success",
- message: "操作成功!",
- });
- done();
- },
- (error) => {
- window.console.log(error);
- loading();
- }
- );
- },
-
- refreshChange () {
- this.questionBankOnLoad(this.questionBankPage, this.questionBankQuery);
- },
-
+ handleAudit(row) {
+ this.dialogFormVisible = true;
+ this.Audit = row;
},
+ //审核
+ submit(row, done, loading) {
+ row.auditTime = this.getNewTime();
+ const data = {
+ id: row.id,
+ status: row.status,
+ auditDetail: row.auditDetail,
+ auditUser: this.userInfo.Id,
+ };
+
+ applyAudit(data).then(
+ () => {
+ this.dialogFormVisible = false;
+ this.questionBankOnLoad(this.questionBankPage);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ },
+
+ questionBankOnLoad(page, params = {}) {
+ //判断角色,如果是保安公司管理员或保安,只能查看当前公司的考试成绩
+ var that = this;
+ //获取当前登录人员的角色信息
+ var roleIds = this.userInfo.role_id.split(",");
+ roleIds.forEach((roleId) => {
+ getRoleDetail(roleId).then((res) => {
+ var roleAlias = res.data.data.roleAlias;
+ if (roleAlias == "保安公司管理员" || roleAlias == "保安") {
+ //如果是保安公司管理员
+ params["deptId"] = that.userInfo.dept_id;
+ }
+ if (roleAlias == "培训公司管理员") {
+ //如果是培训公司管理员
+ params["trainUnitId"] = that.userInfo.dept_id;
+ }
+ if (this.userInfo.role_name == "公安管理员") {
+ //如果是公安管理员
+ params["jurisdiction"] = this.userInfo.jurisdiction;
+ }
+ that.questionBankLoading = false;
+ getList(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, this.questionBankQuery)
+ ).then((res) => {
+ const data = res.data.data;
+ that.questionBankPage.total = data.total;
+ that.questionBankData = data.records;
+ that.questionBankLoading = false;
+ that.questionBankSelectionClear();
+ });
+ });
+ });
+ },
+
+ questionBankSelectionClear() {
+ this.questionBankSelectionList = [];
+ this.$refs.questionBankCrud.toggleSelection();
+ },
+ questionBankSelectionChange(list) {
+ this.questionBankSelectionList = list;
+ },
+ questionBankSearchChange(params, done) {
+ this.questionBankQuery = params;
+ this.questionBankPage.currentPage = 1;
+ this.questionBankOnLoad(this.questionBankPage, params);
+ done();
+ },
+ questionBankSearchReset() {
+ this.questionBankQuery = {};
+ this.questionBankOnLoad(this.questionBankPage);
+ },
+ questionBankCurrentChange(currentPage) {
+ this.questionBankPage.currentPage = currentPage;
+ },
+ questionBankSizeChange(pageSize) {
+ this.questionBankPage.pageSize = pageSize;
+ },
+
+ questionBankRowUpdate(row, index, done, loading) {
+ update({
+ id: row.id,
+ newScore: row.newScore,
+ }).then(
+ () => {
+ this.questionBankOnLoad(this.questionBankPage);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ },
+
+ refreshChange() {
+ this.questionBankOnLoad(this.questionBankPage, this.questionBankQuery);
+ },
+ },
};
</script>
<style lang="scss" scoped>
.morpheus-box {
- position: relative;
+ position: relative;
}
</style>
diff --git a/src/views/trainExam/performance.vue b/src/views/trainExam/performance.vue
index ca37c96..ea07c97 100644
--- a/src/views/trainExam/performance.vue
+++ b/src/views/trainExam/performance.vue
@@ -1,49 +1,57 @@
/*
* @Author: Morpheus
* @Date: 2021-07-05 16:31:54
- * @Last Modified by: Morpheus
- * @Last Modified time: 2021-11-04 16:18:32
+ * @Last Modified by: liu
+ * @Last Modified time: 2021-11-23 14:11:41
* menu-name 成绩管理
*/
<template>
- <el-row class="morpheus-box">
- <el-col :span="24"
- class="recruitmentManagement">
- <el-card>
- <div class="exam-card-body">
- <avue-crud v-model="obj"
- class="company-box"
- :option="questionBankOption"
- :search.sync="questionBankSearch"
- :table-loading="questionBankLoading"
- :data="questionBankData"
- :permission="permissionList"
- ref="questionBankCrud"
- :page.sync="questionBankPage"
- @on-load="questionBankOnLoad"
- @selection-change="questionBankSelectionChange"
- @search-change="questionBankSearchChange"
- @search-reset="questionBankSearchReset"
- @current-change="questionBankCurrentChange"
- @size-change="questionBankSizeChange"
- @row-update="questionBankRowUpdate"
- @refresh-change="refreshChange">
- <template slot-scope="{ row }"
- slot="theoryGrade">
- {{ row.theoryGrade }}
- </template>
- <template slot-scope="{ row }"
- slot="learnGrade">
- {{ row.learnGrade == '' ? "暂未录入" : row.learnGrade }}
- </template>
- <template slot-scope="{ row }"
- slot="allGrade">
- {{ row.allGrade == -1 ? "" : row.allGrade }}
- </template>
- <template slot-scope="{ row }"
- slot="qualified">
- {{
- row.qualified == ''
+ <el-row class="morpheus-box">
+ <el-col
+ :span="24"
+ :class="[
+ 'recruitmentManagement',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
+ <el-card>
+ <div
+ :class="[
+ 'exam-card-body',
+ $store.state.control.windowWidth >= 1024 ? 'tooRowSearch' : '',
+ ]"
+ >
+ <avue-crud
+ v-model="obj"
+ class="company-box"
+ :option="questionBankOption"
+ :search.sync="questionBankSearch"
+ :table-loading="questionBankLoading"
+ :data="questionBankData"
+ :permission="permissionList"
+ ref="questionBankCrud"
+ :page.sync="questionBankPage"
+ @on-load="questionBankOnLoad"
+ @selection-change="questionBankSelectionChange"
+ @search-change="questionBankSearchChange"
+ @search-reset="questionBankSearchReset"
+ @current-change="questionBankCurrentChange"
+ @size-change="questionBankSizeChange"
+ @row-update="questionBankRowUpdate"
+ @refresh-change="refreshChange"
+ >
+ <template slot-scope="{ row }" slot="theoryGrade">
+ {{ row.theoryGrade }}
+ </template>
+ <template slot-scope="{ row }" slot="learnGrade">
+ {{ row.learnGrade == "" ? "暂未录入" : row.learnGrade }}
+ </template>
+ <template slot-scope="{ row }" slot="allGrade">
+ {{ row.allGrade == -1 ? "" : row.allGrade }}
+ </template>
+ <template slot-scope="{ row }" slot="qualified">
+ {{
+ row.qualified == ""
? ""
: row.qualified == 0
? "合格"
@@ -53,963 +61,978 @@
? "缺考,成绩无效"
: ""
}}
- </template>
+ </template>
- <!-- 自定义按钮 -->
- <template slot="menuLeft">
- <!-- <el-button type="danger"
+ <!-- 自定义按钮 -->
+ <template slot="menuLeft">
+ <!-- <el-button type="danger"
size="mini"
icon="el-icon-delete"
plain
@click="handleDelete">新增
</el-button> -->
- <!-- <el-button type="danger"
+ <!-- <el-button type="danger"
size="mini"
icon="el-icon-delete"
plain
@click="handleDelete">删除
</el-button> -->
- <el-button type="success"
- size="small"
- plain
- icon="el-icon-upload2"
- v-if="permission.trainExam_performance_import"
- @click="handleImport">实操成绩导入
- </el-button>
- <el-button type="warning"
- size="small"
- plain
- icon="el-icon-download"
- v-if="permission.trainExam_performance_export"
- @click="handleExport">成绩导出
- </el-button>
- </template>
+ <el-button
+ type="success"
+ size="small"
+ plain
+ icon="el-icon-upload2"
+ v-if="permission.trainExam_performance_import"
+ @click="handleImport"
+ >实操成绩导入
+ </el-button>
+ <el-button
+ type="warning"
+ size="small"
+ plain
+ icon="el-icon-download"
+ v-if="permission.trainExam_performance_export"
+ @click="handleExport"
+ >成绩导出
+ </el-button>
+ </template>
- <template slot-scope="{ type, size, row }"
- slot="menu">
- <el-button icon="el-icon-s-flag"
- @click="absent(row)"
- :size="size"
- :type="type">缺考标记</el-button>
- <el-button icon="el-icon-s-promotion"
- @click="openzhengjian(row)"
- :disabled="row.qualified != 0"
- :size="size"
- :type="type">查看证件</el-button>
- <el-button icon="el-icon-edit"
- @click="modifiedGrades(row)"
- :size="size"
- :type="type">申请修改成绩</el-button>
- </template>
+ <template slot-scope="{ type, size, row }" slot="menu">
+ <el-button
+ icon="el-icon-s-flag"
+ @click="absent(row)"
+ :size="size"
+ :type="type"
+ >缺考标记</el-button
+ >
+ <el-button
+ icon="el-icon-s-promotion"
+ @click="openzhengjian(row)"
+ :disabled="row.qualified != 0"
+ :size="size"
+ :type="type"
+ >查看证件</el-button
+ >
+ <el-button
+ icon="el-icon-edit"
+ @click="modifiedGrades(row)"
+ :size="size"
+ :type="type"
+ >申请修改成绩</el-button
+ >
+ </template>
+ </avue-crud>
- </avue-crud>
+ <el-dialog
+ title="实操成绩导入"
+ append-to-body
+ :visible.sync="excelBox"
+ width="555px"
+ >
+ <avue-form
+ :option="excelOption"
+ v-model="excelForm"
+ :upload-after="uploadAfter"
+ >
+ <template slot="excelTemplate">
+ <el-button type="primary" @click="handleTemplate">
+ 点击下载<i class="el-icon-download el-icon--right"></i>
+ </el-button>
+ </template>
+ </avue-form>
+ </el-dialog>
+ </div>
+ </el-card>
+ </el-col>
- <el-dialog title="实操成绩导入"
- append-to-body
- :visible.sync="excelBox"
- width="555px">
- <avue-form :option="excelOption"
- v-model="excelForm"
- :upload-after="uploadAfter">
- <template slot="excelTemplate">
- <el-button type="primary"
- @click="handleTemplate">
- 点击下载<i class="el-icon-download el-icon--right"></i>
- </el-button>
- </template>
- </avue-form>
- </el-dialog>
- </div>
- </el-card>
- </el-col>
+ <el-dialog
+ title="申请修改成绩"
+ :visible.sync="gradeBoxVisible"
+ width="width"
+ :modal="true"
+ :modal-append-to-body="true"
+ :append-to-body="true"
+ :close-on-click-modal="false"
+ :close-on-press-escape="false"
+ :before-close="dialogBeforeClose"
+ >
+ <div>
+ <el-form
+ ref="gradeForm"
+ :model="gradeForm"
+ :rules="rules"
+ label-width="80px"
+ label-position="left"
+ >
+ <el-row :gutter="24">
+ <el-col :span="12">
+ <el-form-item label="考试名称" label-width="108px">
+ <el-input v-model="gradeForm.examName" disabled></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="姓名" label-width="108px">
+ <el-input v-model="gradeForm.securityName" disabled></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
- <el-dialog title="申请修改成绩"
- :visible.sync="gradeBoxVisible"
- width="width"
- :modal='true'
- :modal-append-to-body='true'
- :append-to-body='true'
- :close-on-click-modal='false'
- :close-on-press-escape='false'
- :before-close="dialogBeforeClose">
+ <el-row :gutter="24">
+ <el-col :span="12">
+ <el-form-item label="身份证号" label-width="108px">
+ <el-input v-model="gradeForm.account" disabled></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="准考证号" label-width="108px">
+ <el-input v-model="gradeForm.candidateNo" disabled></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
- <div>
- <el-form ref="gradeForm"
- :model="gradeForm"
- :rules="rules"
- label-width="80px"
- label-position="left">
+ <el-row :gutter="24">
+ <el-col :span="12">
+ <el-form-item label="原理论成绩" label-width="108px">
+ <el-input v-model="gradeForm.theoryGrade" disabled></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item
+ label="修改考试成绩"
+ label-width="108px"
+ prop="editGrades"
+ >
+ <el-input
+ v-model.number="gradeForm.editGrades"
+ autocomplete="off"
+ ></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
- <el-row :gutter="24">
- <el-col :span="12">
- <el-form-item label="考试名称"
- label-width="108px">
- <el-input v-model="gradeForm.examName"
- disabled></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="姓名"
- label-width="108px">
- <el-input v-model="gradeForm.securityName"
- disabled></el-input>
- </el-form-item>
- </el-col>
- </el-row>
+ <el-row :gutter="24">
+ <el-col :span="12">
+ <el-form-item label="实操成绩" label-width="108px">
+ <el-input v-model="gradeForm.learnGrade" disabled></el-input>
+ </el-form-item>
+ </el-col>
+ <el-col :span="12">
+ <el-form-item label="总成绩" label-width="108px">
+ <el-input v-model="gradeForm.allGrade" disabled></el-input>
+ </el-form-item>
+ </el-col>
+ </el-row>
- <el-row :gutter="24">
- <el-col :span="12">
- <el-form-item label="身份证号"
- label-width="108px">
- <el-input v-model="gradeForm.account"
- disabled></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="准考证号"
- label-width="108px">
- <el-input v-model="gradeForm.candidateNo"
- disabled></el-input>
- </el-form-item>
- </el-col>
- </el-row>
+ <el-form-item label="修改理由" label-width="108px">
+ <el-input
+ type="textarea"
+ :rows="3"
+ placeholder="请输入修改理由"
+ resize="none"
+ v-model="gradeForm.editReason"
+ ></el-input>
+ </el-form-item>
- <el-row :gutter="24">
- <el-col :span="12">
- <el-form-item label="原理论成绩"
- label-width="108px">
- <el-input v-model="gradeForm.theoryGrade"
- disabled></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="修改考试成绩"
- label-width="108px"
- prop='editGrades'>
- <el-input v-model.number="gradeForm.editGrades"
- autocomplete="off"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
+ <el-form-item style="text-align: center" label-width="0">
+ <el-button type="primary" @click="uploadGrade('gradeForm')"
+ >确 定</el-button
+ >
+ <el-button @click="gradeBoxVisible = false">取 消</el-button>
+ </el-form-item>
+ </el-form>
+ </div>
+ </el-dialog>
- <el-row :gutter="24">
- <el-col :span="12">
- <el-form-item label="实操成绩"
- label-width="108px">
- <el-input v-model="gradeForm.learnGrade"
- disabled></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="12">
- <el-form-item label="总成绩"
- label-width="108px">
- <el-input v-model="gradeForm.allGrade"
- disabled></el-input>
- </el-form-item>
- </el-col>
- </el-row>
-
- <el-form-item label="修改理由"
- label-width="108px">
- <el-input type='textarea'
- :rows="3"
- placeholder="请输入修改理由"
- resize='none'
- v-model="gradeForm.editReason"></el-input>
- </el-form-item>
-
- <el-form-item style="text-align: center;"
- label-width="0">
- <el-button type="primary"
- @click="uploadGrade('gradeForm')">确 定</el-button>
- <el-button @click="gradeBoxVisible = false">取 消</el-button>
- </el-form-item>
-
- </el-form>
- </div>
-
- </el-dialog>
-
- <!-- <el-dialog
+ <!-- <el-dialog
title="打印证件"
:visible.sync="dialogVisiblezhengjian"
:modal-append-to-body="false"
> -->
- <div class="dialogVisiblezhengjian"
- v-if="dialogVisiblezhengjian">
- <baoanz :data="baoanzdata"
- :close="1"
- @close="closezhengjian"
- :closePrint="1"></baoanz>
- </div>
- <!-- </el-dialog> -->
- </el-row>
+ <div class="dialogVisiblezhengjian" v-if="dialogVisiblezhengjian">
+ <baoanz
+ :data="baoanzdata"
+ :close="1"
+ @close="closezhengjian"
+ :closePrint="1"
+ ></baoanz>
+ </div>
+ <!-- </el-dialog> -->
+ </el-row>
</template>
<script>
import baoanz from "../securityGuard/baoanz.vue";
-import { getList, update, updateAbsent, updateGrade } from "@/api/examapi/performance";
+import {
+ getList,
+ update,
+ updateAbsent,
+ updateGrade,
+} from "@/api/examapi/performance";
import { mapGetters } from "vuex";
import { getRoleDetail } from "@/api/system/role";
import Qs from "qs";
export default {
- components: {
- baoanz,
- },
- data () {
- var validatePass = (rule, value, callback) => {
- if (value == undefined || value == "") {
- callback(new Error("请输入实操成绩"));
- return;
- } else if (value !== "" && isNaN(value) == true) {
- callback(new Error("请输入数字"));
- } else if (value <= 0) {
- callback(new Error("分数设置请大于0"));
- } else if (value > 100) {
- callback(new Error("分数设置请小于100"));
- } else {
- callback();
- }
- };
+ components: {
+ baoanz,
+ },
+ data() {
+ var validatePass = (rule, value, callback) => {
+ if (value == undefined || value == "") {
+ callback(new Error("请输入实操成绩"));
+ return;
+ } else if (value !== "" && isNaN(value) == true) {
+ callback(new Error("请输入数字"));
+ } else if (value <= 0) {
+ callback(new Error("分数设置请大于0"));
+ } else if (value > 100) {
+ callback(new Error("分数设置请小于100"));
+ } else {
+ callback();
+ }
+ };
- return {
- rules: {
- editGrades: [
- { validator: validatePass, required: true, trigger: "blur" },
- ]
+ return {
+ rules: {
+ editGrades: [
+ { validator: validatePass, required: true, trigger: "blur" },
+ ],
+ },
+ gradeForm: {
+ id: null,
+ examName: "",
+ securityName: "",
+ account: "",
+ candidateNo: "",
+ theoryGrade: "",
+ learnGrade: "",
+ allGrade: "",
+ editGrades: "",
+ editReason: "",
+ },
+ gradeBoxVisible: false,
+ dialogVisiblezhengjian: false,
+ baoanzdata: {},
+ obj: {
+ name: "张三",
+ },
+ excelBox: false,
+ questionBankOption: {
+ // 操作栏多余按钮去除
+ delBtn: false,
+ editBtn: true,
+ addBtn: false,
+ selection: false,
+ // 导出按钮
+ // excelBtn: true,
+ // excelBtnText: "成绩导出",
+ viewBtn: true,
+ // title: '成绩',
+ align: "center",
+ height: "auto",
+ calcHeight: 80,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 4,
+ index: true,
+ indexLabel: "序号",
+ //dialogType: 'drawer',
+ dialogClickModal: false,
+ // 操作栏宽度
+ menu: true,
+ menuWidth: 295,
+ labelWidth: 120,
+ ...this.$store.state.control.clearOtherBut,
+ column: [
+ {
+ label: "考试时间",
+ prop: "examDate",
+ type: "date",
+ hide: true,
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ width: 140,
+ slot: true,
+ search: true,
+ searchSpan: 4,
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: false,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: false,
+ // 表单编辑时是否可见
+ editDisplay: false,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ viewDisplay: false,
+ },
+ {
+ label: "考试名称",
+ prop: "examName",
+ search: true,
+ searchSpan: 5,
+ slot: true,
+ viewDisplay: true,
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: true,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: true,
+ viewDisabled: true,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ rules: [
+ {
+ required: true,
+ message: "请输入试卷名称",
+ trigger: "blur",
+ },
+ ],
+ width: 210,
+ // overHidden:true,
+ },
+ {
+ label: "姓名",
+ prop: "securityName",
+ search: true,
+ searchSpan: 3,
+ slot: true,
+ viewDisplay: true,
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: true,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: true,
+ viewDisabled: true,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ rules: [
+ {
+ required: true,
+ message: "请输入试卷名称",
+ trigger: "blur",
+ },
+ ],
+ width: 80,
+ // overHidden:true,
+ },
+ {
+ label: "身份证号",
+ prop: "account",
+ search: true,
+ searchSpan: 4,
+ slot: true,
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: true,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: true,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ rules: [
+ {
+ required: true,
+ message: "请输入保安姓名",
+ trigger: "blur",
+ },
+ ],
+ width: 140,
+ },
+ {
+ label: "准考证号",
+ prop: "candidateNo",
+ search: true,
+ searchSpan: 4,
+ slot: true,
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: true,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: true,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ rules: [
+ {
+ required: true,
+ message: "请输入保安姓名",
+ trigger: "blur",
+ },
+ ],
+ width: 140,
+ },
+ {
+ label: "所属公司",
+ prop: "companyName",
+ search: true,
+ searchSpan: 4,
+ // dicUrl: '/api/blade-system/dept/tree',
+ // props: {
+ // label: "title",
+ // value: "id",
+ // },
+ slot: true,
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: true,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: true,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ rules: [
+ {
+ required: true,
+ message: "请输入所属公司",
+ trigger: "blur",
+ },
+ ],
+ width: 230,
+ },
+ {
+ label: "考试开始时间",
+ prop: "examTime",
+ type: "datetime",
+ // span: 24,
+ format: "yyyy-MM-dd HH:mm:ss",
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
+ width: 140,
+ slot: true,
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: true,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: true,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ },
+ {
+ label: "考试结束时间",
+ prop: "examEndTime",
+ type: "datetime",
+ // span: 24,
+ format: "yyyy-MM-dd HH:mm:ss",
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
+ width: 140,
+ slot: true,
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: true,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: true,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ },
+ {
+ label: "状态",
+ prop: "isExam",
+ type: "select",
+ slot: true,
+ search: true,
+ searchSpan: 3,
+ width: 60,
+ dicData: [
+ {
+ label: "发布成绩",
+ value: 2,
+ },
+ {
+ label: "考试中",
+ value: 3,
+ },
+ ],
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: true,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: true,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ rules: [
+ {
+ required: true,
+ message: "请输入考试名称",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "理论成绩",
+ prop: "theoryGrade",
+ slot: true,
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: true,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: true,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ width: 68,
+ },
+ {
+ label: "实操成绩",
+ prop: "learnGrade",
+ slot: true,
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: true,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: false,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ width: 68,
+ rules: [
+ { validator: validatePass, required: true, trigger: "blur" },
+ ],
+ },
+ {
+ label: "总成绩",
+ prop: "allGrade",
+ slot: true,
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: true,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: true,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ width: 58,
+ },
+ {
+ label: "是否合格",
+ prop: "qualified",
+ type: "select",
+ slot: true,
+ search: true,
+ searchSpan: 3,
+ width: 68,
+ dicData: [
+ {
+ label: "合格",
+ value: 0,
+ },
+ {
+ label: "不合格",
+ value: 1,
+ },
+ {
+ label: "暂未录实操成绩",
+ value: 2,
+ },
+ {
+ label: "缺考,成绩无效",
+ value: 3,
+ },
+ ],
+ // 表单新增时是否禁止
+ addDisabled: false,
+ // 表单新增时是否可见
+ addDisplay: true,
+ // 表单新增时是否为查看模式
+ addDetail: false,
+ // 表单编辑时是否禁止
+ editDisabled: true,
+ // 表单编辑时是否可见
+ editDisplay: true,
+ // 表单编辑时是否为查看模式
+ editDetail: false,
+ },
+ ],
+ },
+ questionBankSearch: {},
+ questionBankLoading: true,
+ questionBankData: [],
+ questionBankPage: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 16,
+ ...this.$store.state.control.changePageSize,
+ },
+ questionBankQuery: {},
+ questionBankSelectionList: [],
+ excelForm: {},
+ excelOption: {
+ submitBtn: false,
+ emptyBtn: false,
+ column: [
+ {
+ label: "模板上传",
+ prop: "excelFile",
+ type: "upload",
+ drag: true,
+ loadText: "模板上传中,请稍等",
+ span: 24,
+ propsHttp: {
+ res: "data",
},
- gradeForm: {
- id: null,
- examName: '',
- securityName: '',
- account: '',
- candidateNo: '',
- theoryGrade: '',
- learnGrade: '',
- allGrade: '',
- editGrades: '',
- editReason: ''
- },
- gradeBoxVisible: false,
- dialogVisiblezhengjian: false,
- baoanzdata: {},
- obj: {
- name: "张三",
- },
- excelBox: false,
- questionBankOption: {
- // 操作栏多余按钮去除
- delBtn: false,
- editBtn: true,
- addBtn: false,
- selection: false,
- // 导出按钮
- // excelBtn: true,
- // excelBtnText: "成绩导出",
- viewBtn: true,
- // title: '成绩',
- align: "center",
- height: "auto",
- calcHeight: 80,
- tip: false,
- searchShow: true,
- searchMenuSpan: 4,
- index: true,
- indexLabel: "序号",
- //dialogType: 'drawer',
- dialogClickModal: false,
- // 操作栏宽度
- menu: true,
- menuWidth: 295,
- labelWidth: 120,
- column: [
- {
- label: "考试时间",
- prop: "examDate",
- type: "date",
- hide: true,
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- width: 140,
- slot: true,
- search: true,
- searchSpan: 4,
- // 表单新增时是否禁止
- addDisabled: false,
- // 表单新增时是否可见
- addDisplay: false,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: false,
- // 表单编辑时是否可见
- editDisplay: false,
- // 表单编辑时是否为查看模式
- editDetail: false,
- viewDisplay: false,
- },
- {
- label: "考试名称",
- prop: "examName",
- search: true,
- searchSpan: 5,
- slot: true,
- viewDisplay: true,
- // 表单新增时是否禁止
- addDisabled: false,
- // 表单新增时是否可见
- addDisplay: true,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: true,
- viewDisabled: true,
- // 表单编辑时是否可见
- editDisplay: true,
- // 表单编辑时是否为查看模式
- editDetail: false,
- rules: [
- {
- required: true,
- message: "请输入试卷名称",
- trigger: "blur",
- },
- ],
- width: 210,
- // overHidden:true,
- },
- {
- label: "姓名",
- prop: "securityName",
- search: true,
- searchSpan: 3,
- slot: true,
- viewDisplay: true,
- // 表单新增时是否禁止
- addDisabled: false,
- // 表单新增时是否可见
- addDisplay: true,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: true,
- viewDisabled: true,
- // 表单编辑时是否可见
- editDisplay: true,
- // 表单编辑时是否为查看模式
- editDetail: false,
- rules: [
- {
- required: true,
- message: "请输入试卷名称",
- trigger: "blur",
- },
- ],
- width: 80,
- // overHidden:true,
- },
- {
- label: "身份证号",
- prop: "account",
- search: true,
- searchSpan: 4,
- slot: true,
- // 表单新增时是否禁止
- addDisabled: false,
- // 表单新增时是否可见
- addDisplay: true,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: true,
- // 表单编辑时是否可见
- editDisplay: true,
- // 表单编辑时是否为查看模式
- editDetail: false,
- rules: [
- {
- required: true,
- message: "请输入保安姓名",
- trigger: "blur",
- },
- ],
- width: 140,
- },
- {
- label: "准考证号",
- prop: "candidateNo",
- search: true,
- searchSpan: 4,
- slot: true,
- // 表单新增时是否禁止
- addDisabled: false,
- // 表单新增时是否可见
- addDisplay: true,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: true,
- // 表单编辑时是否可见
- editDisplay: true,
- // 表单编辑时是否为查看模式
- editDetail: false,
- rules: [
- {
- required: true,
- message: "请输入保安姓名",
- trigger: "blur",
- },
- ],
- width: 140,
- },
- {
- label: "所属公司",
- prop: "companyName",
- search: true,
- searchSpan: 4,
- // dicUrl: '/api/blade-system/dept/tree',
- // props: {
- // label: "title",
- // value: "id",
- // },
- slot: true,
- // 表单新增时是否禁止
- addDisabled: false,
- // 表单新增时是否可见
- addDisplay: true,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: true,
- // 表单编辑时是否可见
- editDisplay: true,
- // 表单编辑时是否为查看模式
- editDetail: false,
- rules: [
- {
- required: true,
- message: "请输入所属公司",
- trigger: "blur",
- },
- ],
- width: 230,
- },
- {
- label: "考试开始时间",
- prop: "examTime",
- type: "datetime",
- // span: 24,
- format: "yyyy-MM-dd HH:mm:ss",
- valueFormat: "yyyy-MM-dd HH:mm:ss",
- width: 140,
- slot: true,
- // 表单新增时是否禁止
- addDisabled: false,
- // 表单新增时是否可见
- addDisplay: true,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: true,
- // 表单编辑时是否可见
- editDisplay: true,
- // 表单编辑时是否为查看模式
- editDetail: false,
- },
- {
- label: "考试结束时间",
- prop: "examEndTime",
- type: "datetime",
- // span: 24,
- format: "yyyy-MM-dd HH:mm:ss",
- valueFormat: "yyyy-MM-dd HH:mm:ss",
- width: 140,
- slot: true,
- // 表单新增时是否禁止
- addDisabled: false,
- // 表单新增时是否可见
- addDisplay: true,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: true,
- // 表单编辑时是否可见
- editDisplay: true,
- // 表单编辑时是否为查看模式
- editDetail: false,
- },
- {
- label: "状态",
- prop: "isExam",
- type: "select",
- slot: true,
- search: true,
- searchSpan: 3,
- width: 60,
- dicData: [
- {
- label: "发布成绩",
- value: 2,
- },
- {
- label: "考试中",
- value: 3,
- },
- ],
- // 表单新增时是否禁止
- addDisabled: false,
- // 表单新增时是否可见
- addDisplay: true,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: true,
- // 表单编辑时是否可见
- editDisplay: true,
- // 表单编辑时是否为查看模式
- editDetail: false,
- rules: [
- {
- required: true,
- message: "请输入考试名称",
- trigger: "blur",
- },
- ],
- },
- {
- label: "理论成绩",
- prop: "theoryGrade",
- slot: true,
- // 表单新增时是否禁止
- addDisabled: false,
- // 表单新增时是否可见
- addDisplay: true,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: true,
- // 表单编辑时是否可见
- editDisplay: true,
- // 表单编辑时是否为查看模式
- editDetail: false,
- width: 68,
- },
- {
- label: "实操成绩",
- prop: "learnGrade",
- slot: true,
- // 表单新增时是否禁止
- addDisabled: false,
- // 表单新增时是否可见
- addDisplay: true,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: false,
- // 表单编辑时是否可见
- editDisplay: true,
- // 表单编辑时是否为查看模式
- editDetail: false,
- width: 68,
- rules: [
- { validator: validatePass, required: true, trigger: "blur" },
- ],
- },
- {
- label: "总成绩",
- prop: "allGrade",
- slot: true,
- // 表单新增时是否禁止
- addDisabled: false,
- // 表单新增时是否可见
- addDisplay: true,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: true,
- // 表单编辑时是否可见
- editDisplay: true,
- // 表单编辑时是否为查看模式
- editDetail: false,
- width: 58
- },
- {
- label: "是否合格",
- prop: "qualified",
- type: "select",
- slot: true,
- search: true,
- searchSpan: 3,
- width: 68,
- dicData: [
- {
- label: "合格",
- value: 0,
- },
- {
- label: "不合格",
- value: 1,
- },
- {
- label: "暂未录实操成绩",
- value: 2,
- },
- {
- label: "缺考,成绩无效",
- value: 3,
- },
- ],
- // 表单新增时是否禁止
- addDisabled: false,
- // 表单新增时是否可见
- addDisplay: true,
- // 表单新增时是否为查看模式
- addDetail: false,
- // 表单编辑时是否禁止
- editDisabled: true,
- // 表单编辑时是否可见
- editDisplay: true,
- // 表单编辑时是否为查看模式
- editDetail: false
- },
- ],
- },
- questionBankSearch: {},
- questionBankLoading: true,
- questionBankData: [],
- questionBankPage: {
- pageSize: 10,
- currentPage: 1,
- total: 16,
- },
- questionBankQuery: {},
- questionBankSelectionList: [],
- excelForm: {},
- excelOption: {
- submitBtn: false,
- emptyBtn: false,
- column: [
- {
- label: "模板上传",
- prop: "excelFile",
- type: "upload",
- drag: true,
- loadText: "模板上传中,请稍等",
- span: 24,
- propsHttp: {
- res: "data",
- },
- tip: "请上传 .xls,.xlsx 标准格式文件",
- action: "/api/examScore/import-examScore",
- },
- // {
- // label: "数据覆盖",
- // prop: "isCovered",
- // type: "switch",
- // align: "center",
- // width: 80,
- // dicData: [
- // {
- // label: "否",
- // value: 0,
- // },
- // {
- // label: "是",
- // value: 1,
- // },
- // ],
- // value: 0,
- // slot: true,
- // rules: [
- // {
- // required: true,
- // message: "请选择是否覆盖",
- // trigger: "blur",
- // },
- // ],
- // },
- {
- label: "模板下载",
- prop: "excelTemplate",
- formslot: true,
- span: 24,
- },
- ],
- },
- };
+ tip: "请上传 .xls,.xlsx 标准格式文件",
+ action: "/api/examScore/import-examScore",
+ },
+ // {
+ // label: "数据覆盖",
+ // prop: "isCovered",
+ // type: "switch",
+ // align: "center",
+ // width: 80,
+ // dicData: [
+ // {
+ // label: "否",
+ // value: 0,
+ // },
+ // {
+ // label: "是",
+ // value: 1,
+ // },
+ // ],
+ // value: 0,
+ // slot: true,
+ // rules: [
+ // {
+ // required: true,
+ // message: "请选择是否覆盖",
+ // trigger: "blur",
+ // },
+ // ],
+ // },
+ {
+ label: "模板下载",
+ prop: "excelTemplate",
+ formslot: true,
+ span: 24,
+ },
+ ],
+ },
+ };
+ },
+ created() {},
+ mounted() {},
+ computed: {
+ ...mapGetters(["userInfo", "permission"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(null, false),
+ viewBtn: this.vaildData(
+ this.permission.trainExam_performance_view,
+ false
+ ),
+ delBtn: this.vaildData(null, false),
+ editBtn: this.vaildData(
+ this.permission.trainExam_performance_edit,
+ false
+ ),
+ excelBtn: this.vaildData(
+ this.permission.trainExam_performance_export,
+ false
+ ),
+ };
},
- created () { },
- mounted () { },
- computed: {
- ...mapGetters(["userInfo", "permission"]),
- permissionList () {
- return {
- addBtn: this.vaildData(null, false),
- viewBtn: this.vaildData(
- this.permission.trainExam_performance_view,
- false
- ),
- delBtn: this.vaildData(null, false),
- editBtn: this.vaildData(
- this.permission.trainExam_performance_edit,
- false
- ),
- excelBtn: this.vaildData(
- this.permission.trainExam_performance_export,
- false
- ),
- };
- },
+ },
+ methods: {
+ openzhengjian(row) {
+ this.baoanzdata = {
+ realName: row.securityName,
+ $sex: row.sex == 1 ? "男" : "女",
+ securitynumber: row.securityNumber,
+ paperTime: row.paperTime,
+ avatar: row.avatar,
+ };
+ this.dialogVisiblezhengjian = true;
},
- methods: {
- openzhengjian (row) {
- this.baoanzdata = {
- realName: row.securityName,
- $sex: row.sex == 1 ? "男" : "女",
- securitynumber: row.securityNumber,
- paperTime: row.paperTime,
- avatar: row.avatar,
- };
- this.dialogVisiblezhengjian = true;
- },
- closezhengjian () {
- this.dialogVisiblezhengjian = false;
- },
- questionBankOnLoad (page, params = {}) {
- //判断角色,如果是保安公司管理员或保安,只能查看当前公司的考试成绩
- var that = this;
- //获取当前登录人员的角色信息
- var roleIds = this.userInfo.role_id.split(",");
- roleIds.forEach((roleId) => {
- getRoleDetail(roleId).then((res) => {
- var roleAlias = res.data.data.roleAlias;
- if (roleAlias == "保安公司管理员" || roleAlias == "保安") {
- //如果是保安公司管理员
- params["deptId"] = that.userInfo.dept_id;
- }
- if (roleAlias == "培训公司管理员") {
- //如果是培训公司管理员
- params["trainUnitId"] = that.userInfo.dept_id;
- }
- that.questionBankLoading = false;
- params["examType"] = 2;
- getList(
- page.currentPage,
- page.pageSize,
- Object.assign(params, this.questionBankQuery)
- ).then((res) => {
+ closezhengjian() {
+ this.dialogVisiblezhengjian = false;
+ },
+ questionBankOnLoad(page, params = {}) {
+ //判断角色,如果是保安公司管理员或保安,只能查看当前公司的考试成绩
+ var that = this;
+ //获取当前登录人员的角色信息
+ var roleIds = this.userInfo.role_id.split(",");
+ roleIds.forEach((roleId) => {
+ getRoleDetail(roleId).then((res) => {
+ var roleAlias = res.data.data.roleAlias;
+ if (roleAlias == "保安公司管理员" || roleAlias == "保安") {
+ //如果是保安公司管理员
+ params["deptId"] = that.userInfo.dept_id;
+ }
+ if (roleAlias == "培训公司管理员") {
+ //如果是培训公司管理员
+ params["trainUnitId"] = that.userInfo.dept_id;
+ }
+ that.questionBankLoading = false;
+ params["examType"] = 2;
+ getList(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, this.questionBankQuery)
+ ).then((res) => {
+ const data = res.data.data;
- const data = res.data.data;
-
- data.records.forEach(item => {
- if (item.theoryGrade == null && item.learnGrade == -1) {
- item.qualified = ''
- }
- item.theoryGrade == null ? item.theoryGrade = '' : item.theoryGrade
- item.learnGrade == -1 ? item.learnGrade = '' : item.learnGrade
- })
- that.questionBankPage.total = data.total;
- that.questionBankData = data.records;
- that.questionBankLoading = false;
- that.questionBankSelectionClear();
- });
- });
+ data.records.forEach((item) => {
+ if (item.theoryGrade == null && item.learnGrade == -1) {
+ item.qualified = "";
+ }
+ item.theoryGrade == null
+ ? (item.theoryGrade = "")
+ : item.theoryGrade;
+ item.learnGrade == -1 ? (item.learnGrade = "") : item.learnGrade;
});
- },
- //缺考标记
- absent (row, done, loading) {
- this.$confirm("确定缺考标记?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- }).then(() => {
- row.qualified = 3;
- updateAbsent(row).then(
- () => {
- this.questionBankOnLoad(this.questionBankPage);
- this.$message({
- type: "success",
- message: "操作成功!",
- });
- done();
- },
- (error) => {
- window.console.log(error);
- loading();
- }
- );
- });
- },
-
- // 修改考试成绩
- modifiedGrades (row) {
-
- var { id, examName, securityName, account, candidateNo, theoryGrade, learnGrade, allGrade } = row
-
- this.gradeForm.examName = examName
- this.gradeForm.securityName = securityName
- this.gradeForm.account = account
- this.gradeForm.candidateNo = candidateNo
- this.gradeForm.theoryGrade = theoryGrade
- this.gradeForm.learnGrade = learnGrade
- this.gradeForm.allGrade = allGrade
- this.gradeForm.editGrades = ''
- this.gradeForm.editReason = ''
- this.gradeForm.id = id
-
- this.gradeBoxVisible = true
-
- },
-
-
- uploadGrade (formName) {
-
- var that = this
-
- this.$refs[formName].validate((valid) => {
-
- if (valid) {
- var obj = {}
- obj.oldScore = this.gradeForm.theoryGrade
- obj.newScore = this.gradeForm.editGrades
- obj.applyCause = this.gradeForm.editReason
- obj.examScoreId = this.gradeForm.id
- obj.createUser = this.userInfo.Id
-
- updateGrade(obj).then(
- () => {
- that.questionBankOnLoad(that.questionBankPage)
- that.$message({
- type: "success",
- message: "操作成功!",
- })
-
- that.gradeBoxVisible = false
- },
- (error) => {
- window.console.log(error)
- }
- );
-
- }
-
- })
-
- },
-
- questionBankSelectionClear () {
- this.questionBankSelectionList = [];
- this.$refs.questionBankCrud.toggleSelection();
- },
- questionBankSelectionChange (list) {
- this.questionBankSelectionList = list;
- },
- questionBankSearchChange (params, done) {
- this.questionBankQuery = params;
- this.questionBankPage.currentPage = 1;
- this.questionBankOnLoad(this.questionBankPage, params);
- done();
- },
- questionBankSearchReset () {
- this.questionBankQuery = {};
+ that.questionBankPage.total = data.total;
+ that.questionBankData = data.records;
+ that.questionBankLoading = false;
+ that.questionBankSelectionClear();
+ });
+ });
+ });
+ },
+ //缺考标记
+ absent(row, done, loading) {
+ this.$confirm("确定缺考标记?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ }).then(() => {
+ row.qualified = 3;
+ updateAbsent(row).then(
+ () => {
this.questionBankOnLoad(this.questionBankPage);
- },
- questionBankCurrentChange (currentPage) {
- this.questionBankPage.currentPage = currentPage;
- },
- questionBankSizeChange (pageSize) {
- this.questionBankPage.pageSize = pageSize;
- },
-
- questionBankRowUpdate (row, index, done, loading) {
- update({
- theoryGrade: row.theoryGrade,
- learnGrade: row.learnGrade,
- examId: row.examId,
- id: row.id,
- }).then(
- () => {
- this.questionBankOnLoad(this.questionBankPage);
- this.$message({
- type: "success",
- message: "操作成功!",
- });
- done();
- },
- (error) => {
- window.console.log(error);
- loading();
- }
- );
- },
- handleTemplate () {
- window.open(`/api/examScore/export-template`);
- },
- handleImport () {
- this.excelBox = true;
- },
- uploadAfter (res, done, loading, column) {
- window.console.log(column);
- this.excelBox = false;
- // this.$message({
- // type: "success",
- // message: "操作成功!",
- // });
- this.refreshChange();
- done();
- },
- refreshChange () {
- this.questionBankOnLoad(this.questionBankPage, this.questionBankQuery);
- },
- //成绩导出
- handleExport () {
- this.$confirm("是否导出成绩数据?", "提示", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- }).then(() => {
- //获取查询条件
- // console.log(this.questionBankSearch, 456);
- var data = {
- account: this.questionBankSearch.account,
- companyName: this.questionBankSearch.companyName,
- examDate: this.questionBankSearch.examDate,
- isExam: this.questionBankSearch.isExam,
- qualified: this.questionBankSearch.qualified,
- securityName: this.questionBankSearch.securityName,
- examName: this.questionBankSearch.examName,
- };
- //导出
- if (
- this.userInfo.role_name == "保安公司管理员" ||
- this.userInfo.role_name == "保安"
- ) {
- //如果是保安公司管理员
- data["deptId"] = this.userInfo.dept_id;
- }
- if (this.userInfo.role_name == "培训公司管理员") {
- //如果是培训公司管理员
- data["trainUnitId"] = this.userInfo.dept_id;
- }
- data["examType"] = 2;
- //序列号url形式,用&拼接
- data = Qs.stringify(data);
- window.open(`/api/examScore/export-examScore?` + data);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
});
- },
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ });
},
+
+ // 修改考试成绩
+ modifiedGrades(row) {
+ var {
+ id,
+ examName,
+ securityName,
+ account,
+ candidateNo,
+ theoryGrade,
+ learnGrade,
+ allGrade,
+ } = row;
+
+ this.gradeForm.examName = examName;
+ this.gradeForm.securityName = securityName;
+ this.gradeForm.account = account;
+ this.gradeForm.candidateNo = candidateNo;
+ this.gradeForm.theoryGrade = theoryGrade;
+ this.gradeForm.learnGrade = learnGrade;
+ this.gradeForm.allGrade = allGrade;
+ this.gradeForm.editGrades = "";
+ this.gradeForm.editReason = "";
+ this.gradeForm.id = id;
+
+ this.gradeBoxVisible = true;
+ },
+
+ uploadGrade(formName) {
+ var that = this;
+
+ this.$refs[formName].validate((valid) => {
+ if (valid) {
+ var obj = {};
+ obj.oldScore = this.gradeForm.theoryGrade;
+ obj.newScore = this.gradeForm.editGrades;
+ obj.applyCause = this.gradeForm.editReason;
+ obj.examScoreId = this.gradeForm.id;
+ obj.createUser = this.userInfo.Id;
+
+ updateGrade(obj).then(
+ () => {
+ that.questionBankOnLoad(that.questionBankPage);
+ that.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+
+ that.gradeBoxVisible = false;
+ },
+ (error) => {
+ window.console.log(error);
+ }
+ );
+ }
+ });
+ },
+
+ questionBankSelectionClear() {
+ this.questionBankSelectionList = [];
+ this.$refs.questionBankCrud.toggleSelection();
+ },
+ questionBankSelectionChange(list) {
+ this.questionBankSelectionList = list;
+ },
+ questionBankSearchChange(params, done) {
+ this.questionBankQuery = params;
+ this.questionBankPage.currentPage = 1;
+ this.questionBankOnLoad(this.questionBankPage, params);
+ done();
+ },
+ questionBankSearchReset() {
+ this.questionBankQuery = {};
+ this.questionBankOnLoad(this.questionBankPage);
+ },
+ questionBankCurrentChange(currentPage) {
+ this.questionBankPage.currentPage = currentPage;
+ },
+ questionBankSizeChange(pageSize) {
+ this.questionBankPage.pageSize = pageSize;
+ },
+
+ questionBankRowUpdate(row, index, done, loading) {
+ update({
+ theoryGrade: row.theoryGrade,
+ learnGrade: row.learnGrade,
+ examId: row.examId,
+ id: row.id,
+ }).then(
+ () => {
+ this.questionBankOnLoad(this.questionBankPage);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ },
+ handleTemplate() {
+ window.open(`/api/examScore/export-template`);
+ },
+ handleImport() {
+ this.excelBox = true;
+ },
+ uploadAfter(res, done, loading, column) {
+ window.console.log(column);
+ this.excelBox = false;
+ // this.$message({
+ // type: "success",
+ // message: "操作成功!",
+ // });
+ this.refreshChange();
+ done();
+ },
+ refreshChange() {
+ this.questionBankOnLoad(this.questionBankPage, this.questionBankQuery);
+ },
+ //成绩导出
+ handleExport() {
+ this.$confirm("是否导出成绩数据?", "提示", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ }).then(() => {
+ //获取查询条件
+ // console.log(this.questionBankSearch, 456);
+ var data = {
+ account: this.questionBankSearch.account,
+ companyName: this.questionBankSearch.companyName,
+ examDate: this.questionBankSearch.examDate,
+ isExam: this.questionBankSearch.isExam,
+ qualified: this.questionBankSearch.qualified,
+ securityName: this.questionBankSearch.securityName,
+ examName: this.questionBankSearch.examName,
+ };
+ //导出
+ if (
+ this.userInfo.role_name == "保安公司管理员" ||
+ this.userInfo.role_name == "保安"
+ ) {
+ //如果是保安公司管理员
+ data["deptId"] = this.userInfo.dept_id;
+ }
+ if (this.userInfo.role_name == "培训公司管理员") {
+ //如果是培训公司管理员
+ data["trainUnitId"] = this.userInfo.dept_id;
+ }
+ data["examType"] = 2;
+ //序列号url形式,用&拼接
+ data = Qs.stringify(data);
+ window.open(`/api/examScore/export-examScore?` + data);
+ });
+ },
+ },
};
</script>
<style lang="scss" scoped>
.morpheus-box {
- position: relative;
+ position: relative;
}
.dialogVisiblezhengjian {
- position: absolute;
- background-color: #fff;
- width: 100%;
- height: 100%;
- z-index: 10000 !important;
+ position: absolute;
+ background-color: #fff;
+ width: 100%;
+ height: 100%;
+ z-index: 10000 !important;
}
</style>
diff --git a/src/views/trainExam/singleperformance.vue b/src/views/trainExam/singleperformance.vue
index c0075b2..314a65b 100644
--- a/src/views/trainExam/singleperformance.vue
+++ b/src/views/trainExam/singleperformance.vue
@@ -2,14 +2,19 @@
* @Author: Morpheus
* @Date: 2021-07-05 16:31:54
* @Last Modified by: liu
- * @Last Modified time: 2021-10-26 15:38:19
+ * @Last Modified time: 2021-11-23 14:11:16
* menu-name 成绩查看
*/
<template>
<el-row class="morpheus-box-score">
<el-col :span="24">
<el-card>
- <div class="exam-card-body">
+ <div
+ :class="[
+ 'exam-card-body',
+ $store.state.control.windowWidth >= 1024 ? 'tooRowSearch' : '',
+ ]"
+ >
<avue-crud
v-model="obj"
class="company-box"
@@ -156,6 +161,7 @@
menu: false,
menuWidth: 136,
labelWidth: 120,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "考试时间",
@@ -525,7 +531,8 @@
questionBankPage: {
pageSize: 10,
currentPage: 1,
- total: 16,
+ total: 0,
+ ...this.$store.state.control.changePageSize,
},
questionBankQuery: {},
questionBankSelectionList: [],
diff --git a/src/views/traincompany/index.vue b/src/views/traincompany/index.vue
index d4a9922..b6164fb 100644
--- a/src/views/traincompany/index.vue
+++ b/src/views/traincompany/index.vue
@@ -1,12 +1,14 @@
/*
* @Author: Morpheus
* @Date: 2021-07-07 17:30:05
- * @Last Modified by: Morpheus
- * @Last Modified time: 2021-07-10 16:06:14
+ * @Last Modified by: liu
+ * @Last Modified time: 2021-11-23 14:03:37
* menu-name 保安培训报名
*/
<template>
- <basic-container>
+ <basic-container
+ :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
+ >
<avue-crud
:option="option"
:table-loading="loading"
@@ -28,9 +30,8 @@
@row-click="handleRowClick"
@on-load="onLoad"
>
-
- <template slot-scope="{ type,row }" slot="menu">
- <el-button
+ <template slot-scope="{ type, row }" slot="menu">
+ <el-button
:type="type"
size="small"
icon="el-icon-edit"
@@ -38,25 +39,30 @@
:disabled="auditStatus"
@click="handleTrainApply(row)"
>报名
- </el-button>
- <el-button
+ </el-button>
+ <el-button
:type="type"
size="small"
icon="el-icon-edit"
v-if="permission.traincompany_batchAddTrain"
@click="handleTrainApplyBatch(row)"
>批量报名
- </el-button>
+ </el-button>
</template>
</avue-crud>
<el-dialog
- title="批量报名"
- append-to-body
- :visible.sync="dialogDisable"
- width="1000px"
- >
- <avue-form ref="formTrainApply" :option="optionTrainApply" v-model="formTrainApply" @submit="submit"></avue-form>
+ title="批量报名"
+ append-to-body
+ :visible.sync="dialogDisable"
+ width="1000px"
+ >
+ <avue-form
+ ref="formTrainApply"
+ :option="optionTrainApply"
+ v-model="formTrainApply"
+ @submit="submit"
+ ></avue-form>
</el-dialog>
</basic-container>
</template>
@@ -69,27 +75,30 @@
update,
remove,
} from "@/api/securityCompany/train";
-import {adddata,batchTrain} from "@/api/trainingRegistration/trainingRegistration";
+import {
+ adddata,
+ batchTrain,
+} from "@/api/trainingRegistration/trainingRegistration";
import { mapGetters } from "vuex";
-import { mapState } from 'vuex';
-import {getUser} from "@/api/system/user";
+import { mapState } from "vuex";
+import { getUser } from "@/api/system/user";
export default {
-
data() {
return {
form: {},
- auditStatus:false,
+ auditStatus: false,
formTrainApply: {
- num:0
+ num: 0,
},
query: {},
- deptId:null,
+ deptId: null,
loading: true,
- dialogDisable:false,
+ dialogDisable: false,
page: {
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
selectionList: [],
option: {
@@ -108,9 +117,10 @@
searchMenuSpan: 6,
index: true,
viewBtn: false,
- editBtnText:'报名',
- editTitle: '报名',
+ editBtnText: "报名",
+ editTitle: "报名",
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "学校",
@@ -131,7 +141,7 @@
{
label: "负责人",
prop: "contacts",
- display: false
+ display: false,
},
{
label: "联系方式",
@@ -144,7 +154,7 @@
prop: "address",
display: false,
width: 280,
- }
+ },
],
},
optionTrainApply: {
@@ -157,32 +167,36 @@
searchMenuSpan: 6,
index: true,
dialogClickModal: false,
- labelWidth:110,
+ labelWidth: 110,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
- label: "学校",
- prop: "trainingUnitId",
- dicUrl: "/api/blade-system/dept/lazy-tree-type?parentId=1418458374477549569",
- cascaderItem: ["trainExamId"],
- props: {
- label: "title",
- value: "id"
+ label: "学校",
+ prop: "trainingUnitId",
+ dicUrl:
+ "/api/blade-system/dept/lazy-tree-type?parentId=1418458374477549569",
+ cascaderItem: ["trainExamId"],
+ props: {
+ label: "title",
+ value: "id",
+ },
+ type: "select",
+ disabled: true,
+ rules: [
+ {
+ required: true,
+ message: "请输入学校",
+ trigger: "blur",
},
- type: "select",
- disabled:true,
- rules: [{
- required: true,
- message: "请输入学校",
- trigger: "blur"
- }],
- hide:true,
- searchSpan: 6,
- searchLabelWidth: 110,
- search: true,
- span:24
+ ],
+ hide: true,
+ searchSpan: 6,
+ searchLabelWidth: 110,
+ search: true,
+ span: 24,
},
// {
- // label: "单位名称",
+ // label: "企业名称",
// prop: "deptId",
// dicUrl: "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
// // dicUrl: "/api/blade-system/dept/security_lazy-tree?parentId=0",
@@ -196,11 +210,11 @@
// hide: true,
// rules: [{
// required: true,
- // message: "请输入单位名称",
+ // message: "请输入企业名称",
// trigger: "blur"
// }],
// span: 24
- // },
+ // },
{
label: "姓名",
prop: "userId",
@@ -212,7 +226,7 @@
value: "id",
},
//不包含父节点值
- leafOnly:true,
+ leafOnly: true,
multiple: true,
searchSpan: 5,
rules: [
@@ -227,10 +241,9 @@
{
label: "总数",
prop: "num",
- disabled:true,
+ disabled: true,
span: 12,
},
-
],
},
data: [],
@@ -239,7 +252,7 @@
watch: {
"formTrainApply.userId"() {
// console.log(this.formTrainApply.userId.length,456);
- this.formTrainApply.num = this.formTrainApply.userId.length;
+ this.formTrainApply.num = this.formTrainApply.userId.length;
},
},
computed: {
@@ -260,48 +273,81 @@
return ids.join(",");
},
...mapState({
- userInfo: state => state.user.userInfo
- })
-
-
-
+ userInfo: (state) => state.user.userInfo,
+ }),
},
created() {
- this.optionTrainApply.column[1].dicUrl =
- "/api/blade-user/security-apply-tree?examType=2&deptId=" +
- this.userInfo.dept_id;
+ this.optionTrainApply.column[1].dicUrl =
+ "/api/blade-user/security-apply-tree?examType=2&deptId=" +
+ this.userInfo.dept_id;
- this.getUserDetail();
+ this.getUserDetail();
},
methods: {
//获取用户信息
- getUserDetail(){
+ getUserDetail() {
var that = this;
- getUser(this.userInfo.Id).then((res)=>{
- var status = res.data.data.examinationType;
- if(status=='1'){
- that.auditStatus = true;
- }
- // console.log(that.auditStatus,3333);
- })
+ getUser(this.userInfo.Id).then((res) => {
+ var status = res.data.data.examinationType;
+ if (status == "1") {
+ that.auditStatus = true;
+ }
+ // console.log(that.auditStatus,3333);
+ });
},
//保安公司批量报名
- handleTrainApplyBatch(row){
+ handleTrainApplyBatch(row) {
this.dialogDisable = true;
this.optionTrainApply.column.trainingUnitId = row.departmentid;
// this.deptId= this.userInfo.dept_id;
this.formTrainApply = {
- trainingUnitId: row.departmentid
- }
+ trainingUnitId: row.departmentid,
+ };
},
//批量报名提交
- submit(){
- batchTrain({
- userIds: this.formTrainApply.userId.join(","),
- trainingUnitId: this.formTrainApply.trainingUnitId
- }).then(
+ submit() {
+ batchTrain({
+ userIds: this.formTrainApply.userId.join(","),
+ trainingUnitId: this.formTrainApply.trainingUnitId,
+ }).then(
+ (res) => {
+ this.onLoad(this.page);
+ if (res.data.data == 201) {
+ this.$message({
+ type: "warning",
+ message: "已报名,不能重复报名",
+ });
+ } else if (res.data.data == 201) {
+ this.$message({
+ type: "warning",
+ message: "报名失败",
+ });
+ } else {
+ this.$message({
+ type: "success",
+ message: "报名成功",
+ });
+ this.$refs.formTrainApply.resetFields();
+ this.dialogDisable = false;
+ }
+ },
+ (error) => {
+ window.console.log(error);
+ }
+ );
+ },
+ //未持证保安人员报名
+ handleTrainApply(row, done, loading) {
+ this.$confirm("是否确定报名?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ }).then(() => {
+ row["userId"] = this.userInfo.user_id;
+ row["trainingUnitId"] = row.departmentid;
+ adddata(row).then(
(res) => {
- this.onLoad(this.page);
+ // this.onLoad(this.page);
if (res.data.data == 201) {
this.$message({
type: "warning",
@@ -317,42 +363,6 @@
type: "success",
message: "报名成功",
});
- this.$refs.formTrainApply.resetFields();
- this.dialogDisable = false;
- }
- },
- (error) => {
- window.console.log(error);
- }
- );
- },
- //未持证保安人员报名
- handleTrainApply(row,done,loading){
- this.$confirm("是否确定报名?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- }).then(() => {
- row['userId'] = this.userInfo.user_id;
- row['trainingUnitId'] = row.departmentid;
- adddata(row).then(
- (res) => {
- // this.onLoad(this.page);
- if(res.data.data==201){
- this.$message({
- type: "warning",
- message:"已报名,不能重复报名",
- });
- }else if(res.data.data==201){
- this.$message({
- type: "warning",
- message:"报名失败",
- });
- }else{
- this.$message({
- type: "success",
- message:"报名成功",
- });
}
done();
},
@@ -361,10 +371,10 @@
loading();
}
);
- })
+ });
},
//关闭窗口清除数据
- closeDialog(){
+ closeDialog() {
this.$refs.formTrainApply.resetFields();
},
rowSave(row, done, loading) {
@@ -416,7 +426,7 @@
});
});
},
- beforeOpen(done,type) {
+ beforeOpen(done, type) {
if (["edit", "view"].includes(type)) {
getDetail(this.form.id).then((res) => {
this.form = res.data.data;
diff --git a/src/views/trainingRegistration/data.js b/src/views/trainingRegistration/data.js
index 2113454..852093f 100644
--- a/src/views/trainingRegistration/data.js
+++ b/src/views/trainingRegistration/data.js
@@ -19,226 +19,226 @@
var w = 160,
s = 12;
export var column = [{
- label: "学校名称",
- prop: "trainingUnitId",
- dicUrl: "/api/blade-system/dept/lazy-tree-type?parentId=1418458374477549569",
- cascaderItem: ["trainExamId"],
- props: {
- label: "title",
- value: "id"
- },
- type: "select",
- rules: [{
- required: true,
- message: "请输入学校名称",
- trigger: "blur"
- }],
- searchSpan: 4,
- searchLabelWidth: 110,
- width: 200,
- }, {
- label: "姓名",
- prop: "userId",
- type: "select",
- hide: true,
- dicUrl: "/api/blade-user/page-security-unit?deptId={{key}}",
- props: {
- label: "realName",
- value: "id"
- },
- searchSpan: 4,
- rules: [{
- required: true,
- message: "请输入姓名",
- trigger: "blur"
- }],
- }, {
- label: "姓名",
- prop: "realName",
- search: true,
- editDisplay: false,
- addDisplay: false,
- searchSpan: 4,
- }, {
- label: "身份证号",
- prop: "idCardNo",
- rules: [{
- required: true,
- message: "请输入身份证号",
- trigger: "blur"
- }],
- editDisplay: false,
- addDisplay: false,
- width: 160
- }, {
- label: "准考证号",
- prop: "candidateNo",
- rules: [{
- required: true,
- message: "请输入准考证号",
- trigger: "blur"
- }],
- editDisplay: false,
- addDisplay: false,
- width: 160
+ label: "学校名称",
+ prop: "trainingUnitId",
+ dicUrl: "/api/blade-system/dept/lazy-tree-type?parentId=1418458374477549569",
+ cascaderItem: ["trainExamId"],
+ props: {
+ label: "title",
+ value: "id"
},
- // {
- // label: "电话",
- // prop: "phone",
- // // hide: true,
- // rules: [{
- // required: true,
- // message: "请输入电话",
- // trigger: "blur"
- // }],
- // editDisplay: false,
- // addDisplay: false,
- // width: 110,
- // },
- {
- label: "单位名称",
- prop: "deptId",
- // width: 70,
- // search: true,
- // searchSpan: 4,
- dicUrl: "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
- cascaderItem: ["userId"],
- props: {
- label: "title",
- value: "id"
- },
- // search: true,
- type: "select",
- hide: true,
- rules: [{
- required: true,
- message: "请输入单位名称",
- trigger: "blur"
- }],
- overHidden: true
- }, {
- label: "单位名称",
- prop: "deptName",
- // hide: true,
- search: true,
- searchSpan: 6,
- rules: [{
- required: true,
- message: "请输入单位名称",
- trigger: "blur"
- }],
+ type: "select",
+ rules: [{
+ required: true,
+ message: "请输入学校名称",
+ trigger: "blur"
+ }],
+ searchSpan: 4,
+ searchLabelWidth: 110,
+ width: 200,
+}, {
+ label: "姓名",
+ prop: "userId",
+ type: "select",
+ hide: true,
+ dicUrl: "/api/blade-user/page-security-unit?deptId={{key}}",
+ props: {
+ label: "realName",
+ value: "id"
+ },
+ searchSpan: 4,
+ rules: [{
+ required: true,
+ message: "请输入姓名",
+ trigger: "blur"
+ }],
+}, {
+ label: "姓名",
+ prop: "realName",
+ search: true,
+ editDisplay: false,
+ addDisplay: false,
+ searchSpan: 4,
+}, {
+ label: "身份证号",
+ prop: "idCardNo",
+ rules: [{
+ required: true,
+ message: "请输入身份证号",
+ trigger: "blur"
+ }],
+ editDisplay: false,
+ addDisplay: false,
+ width: 160
+}, {
+ label: "准考证号",
+ prop: "candidateNo",
+ rules: [{
+ required: true,
+ message: "请输入准考证号",
+ trigger: "blur"
+ }],
+ editDisplay: false,
+ addDisplay: false,
+ width: 160
+},
+// {
+// label: "电话",
+// prop: "phone",
+// // hide: true,
+// rules: [{
+// required: true,
+// message: "请输入电话",
+// trigger: "blur"
+// }],
+// editDisplay: false,
+// addDisplay: false,
+// width: 110,
+// },
+{
+ label: "企业名称",
+ prop: "deptId",
+ // width: 70,
+ // search: true,
+ // searchSpan: 4,
+ dicUrl: "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
+ cascaderItem: ["userId"],
+ props: {
+ label: "title",
+ value: "id"
+ },
+ // search: true,
+ type: "select",
+ hide: true,
+ rules: [{
+ required: true,
+ message: "请输入企业名称",
+ trigger: "blur"
+ }],
+ overHidden: true
+}, {
+ label: "企业名称",
+ prop: "deptName",
+ // hide: true,
+ search: true,
+ searchSpan: 6,
+ rules: [{
+ required: true,
+ message: "请输入企业名称",
+ trigger: "blur"
+ }],
+},
+{
+ label: "考试名称",
+ prop: "trainExamName",
+ width: 220,
+},
+{
+ label: "考试证件",
+ prop: "applyCard"
+},
+{
+ label: "审核状态",
+ search: true,
+ searchLabelWidth: 110,
+ type: "select",
+ searchSpan: 4,
+ prop: "auditStatus",
+ searchValue: 4,
+ dicData: [{
+ label: '全部',
+ value: 0,
},
{
- label: "考试名称",
- prop: "trainExamName",
- width: 220,
+ label: '审核通过',
+ value: 1,
},
{
- label: "考试证件",
- prop: "applyCard"
+ label: '审核不通过',
+ value: 2,
},
{
- label: "审核状态",
- search: true,
- searchLabelWidth: 110,
- type: "select",
- searchSpan: 4,
- prop: "auditStatus",
- searchValue: 4,
- dicData: [{
- label: '全部',
- value: 0,
- },
- {
- label: '审核通过',
- value: 1,
- },
- {
- label: '审核不通过',
- value: 2,
- },
- {
- label: '已提交审核',
- value: 3,
- },
- {
- label: '未提交审核',
- value: 4,
- }
- ],
- props: {
- label: "label",
- value: "value"
- },
- editDisplay: false,
- addDisplay: false,
- width: 100,
+ label: '已提交审核',
+ value: 3,
},
{
- label: "报名状态",
- search: true,
- type: "select",
- searchSpan: 4,
- prop: "cancel",
- searchValue: 1,
- dicData: [{
- label: '全部',
- value: 0,
- },
- {
- label: '已报名',
- value: 1,
- },
- {
- label: '已取消',
- value: 2,
- }
- ],
- props: {
- label: "label",
- value: "value"
- },
- editDisplay: false,
- addDisplay: false,
- width: 100,
+ label: '未提交审核',
+ value: 4,
+ }
+ ],
+ props: {
+ label: "label",
+ value: "value"
+ },
+ editDisplay: false,
+ addDisplay: false,
+ width: 100,
+},
+{
+ label: "报名状态",
+ search: true,
+ type: "select",
+ searchSpan: 4,
+ prop: "cancel",
+ searchValue: 1,
+ dicData: [{
+ label: '全部',
+ value: 0,
},
{
- label: "考试状态",
- search: true,
- type: "select",
- searchSpan: 4,
- prop: "isExam",
- searchValue: 1,
- dicData: [{
- label: '全部',
- value: 0,
- },
- {
- label: '未考试',
- value: 1,
- },
- {
- label: '考试结束',
- value: 2,
- },
- {
- label: '考试中',
- value: 3,
- },
- {
- label: '缺考',
- value: 4,
- }
- ],
- props: {
- label: "label",
- value: "value"
- },
- editDisplay: false,
- addDisplay: false,
- width: 100,
+ label: '已报名',
+ value: 1,
},
+ {
+ label: '已取消',
+ value: 2,
+ }
+ ],
+ props: {
+ label: "label",
+ value: "value"
+ },
+ editDisplay: false,
+ addDisplay: false,
+ width: 100,
+},
+{
+ label: "考试状态",
+ search: true,
+ type: "select",
+ searchSpan: 4,
+ prop: "isExam",
+ searchValue: 1,
+ dicData: [{
+ label: '全部',
+ value: 0,
+ },
+ {
+ label: '未考试',
+ value: 1,
+ },
+ {
+ label: '考试结束',
+ value: 2,
+ },
+ {
+ label: '考试中',
+ value: 3,
+ },
+ {
+ label: '缺考',
+ value: 4,
+ }
+ ],
+ props: {
+ label: "label",
+ value: "value"
+ },
+ editDisplay: false,
+ addDisplay: false,
+ width: 100,
+},
// {
// label: "确认截止时间",
// prop: "remainingTime",
diff --git a/src/views/trainingRegistration/index.vue b/src/views/trainingRegistration/index.vue
index 02187be..9e9e6ae 100644
--- a/src/views/trainingRegistration/index.vue
+++ b/src/views/trainingRegistration/index.vue
@@ -1,5 +1,7 @@
<template>
- <basic-container>
+ <basic-container
+ :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
+ >
<avue-crud
:option="option"
:table-loading="loading"
@@ -157,6 +159,7 @@
excelBtn: false,
menuWidth: 380,
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "所选保安人数",
@@ -299,6 +302,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
query: {},
data: [],
@@ -326,6 +330,7 @@
delBtn: false,
editBtn: false,
addBtn: false,
+ ...this.$store.state.control.clearOtherBut,
},
};
},
diff --git a/src/views/util/demo/dict-classic.vue b/src/views/util/demo/dict-classic.vue
index 659da7a..9380ac3 100644
--- a/src/views/util/demo/dict-classic.vue
+++ b/src/views/util/demo/dict-classic.vue
@@ -1,5 +1,7 @@
<template>
- <basic-container>
+ <basic-container
+ :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
+ >
<avue-crud
:option="option"
:table-loading="loading"
@@ -28,19 +30,19 @@
v-if="permission.dict_delete"
plain
@click="handleDelete"
- >删 除
+ >删 除
</el-button>
</template>
- <template slot-scope="{row}" slot="isSealed">
- <el-tag>{{row.isSealed===0?'否':'是'}}</el-tag>
+ <template slot-scope="{ row }" slot="isSealed">
+ <el-tag>{{ row.isSealed === 0 ? "否" : "是" }}</el-tag>
</template>
<template slot-scope="scope" slot="menu">
<el-button
type="text"
icon="el-icon-check"
size="small"
- @click.stop="handleAdd(scope.row,scope.index)"
- >新增子项
+ @click.stop="handleAdd(scope.row, scope.index)"
+ >新增子项
</el-button>
</template>
</avue-crud>
@@ -48,311 +50,318 @@
</template>
<script>
- import {
- getList,
- remove,
- update,
- add,
- getDict,
- getDictTree
- } from "@/api/system/dict";
- import {mapGetters} from "vuex";
+import {
+ getList,
+ remove,
+ update,
+ add,
+ getDict,
+ getDictTree,
+} from "@/api/system/dict";
+import { mapGetters } from "vuex";
- export default {
- data() {
- return {
- form: {},
- selectionList: [],
- query: {},
- loading: true,
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- option: {
- tip: false,
- searchShow: true,
- searchMenuSpan: 6,
- tree: true,
- border: true,
- index: true,
- selection: true,
- viewBtn: true,
- menuWidth: 300,
- dialogWidth: 880,
- column: [
- {
- label: "字典编号",
- prop: "code",
- search: true,
- span: 24,
- rules: [
- {
- required: true,
- message: "请输入字典编号",
- trigger: "blur"
- }
- ]
- },
- {
- label: "字典名称",
- prop: "dictValue",
- search: true,
- align: "center",
- rules: [
- {
- required: true,
- message: "请输入字典名称",
- trigger: "blur"
- }
- ]
- },
- {
- label: "上级字典",
- prop: "parentId",
- type: "tree",
- dicData: [],
- hide: true,
- props: {
- label: "title"
+export default {
+ data() {
+ return {
+ form: {},
+ selectionList: [],
+ query: {},
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ ...this.$store.state.control.changePageSize,
+ },
+ option: {
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ tree: true,
+ border: true,
+ index: true,
+ selection: true,
+ viewBtn: true,
+ menuWidth: 300,
+ dialogWidth: 880,
+ column: [
+ {
+ label: "字典编号",
+ prop: "code",
+ search: true,
+ span: 24,
+ rules: [
+ {
+ required: true,
+ message: "请输入字典编号",
+ trigger: "blur",
},
- rules: [
- {
- required: false,
- message: "请选择上级字典",
- trigger: "click"
- }
- ]
+ ],
+ },
+ {
+ label: "字典名称",
+ prop: "dictValue",
+ search: true,
+ align: "center",
+ rules: [
+ {
+ required: true,
+ message: "请输入字典名称",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "上级字典",
+ prop: "parentId",
+ type: "tree",
+ dicData: [],
+ hide: true,
+ props: {
+ label: "title",
},
- {
- label: "字典键值",
- prop: "dictKey",
- type: "number",
- rules: [
- {
- required: true,
- message: "请输入字典键值",
- trigger: "blur"
- }
- ]
- },
- {
- label: "字典排序",
- prop: "sort",
- type: "number",
- rules: [
- {
- required: true,
- message: "请输入字典排序",
- trigger: "blur"
- }
- ]
- },
- {
- label: "封存",
- prop: "isSealed",
- type: "select",
- dicData: [
- {
- label: "否",
- value: 0
- },
- {
- label: "是",
- value: 1
- }
- ],
- slot: true,
- rules: [
- {
- required: true,
- message: "请选择封存",
- trigger: "blur"
- }
- ]
- },
- {
- label: "字典备注",
- prop: "remark",
- search: true,
- hide: true
- }
- ]
- },
- data: []
+ rules: [
+ {
+ required: false,
+ message: "请选择上级字典",
+ trigger: "click",
+ },
+ ],
+ },
+ {
+ label: "字典键值",
+ prop: "dictKey",
+ type: "number",
+ rules: [
+ {
+ required: true,
+ message: "请输入字典键值",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "字典排序",
+ prop: "sort",
+ type: "number",
+ rules: [
+ {
+ required: true,
+ message: "请输入字典排序",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "封存",
+ prop: "isSealed",
+ type: "select",
+ dicData: [
+ {
+ label: "否",
+ value: 0,
+ },
+ {
+ label: "是",
+ value: 1,
+ },
+ ],
+ slot: true,
+ rules: [
+ {
+ required: true,
+ message: "请选择封存",
+ trigger: "blur",
+ },
+ ],
+ },
+ {
+ label: "字典备注",
+ prop: "remark",
+ search: true,
+ hide: true,
+ },
+ ],
+ },
+ data: [],
+ };
+ },
+ computed: {
+ ...mapGetters(["permission"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.dict_add, false),
+ viewBtn: this.vaildData(this.permission.dict_view, false),
+ delBtn: this.vaildData(this.permission.dict_delete, false),
+ editBtn: this.vaildData(this.permission.dict_edit, false),
};
},
- computed: {
- ...mapGetters(["permission"]),
- permissionList() {
- return {
- addBtn: this.vaildData(this.permission.dict_add, false),
- viewBtn: this.vaildData(this.permission.dict_view, false),
- delBtn: this.vaildData(this.permission.dict_delete, false),
- editBtn: this.vaildData(this.permission.dict_edit, false)
- };
- },
- ids() {
- let ids = [];
- this.selectionList.forEach(ele => {
- ids.push(ele.id);
- });
- return ids.join(",");
- }
+ ids() {
+ let ids = [];
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id);
+ });
+ return ids.join(",");
},
- mounted() {
- getDictTree().then(res => {
- const column = this.findObject(this.optionChild.column, "parentId");
- column.dicData = res.data.data;
+ },
+ mounted() {
+ getDictTree().then((res) => {
+ const column = this.findObject(this.optionChild.column, "parentId");
+ column.dicData = res.data.data;
+ });
+ },
+ methods: {
+ handleAdd(row) {
+ this.$refs.crud.value.code = row.code;
+ this.$refs.crud.value.parentId = row.id;
+ this.$refs.crud.option.column.filter((item) => {
+ if (item.prop === "code") {
+ item.value = row.code;
+ item.addDisabled = true;
+ }
+ if (item.prop === "parentId") {
+ item.value = row.id;
+ item.addDisabled = true;
+ }
+ });
+ this.$refs.crud.rowAdd();
+ },
+ rowSave(row, done, loading) {
+ add(row).then(
+ () => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ },
+ rowUpdate(row, index, done, loading) {
+ update(row).then(
+ () => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ },
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(row.id);
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ });
+ },
+ searchReset() {
+ this.query = {};
+ this.onLoad(this.page);
+ },
+ searchChange(params, done) {
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
+ selectionChange(list) {
+ this.selectionList = list;
+ },
+ selectionClear() {
+ this.selectionList = [];
+ this.$refs.crud.toggleSelection();
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据");
+ return;
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove(this.ids);
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ this.$refs.crud.toggleSelection();
+ });
+ },
+ beforeOpen(done, type) {
+ if (["edit", "view"].includes(type)) {
+ getDict(this.form.id).then((res) => {
+ this.form = res.data.data;
+ });
+ }
+ done();
+ },
+ beforeClose(done) {
+ this.$refs.crud.tableForm = {};
+ this.$refs.crud.value.code = "";
+ this.$refs.crud.value.parentId = "";
+ this.$refs.crud.value.addDisabled = false;
+ this.$refs.crud.option.column.filter((item) => {
+ if (item.prop === "code") {
+ item.value = "";
+ item.addDisabled = false;
+ }
+ if (item.prop === "parentId") {
+ item.value = "";
+ item.addDisabled = false;
+ }
+ });
+ done();
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage;
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize;
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query);
+ },
+ onLoad(page, params = {}) {
+ this.loading = true;
+ getList(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, this.query)
+ ).then((res) => {
+ this.data = res.data.data;
+ this.loading = false;
+ this.selectionClear();
});
},
- methods: {
- handleAdd(row) {
- this.$refs.crud.value.code = row.code;
- this.$refs.crud.value.parentId = row.id;
- this.$refs.crud.option.column.filter(item => {
- if (item.prop === "code") {
- item.value = row.code;
- item.addDisabled = true;
- }
- if (item.prop === "parentId") {
- item.value = row.id;
- item.addDisabled = true;
- }
- });
- this.$refs.crud.rowAdd();
- },
- rowSave(row, done, loading) {
- add(row).then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- done();
- }, error => {
- window.console.log(error);
- loading();
- });
- },
- rowUpdate(row, index, done, loading) {
- update(row).then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- done();
- }, error => {
- window.console.log(error);
- loading();
- });
- },
- rowDel(row) {
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- return remove(row.id);
- })
- .then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- });
- },
- searchReset() {
- this.query = {};
- this.onLoad(this.page);
- },
- searchChange(params, done) {
- this.query = params;
- this.page.currentPage = 1;
- this.onLoad(this.page, params);
- done();
- },
- selectionChange(list) {
- this.selectionList = list;
- },
- selectionClear() {
- this.selectionList = [];
- this.$refs.crud.toggleSelection();
- },
- handleDelete() {
- if (this.selectionList.length === 0) {
- this.$message.warning("请选择至少一条数据");
- return;
- }
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- return remove(this.ids);
- })
- .then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.$refs.crud.toggleSelection();
- });
- },
- beforeOpen(done, type) {
- if (["edit", "view"].includes(type)) {
- getDict(this.form.id).then(res => {
- this.form = res.data.data;
- });
- }
- done();
- },
- beforeClose(done) {
- this.$refs.crud.tableForm = {};
- this.$refs.crud.value.code = "";
- this.$refs.crud.value.parentId = "";
- this.$refs.crud.value.addDisabled = false;
- this.$refs.crud.option.column.filter(item => {
- if (item.prop === "code") {
- item.value = "";
- item.addDisabled = false;
- }
- if (item.prop === "parentId") {
- item.value = "";
- item.addDisabled = false;
- }
- });
- done();
- },
- currentChange(currentPage) {
- this.page.currentPage = currentPage;
- },
- sizeChange(pageSize) {
- this.page.pageSize = pageSize;
- },
- refreshChange() {
- this.onLoad(this.page, this.query);
- },
- onLoad(page, params = {}) {
- this.loading = true;
- getList(
- page.currentPage,
- page.pageSize,
- Object.assign(params, this.query)
- ).then(res => {
- this.data = res.data.data;
- this.loading = false;
- this.selectionClear();
- });
- }
- }
- };
+ },
+};
</script>
<style>
diff --git a/src/views/work/claim.vue b/src/views/work/claim.vue
index 916fe50..2d7ca13 100644
--- a/src/views/work/claim.vue
+++ b/src/views/work/claim.vue
@@ -1,51 +1,62 @@
<template>
- <basic-container>
- <avue-crud :option="option"
- :table-loading="loading"
- :data="data"
- ref="crud"
- v-model="form"
- @search-change="searchChange"
- @search-reset="searchReset"
- @selection-change="selectionChange"
- @current-change="currentChange"
- @size-change="sizeChange"
- @refresh-change="refreshChange"
- @on-load="onLoad">
+ <basic-container
+ :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
+ >
+ <avue-crud
+ :option="option"
+ :table-loading="loading"
+ :data="data"
+ ref="crud"
+ v-model="form"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @selection-change="selectionChange"
+ @current-change="currentChange"
+ @size-change="sizeChange"
+ @refresh-change="refreshChange"
+ @on-load="onLoad"
+ >
<template slot-scope="scope" slot="menu">
- <el-button type="text"
- size="small"
- v-if="permission.work_claim_sign"
- plain
- class="none-border"
- @click.stop="handleClaim(scope.row)">签收
+ <el-button
+ type="text"
+ size="small"
+ v-if="permission.work_claim_sign"
+ plain
+ class="none-border"
+ @click.stop="handleClaim(scope.row)"
+ >签收
</el-button>
- <el-button type="text"
- size="small"
- v-if="permission.work_claim_detail"
- plain
- class="none-border"
- @click.stop="handleDetail(scope.row)">详情
+ <el-button
+ type="text"
+ size="small"
+ v-if="permission.work_claim_detail"
+ plain
+ class="none-border"
+ @click.stop="handleDetail(scope.row)"
+ >详情
</el-button>
- <el-button type="text"
- size="small"
- v-if="permission.work_claim_follow"
- plain
- class="none-border"
- @click.stop="handleImage(scope.row,scope.index)">跟踪
+ <el-button
+ type="text"
+ size="small"
+ v-if="permission.work_claim_follow"
+ plain
+ class="none-border"
+ @click.stop="handleImage(scope.row, scope.index)"
+ >跟踪
</el-button>
</template>
- <template slot-scope="{row}"
- slot="processDefinitionVersion">
- <el-tag>v{{row.processDefinitionVersion}}</el-tag>
+ <template slot-scope="{ row }" slot="processDefinitionVersion">
+ <el-tag>v{{ row.processDefinitionVersion }}</el-tag>
</template>
</avue-crud>
- <el-dialog title="流程图"
- append-to-body
- :visible.sync="flowBox"
- :fullscreen="true">
+ <el-dialog
+ title="流程图"
+ append-to-body
+ :visible.sync="flowBox"
+ :fullscreen="true"
+ >
<iframe
- :src=flowUrl
+ :src="flowUrl"
width="100%"
height="700"
title="流程图"
@@ -54,10 +65,10 @@
marginWidth="0"
marginHeight="0"
scrolling="no"
- allowTransparency="yes">
+ allowTransparency="yes"
+ >
</iframe>
- <span slot="footer"
- class="dialog-footer">
+ <span slot="footer" class="dialog-footer">
<el-button @click="flowBox = false">关 闭</el-button>
</span>
</el-dialog>
@@ -65,167 +76,178 @@
</template>
<script>
- import {mapGetters} from "vuex";
- import {claimList, claimTask} from "@/api/work/work";
- import {flowCategory, flowRoute} from "@/util/flow";
+import { mapGetters } from "vuex";
+import { claimList, claimTask } from "@/api/work/work";
+import { flowCategory, flowRoute } from "@/util/flow";
- export default {
- data() {
- return {
- form: {},
- selectionId: '',
- selectionList: [],
- query: {},
- loading: true,
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- flowBox: false,
- flowUrl: '',
- workBox: false,
- option: {
- height: 'auto',
- calcHeight: 30,
- tip: false,
- simplePage: true,
- searchShow: true,
- searchMenuSpan: 6,
- border: true,
- index: true,
- selection: true,
- editBtn: false,
- addBtn: false,
- viewBtn: false,
- delBtn: false,
- dialogWidth: 900,
- menuWidth: 150,
- dialogClickModal: false,
- column: [
- {
- label: "流程分类",
- type: "select",
- row: true,
- dicUrl: "/api/blade-system/dict/dictionary?code=flow",
- props: {
- label: "dictValue",
- value: "dictKey"
- },
- dataType: "number",
- slot: true,
- prop: "category",
- search: true,
- hide: true,
- width: 100,
+export default {
+ data() {
+ return {
+ form: {},
+ selectionId: "",
+ selectionList: [],
+ query: {},
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ ...this.$store.state.control.changePageSize,
+ },
+ flowBox: false,
+ flowUrl: "",
+ workBox: false,
+ option: {
+ height: "auto",
+ calcHeight: 30,
+ tip: false,
+ simplePage: true,
+ searchShow: true,
+ searchMenuSpan: 6,
+ border: true,
+ index: true,
+ selection: true,
+ editBtn: false,
+ addBtn: false,
+ viewBtn: false,
+ delBtn: false,
+ dialogWidth: 900,
+ menuWidth: 150,
+ dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
+ column: [
+ {
+ label: "流程分类",
+ type: "select",
+ row: true,
+ dicUrl: "/api/blade-system/dict/dictionary?code=flow",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
},
- {
- label: '流程名称',
- prop: 'processDefinitionName',
- search: true,
- },
- {
- label: '当前步骤',
- prop: 'taskName',
- },
- {
- label: '流程版本',
- prop: 'processDefinitionVersion',
- slot: true,
- width: 80,
- },
- {
- label: '申请时间',
- prop: 'createTime',
- width: 165,
- },
- ]
- },
- data: []
- };
+ dataType: "number",
+ slot: true,
+ prop: "category",
+ search: true,
+ hide: true,
+ width: 100,
+ },
+ {
+ label: "流程名称",
+ prop: "processDefinitionName",
+ search: true,
+ },
+ {
+ label: "当前步骤",
+ prop: "taskName",
+ },
+ {
+ label: "流程版本",
+ prop: "processDefinitionVersion",
+ slot: true,
+ width: 80,
+ },
+ {
+ label: "申请时间",
+ prop: "createTime",
+ width: 165,
+ },
+ ],
+ },
+ data: [],
+ };
+ },
+ computed: {
+ ...mapGetters(["permission", "flowRoutes"]),
+ ids() {
+ let ids = [];
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id);
+ });
+ return ids.join(",");
},
- computed: {
- ...mapGetters(["permission", "flowRoutes"]),
- ids() {
- let ids = [];
- this.selectionList.forEach(ele => {
- ids.push(ele.id);
- });
- return ids.join(",");
- },
+ },
+ methods: {
+ searchReset() {
+ this.query = {};
+ this.onLoad(this.page);
},
- methods: {
- searchReset() {
- this.query = {};
- this.onLoad(this.page);
- },
- searchChange(params, done) {
- this.query = params;
- this.page.currentPage = 1;
- this.onLoad(this.page, params);
- done();
- },
- selectionChange(list) {
- this.selectionList = list;
- },
- selectionClear() {
- this.selectionList = [];
- this.$refs.crud.toggleSelection();
- },
- handleClaim(row) {
- this.$confirm("确定签收此任务?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
+ searchChange(params, done) {
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
+ selectionChange(list) {
+ this.selectionList = list;
+ },
+ selectionClear() {
+ this.selectionList = [];
+ this.$refs.crud.toggleSelection();
+ },
+ handleClaim(row) {
+ this.$confirm("确定签收此任务?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return claimTask(row.taskId);
})
- .then(() => {
- return claimTask(row.taskId);
- })
- .then(() => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!"
- });
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
});
- },
- handleDetail(row) {
- this.$router.push({path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}`});
- },
- handleImage(row) {
- this.flowUrl = `/api/blade-flow/process/diagram-view?processInstanceId=${row.processInstanceId}`;
- this.flowBox = true;
- },
- currentChange(currentPage){
- this.page.currentPage = currentPage;
- },
- sizeChange(pageSize){
- this.page.pageSize = pageSize;
- },
- refreshChange() {
- this.onLoad(this.page, this.query);
- },
- onLoad(page, params = {}) {
- const query = {
- ...this.query,
- category: (params.category) ? flowCategory(params.category) : null
- };
- this.loading = true;
- claimList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => {
- const data = res.data.data;
- this.page.total = data.total;
- this.data = data.records;
- this.loading = false;
- this.selectionClear();
});
- }
- }
- };
+ },
+ handleDetail(row) {
+ this.$router.push({
+ path: `/work/process/${flowRoute(
+ this.flowRoutes,
+ row.category
+ )}/detail/${row.processInstanceId}/${row.businessId}`,
+ });
+ },
+ handleImage(row) {
+ this.flowUrl = `/api/blade-flow/process/diagram-view?processInstanceId=${row.processInstanceId}`;
+ this.flowBox = true;
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage;
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize;
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query);
+ },
+ onLoad(page, params = {}) {
+ const query = {
+ ...this.query,
+ category: params.category ? flowCategory(params.category) : null,
+ };
+ this.loading = true;
+ claimList(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, query)
+ ).then((res) => {
+ const data = res.data.data;
+ this.page.total = data.total;
+ this.data = data.records;
+ this.loading = false;
+ this.selectionClear();
+ });
+ },
+ },
+};
</script>
<style>
- .none-border {
- border: 0;
- background-color: transparent !important;
- }
+.none-border {
+ border: 0;
+ background-color: transparent !important;
+}
</style>
diff --git a/src/views/work/done.vue b/src/views/work/done.vue
index 57c5a24..2fdfa03 100644
--- a/src/views/work/done.vue
+++ b/src/views/work/done.vue
@@ -1,45 +1,54 @@
<template>
- <basic-container>
- <avue-crud :option="option"
- :table-loading="loading"
- :data="data"
- ref="crud"
- v-model="form"
- :page.sync="page"
- @search-change="searchChange"
- @search-reset="searchReset"
- @selection-change="selectionChange"
- @current-change="currentChange"
- @size-change="sizeChange"
- @refresh-change="refreshChange"
- @on-load="onLoad">
+ <basic-container
+ :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
+ >
+ <avue-crud
+ :option="option"
+ :table-loading="loading"
+ :data="data"
+ ref="crud"
+ v-model="form"
+ :page.sync="page"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @selection-change="selectionChange"
+ @current-change="currentChange"
+ @size-change="sizeChange"
+ @refresh-change="refreshChange"
+ @on-load="onLoad"
+ >
<template slot-scope="scope" slot="menu">
- <el-button type="text"
- size="small"
- v-if="permission.work_done_detail"
- plain
- class="none-border"
- @click.stop="handleDetail(scope.row)">详情
+ <el-button
+ type="text"
+ size="small"
+ v-if="permission.work_done_detail"
+ plain
+ class="none-border"
+ @click.stop="handleDetail(scope.row)"
+ >详情
</el-button>
- <el-button type="text"
- size="small"
- v-if="permission.work_done_follow"
- plain
- class="none-border"
- @click.stop="handleImage(scope.row,scope.index)">跟踪
+ <el-button
+ type="text"
+ size="small"
+ v-if="permission.work_done_follow"
+ plain
+ class="none-border"
+ @click.stop="handleImage(scope.row, scope.index)"
+ >跟踪
</el-button>
</template>
- <template slot-scope="{row}"
- slot="processDefinitionVersion">
- <el-tag>v{{row.processDefinitionVersion}}</el-tag>
+ <template slot-scope="{ row }" slot="processDefinitionVersion">
+ <el-tag>v{{ row.processDefinitionVersion }}</el-tag>
</template>
</avue-crud>
- <el-dialog title="流程图"
- append-to-body
- :visible.sync="flowBox"
- :fullscreen="true">
+ <el-dialog
+ title="流程图"
+ append-to-body
+ :visible.sync="flowBox"
+ :fullscreen="true"
+ >
<iframe
- :src=flowUrl
+ :src="flowUrl"
width="100%"
height="700"
title="流程图"
@@ -48,10 +57,10 @@
marginWidth="0"
marginHeight="0"
scrolling="no"
- allowTransparency="yes">
+ allowTransparency="yes"
+ >
</iframe>
- <span slot="footer"
- class="dialog-footer">
+ <span slot="footer" class="dialog-footer">
<el-button @click="flowBox = false">关 闭</el-button>
</span>
</el-dialog>
@@ -59,149 +68,160 @@
</template>
<script>
- import {mapGetters} from "vuex";
- import {doneList} from "@/api/work/work";
- import {flowCategory, flowRoute} from "@/util/flow";
+import { mapGetters } from "vuex";
+import { doneList } from "@/api/work/work";
+import { flowCategory, flowRoute } from "@/util/flow";
- export default {
- data() {
- return {
- form: {},
- selectionId: '',
- selectionList: [],
- query: {},
- loading: true,
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- flowBox: false,
- flowUrl: '',
- workBox: false,
- option: {
- height: 'auto',
- calcHeight: 30,
- tip: false,
- searchShow: true,
- searchMenuSpan: 6,
- border: true,
- index: true,
- selection: true,
- editBtn: false,
- addBtn: false,
- viewBtn: false,
- delBtn: false,
- dialogWidth: 900,
- menuWidth: 150,
- dialogClickModal: false,
- column: [
- {
- label: "流程分类",
- type: "select",
- row: true,
- dicUrl: "/api/blade-system/dict/dictionary?code=flow",
- props: {
- label: "dictValue",
- value: "dictKey"
- },
- dataType: "number",
- slot: true,
- prop: "category",
- search: true,
- hide: true,
- width: 100,
+export default {
+ data() {
+ return {
+ form: {},
+ selectionId: "",
+ selectionList: [],
+ query: {},
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ ...this.$store.state.control.changePageSize,
+ },
+ flowBox: false,
+ flowUrl: "",
+ workBox: false,
+ option: {
+ height: "auto",
+ calcHeight: 30,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ border: true,
+ index: true,
+ selection: true,
+ editBtn: false,
+ addBtn: false,
+ viewBtn: false,
+ delBtn: false,
+ dialogWidth: 900,
+ menuWidth: 150,
+ dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
+ column: [
+ {
+ label: "流程分类",
+ type: "select",
+ row: true,
+ dicUrl: "/api/blade-system/dict/dictionary?code=flow",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
},
- {
- label: '流程名称',
- prop: 'processDefinitionName',
- search: true,
- },
- {
- label: '当前步骤',
- prop: 'taskName',
- },
- {
- label: '流程版本',
- prop: 'processDefinitionVersion',
- slot: true,
- width: 80,
- },
- {
- label: '申请时间',
- prop: 'createTime',
- width: 165,
- },
- ]
- },
- data: []
+ dataType: "number",
+ slot: true,
+ prop: "category",
+ search: true,
+ hide: true,
+ width: 100,
+ },
+ {
+ label: "流程名称",
+ prop: "processDefinitionName",
+ search: true,
+ },
+ {
+ label: "当前步骤",
+ prop: "taskName",
+ },
+ {
+ label: "流程版本",
+ prop: "processDefinitionVersion",
+ slot: true,
+ width: 80,
+ },
+ {
+ label: "申请时间",
+ prop: "createTime",
+ width: 165,
+ },
+ ],
+ },
+ data: [],
+ };
+ },
+ computed: {
+ ...mapGetters(["permission", "flowRoutes"]),
+ ids() {
+ let ids = [];
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id);
+ });
+ return ids.join(",");
+ },
+ },
+ methods: {
+ searchReset() {
+ this.query = {};
+ this.onLoad(this.page);
+ },
+ searchChange(params, done) {
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
+ selectionChange(list) {
+ this.selectionList = list;
+ },
+ selectionClear() {
+ this.selectionList = [];
+ this.$refs.crud.toggleSelection();
+ },
+ handleDetail(row) {
+ this.$router.push({
+ path: `/work/process/${flowRoute(
+ this.flowRoutes,
+ row.category
+ )}/detail/${row.processInstanceId}/${row.businessId}`,
+ });
+ },
+ handleImage(row) {
+ this.flowUrl = `/api/blade-flow/process/diagram-view?processInstanceId=${row.processInstanceId}`;
+ this.flowBox = true;
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage;
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize;
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query);
+ },
+ onLoad(page, params = {}) {
+ const query = {
+ ...this.query,
+ category: params.category ? flowCategory(params.category) : null,
};
+ this.loading = true;
+ doneList(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, query)
+ ).then((res) => {
+ const data = res.data.data;
+ this.page.total = data.total;
+ this.data = data.records;
+ this.loading = false;
+ this.selectionClear();
+ });
},
- computed: {
- ...mapGetters(["permission", "flowRoutes"]),
- ids() {
- let ids = [];
- this.selectionList.forEach(ele => {
- ids.push(ele.id);
- });
- return ids.join(",");
- },
- },
- methods: {
- searchReset() {
- this.query = {};
- this.onLoad(this.page);
- },
- searchChange(params, done) {
- this.query = params;
- this.page.currentPage = 1;
- this.onLoad(this.page, params);
- done();
- },
- selectionChange(list) {
- this.selectionList = list;
- },
- selectionClear() {
- this.selectionList = [];
- this.$refs.crud.toggleSelection();
- },
- handleDetail(row) {
- this.$router.push({path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}`});
- },
- handleImage(row) {
- this.flowUrl = `/api/blade-flow/process/diagram-view?processInstanceId=${row.processInstanceId}`;
- this.flowBox = true;
- },
- currentChange(currentPage){
- this.page.currentPage = currentPage;
- },
- sizeChange(pageSize){
- this.page.pageSize = pageSize;
- },
- refreshChange() {
- this.onLoad(this.page, this.query);
- },
- onLoad(page, params = {}) {
- const query = {
- ...this.query,
- category: (params.category) ? flowCategory(params.category) : null
- };
- this.loading = true;
- doneList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => {
- const data = res.data.data;
- this.page.total = data.total;
- this.data = data.records;
- this.loading = false;
- this.selectionClear();
- });
- }
- }
- };
+ },
+};
</script>
<style>
- .none-border {
- border: 0;
- background-color: transparent !important;
- }
+.none-border {
+ border: 0;
+ background-color: transparent !important;
+}
</style>
diff --git a/src/views/work/send.vue b/src/views/work/send.vue
index 9c2d96d..1806e3d 100644
--- a/src/views/work/send.vue
+++ b/src/views/work/send.vue
@@ -1,49 +1,59 @@
<template>
- <basic-container>
- <avue-crud :option="option"
- :table-loading="loading"
- :data="data"
- ref="crud"
- v-model="form"
- :page.sync="page"
- @search-change="searchChange"
- @search-reset="searchReset"
- @selection-change="selectionChange"
- @current-change="currentChange"
- @size-change="sizeChange"
- @refresh-change="refreshChange"
- @on-load="onLoad">
+ <basic-container
+ :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
+ >
+ <avue-crud
+ :option="option"
+ :table-loading="loading"
+ :data="data"
+ ref="crud"
+ v-model="form"
+ :page.sync="page"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @selection-change="selectionChange"
+ @current-change="currentChange"
+ @size-change="sizeChange"
+ @refresh-change="refreshChange"
+ @on-load="onLoad"
+ >
<template slot-scope="scope" slot="menu">
- <el-button type="text"
- size="small"
- v-if="permission.work_send_detail"
- plain
- class="none-border"
- @click.stop="handleDetail(scope.row)">详情
+ <el-button
+ type="text"
+ size="small"
+ v-if="permission.work_send_detail"
+ plain
+ class="none-border"
+ @click.stop="handleDetail(scope.row)"
+ >详情
</el-button>
- <el-button type="text"
- size="small"
- v-if="permission.work_send_follow"
- plain
- class="none-border"
- @click.stop="handleImage(scope.row,scope.index)">跟踪
+ <el-button
+ type="text"
+ size="small"
+ v-if="permission.work_send_follow"
+ plain
+ class="none-border"
+ @click.stop="handleImage(scope.row, scope.index)"
+ >跟踪
</el-button>
</template>
- <template slot-scope="{row}"
- slot="processDefinitionVersion">
- <el-tag>v{{row.processDefinitionVersion}}</el-tag>
+ <template slot-scope="{ row }" slot="processDefinitionVersion">
+ <el-tag>v{{ row.processDefinitionVersion }}</el-tag>
</template>
- <template slot-scope="{row}"
- slot="processIsFinished">
- <el-tag>{{row.processIsFinished==='finished' ? '已完成' : '未完成'}}</el-tag>
+ <template slot-scope="{ row }" slot="processIsFinished">
+ <el-tag>{{
+ row.processIsFinished === "finished" ? "已完成" : "未完成"
+ }}</el-tag>
</template>
</avue-crud>
- <el-dialog title="流程图"
- append-to-body
- :visible.sync="flowBox"
- :fullscreen="true">
+ <el-dialog
+ title="流程图"
+ append-to-body
+ :visible.sync="flowBox"
+ :fullscreen="true"
+ >
<iframe
- :src=flowUrl
+ :src="flowUrl"
width="100%"
height="700"
title="流程图"
@@ -52,10 +62,10 @@
marginWidth="0"
marginHeight="0"
scrolling="no"
- allowTransparency="yes">
+ allowTransparency="yes"
+ >
</iframe>
- <span slot="footer"
- class="dialog-footer">
+ <span slot="footer" class="dialog-footer">
<el-button @click="flowBox = false">关 闭</el-button>
</span>
</el-dialog>
@@ -63,155 +73,166 @@
</template>
<script>
- import {mapGetters} from "vuex";
- import {sendList} from "@/api/work/work";
- import {flowCategory,flowRoute} from "@/util/flow";
+import { mapGetters } from "vuex";
+import { sendList } from "@/api/work/work";
+import { flowCategory, flowRoute } from "@/util/flow";
- export default {
- data() {
- return {
- form: {},
- selectionId: '',
- selectionList: [],
- query: {},
- loading: true,
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- flowBox: false,
- flowUrl: '',
- workBox: false,
- option: {
- height: 'auto',
- calcHeight: 30,
- tip: false,
- searchShow: true,
- searchMenuSpan: 6,
- border: true,
- index: true,
- selection: true,
- editBtn: false,
- addBtn: false,
- viewBtn: false,
- delBtn: false,
- dialogWidth: 900,
- menuWidth: 150,
- dialogClickModal: false,
- column: [
- {
- label: "流程分类",
- type: "select",
- row: true,
- dicUrl: "/api/blade-system/dict/dictionary?code=flow",
- props: {
- label: "dictValue",
- value: "dictKey"
- },
- dataType: "number",
- slot: true,
- prop: "category",
- search: true,
- hide: true,
- width: 100,
+export default {
+ data() {
+ return {
+ form: {},
+ selectionId: "",
+ selectionList: [],
+ query: {},
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ ...this.$store.state.control.changePageSize,
+ },
+ flowBox: false,
+ flowUrl: "",
+ workBox: false,
+ option: {
+ height: "auto",
+ calcHeight: 30,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ border: true,
+ index: true,
+ selection: true,
+ editBtn: false,
+ addBtn: false,
+ viewBtn: false,
+ delBtn: false,
+ dialogWidth: 900,
+ menuWidth: 150,
+ dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
+ column: [
+ {
+ label: "流程分类",
+ type: "select",
+ row: true,
+ dicUrl: "/api/blade-system/dict/dictionary?code=flow",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
},
- {
- label: '流程名称',
- prop: 'processDefinitionName',
- search: true,
- },
- {
- label: '当前步骤',
- prop: 'taskName',
- },
- {
- label: '流程版本',
- prop: 'processDefinitionVersion',
- slot: true,
- width: 80,
- },
- {
- label: '流程进度',
- prop: 'processIsFinished',
- slot: true,
- width: 80,
- },
- {
- label: '申请时间',
- prop: 'createTime',
- width: 165,
- },
- ]
- },
- data: []
+ dataType: "number",
+ slot: true,
+ prop: "category",
+ search: true,
+ hide: true,
+ width: 100,
+ },
+ {
+ label: "流程名称",
+ prop: "processDefinitionName",
+ search: true,
+ },
+ {
+ label: "当前步骤",
+ prop: "taskName",
+ },
+ {
+ label: "流程版本",
+ prop: "processDefinitionVersion",
+ slot: true,
+ width: 80,
+ },
+ {
+ label: "流程进度",
+ prop: "processIsFinished",
+ slot: true,
+ width: 80,
+ },
+ {
+ label: "申请时间",
+ prop: "createTime",
+ width: 165,
+ },
+ ],
+ },
+ data: [],
+ };
+ },
+ computed: {
+ ...mapGetters(["permission", "flowRoutes"]),
+ ids() {
+ let ids = [];
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id);
+ });
+ return ids.join(",");
+ },
+ },
+ methods: {
+ searchReset() {
+ this.query = {};
+ this.onLoad(this.page);
+ },
+ searchChange(params, done) {
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
+ selectionChange(list) {
+ this.selectionList = list;
+ },
+ selectionClear() {
+ this.selectionList = [];
+ this.$refs.crud.toggleSelection();
+ },
+ handleDetail(row) {
+ this.$router.push({
+ path: `/work/process/${flowRoute(
+ this.flowRoutes,
+ row.category
+ )}/detail/${row.processInstanceId}/${row.businessId}`,
+ });
+ },
+ handleImage(row) {
+ this.flowUrl = `/api/blade-flow/process/diagram-view?processInstanceId=${row.processInstanceId}`;
+ this.flowBox = true;
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage;
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize;
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query);
+ },
+ onLoad(page, params = {}) {
+ const query = {
+ ...this.query,
+ category: params.category ? flowCategory(params.category) : null,
};
+ this.loading = true;
+ sendList(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, query)
+ ).then((res) => {
+ const data = res.data.data;
+ this.page.total = data.total;
+ this.data = data.records;
+ this.loading = false;
+ this.selectionClear();
+ });
},
- computed: {
- ...mapGetters(["permission", "flowRoutes"]),
- ids() {
- let ids = [];
- this.selectionList.forEach(ele => {
- ids.push(ele.id);
- });
- return ids.join(",");
- },
- },
- methods: {
- searchReset() {
- this.query = {};
- this.onLoad(this.page);
- },
- searchChange(params, done) {
- this.query = params;
- this.page.currentPage = 1;
- this.onLoad(this.page, params);
- done();
- },
- selectionChange(list) {
- this.selectionList = list;
- },
- selectionClear() {
- this.selectionList = [];
- this.$refs.crud.toggleSelection();
- },
- handleDetail(row) {
- this.$router.push({ path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}` });
- },
- handleImage(row) {
- this.flowUrl = `/api/blade-flow/process/diagram-view?processInstanceId=${row.processInstanceId}`;
- this.flowBox = true;
- },
- currentChange(currentPage){
- this.page.currentPage = currentPage;
- },
- sizeChange(pageSize){
- this.page.pageSize = pageSize;
- },
- refreshChange() {
- this.onLoad(this.page, this.query);
- },
- onLoad(page, params = {}) {
- const query = {
- ...this.query,
- category: (params.category) ? flowCategory(params.category) : null
- };
- this.loading = true;
- sendList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => {
- const data = res.data.data;
- this.page.total = data.total;
- this.data = data.records;
- this.loading = false;
- this.selectionClear();
- });
- }
- }
- };
+ },
+};
</script>
<style>
- .none-border {
- border: 0;
- background-color: transparent !important;
- }
+.none-border {
+ border: 0;
+ background-color: transparent !important;
+}
</style>
diff --git a/src/views/work/start.vue b/src/views/work/start.vue
index a001e81..895bd49 100644
--- a/src/views/work/start.vue
+++ b/src/views/work/start.vue
@@ -1,18 +1,22 @@
<template>
- <basic-container>
- <avue-crud :option="option"
- :table-loading="loading"
- :data="data"
- :page.sync="page"
- v-model="form"
- ref="crud"
- @search-change="searchChange"
- @search-reset="searchReset"
- @selection-change="selectionChange"
- @current-change="currentChange"
- @size-change="sizeChange"
- @refresh-change="refreshChange"
- @on-load="onLoad">
+ <basic-container
+ :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
+ >
+ <avue-crud
+ :option="option"
+ :table-loading="loading"
+ :data="data"
+ :page.sync="page"
+ v-model="form"
+ ref="crud"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @selection-change="selectionChange"
+ @current-change="currentChange"
+ @size-change="sizeChange"
+ @refresh-change="refreshChange"
+ @on-load="onLoad"
+ >
<template slot="menuLeft">
<el-radio-group v-model="mode" size="small">
<el-radio-button label="1">通用流程</el-radio-button>
@@ -20,44 +24,46 @@
</el-radio-group>
</template>
<template slot-scope="scope" slot="menu">
- <el-button type="text"
- size="small"
- v-if="permission.work_start_flow"
- plain
- class="none-border"
- @click.stop="handleStart(scope.row)">发起
+ <el-button
+ type="text"
+ size="small"
+ v-if="permission.work_start_flow"
+ plain
+ class="none-border"
+ @click.stop="handleStart(scope.row)"
+ >发起
</el-button>
- <el-button type="text"
- size="small"
- v-if="permission.work_start_image"
- plain
- class="none-border"
- @click.stop="handleImage(scope.row,scope.index)">流程图
+ <el-button
+ type="text"
+ size="small"
+ v-if="permission.work_start_image"
+ plain
+ class="none-border"
+ @click.stop="handleImage(scope.row, scope.index)"
+ >流程图
</el-button>
</template>
- <template slot-scope="{row}"
- slot="tenantId">
- <el-tag>{{row.tenantId===''?'通用':row.tenantId}}</el-tag>
+ <template slot-scope="{ row }" slot="tenantId">
+ <el-tag>{{ row.tenantId === "" ? "通用" : row.tenantId }}</el-tag>
</template>
- <template slot-scope="{row}"
- slot="version">
- <el-tag>v{{row.version}}</el-tag>
+ <template slot-scope="{ row }" slot="version">
+ <el-tag>v{{ row.version }}</el-tag>
</template>
- <template slot-scope="{row}"
- slot="suspensionState">
- <el-tag>{{row.suspensionState===1?'激活':'挂起'}}</el-tag>
+ <template slot-scope="{ row }" slot="suspensionState">
+ <el-tag>{{ row.suspensionState === 1 ? "激活" : "挂起" }}</el-tag>
</template>
- <template slot-scope="{row}"
- slot="category">
- <el-tag>{{row.categoryName}}</el-tag>
+ <template slot-scope="{ row }" slot="category">
+ <el-tag>{{ row.categoryName }}</el-tag>
</template>
</avue-crud>
- <el-dialog title="流程图"
- append-to-body
- :visible.sync="flowBox"
- :fullscreen="true">
+ <el-dialog
+ title="流程图"
+ append-to-body
+ :visible.sync="flowBox"
+ :fullscreen="true"
+ >
<iframe
- :src=flowUrl
+ :src="flowUrl"
width="100%"
height="700"
title="流程图"
@@ -66,10 +72,10 @@
marginWidth="0"
marginHeight="0"
scrolling="no"
- allowTransparency="yes">
+ allowTransparency="yes"
+ >
</iframe>
- <span slot="footer"
- class="dialog-footer">
+ <span slot="footer" class="dialog-footer">
<el-button @click="flowBox = false">关 闭</el-button>
</span>
</el-dialog>
@@ -77,167 +83,177 @@
</template>
<script>
- import {mapGetters} from "vuex";
- import {startList} from "@/api/work/work";
- import {flowCategory, flowRoute} from "@/util/flow";
+import { mapGetters } from "vuex";
+import { startList } from "@/api/work/work";
+import { flowCategory, flowRoute } from "@/util/flow";
- export default {
- data() {
- return {
- form: {},
- mode: '1',
- selectionId: '',
- selectionList: [],
- query: {},
- loading: true,
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- flowBox: false,
- flowUrl: '',
- workBox: false,
- option: {
- height: 'auto',
- calcHeight: 30,
- tip: false,
- searchShow: true,
- searchMenuSpan: 6,
- border: true,
- index: true,
- selection: true,
- editBtn: false,
- addBtn: false,
- viewBtn: false,
- delBtn: false,
- menuWidth: 150,
- dialogWidth: 900,
- dialogClickModal: false,
- column: [
- {
- label: '保安单位编号',
- prop: 'tenantId',
- slot: true,
- width: 120,
+export default {
+ data() {
+ return {
+ form: {},
+ mode: "1",
+ selectionId: "",
+ selectionList: [],
+ query: {},
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ ...this.$store.state.control.changePageSize,
+ },
+ flowBox: false,
+ flowUrl: "",
+ workBox: false,
+ option: {
+ height: "auto",
+ calcHeight: 30,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ border: true,
+ index: true,
+ selection: true,
+ editBtn: false,
+ addBtn: false,
+ viewBtn: false,
+ delBtn: false,
+ menuWidth: 150,
+ dialogWidth: 900,
+ dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
+ column: [
+ {
+ label: "保安单位编号",
+ prop: "tenantId",
+ slot: true,
+ width: 120,
+ },
+ {
+ label: "流程分类",
+ type: "select",
+ row: true,
+ dicUrl: "/api/blade-system/dict/dictionary?code=flow",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
},
- {
- label: "流程分类",
- type: "select",
- row: true,
- dicUrl: "/api/blade-system/dict/dictionary?code=flow",
- props: {
- label: "dictValue",
- value: "dictKey"
- },
- dataType: "number",
- slot: true,
- prop: "category",
- search: true,
- width: 100,
- },
- {
- label: '流程标识',
- prop: 'key',
- },
- {
- label: '流程名称',
- prop: 'name',
- search: true,
- },
- {
- label: '流程版本',
- prop: 'version',
- slot: true,
- width: 80,
- },
- {
- label: '状态',
- prop: 'suspensionState',
- slot: true,
- width: 80,
- },
- {
- label: '部署时间',
- prop: 'deploymentTime',
- width: 165,
- },
- ]
- },
- data: []
+ dataType: "number",
+ slot: true,
+ prop: "category",
+ search: true,
+ width: 100,
+ },
+ {
+ label: "流程标识",
+ prop: "key",
+ },
+ {
+ label: "流程名称",
+ prop: "name",
+ search: true,
+ },
+ {
+ label: "流程版本",
+ prop: "version",
+ slot: true,
+ width: 80,
+ },
+ {
+ label: "状态",
+ prop: "suspensionState",
+ slot: true,
+ width: 80,
+ },
+ {
+ label: "部署时间",
+ prop: "deploymentTime",
+ width: 165,
+ },
+ ],
+ },
+ data: [],
+ };
+ },
+ watch: {
+ mode() {
+ this.onLoad(this.page);
+ },
+ },
+ computed: {
+ ...mapGetters(["permission", "flowRoutes"]),
+ ids() {
+ let ids = [];
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id);
+ });
+ return ids.join(",");
+ },
+ },
+ methods: {
+ searchReset() {
+ this.query = {};
+ this.onLoad(this.page);
+ },
+ searchChange(params, done) {
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
+ selectionChange(list) {
+ this.selectionList = list;
+ },
+ selectionClear() {
+ this.selectionList = [];
+ this.$refs.crud.toggleSelection();
+ },
+ handleStart(row) {
+ this.$router.push({
+ path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/form/${
+ row.id
+ }`,
+ });
+ },
+ handleImage(row) {
+ this.flowUrl = `/api/blade-flow/process/resource-view?processDefinitionId=${row.id}`;
+ this.flowBox = true;
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage;
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize;
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query);
+ },
+ onLoad(page, params = {}) {
+ const query = {
+ ...this.query,
+ category: params.category ? flowCategory(params.category) : null,
+ mode: this.mode,
};
+ this.loading = true;
+ startList(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, query)
+ ).then((res) => {
+ const data = res.data.data;
+ this.page.total = data.total;
+ this.data = data.records;
+ this.loading = false;
+ this.selectionClear();
+ });
},
- watch: {
- 'mode'() {
- this.onLoad(this.page);
- }
- },
- computed: {
- ...mapGetters(["permission", "flowRoutes"]),
- ids() {
- let ids = [];
- this.selectionList.forEach(ele => {
- ids.push(ele.id);
- });
- return ids.join(",");
- },
- },
- methods: {
- searchReset() {
- this.query = {};
- this.onLoad(this.page);
- },
- searchChange(params, done) {
- this.query = params;
- this.page.currentPage = 1;
- this.onLoad(this.page, params);
- done();
- },
- selectionChange(list) {
- this.selectionList = list;
- },
- selectionClear() {
- this.selectionList = [];
- this.$refs.crud.toggleSelection();
- },
- handleStart(row) {
- this.$router.push({path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/form/${row.id}`});
- },
- handleImage(row) {
- this.flowUrl = `/api/blade-flow/process/resource-view?processDefinitionId=${row.id}`;
- this.flowBox = true;
- },
- currentChange(currentPage) {
- this.page.currentPage = currentPage;
- },
- sizeChange(pageSize) {
- this.page.pageSize = pageSize;
- },
- refreshChange() {
- this.onLoad(this.page, this.query);
- },
- onLoad(page, params = {}) {
- const query = {
- ...this.query,
- category: (params.category) ? flowCategory(params.category) : null,
- mode: this.mode
- };
- this.loading = true;
- startList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => {
- const data = res.data.data;
- this.page.total = data.total;
- this.data = data.records;
- this.loading = false;
- this.selectionClear();
- });
- }
- }
- };
+ },
+};
</script>
<style>
- .none-border {
- border: 0;
- background-color: transparent !important;
- }
+.none-border {
+ border: 0;
+ background-color: transparent !important;
+}
</style>
diff --git a/src/views/work/todo.vue b/src/views/work/todo.vue
index 975736c..591e969 100644
--- a/src/views/work/todo.vue
+++ b/src/views/work/todo.vue
@@ -1,51 +1,62 @@
<template>
- <basic-container>
- <avue-crud :option="option"
- :table-loading="loading"
- :data="data"
- ref="crud"
- v-model="form"
- @search-change="searchChange"
- @search-reset="searchReset"
- @selection-change="selectionChange"
- @current-change="currentChange"
- @size-change="sizeChange"
- @refresh-change="refreshChange"
- @on-load="onLoad">
+ <basic-container
+ :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
+ >
+ <avue-crud
+ :option="option"
+ :table-loading="loading"
+ :data="data"
+ ref="crud"
+ v-model="form"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @selection-change="selectionChange"
+ @current-change="currentChange"
+ @size-change="sizeChange"
+ @refresh-change="refreshChange"
+ @on-load="onLoad"
+ >
<template slot-scope="scope" slot="menu">
- <el-button type="text"
- size="small"
- v-if="permission.work_todo_handle"
- plain
- class="none-border"
- @click.stop="handleWork(scope.row)">处理
+ <el-button
+ type="text"
+ size="small"
+ v-if="permission.work_todo_handle"
+ plain
+ class="none-border"
+ @click.stop="handleWork(scope.row)"
+ >处理
</el-button>
- <el-button type="text"
- size="small"
- v-if="permission.work_todo_detail"
- plain
- class="none-border"
- @click.stop="handleDetail(scope.row)">详情
+ <el-button
+ type="text"
+ size="small"
+ v-if="permission.work_todo_detail"
+ plain
+ class="none-border"
+ @click.stop="handleDetail(scope.row)"
+ >详情
</el-button>
- <el-button type="text"
- size="small"
- v-if="permission.work_todo_follow"
- plain
- class="none-border"
- @click.stop="handleImage(scope.row,scope.index)">跟踪
+ <el-button
+ type="text"
+ size="small"
+ v-if="permission.work_todo_follow"
+ plain
+ class="none-border"
+ @click.stop="handleImage(scope.row, scope.index)"
+ >跟踪
</el-button>
</template>
- <template slot-scope="{row}"
- slot="processDefinitionVersion">
- <el-tag>v{{row.processDefinitionVersion}}</el-tag>
+ <template slot-scope="{ row }" slot="processDefinitionVersion">
+ <el-tag>v{{ row.processDefinitionVersion }}</el-tag>
</template>
</avue-crud>
- <el-dialog title="流程图"
- append-to-body
- :visible.sync="flowBox"
- :fullscreen="true">
+ <el-dialog
+ title="流程图"
+ append-to-body
+ :visible.sync="flowBox"
+ :fullscreen="true"
+ >
<iframe
- :src=flowUrl
+ :src="flowUrl"
width="100%"
height="700"
title="流程图"
@@ -54,10 +65,10 @@
marginWidth="0"
marginHeight="0"
scrolling="no"
- allowTransparency="yes">
+ allowTransparency="yes"
+ >
</iframe>
- <span slot="footer"
- class="dialog-footer">
+ <span slot="footer" class="dialog-footer">
<el-button @click="flowBox = false">关 闭</el-button>
</span>
</el-dialog>
@@ -65,153 +76,169 @@
</template>
<script>
- import {mapGetters} from "vuex";
- import {todoList} from "@/api/work/work";
- import {flowCategory,flowRoute} from "@/util/flow";
+import { mapGetters } from "vuex";
+import { todoList } from "@/api/work/work";
+import { flowCategory, flowRoute } from "@/util/flow";
- export default {
- data() {
- return {
- form: {},
- selectionId: '',
- selectionList: [],
- query: {},
- loading: true,
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- flowBox: false,
- flowUrl: '',
- workBox: false,
- option: {
- height: 'auto',
- calcHeight: 30,
- tip: false,
- simplePage: true,
- searchShow: true,
- searchMenuSpan: 6,
- border: true,
- index: true,
- selection: true,
- editBtn: false,
- addBtn: false,
- viewBtn: false,
- delBtn: false,
- dialogWidth: 900,
- menuWidth: 150,
- dialogClickModal: false,
- column: [
- {
- label: "流程分类",
- type: "select",
- row: true,
- dicUrl: "/api/blade-system/dict/dictionary?code=flow",
- props: {
- label: "dictValue",
- value: "dictKey"
- },
- dataType: "number",
- slot: true,
- prop: "category",
- search: true,
- hide: true,
- width: 100,
+export default {
+ data() {
+ return {
+ form: {},
+ selectionId: "",
+ selectionList: [],
+ query: {},
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ ...this.$store.state.control.changePageSize,
+ },
+ flowBox: false,
+ flowUrl: "",
+ workBox: false,
+ option: {
+ height: "auto",
+ calcHeight: 30,
+ tip: false,
+ simplePage: true,
+ searchShow: true,
+ searchMenuSpan: 6,
+ border: true,
+ index: true,
+ selection: true,
+ editBtn: false,
+ addBtn: false,
+ viewBtn: false,
+ delBtn: false,
+ dialogWidth: 900,
+ menuWidth: 150,
+ dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
+ column: [
+ {
+ label: "流程分类",
+ type: "select",
+ row: true,
+ dicUrl: "/api/blade-system/dict/dictionary?code=flow",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
},
- {
- label: '流程名称',
- prop: 'processDefinitionName',
- search: true,
- },
- {
- label: '当前步骤',
- prop: 'taskName',
- },
- {
- label: '流程版本',
- prop: 'processDefinitionVersion',
- slot: true,
- width: 80,
- },
- {
- label: '申请时间',
- prop: 'createTime',
- width: 165,
- },
- ]
- },
- data: []
+ dataType: "number",
+ slot: true,
+ prop: "category",
+ search: true,
+ hide: true,
+ width: 100,
+ },
+ {
+ label: "流程名称",
+ prop: "processDefinitionName",
+ search: true,
+ },
+ {
+ label: "当前步骤",
+ prop: "taskName",
+ },
+ {
+ label: "流程版本",
+ prop: "processDefinitionVersion",
+ slot: true,
+ width: 80,
+ },
+ {
+ label: "申请时间",
+ prop: "createTime",
+ width: 165,
+ },
+ ],
+ },
+ data: [],
+ };
+ },
+ computed: {
+ ...mapGetters(["permission", "flowRoutes"]),
+ ids() {
+ let ids = [];
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id);
+ });
+ return ids.join(",");
+ },
+ },
+ methods: {
+ searchReset() {
+ this.query = {};
+ this.onLoad(this.page);
+ },
+ searchChange(params, done) {
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
+ selectionChange(list) {
+ this.selectionList = list;
+ },
+ selectionClear() {
+ this.selectionList = [];
+ this.$refs.crud.toggleSelection();
+ },
+ handleWork(row) {
+ this.$router.push({
+ path: `/work/process/${flowRoute(
+ this.flowRoutes,
+ row.category
+ )}/handle/${row.taskId}/${row.processInstanceId}/${row.businessId}`,
+ });
+ },
+ handleDetail(row) {
+ this.$router.push({
+ path: `/work/process/${flowRoute(
+ this.flowRoutes,
+ row.category
+ )}/detail/${row.processInstanceId}/${row.businessId}`,
+ });
+ },
+ handleImage(row) {
+ this.flowUrl = `/api/blade-flow/process/diagram-view?processInstanceId=${row.processInstanceId}`;
+ this.flowBox = true;
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage;
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize;
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query);
+ },
+ onLoad(page, params = {}) {
+ const query = {
+ ...this.query,
+ category: params.category ? flowCategory(params.category) : null,
};
+ this.loading = true;
+ todoList(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, query)
+ ).then((res) => {
+ const data = res.data.data;
+ this.page.total = data.total;
+ this.data = data.records;
+ this.loading = false;
+ this.selectionClear();
+ });
},
- computed: {
- ...mapGetters(["permission", "flowRoutes"]),
- ids() {
- let ids = [];
- this.selectionList.forEach(ele => {
- ids.push(ele.id);
- });
- return ids.join(",");
- },
- },
- methods: {
- searchReset() {
- this.query = {};
- this.onLoad(this.page);
- },
- searchChange(params, done) {
- this.query = params;
- this.page.currentPage = 1;
- this.onLoad(this.page, params);
- done();
- },
- selectionChange(list) {
- this.selectionList = list;
- },
- selectionClear() {
- this.selectionList = [];
- this.$refs.crud.toggleSelection();
- },
- handleWork(row) {
- this.$router.push({ path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/handle/${row.taskId}/${row.processInstanceId}/${row.businessId}` });
- },
- handleDetail(row) {
- this.$router.push({ path: `/work/process/${flowRoute(this.flowRoutes, row.category)}/detail/${row.processInstanceId}/${row.businessId}` });
- },
- handleImage(row) {
- this.flowUrl = `/api/blade-flow/process/diagram-view?processInstanceId=${row.processInstanceId}`;
- this.flowBox = true;
- },
- currentChange(currentPage){
- this.page.currentPage = currentPage;
- },
- sizeChange(pageSize){
- this.page.pageSize = pageSize;
- },
- refreshChange() {
- this.onLoad(this.page, this.query);
- },
- onLoad(page, params = {}) {
- const query = {
- ...this.query,
- category: (params.category) ? flowCategory(params.category) : null
- };
- this.loading = true;
- todoList(page.currentPage, page.pageSize, Object.assign(params, query)).then(res => {
- const data = res.data.data;
- this.page.total = data.total;
- this.data = data.records;
- this.loading = false;
- this.selectionClear();
- });
- }
- }
- };
+ },
+};
</script>
<style>
- .none-border {
- border: 0;
- background-color: transparent !important;
- }
+.none-border {
+ border: 0;
+ background-color: transparent !important;
+}
</style>
diff --git a/src/views/workreport/workreply.vue b/src/views/workreport/workreply.vue
index ca07a8c..64f0386 100644
--- a/src/views/workreport/workreply.vue
+++ b/src/views/workreport/workreply.vue
@@ -1,5 +1,7 @@
<template>
- <basic-container>
+ <basic-container
+ :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
+ >
<avue-crud
:option="option"
:table-loading="loading"
@@ -69,6 +71,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
selectionList: [],
option: {
@@ -90,6 +93,7 @@
menuWidth: 320,
dialogClickModal: false,
column: workreplyColumn,
+ ...this.$store.state.control.clearOtherBut,
},
data: [],
};
diff --git a/src/views/workreport/workreport.vue b/src/views/workreport/workreport.vue
index a33eec1..2b3e5b4 100644
--- a/src/views/workreport/workreport.vue
+++ b/src/views/workreport/workreport.vue
@@ -1,5 +1,10 @@
<template>
- <basic-container class="workreply">
+ <basic-container
+ :class="[
+ 'workreply',
+ $store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '',
+ ]"
+ >
<avue-crud
:option="option"
:table-loading="loading"
@@ -70,6 +75,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
selectionList: [],
option: {
@@ -91,6 +97,7 @@
menuWidth: 320,
dialogClickModal: false,
column: workreportColumn,
+ ...this.$store.state.control.clearOtherBut,
},
data: [],
};
diff --git a/src/views/zc/zc.vue b/src/views/zc/zc.vue
index 4f90985..5e5313a 100644
--- a/src/views/zc/zc.vue
+++ b/src/views/zc/zc.vue
@@ -1,5 +1,7 @@
<template>
- <basic-container>
+ <basic-container
+ :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
+ >
<avue-crud
:option="option"
:table-loading="loading"
@@ -71,6 +73,7 @@
pageSize: 10,
currentPage: 1,
total: 0,
+ ...this.$store.state.control.changePageSize,
},
selectionList: [],
option: {
@@ -86,6 +89,7 @@
headerAlign: "center",
align: "center",
dialogClickModal: false,
+ ...this.$store.state.control.clearOtherBut,
column: [
{
label: "账号",
--
Gitblit v1.9.3