From ac1e76c9db2f33f07fe73b9b587a1bf0f56d7920 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Wed, 25 Aug 2021 20:03:47 +0800
Subject: [PATCH] 修改bug
---
src/views/home/index.vue | 14 +-
src/store/modules/dict.js | 4
src/api/recordOur/outCardPopup.js | 4
src/components/Approval/Approval.vue | 42 ++++----
src/views/home/ourDatas.js | 6 +
src/store/getters.js | 1
src/components/attach/attach.vue | 119 ++++++++++++++---------
src/styles/element-ui.scss | 40 +++++++
src/api/resource/attach.js | 24 +++-
src/components/cardPopup/cardPopup.vue | 26 ++++-
10 files changed, 187 insertions(+), 93 deletions(-)
diff --git a/src/api/recordOur/outCardPopup.js b/src/api/recordOur/outCardPopup.js
index c8cefb0..c27dd34 100644
--- a/src/api/recordOur/outCardPopup.js
+++ b/src/api/recordOur/outCardPopup.js
@@ -18,13 +18,13 @@
}
-export const selectIn = (name, cardid, ptype) => {
+export const selectIn = (name, cardid, type) => {
return request({
url: '/api/' + name,
method: 'post',
params: {
cardid,
- ptype
+ type
}
})
}
\ No newline at end of file
diff --git a/src/api/resource/attach.js b/src/api/resource/attach.js
index e68744e..90f9db2 100644
--- a/src/api/resource/attach.js
+++ b/src/api/resource/attach.js
@@ -1,7 +1,21 @@
import request from '@/router/axios';
-import {urls} from "@/api/urls";
+import { urls } from "@/api/urls";
-export const getList = (current, size, params,deptid,type) => {
+export const getList = (current, size, params, deptid) => {
+ return request({
+ url: '/api/blade-resource/attach/page',
+ method: 'get',
+ params: {
+ ...params,
+ current,
+ size,
+ deptid
+ }
+ })
+}
+
+
+export const getListOld = (current, size, params, deptid, type) => {
return request({
url: '/api/blade-resource/attach/list',
method: 'get',
@@ -36,7 +50,7 @@
}
export const removenws = (ids) => {
return request({
- url: urls+'/blade-resource/attach/remove',
+ url: urls + '/blade-resource/attach/remove',
method: 'post',
params: {
ids,
@@ -46,7 +60,7 @@
export const removenw = (ids) => {
return request({
- url: urls+'/blade-resource/attach/remove',
+ url: urls + '/blade-resource/attach/remove',
method: 'post',
params: {
ids,
@@ -64,7 +78,7 @@
export const addnw = (row) => {
return request({
- url: urls+'/blade-resource/attach/submit',
+ url: urls + '/blade-resource/attach/submit',
method: 'post',
data: row
})
diff --git a/src/components/Approval/Approval.vue b/src/components/Approval/Approval.vue
index 2ee2e9f..159a348 100644
--- a/src/components/Approval/Approval.vue
+++ b/src/components/Approval/Approval.vue
@@ -53,9 +53,28 @@
type: Boolean,
default: false,
},
+ data: {
+ type: Array,
+ default: [],
+ },
},
computed: {
...mapGetters(["ApprovalShow", "userInfo"]),
+ },
+ created() {
+ var d = this.data,
+ b = [];
+ for (var k in d) {
+ console.log({
+ label: d[k].menuName,
+ value: d[k].type + "",
+ });
+ b.push({
+ label: d[k].menuName,
+ value: d[k].type + "",
+ });
+ }
+ this.option1.column[1].dicData = b;
},
data() {
return {
@@ -102,28 +121,7 @@
label: "许可类型",
prop: "ptype",
type: "select",
- dicData: [
- {
- label: "保安服务公司许可申请",
- value: "0",
- },
- {
- label: "自招保安单位备案",
- value: "1",
- },
- {
- label: "保安培训公司备案",
- value: "2",
- },
- {
- label: "跨区域经营备案",
- value: "3",
- },
- {
- label: "自招保安单位备案撤销",
- value: "6",
- },
- ],
+ dicData: [],
},
{
label: "审批意见",
diff --git a/src/components/attach/attach.vue b/src/components/attach/attach.vue
index 78a6786..73d56ba 100644
--- a/src/components/attach/attach.vue
+++ b/src/components/attach/attach.vue
@@ -24,6 +24,7 @@
size="small"
plain
icon="el-icon-upload2"
+ v-if="canDoIt"
@click="handleUpload"
>上 传
</el-button>
@@ -32,6 +33,7 @@
size="small"
icon="el-icon-delete"
plain
+ v-if="canDoIt"
@click="handleDelete"
>删 除
</el-button>
@@ -41,9 +43,8 @@
type="text"
icon="el-icon-download"
size="small"
- v-if="permission.attach_download"
@click="handleDownload(scope.row)"
- >下载222
+ >下载
</el-button>
<el-button
type="text"
@@ -79,7 +80,7 @@
:visible.sync="imgSee"
class="see-img-box"
>
- <div class="img" :style="{ background: imgUrl }"></div>
+ <div class="imgs" :style="{ background: imgUrl }"></div>
</el-dialog>
</basic-container>
</template>
@@ -110,8 +111,9 @@
height: "auto",
calcHeight: 30,
tip: false,
+ align: "center",
searchShow: true,
- menu: false,
+ // menu: false,
height: 323,
searchMenuSpan: 6,
border: false,
@@ -121,45 +123,49 @@
selection: true,
dialogClickModal: false,
column: [
- {
- label: "附件地址",
- prop: "link",
- rules: [
- {
- required: true,
- message: "请输入附件地址",
- trigger: "blur",
- },
- ],
- },
- {
- label: "附件域名",
- prop: "domain",
- search: true,
- rules: [
- {
- required: true,
- message: "请输入附件域名",
- trigger: "blur",
- },
- ],
- },
+ // {
+ // label: "附件地址",
+ // prop: "link",
+ // hide: true,
+ // rules: [
+ // {
+ // required: true,
+ // message: "请输入附件地址",
+ // trigger: "blur",
+ // },
+ // ],
+ // },
+ // {
+ // label: "附件域名",
+ // prop: "domain",
+ // hide: true,
+ // // search: true,
+ // rules: [
+ // {
+ // required: true,
+ // message: "请输入附件域名",
+ // trigger: "blur",
+ // },
+ // ],
+ // },
+ // {
+ // label: "附件名称",
+ // prop: "name",
+ // hide: true,
+ // search: true,
+ // rules: [
+ // {
+ // required: true,
+ // message: "请输入附件名称",
+ // trigger: "blur",
+ // },
+ // ],
+ // },
{
label: "附件名称",
- prop: "name",
- search: true,
- rules: [
- {
- required: true,
- message: "请输入附件名称",
- trigger: "blur",
- },
- ],
- },
- {
- label: "附件原名",
prop: "originalName",
search: true,
+ overHidden: true,
rules: [
{
required: true,
@@ -191,13 +197,26 @@
},
],
},
- {
- label: "预览",
- prop: "link",
- slot: true,
- dataType: "string",
- type: "img",
- },
+ // {
+ // label: "上传时间",
+ // prop: "createTime",
+ // // slot: true,
+ // // search: true,
+ // rules: [
+ // {
+ // required: true,
+ // message: "请输入附件大小",
+ // trigger: "blur",
+ // },
+ // ],
+ // },
+ // {
+ // label: "预览",
+ // prop: "link",
+ // slot: true,
+ // dataType: "string",
+ // type: "img",
+ // },
],
},
data: [],
@@ -246,7 +265,7 @@
};
},
computed: {
- ...mapGetters(["permission"]),
+ ...mapGetters(["permission", "canDoIt"]),
permissionList() {
return {
addBtn: false,
@@ -285,7 +304,7 @@
this.attachBox = true;
},
uploadAfter(res, done, loading, column) {
- window.console.log(column);
+ // window.console.log(column);
this.attachBox = false;
this.refreshChange();
done();
@@ -387,6 +406,8 @@
seeImages(row) {
this.imgUrl = "";
this.imgUrl = "url(" + row.link + ") center center / contain no-repeat";
+ console.log(this.imgUrl);
+ // this.imgUrl = row.link;
this.imgSee = true;
},
@@ -413,5 +434,5 @@
};
</script>
-<style>
+<style lang="scss" scoped>
</style>
diff --git a/src/components/cardPopup/cardPopup.vue b/src/components/cardPopup/cardPopup.vue
index a725b6a..3318e41 100644
--- a/src/components/cardPopup/cardPopup.vue
+++ b/src/components/cardPopup/cardPopup.vue
@@ -32,15 +32,20 @@
></avue-form>
</el-collapse-item>
<el-collapse-item title="附件上传/查询" name="2">
- <attach :type="type"></attach>
+ <attach :type="imgType"></attach>
</el-collapse-item>
</el-collapse>
</div>
<div class="hand-next">
<el-button type="primary" @click="tip1up1">上一页</el-button>
- <el-button type="primary" @click="tip1">暂存</el-button>
- <el-button type="primary" @click="up()">提交审批</el-button>
+ <el-button type="primary" @click="tip1" :disabled="!canDoIt"
+ >暂存</el-button
+ >
+ <el-button type="primary" @click="up()" :disabled="!canDoIt">{{
+ //canDoIt ? "提交审批" : "已成功提交"
+ canDoIt ? "提交审批" : "提交审批"
+ }}</el-button>
<el-button type="info" @click="qx">取消</el-button>
</div>
</div>
@@ -63,6 +68,7 @@
see: false,
name: "",
type: "",
+ imgType: "",
apiName: [],
forms: 1,
data0: {},
@@ -77,18 +83,25 @@
};
},
computed: {
- ...mapGetters(["useWhere"]),
+ ...mapGetters(["useWhere", "canDoIt"]),
},
watch: {
useWhere() {
+ // console.log(this.canDoIt, "canDoIt");
for (var k in this.data) {
if (this.useWhere == this.data[k].type) {
this.see = true;
this.type = this.data[k].type;
+ this.imgType = this.data[k].imgType;
this.htmls = this.data[k].datas.htmls;
- this.option.column = this.data[k].datas.column;
+
this.apiName = this.data[k].datas.apiName;
this.name = this.data[k].menuName;
+ var d = this.data[k].datas.column;
+ for (var k in d) {
+ d[k]["disabled"] = !this.canDoIt;
+ }
+ this.option.column = d;
console.log("已选择type:" + this.useWhere + "--" + this.name);
this.convert();
}
@@ -101,7 +114,7 @@
methods: {
convert: function () {
var caridid = this.$store.getters.userInfo.Id;
- selectIn(this.apiName[2], caridid).then((res) => {
+ selectIn(this.apiName[2], caridid, this.type).then((res) => {
var d = res.data.data;
for (var k in d) {
this.obj0[k.toLowerCase()] = d[k];
@@ -159,6 +172,7 @@
message: "提交申请成功",
type: "success",
});
+ this.$store.commit("changecanDoIt", false);
});
},
tipover() {
diff --git a/src/store/getters.js b/src/store/getters.js
index 35044c1..415d99b 100644
--- a/src/store/getters.js
+++ b/src/store/getters.js
@@ -28,5 +28,6 @@
ApprovalShow: state => state.dict.ApprovalShow,
useWhere: state => state.dict.useWhere,
handle: state => state.dict.handle,
+ canDoIt: state => state.dict.canDoIt,
}
export default getters
diff --git a/src/store/modules/dict.js b/src/store/modules/dict.js
index b84998c..951c789 100644
--- a/src/store/modules/dict.js
+++ b/src/store/modules/dict.js
@@ -8,6 +8,7 @@
ApprovalShow: false,
useWhere: 'close',
handle: true,
+ canDoIt: true
},
actions: {
FlowRoutes({ commit }) {
@@ -39,6 +40,9 @@
},
changehandle: (state, data) => {
state.handle = data
+ },
+ changecanDoIt: (state, data) => {
+ state.canDoIt = data
}
}
diff --git a/src/styles/element-ui.scss b/src/styles/element-ui.scss
index 54c3e92..a98a587 100644
--- a/src/styles/element-ui.scss
+++ b/src/styles/element-ui.scss
@@ -25,7 +25,6 @@
display: none;
}
-
.el-message__icon,
.el-message__content {
display: inline-block;
@@ -49,12 +48,19 @@
padding: 0 !important;
}
-.el-dropdown-menu__item--divided:before, .el-menu, .el-menu--horizontal > .el-menu-item:not(.is-disabled):focus, .el-menu--horizontal > .el-menu-item:not(.is-disabled):hover, .el-menu--horizontal > .el-submenu .el-submenu__title:hover {
+.el-dropdown-menu__item--divided:before,
+.el-menu,
+.el-menu--horizontal > .el-menu-item:not(.is-disabled):focus,
+.el-menu--horizontal > .el-menu-item:not(.is-disabled):hover,
+.el-menu--horizontal > .el-submenu .el-submenu__title:hover {
background-color: transparent;
}
-
-.el-dropdown-menu__item--divided:before, .el-menu, .el-menu--horizontal > .el-menu-item:not(.is-disabled):focus, .el-menu--horizontal > .el-menu-item:not(.is-disabled):hover, .el-menu--horizontal > .el-submenu .el-submenu__title:hover {
+.el-dropdown-menu__item--divided:before,
+.el-menu,
+.el-menu--horizontal > .el-menu-item:not(.is-disabled):focus,
+.el-menu--horizontal > .el-menu-item:not(.is-disabled):hover,
+.el-menu--horizontal > .el-submenu .el-submenu__title:hover {
background-color: transparent !important;
}
@@ -69,3 +75,29 @@
.el-divider--horizontal {
margin: 12px 0 !important;
}
+
+.see-img-box {
+ .el-dialog {
+ width: 840px;
+ height: 540px;
+
+ .el-dialog__body {
+ padding: 4px;
+ position: relative;
+ height: calc(100% - 62px);
+ }
+
+ div.imgs {
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ margin: auto;
+ width: calc(100% - 8px);
+ height: calc(100% - 8px);
+ overflow: hidden;
+ height: 100%;
+ }
+ }
+}
diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index 69a30b7..b4a5303 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -32,7 +32,7 @@
</div>
</div>
<!-- 审批进度查询 -->
- <Approval class="Approval">
+ <Approval class="Approval" :data="dataCard">
<span slot="close">
<i
class="el-icon-close ApprovalClose breakApprovalClose"
@@ -69,9 +69,6 @@
Approval: Approval,
cardPopup: cardPopup,
},
- computed: {
- ...mapGetters(["userInfo"]),
- },
data() {
return {
userName: "",
@@ -84,7 +81,7 @@
};
},
computed: {
- ...mapGetters(["userInfo", "ApprovalShow", "useWhere"]),
+ ...mapGetters(["userInfo", "ApprovalShow", "useWhere", "canDoIt"]),
},
created() {
this.cc();
@@ -119,6 +116,13 @@
for (const key in this.dataCard) {
if (this.dataCard[key].type == item.ptype) {
console.log("已申请名称", this.dataCard[key].menuName);
+ console.log("申请状态", this.dataCard[key].type);
+ if (
+ this.dataCard[key].type == 0 ||
+ this.dataCard[key].type == 2
+ ) {
+ this.$store.commit("changecanDoIt", false);
+ }
}
}
});
diff --git a/src/views/home/ourDatas.js b/src/views/home/ourDatas.js
index 5b8a732..1b7c88f 100644
--- a/src/views/home/ourDatas.js
+++ b/src/views/home/ourDatas.js
@@ -26,6 +26,7 @@
// topUrl: "/img/服务许可背景图.jpg",
targetUrl: "per",
type: 0,
+ imgType: 0,
datas: {
htmls: securityPermit,
column: securityPermitcolumn,
@@ -38,6 +39,7 @@
topUrl: "url(/img/login-sq4.png)",
topUrlh: "url(/img/login-sq44.png)",
type: 1,
+ imgType: 1,
datas: {
htmls: securityTraining,
column: securityTrainingcolumn,
@@ -51,6 +53,7 @@
topUrl: "url(/img/login-sq2.png)",
topUrlh: "url(/img/login-sq22.png)",
type: 2,
+ imgType: 2,
datas: {
htmls: branchOffice,
column: branchOfficecolumn,
@@ -64,6 +67,7 @@
topUrl: "url(/img/login-sq3.png)",
topUrlh: "url(/img/login-sq33.png)",
type: 3,
+ imgType: 3,
datas: {
htmls: securityGuard,
column: securityGuardcolumn,
@@ -77,6 +81,7 @@
topUrl: "url(/img/login-sq5.png)",
topUrlh: "url(/img/login-sq55.png)",
type: 4,
+ imgType: 6,
datas: {
htmls: cancellationOfFiling,
column: cancellationOfFilingcolumn,
@@ -89,6 +94,7 @@
topUrl: "url(/img/login-sq10.png)",
topUrlh: "url(/img/login-sq1010.png)",
type: 5,
+ imgType: 7,
datas: {
htmls: crossRegion,
column: crossRegioncolumn,
--
Gitblit v1.9.3