From de85e55178c80e62a7d6ea65602263d87d2f92ef Mon Sep 17 00:00:00 2001
From: tangzy <tangzy123456>
Date: Wed, 14 Jul 2021 09:06:48 +0800
Subject: [PATCH] 许可备案系统
---
src/lang/zh.js | 4
src/api/revoke/revoke.js | 50 +
vue.config.js | 2
public/index.html | 6
src/api/permit/permit.js | 50 +
src/router/views/index.js | 74 +
src/mock/menu.js | 4
src/config/iconList.js | 1
src/views/record/record.vue | 495 ++++++++++
src/views/system/user.vue | 4
src/views/permit/permit.vue | 514 ++++++++++
src/config/env.js | 2
src/views/revoke/revoke.vue | 471 ++++++++++
src/api/recordk/recordk.js | 50 +
src/page/login/userlogin.vue | 4
src/views/resource/attach.vue | 499 +++++----
src/api/record/record.js | 50 +
src/api/resource/attach.js | 4
src/views/recordk/recordk.vue | 493 ++++++++++
19 files changed, 2,538 insertions(+), 239 deletions(-)
diff --git a/public/index.html b/public/index.html
index 9ef8ec6..6722a7d 100644
--- a/public/index.html
+++ b/public/index.html
@@ -19,7 +19,7 @@
<script src="<%= BASE_URL %>cdn/xlsx/FileSaver.min.js"></script>
<script src="<%= BASE_URL %>cdn/xlsx/xlsx.full.min.js"></script>
<link rel="icon" href="<%= BASE_URL %>favicon.png">
- <title>Saber企业级开发平台</title>
+ <title>单位许可和备案系统</title>
<style>
html,
body,
@@ -95,10 +95,10 @@
初次加载资源可能需要较多时间 请耐心等待
</div>
</div>
- <div class="avue-home__footer">
+<!-- <div class="avue-home__footer">
<a href="https://bladex.vip" target="_blank">
https://bladex.vip </a>
- </div>
+ </div>-->
</div>
</div>
<!-- built files will be auto injected -->
diff --git a/src/api/permit/permit.js b/src/api/permit/permit.js
new file mode 100644
index 0000000..74fb84c
--- /dev/null
+++ b/src/api/permit/permit.js
@@ -0,0 +1,50 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+ return request({
+ url: '/api/blade-permit/permit/list',
+ method: 'get',
+ params: {
+ ...params,
+ current,
+ size,
+ }
+ })
+}
+
+export const getDetail = (id) => {
+ return request({
+ url: '/api/blade-permit/permit/detail',
+ method: 'get',
+ params: {
+ id
+ }
+ })
+}
+
+export const remove = (ids) => {
+ return request({
+ url: '/api/blade-permit/permit/remove',
+ method: 'post',
+ params: {
+ ids,
+ }
+ })
+}
+
+export const add = (row) => {
+ return request({
+ url: '/api/blade-permit/permit/save',
+ method: 'post',
+ data: row
+ })
+}
+
+export const update = (row) => {
+ return request({
+ url: '/api/blade-permit/permit/submit',
+ method: 'post',
+ data: row
+ })
+}
+
diff --git a/src/api/record/record.js b/src/api/record/record.js
new file mode 100644
index 0000000..babd692
--- /dev/null
+++ b/src/api/record/record.js
@@ -0,0 +1,50 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+ return request({
+ url: '/api/record/list',
+ method: 'get',
+ params: {
+ ...params,
+ current,
+ size,
+ }
+ })
+}
+
+export const getDetail = (id) => {
+ return request({
+ url: '/api/record/detail',
+ method: 'get',
+ params: {
+ id
+ }
+ })
+}
+
+export const remove = (ids) => {
+ return request({
+ url: '/api/record/remove',
+ method: 'post',
+ params: {
+ ids,
+ }
+ })
+}
+
+export const add = (row) => {
+ return request({
+ url: '/api/record/submit',
+ method: 'post',
+ data: row
+ })
+}
+
+export const update = (row) => {
+ return request({
+ url: '/api/record/submit',
+ method: 'post',
+ data: row
+ })
+}
+
diff --git a/src/api/recordk/recordk.js b/src/api/recordk/recordk.js
new file mode 100644
index 0000000..e7fe5c0
--- /dev/null
+++ b/src/api/recordk/recordk.js
@@ -0,0 +1,50 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+ return request({
+ url: '/api/recordk/list',
+ method: 'get',
+ params: {
+ ...params,
+ current,
+ size,
+ }
+ })
+}
+
+export const getDetail = (id) => {
+ return request({
+ url: '/api/recordk/detail',
+ method: 'get',
+ params: {
+ id
+ }
+ })
+}
+
+export const remove = (ids) => {
+ return request({
+ url: '/api/recordk/remove',
+ method: 'post',
+ params: {
+ ids,
+ }
+ })
+}
+
+export const add = (row) => {
+ return request({
+ url: '/api/recordk/submit',
+ method: 'post',
+ data: row
+ })
+}
+
+export const update = (row) => {
+ return request({
+ url: '/api/recordk/submit',
+ method: 'post',
+ data: row
+ })
+}
+
diff --git a/src/api/resource/attach.js b/src/api/resource/attach.js
index e90ccaf..6b4175f 100644
--- a/src/api/resource/attach.js
+++ b/src/api/resource/attach.js
@@ -1,6 +1,6 @@
import request from '@/router/axios';
-export const getList = (current, size, params) => {
+export const getList = (current, size, params,deptid,type) => {
return request({
url: '/api/blade-resource/attach/list',
method: 'get',
@@ -8,6 +8,8 @@
...params,
current,
size,
+ deptid,
+ type,
}
})
}
diff --git a/src/api/revoke/revoke.js b/src/api/revoke/revoke.js
new file mode 100644
index 0000000..a268a64
--- /dev/null
+++ b/src/api/revoke/revoke.js
@@ -0,0 +1,50 @@
+import request from '@/router/axios';
+
+export const getList = (current, size, params) => {
+ return request({
+ url: '/api/revoke/list',
+ method: 'get',
+ params: {
+ ...params,
+ current,
+ size,
+ }
+ })
+}
+
+export const getDetail = (id) => {
+ return request({
+ url: '/api/revoke/detail',
+ method: 'get',
+ params: {
+ id
+ }
+ })
+}
+
+export const remove = (ids) => {
+ return request({
+ url: '/api/revoke/remove',
+ method: 'post',
+ params: {
+ ids,
+ }
+ })
+}
+
+export const add = (row) => {
+ return request({
+ url: '/api/revoke/submit',
+ method: 'post',
+ data: row
+ })
+}
+
+export const update = (row) => {
+ return request({
+ url: '/api/revoke/submit',
+ method: 'post',
+ data: row
+ })
+}
+
diff --git a/src/config/env.js b/src/config/env.js
index ee7a413..7c4ce1a 100644
--- a/src/config/env.js
+++ b/src/config/env.js
@@ -1,5 +1,5 @@
// 阿里矢量图标库配置
-let iconfontVersion = ['567566_pwc3oottzol','2057093_bptm5k964zj',"2652129_79ej8yw79fo"];
+let iconfontVersion = ['567566_pwc3oottzol','2057093_bptm5k964zj',"2652129_79ej8yw79fo","2057093_wglkjzs6v5j"];
let iconfontUrl = `//at.alicdn.com/t/font_$key.css`;
let baseUrl = '';
diff --git a/src/config/iconList.js b/src/config/iconList.js
index 85ff606..bd15fa0 100644
--- a/src/config/iconList.js
+++ b/src/config/iconList.js
@@ -68,6 +68,7 @@
"iconfont icongitee2",
"iconfont icon-baoan",
"iconfont icon-baoanguanlipad",
+ "iconfont iconsp",
]
},
{
diff --git a/src/lang/zh.js b/src/lang/zh.js
index 948f98f..976f37c 100644
--- a/src/lang/zh.js
+++ b/src/lang/zh.js
@@ -1,6 +1,6 @@
export default {
tip: '提示',
- title: '保安服务企业管理',
+ title: '单位许可和备案系统',
logoutTip: '退出系统, 是否继续?',
submitText: '确定',
cancelText: '取消',
@@ -67,7 +67,7 @@
},
login: {
title: '登录 ',
- info: '保安服务企业管理',
+ info: '单位许可和备案系统',
tenantId: '请输入租户ID',
username: '请输入账号',
password: '请输入密码',
diff --git a/src/mock/menu.js b/src/mock/menu.js
index ce5eaea..54cbd2c 100644
--- a/src/mock/menu.js
+++ b/src/mock/menu.js
@@ -1,8 +1,8 @@
import Mock from 'mockjs'
const top = [{
- label: "首页",
- path: "/wel/index",
+ label: "审办许可申请",
+ path: "/permit/permit",
icon: 'el-icon-menu',
meta: {
i18n: 'dashboard',
diff --git a/src/page/login/userlogin.vue b/src/page/login/userlogin.vue
index 9f369f9..63f477a 100644
--- a/src/page/login/userlogin.vue
+++ b/src/page/login/userlogin.vue
@@ -78,9 +78,9 @@
//租户ID
tenantId: "000000",
//用户名
- username: "admin",
+ username: "hls",
//密码
- password: "admin",
+ password: "hls",
//账号类型
type: "account",
//验证码的值
diff --git a/src/router/views/index.js b/src/router/views/index.js
index 383242e..c70b758 100644
--- a/src/router/views/index.js
+++ b/src/router/views/index.js
@@ -11,7 +11,7 @@
i18n: 'dashboard'
},
component: () =>
- import( /* webpackChunkName: "views" */ '@/views/wel/index')
+ import( /* webpackChunkName: "views" */ '@/views/permit/permit')
}, {
path: 'dashboard',
name: '控制台',
@@ -61,7 +61,77 @@
component: () =>
import( /* webpackChunkName: "views" */ '@/views/util/demo/dict-vertical')
}]
-}, {
+},{
+ path: '/permit',
+ redirect: '/permit/permit',
+ component: Layout,
+ children: [{
+ path: 'index',
+ name: '服务公司申办许可申请',
+ meta: {
+ i18n: 'index',
+ },
+ component: () =>
+ import( /* webpackChunkName: "views" */ '@/views/permit/permit')
+ }]
+},
+ {
+ path: '/record',
+ redirect: '/record/record',
+ component: Layout,
+ children: [{
+ path: 'index',
+ name: '保安单位公司备案',
+ meta: {
+ i18n: 'index',
+ },
+ component: () =>
+ import( /* webpackChunkName: "views" */ '@/views/record/record')
+ }]
+ },
+ {
+ path: '/recordk',
+ redirect: '/recordk/recordk',
+ component: Layout,
+ children: [{
+ path: 'index',
+ name: '跨区域经营备案',
+ meta: {
+ i18n: 'index',
+ },
+ component: () =>
+ import( /* webpackChunkName: "views" */ '@/views/recordk/recordk')
+ }]
+ },
+ {
+ path: '/attach',
+ redirect: '/resource/attach',
+ component: Layout,
+ children: [{
+ path: 'index',
+ name: '附件上传',
+ meta: {
+ i18n: 'index',
+ },
+ component: () =>
+ import( /* webpackChunkName: "views" */ '@/views/resource/attach')
+ }]
+ },
+ {
+ path: '/revoke',
+ redirect: '/revoke/revoke',
+ component: Layout,
+ children: [{
+ path: 'index',
+ name: '自招保安单位备案撤销',
+ meta: {
+ i18n: 'index',
+ },
+ component: () =>
+ import( /* webpackChunkName: "views" */ '@/views/revoke/revoke')
+ }]
+ },
+ {
path: '/info',
component: Layout,
redirect: '/info/index',
diff --git a/src/views/permit/permit.vue b/src/views/permit/permit.vue
new file mode 100644
index 0000000..1833eb0
--- /dev/null
+++ b/src/views/permit/permit.vue
@@ -0,0 +1,514 @@
+<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"
+ :row-style="rowStyle"
+ >
+ <template slot="menuLeft">
+ <el-button type="danger"
+ size="small"
+ icon="el-icon-delete"
+ plain
+ v-if="permission.permit_delete"
+ @click="handleDelete">删 除
+ </el-button>
+ </template>
+ <template slot-scope="{type,size,row}"
+ slot="menu">
+ <el-button icon="icon-zhengjian"
+ :size="size"
+ :type="type"
+ class="zhengJian-icon"
+ @click.stop="handleCredentials(row)">附件上传
+ </el-button>
+ </template>
+ <template class="tdtype" slot-scope="{ row }" slot="type">
+ <el-tag class="dtype">
+ {{
+ row.type == "0" ? "通过" : row.type == "1" ? "不通过":"待审核"
+ }}
+ <i class="gz" v-if="row.type == '0' "></i>
+ <i class="yj" v-if="row.type == '1' "></i>
+ <i class="zc" v-if="row.type == '2' "></i>
+ </el-tag>
+ </template>
+ </avue-crud>
+ </basic-container>
+</template>
+
+<script>
+import {getList, getDetail, add, update, remove} from "@/api/permit/permit";
+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,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 8,
+ labelWidth: 130,
+ headerAlign: 'center',
+ align: 'center',
+ border: true,
+ index: true,
+ viewBtn: true,
+ selection: true,
+ dialogClickModal: false,
+ column: [
+ {
+ label: "社会信用代码",
+ prop: "creditcode",
+ hide: true,
+ rules: [{
+ required: true,
+ message: "请输入统一社会信用代码",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "企业名称",
+ prop: "enterprisename",
+ rules: [{
+ required: true,
+ message: "请输入企业名称",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "法定代表人",
+ prop: "representative",
+ rules: [{
+ required: true,
+ message: "请输入法定代表人",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "成立日期",
+ prop: "establishtime",
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ rules: [{
+ required: true,
+ message: "请输入成立日期",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "注册资本",
+ prop: "registeredcapital",
+ rules: [{
+ required: true,
+ message: "请输入注册资本",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "组织机构代码",
+ prop: "organizationcode",
+ rules: [{
+ required: true,
+ message: "请输入组织机构代码",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "工商注册号",
+ hide: true,
+ prop: "registrationnumber",
+ rules: [{
+ required: true,
+ message: "请输入工商注册号",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "纳税人识别号",
+ prop: "identificationnumber",
+ rules: [{
+ required: true,
+ message: "请输入纳税人识别号",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "企业类型",
+ hide: true,
+ prop: "enterprises",
+ rules: [{
+ required: true,
+ message: "请输入企业类型",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "注册地址",
+ prop: "address",
+ rules: [{
+ required: true,
+ message: "请输入注册地址",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "所属地区",
+ hide: true,
+ prop: "region",
+ rules: [{
+ required: true,
+ message: "请输入所属地区",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "登记机关",
+ prop: "registration",
+ rules: [{
+ required: true,
+ message: "请输入登记机关",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "所属行业",
+ hide: true,
+ prop: "industry",
+ rules: [{
+ required: true,
+ message: "请输入所属行业",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "所属机构",
+ prop: "deptid",
+ addDisplay: false,
+ type: "select",
+ hide: true,
+ dicUrl: "/api/blade-system/dept/selectIn",
+ props: {
+ label: "deptname",
+ value: "deptid"
+ },
+ },
+ {
+ label: "许可类型",
+ prop: "ptype",
+ type: "select",
+ dicData: [
+ {
+ label: "保安服务许可",
+ value: '0'
+ },
+ {
+ label: "保安培训许可",
+ value: '1'
+ },
+ ],
+ },
+ {
+ label: "提交时间",
+ prop: "permitime",
+ addDisplay: false,
+ type: "date",
+ format: "yyyy-MM-dd HH:mm:ss",
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
+ },
+ {
+ label: "审核状态",
+ prop: "type",
+ addDisplay: false,
+ type: "select",
+ dicData: [
+ {
+ label: "通过",
+ value: '0'
+ },
+ {
+ label: "不通过",
+ value: '1'
+ },
+ {
+ label: "待审核",
+ value: '2'
+ }
+ ],
+ },
+ {
+ label: "经营范围",
+ prop: "business",
+ component: 'AvueUeditor',
+ hide: true,
+ minRows: 6,
+ span: 24,
+ rules: [{
+ required: true,
+ message: "请输入经营范围",
+ trigger: "blur"
+ }]
+ },
+
+ ]
+ },
+ data: []
+ };
+ },
+ computed: {
+ ...
+ mapGetters(["permission", "userInfo"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.permit_add, false),
+ viewBtn: this.vaildData(this.permission.permit_view, false),
+ delBtn: this.vaildData(this.permission.permit_delete, false),
+ editBtn: this.vaildData(this.permission.permit_edit, false)
+ };
+ }
+ ,
+ ids() {
+ let ids = [];
+ this.selectionList.forEach(ele => {
+ ids.push(ele.id);
+ });
+ return ids.join(",");
+ }
+ ,
+ }
+ ,
+ // mounted() {
+ // console.log(this.userInfo.dept_id);
+ // },
+ methods: {
+ handleCredentials(row) {
+ this.$router.push({
+ path: "/attach/index",
+ // redirect: { name: "foo" },
+ // query: { row: row },
+ query: {deptid: row.deptid, type: '0'},
+ // params: { row: row.identificationnumber },
+ });
+ },
+ rowSave(row, done, loading) {
+ row.deptid = this.userInfo.dept_id
+ add(row).then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ });
+ done();
+ }, error => {
+ loading();
+ window.console.log(error);
+ });
+ }
+ ,
+ rowUpdate(row, index, done, loading) {
+ update(row).then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ });
+ done();
+ }, 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: "操作成功!"
+ });
+ });
+ }
+ ,
+ 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();
+ });
+ },
+ rowStyle({row}) {
+ if (row.dtype != null && row.dtype != "") {
+ if (row.dtype == '2') {
+ return {
+ color: "#F34A4A"
+ };
+ }
+ if(row.dtype=='1'){
+ return {
+ color: "#F48F57"
+ };
+ }
+
+ }
+ }
+ }
+};
+
+</script>
+
+<style scoped>
+.dtype{
+ width: 80px;
+}
+
+.dx{
+ position: absolute;
+ top: 50%;
+ margin-top: -5px;
+ margin-left: 6px;
+ width: 10px;
+ height: 10px;
+ border-radius: 30%;
+ background: #DFDFDF;
+}
+.zc{
+ position: absolute;
+ top: 50%;
+ margin-top: -5px;
+ margin-left: 6px;
+ width: 10px;
+ height: 10px;
+ border-radius: 30%;
+ background: #29C093;
+}
+.yj{
+ position: absolute;
+ top: 50%;
+ margin-top: -5px;
+ margin-left: 6px;
+ width: 10px;
+ height: 10px;
+ border-radius: 30%;
+ background: #F34A4A;
+}
+.gz{
+ position: absolute;
+ top: 50%;
+ margin-top: -5px;
+ margin-left: 6px;
+ width: 10px;
+ height: 10px;
+ border-radius: 30%;
+ background: #F48F57;
+}
+
+.el-tag{
+ display: inline-block;
+ width: 80px;
+ /*padding-right: 40px !important;*/
+
+}
+</style>
diff --git a/src/views/record/record.vue b/src/views/record/record.vue
new file mode 100644
index 0000000..98a7aed
--- /dev/null
+++ b/src/views/record/record.vue
@@ -0,0 +1,495 @@
+<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">
+ <template slot="menuLeft">
+ <el-button type="danger"
+ size="small"
+ icon="el-icon-delete"
+ plain
+ v-if="permission.record_delete"
+ @click="handleDelete">删 除
+ </el-button>
+ </template>
+ <template slot-scope="{type,size,row}"
+ slot="menu">
+ <el-button icon="icon-zhengjian"
+ :size="size"
+ :type="type"
+ class="zhengJian-icon"
+ @click.stop="handleCredentialsr(row)">附件上传</el-button>
+ </template>
+ <template class="tdtype" slot-scope="{ row }" slot="type">
+ <el-tag class="dtype">
+ {{
+ row.type == "0" ? "通过" : row.type == "1" ? "不通过":"待审核"
+ }}
+ <i class="gz" v-if="row.type == '0' "></i>
+ <i class="yj" v-if="row.type == '1' "></i>
+ <i class="zc" v-if="row.type == '2' "></i>
+ </el-tag>
+ </template>
+ </avue-crud>
+ </basic-container>
+</template>
+
+<script>
+ import {getList, getDetail, add, update, remove} from "@/api/record/record";
+ 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,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ labelWidth:130,
+ border: true,
+ index: true,
+ viewBtn: true,
+ selection: true,
+ dialogClickModal: false,
+ column: [
+ {
+ label: "社会信用代码",
+ prop: "creditcode",
+ hide: true,
+ rules: [{
+ required: true,
+ message: "请输入统一社会信用代码",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "企业名称",
+ prop: "enterprisename",
+ rules: [{
+ required: true,
+ message: "请输入企业名称",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "法定代表人",
+ prop: "representative",
+ rules: [{
+ required: true,
+ message: "请输入法定代表人",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "成立日期",
+ prop: "establishtime",
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ rules: [{
+ required: true,
+ message: "请输入成立日期",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "注册资本",
+ prop: "registeredcapital",
+ rules: [{
+ required: true,
+ message: "请输入注册资本",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "组织机构代码",
+ prop: "organizationcode",
+ hide:true,
+ rules: [{
+ required: true,
+ message: "请输入组织机构代码",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "工商注册号",
+ prop: "registrationnumber",
+ rules: [{
+ required: true,
+ message: "请输入工商注册号",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "纳税人识别号",
+ hide:true,
+ prop: "identificationnumber",
+ rules: [{
+ required: true,
+ message: "请输入纳税人识别号",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "企业类型",
+ prop: "enterprises",
+ rules: [{
+ required: true,
+ message: "请输入企业类型",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "注册地址",
+ prop: "address",
+ rules: [{
+ required: true,
+ message: "请输入注册地址",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "所属地区",
+ prop: "region",
+ rules: [{
+ required: true,
+ message: "请输入所属地区",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "登记机关",
+ prop: "registration",
+ rules: [{
+ required: true,
+ message: "请输入登记机关",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "所属行业",
+ prop: "industry",
+ rules: [{
+ required: true,
+ message: "请输入所属行业",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "所属机构",
+ prop: "deptid",
+ type: "select",
+ hide: true,
+ dicUrl: "/api/blade-system/dept/selectIn",
+ props: {
+ label: "deptname",
+ value: "deptid"
+ },
+ },
+
+ {
+ label: "单位许可编号",
+ hide:true,
+ prop: "perid",
+ rules: [{
+ required: true,
+ message: "请输入服务单位许可编号",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "许可发证机关",
+ prop: "offices",
+ rules: [{
+ required: true,
+ message: "请输入许可发证机关",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "发证时间",
+ prop: "officetime",
+ type: "date",
+ format: "yyyy-MM-dd HH:mm:ss",
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
+ rules: [{
+ required: true,
+ message: "请输入发证时间",
+ trigger: "blur"
+ }]
+ },
+
+ {
+ label: "审核状态",
+ prop: "type",
+ addDisplay:false,
+ type: "select",
+ dicData: [
+ {
+ label: "通过",
+ value: '0'
+ },
+ {
+ label: "不通过",
+ value: '1'
+ },
+ {
+ label: "待审核",
+ value: '2'
+ }
+ ],
+ },
+ {
+ label: "经营范围",
+ prop: "business",
+ component: 'AvueUeditor',
+ hide: true,
+ minRows: 6,
+ span: 24,
+ rules: [{
+ required: true,
+ message: "请输入经营范围",
+ trigger: "blur"
+ }]
+ },
+ ]
+ },
+ data: []
+ };
+ },
+ computed: {
+ ...mapGetters(["permission"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.record_add, false),
+ viewBtn: this.vaildData(this.permission.record_view, false),
+ delBtn: this.vaildData(this.permission.record_delete, false),
+ editBtn: this.vaildData(this.permission.record_edit, false)
+ };
+ },
+ ids() {
+ let ids = [];
+ this.selectionList.forEach(ele => {
+ ids.push(ele.id);
+ });
+ return ids.join(",");
+ }
+ },
+ methods: {
+ handleCredentialsr(row) {
+ this.$router.push({
+ path: "/attach/index",
+ // redirect: { name: "foo" },
+ // query: { row: row },
+ query: {deptid: row.deptid, type: '1'},
+ // params: { row: row.identificationnumber },
+ });
+ },
+ rowSave(row, done, loading) {
+ row.deptid = this.userInfo.dept_id
+ add(row).then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ });
+ done();
+ }, error => {
+ loading();
+ window.console.log(error);
+ });
+ },
+ rowUpdate(row, index, done, loading) {
+ update(row).then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ });
+ done();
+ }, 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: "操作成功!"
+ });
+ });
+ },
+ 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();
+ });
+ },
+ rowStyle({row, column, rowIndex}) {
+ if (row.dtype != null && row.dtype != "") {
+ if (row.dtype == '2') {
+ return {
+ color: "#F34A4A"
+ };
+ }
+ if(row.dtype=='1'){
+ return {
+ color: "#F48F57"
+ };
+ }
+
+ }
+ }
+ }
+ };
+</script>
+
+<style scoped>
+.dtype{
+ width: 80px;
+}
+
+.dx{
+ position: absolute;
+ top: 50%;
+ margin-top: -5px;
+ margin-left: 6px;
+ width: 10px;
+ height: 10px;
+ border-radius: 30%;
+ background: #DFDFDF;
+}
+.zc{
+ position: absolute;
+ top: 50%;
+ margin-top: -5px;
+ margin-left: 6px;
+ width: 10px;
+ height: 10px;
+ border-radius: 30%;
+ background: #29C093;
+}
+.yj{
+ position: absolute;
+ top: 50%;
+ margin-top: -5px;
+ margin-left: 6px;
+ width: 10px;
+ height: 10px;
+ border-radius: 30%;
+ background: #F34A4A;
+}
+.gz{
+ position: absolute;
+ top: 50%;
+ margin-top: -5px;
+ margin-left: 6px;
+ width: 10px;
+ height: 10px;
+ border-radius: 30%;
+ background: #F48F57;
+}
+
+.el-tag{
+ display: inline-block;
+ width: 80px;
+ /*padding-right: 40px !important;*/
+
+}
+</style>
diff --git a/src/views/recordk/recordk.vue b/src/views/recordk/recordk.vue
new file mode 100644
index 0000000..db61335
--- /dev/null
+++ b/src/views/recordk/recordk.vue
@@ -0,0 +1,493 @@
+<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"
+ :row-style="rowStyle"
+ >
+ <template slot="menuLeft">
+ <el-button type="danger"
+ size="small"
+ icon="el-icon-delete"
+ plain
+ v-if="permission.recordk_delete"
+ @click="handleDelete">删 除
+ </el-button>
+ </template>
+ <template slot-scope="{type,size,row}"
+ slot="menu">
+ <el-button icon="icon-zhengjian"
+ :size="size"
+ :type="type"
+ class="zhengJian-icon"
+ @click.stop="handleCredentials(row)">附件上传</el-button>
+ </template>
+ <template class="tdtype" slot-scope="{ row }" slot="type">
+ <el-tag class="dtype">
+ {{
+ row.type == "0" ? "通过" : row.type == "1" ? "不通过":"待审核"
+ }}
+ <i class="gz" v-if="row.type == '0' "></i>
+ <i class="yj" v-if="row.type == '1' "></i>
+ <i class="zc" v-if="row.type == '2' "></i>
+ </el-tag>
+ </template>
+ </avue-crud>
+ </basic-container>
+</template>
+
+<script>
+ import {getList, getDetail, add, update, remove} from "@/api/recordk/recordk";
+ 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,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ border: true,
+ index: true,
+ viewBtn: true,
+ labelWidth:130,
+ selection: true,
+ dialogClickModal: false,
+ column: [
+ {
+ label: "社会信用代码",
+ prop: "creditcode",
+ rules: [{
+ required: true,
+ message: "请输入统一社会信用代码",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "企业名称",
+ prop: "enterprisename",
+ rules: [{
+ required: true,
+ message: "请输入企业名称",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "法定代表人",
+ prop: "representative",
+ rules: [{
+ required: true,
+ message: "请输入法定代表人",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "成立日期",
+ prop: "establishtime",
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ rules: [{
+ required: true,
+ message: "请输入成立日期",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "注册资本",
+ prop: "registeredcapital",
+ rules: [{
+ required: true,
+ message: "请输入注册资本",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "组织机构代码",
+ hide: true,
+ prop: "organizationcode",
+ rules: [{
+ required: true,
+ message: "请输入组织机构代码",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "工商注册号",
+ prop: "registrationnumber",
+ rules: [{
+ required: true,
+ message: "请输入工商注册号",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "纳税人识别号",
+ prop: "identificationnumber",
+ hide: true,
+ rules: [{
+ required: true,
+ message: "请输入纳税人识别号",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "企业类型",
+ prop: "enterprises",
+ rules: [{
+ required: true,
+ message: "请输入企业类型",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "注册地址",
+ prop: "address",
+ rules: [{
+ required: true,
+ message: "请输入注册地址",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "所属地区",
+ prop: "region",
+ rules: [{
+ required: true,
+ message: "请输入所属地区",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "所属机构",
+ prop: "deptid",
+ type: "select",
+ hide: true,
+ dicUrl: "/api/blade-system/dept/selectIn",
+ props: {
+ label: "deptname",
+ value: "deptid"
+ },
+ },
+ {
+ label: "登记机关",
+ prop: "registration",
+ rules: [{
+ required: true,
+ message: "请输入登记机关",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "所属行业",
+ prop: "industry",
+ rules: [{
+ required: true,
+ message: "请输入所属行业",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "经营范围",
+ prop: "business",
+ component: 'AvueUeditor',
+ hide: true,
+ minRows: 6,
+ span: 24,
+ rules: [{
+ required: true,
+ message: "请输入经营范围",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "服务单位许可编号",
+ prop: "perid",
+ rules: [{
+ required: true,
+ message: "请输入服务单位许可编号",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "许可发证机关",
+ prop: "offices",
+ rules: [{
+ required: true,
+ message: "请输入许可发证机关",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "发证时间",
+ prop: "officetime",
+ type: "date",
+ format: "yyyy-MM-dd HH:mm:ss",
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
+ rules: [{
+ required: true,
+ message: "请输入发证时间",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "审核状态",
+ prop: "type",
+ addDisplay:false,
+ type: "select",
+ dicData: [
+ {
+ label: "通过",
+ value: '0'
+ },
+ {
+ label: "不通过",
+ value: '1'
+ },
+ {
+ label: "待审核",
+ value: '2'
+ }
+ ],
+ },
+ ]
+ },
+ data: []
+ };
+ },
+ computed: {
+ ...mapGetters(["permission"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.recordk_add, false),
+ viewBtn: this.vaildData(this.permission.recordk_view, false),
+ delBtn: this.vaildData(this.permission.recordk_delete, false),
+ editBtn: this.vaildData(this.permission.recordk_edit, false)
+ };
+ },
+ ids() {
+ let ids = [];
+ this.selectionList.forEach(ele => {
+ ids.push(ele.id);
+ });
+ return ids.join(",");
+ }
+ },
+ methods: {
+ handleCredentials(row) {
+ this.$router.push({
+ path: "/attach/index",
+ // redirect: { name: "foo" },
+ // query: { row: row },
+ query: {deptid: row.deptid, type: '3'},
+ // params: { row: row.identificationnumber },
+ });
+ },
+ rowSave(row, done, loading) {
+ row.deptid = this.userInfo.dept_id
+ add(row).then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ });
+ done();
+ }, error => {
+ loading();
+ window.console.log(error);
+ });
+ },
+ rowUpdate(row, index, done, loading) {
+ update(row).then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ });
+ done();
+ }, 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: "操作成功!"
+ });
+ });
+ },
+ 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();
+ });
+ },
+ rowStyle({row, column, rowIndex}) {
+ if (row.dtype != null && row.dtype != "") {
+ if (row.dtype == '2') {
+ return {
+ color: "#F34A4A"
+ };
+ }
+ if(row.dtype=='1'){
+ return {
+ color: "#F48F57"
+ };
+ }
+
+ }
+ }
+ }
+ };
+</script>
+
+<style scoped>
+.dtype{
+ width: 80px;
+}
+
+.dx{
+ position: absolute;
+ top: 50%;
+ margin-top: -5px;
+ margin-left: 6px;
+ width: 10px;
+ height: 10px;
+ border-radius: 30%;
+ background: #DFDFDF;
+}
+.zc{
+ position: absolute;
+ top: 50%;
+ margin-top: -5px;
+ margin-left: 6px;
+ width: 10px;
+ height: 10px;
+ border-radius: 30%;
+ background: #29C093;
+}
+.yj{
+ position: absolute;
+ top: 50%;
+ margin-top: -5px;
+ margin-left: 6px;
+ width: 10px;
+ height: 10px;
+ border-radius: 30%;
+ background: #F34A4A;
+}
+.gz{
+ position: absolute;
+ top: 50%;
+ margin-top: -5px;
+ margin-left: 6px;
+ width: 10px;
+ height: 10px;
+ border-radius: 30%;
+ background: #F48F57;
+}
+
+.el-tag{
+ display: inline-block;
+ width: 80px;
+ /*padding-right: 40px !important;*/
+
+}
+</style>
diff --git a/src/views/resource/attach.vue b/src/views/resource/attach.vue
index fa180b6..7dfbf4d 100644
--- a/src/views/resource/attach.vue
+++ b/src/views/resource/attach.vue
@@ -20,7 +20,6 @@
<el-button type="primary"
size="small"
plain
- v-if="permission.attach_upload"
icon="el-icon-upload2"
@click="handleUpload">上 传
</el-button>
@@ -28,7 +27,6 @@
size="small"
icon="el-icon-delete"
plain
- v-if="permission.attach_delete"
@click="handleDelete">删 除
</el-button>
</template>
@@ -36,13 +34,12 @@
<el-button type="text"
icon="el-icon-download"
size="small"
- v-if="permission.attach_download"
@click="handleDownload(scope.row)">下载
</el-button>
</template>
<template slot-scope="{row}"
slot="attachSize">
- <el-tag>{{`${row.attachSize} KB`}}</el-tag>
+ <el-tag>{{ `${row.attachSize} KB` }}</el-tag>
</template>
</avue-crud>
<el-dialog title="附件管理"
@@ -56,232 +53,288 @@
</template>
<script>
- import {getList, getDetail, remove} from "@/api/resource/attach";
- import {mapGetters} from "vuex";
+import {getList, getDetail, remove} from "@/api/resource/attach";
+import {mapGetters} from "vuex";
- export default {
- data() {
- return {
- form: {},
- query: {},
- loading: true,
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- attachBox: false,
- 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: "link",
- rules: [{
- required: true,
- message: "请输入附件地址",
- trigger: "blur"
- }]
+export default {
+ data() {
+ return {
+ form: {},
+ query: {},
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0
+ },
+ attachBox: false,
+ 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: "link",
+ rules: [{
+ required: true,
+ message: "请输入附件地址",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "附件域名",
+ prop: "domain",
+ search: true,
+ rules: [{
+ required: true,
+ message: "请输入附件域名",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "附件名称",
+ prop: "name",
+ search: true,
+ rules: [{
+ required: true,
+ message: "请输入附件名称",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "附件原名",
+ prop: "originalName",
+ search: true,
+ rules: [{
+ required: true,
+ message: "请输入附件原名",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "附件拓展名",
+ prop: "extension",
+ rules: [{
+ required: true,
+ message: "请输入附件拓展名",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "附件大小",
+ prop: "attachSize",
+ slot: true,
+ rules: [{
+ required: true,
+ message: "请输入附件大小",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "所属机构",
+ prop: "deptid",
+ type: "select",
+ dicUrl: "/api/blade-system/dept/selectIn",
+ props: {
+ label: "deptname",
+ value: "deptid"
},
- {
- label: "附件域名",
- prop: "domain",
- search: true,
- rules: [{
- required: true,
- message: "请输入附件域名",
- trigger: "blur"
- }]
- },
- {
- label: "附件名称",
- prop: "name",
- search: true,
- rules: [{
- required: true,
- message: "请输入附件名称",
- trigger: "blur"
- }]
- },
- {
- label: "附件原名",
- prop: "originalName",
- search: true,
- rules: [{
- required: true,
- message: "请输入附件原名",
- trigger: "blur"
- }]
- },
- {
- label: "附件拓展名",
- prop: "extension",
- rules: [{
- required: true,
- message: "请输入附件拓展名",
- trigger: "blur"
- }]
- },
- {
- label: "附件大小",
- prop: "attachSize",
- slot: true,
- rules: [{
- required: true,
- message: "请输入附件大小",
- trigger: "blur"
- }]
- },
- ]
- },
- data: [],
- attachForm: {},
- attachOption: {
- submitBtn: false,
- emptyBtn: false,
- column: [
- {
- label: '附件上传',
- prop: 'attachFile',
- type: 'upload',
- drag: true,
- loadText: '模板上传中,请稍等',
- span: 24,
- propsHttp: {
- res: 'data'
+ },
+ {
+ label: "类型",
+ prop: "type",
+ addDisplay: false,
+ type: "select",
+ dicData: [
+ {
+ label: "许可审批",
+ value: '0'
},
- action: "/api/blade-resource/oss/endpoint/put-file-attach"
- }
- ]
+ {
+ label: "备案",
+ value: '1'
+ },
+ {
+ label: "撤销",
+ value: '2'
+ },
+ {
+ label: "跨区备案",
+ value: '3'
+ }
+ ],
+ },
+ ]
+ },
+ data: [],
+ attachForm: {},
+ attachOption: {
+ submitBtn: false,
+ emptyBtn: false,
+ column: [
+ {
+ label: '附件上传',
+ prop: 'attachFile',
+ type: 'upload',
+ drag: true,
+ loadText: '模板上传中,请稍等',
+ span: 24,
+ propsHttp: {
+ res: 'data'
+ },
+ action: "/api/blade-resource/oss/endpoint/put-file-attach?deptid="
+ }
+ ]
+ }
+ };
+ },
+ created() {
+ var flag = false,i=0,ind=null
+ this.$store.state.tags.tagList.forEach((item,index)=>{
+ if(item.label=="附件上传"){
+ if(flag==false){
+ ind=index
+ flag=true
}
+ i++
+ }
+ })
+ if(i>1){
+ this.$store.state.tags.tagList.splice(ind,1)
+
+ }
+ var deptid = this.$route.query.deptid;
+ var type = this.$route.query.type;
+ this.attachOption.column[0].action += deptid + "&type=" + type
+ },
+ computed: {
+ ...mapGetters(["permission"]),
+ permissionList() {
+ return {
+
+ addBtn: false,
+ editBtn: false,
+ viewBtn: false,
+ delBtn: this.vaildData(this.permission.attach_delete, false)
};
},
- computed: {
- ...mapGetters(["permission"]),
- permissionList() {
- return {
- addBtn: false,
- editBtn: false,
- viewBtn: false,
- delBtn: this.vaildData(this.permission.attach_delete, false)
- };
- },
- ids() {
- let ids = [];
- this.selectionList.forEach(ele => {
- ids.push(ele.id);
- });
- return ids.join(",");
- }
- },
- methods: {
- handleUpload() {
- this.attachBox = true;
- },
- uploadAfter(res, done, loading, column) {
- window.console.log(column);
- this.attachBox = false;
- this.refreshChange();
- done();
- },
- handleDownload(row) {
- window.open(`${row.link}`);
- },
- rowDel(row) {
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning"
- })
- .then(() => {
- return remove(row.id);
- })
- .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();
- });
- }
+ ids() {
+ let ids = [];
+ this.selectionList.forEach(ele => {
+ ids.push(ele.id);
+ });
+ return ids.join(",");
}
- };
+ },
+ methods: {
+ handleUpload() {
+ this.attachBox = true;
+ },
+ uploadAfter(res, done, loading, column) {
+ window.console.log(column);
+ this.attachBox = false;
+ this.refreshChange();
+ done();
+ },
+ handleDownload(row) {
+ window.open(`${row.link}`);
+ },
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning"
+ })
+ .then(() => {
+ return remove(row.id);
+ })
+ .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;
+ console.log(params)
+ getList(page.currentPage, page.pageSize, Object.assign(params, this.query),this.$route.query.deptid,this.$route.query.type).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/revoke/revoke.vue b/src/views/revoke/revoke.vue
new file mode 100644
index 0000000..b28fbf1
--- /dev/null
+++ b/src/views/revoke/revoke.vue
@@ -0,0 +1,471 @@
+<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">
+ <template slot="menuLeft">
+ <el-button type="danger"
+ size="small"
+ icon="el-icon-delete"
+ plain
+ v-if="permission.revoke_delete"
+ @click="handleDelete">删 除
+ </el-button>
+ </template>
+ <template slot-scope="{type,size,row}"
+ slot="menu">
+ <el-button icon="icon-zhengjian"
+ :size="size"
+ :type="type"
+ class="zhengJian-icon"
+ @click.stop="handleCredentials(row)">附件上传</el-button>
+ </template>
+ <template class="tdtype" slot-scope="{ row }" slot="type">
+ <el-tag class="dtype">
+ {{
+ row.type == "0" ? "已撤销" : row.type == "1" ? "未撤销":"待撤销"
+ }}
+ <i class="gz" v-if="row.type == '0' "></i>
+ <i class="yj" v-if="row.type == '1' "></i>
+ <i class="zc" v-if="row.type == '2' "></i>
+ </el-tag>
+ </template>
+ </avue-crud>
+ </basic-container>
+</template>
+
+<script>
+ import {getList, getDetail, add, update, remove} from "@/api/revoke/revoke";
+ 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,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 6,
+ border: true,
+ index: true,
+ viewBtn: true,
+ labelWidth:130,
+ selection: true,
+ dialogClickModal: false,
+ column: [
+ {
+ label: "社会信用代码",
+ prop: "creditcode",
+ hide: true,
+ rules: [{
+ required: true,
+ message: "请输入统一社会信用代码",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "企业名称",
+ prop: "enterprisename",
+ rules: [{
+ required: true,
+ message: "请输入企业名称",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "法定代表人",
+ prop: "representative",
+ rules: [{
+ required: true,
+ message: "请输入法定代表人",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "成立日期",
+ prop: "establishtime",
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ rules: [{
+ required: true,
+ message: "请输入成立日期",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "注册资本",
+ prop: "registeredcapital",
+ rules: [{
+ required: true,
+ message: "请输入注册资本",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "组织机构代码",
+ prop: "organizationcode",
+ rules: [{
+ required: true,
+ message: "请输入组织机构代码",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "工商注册号",
+ prop: "registrationnumber",
+ hide: true,
+ rules: [{
+ required: true,
+ message: "请输入工商注册号",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "纳税人识别号",
+ prop: "identificationnumber",
+ hide: true,
+ rules: [{
+ required: true,
+ message: "请输入纳税人识别号",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "企业类型",
+ prop: "enterprises",
+ rules: [{
+ required: true,
+ message: "请输入企业类型",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "注册地址",
+ prop: "address",
+ rules: [{
+ required: true,
+ message: "请输入注册地址",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "所属地区",
+ prop: "region",
+ rules: [{
+ required: true,
+ message: "请输入所属地区",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "登记机关",
+ prop: "registration",
+ rules: [{
+ required: true,
+ message: "请输入登记机关",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "所属行业",
+ prop: "industry",
+ rules: [{
+ required: true,
+ message: "请输入所属行业",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "所属机构",
+ prop: "deptid",
+ type: "select",
+ hide: true,
+ dicUrl: "/api/blade-system/dept/selectIn",
+ props: {
+ label: "deptname",
+ value: "deptid"
+ },
+ },
+ {
+ label: "撤销原因",
+ prop: "reason",
+ rules: [{
+ required: true,
+ message: "请输入撤销原因",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "审核状态",
+ prop: "type",
+ addDisplay:false,
+ type: "select",
+ dicData: [
+ {
+ label: "已撤销",
+ value: '0'
+ },
+ {
+ label: "未撤销",
+ value: '1'
+ },
+ {
+ label: "待撤销",
+ value: '2'
+ }
+ ],
+ },
+ {
+ label: "经营范围",
+ prop: "business",
+ component: 'AvueUeditor',
+ hide: true,
+ minRows: 6,
+ span: 24,
+ rules: [{
+ required: true,
+ message: "请输入经营范围",
+ trigger: "blur"
+ }]
+ },
+ ]
+ },
+ data: []
+ };
+ },
+ computed: {
+ ...mapGetters(["permission"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.revoke_add, false),
+ viewBtn: this.vaildData(this.permission.revoke_view, false),
+ delBtn: this.vaildData(this.permission.revoke_delete, false),
+ editBtn: this.vaildData(this.permission.revoke_edit, false)
+ };
+ },
+ ids() {
+ let ids = [];
+ this.selectionList.forEach(ele => {
+ ids.push(ele.id);
+ });
+ return ids.join(",");
+ }
+ },
+ methods: {
+ handleCredentials(row) {
+ this.$router.push({
+ path: "/attach/index",
+ // redirect: { name: "foo" },
+ // query: { row: row },
+ query: {deptid: row.deptid, type: '0'},
+ // params: { row: row.identificationnumber },
+ });
+ },
+ rowSave(row, done, loading) {
+ row.deptid = this.userInfo.dept_id
+ add(row).then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ });
+ done();
+ }, error => {
+ loading();
+ window.console.log(error);
+ });
+ },
+ rowUpdate(row, index, done, loading) {
+ update(row).then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ });
+ done();
+ }, 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: "操作成功!"
+ });
+ });
+ },
+ 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();
+ });
+ }
+ },
+ rowStyle({row, column, rowIndex}) {
+ if (row.dtype != null && row.dtype != "") {
+ if (row.dtype == '2') {
+ return {
+ color: "#F34A4A"
+ };
+ }
+ if(row.dtype=='1'){
+ return {
+ color: "#F48F57"
+ };
+ }
+
+ }
+ }
+ };
+</script>
+
+<style scoped>
+.dtype{
+ width: 80px;
+}
+
+.dx{
+ position: absolute;
+ top: 50%;
+ margin-top: -5px;
+ margin-left: 6px;
+ width: 10px;
+ height: 10px;
+ border-radius: 30%;
+ background: #DFDFDF;
+}
+.zc{
+ position: absolute;
+ top: 50%;
+ margin-top: -5px;
+ margin-left: 6px;
+ width: 10px;
+ height: 10px;
+ border-radius: 30%;
+ background: #29C093;
+}
+.yj{
+ position: absolute;
+ top: 50%;
+ margin-top: -5px;
+ margin-left: 6px;
+ width: 10px;
+ height: 10px;
+ border-radius: 30%;
+ background: #F34A4A;
+}
+.gz{
+ position: absolute;
+ top: 50%;
+ margin-top: -5px;
+ margin-left: 6px;
+ width: 10px;
+ height: 10px;
+ border-radius: 30%;
+ background: #F48F57;
+}
+
+.el-tag{
+ display: inline-block;
+ width: 80px;
+ /*padding-right: 40px !important;*/
+
+}
+</style>
diff --git a/src/views/system/user.vue b/src/views/system/user.vue
index 0e50af3..03b32e1 100644
--- a/src/views/system/user.vue
+++ b/src/views/system/user.vue
@@ -272,7 +272,7 @@
display: false
},
{
- label: "所属租户",
+ label: "所属机构",
prop: "tenantName",
slot: true,
display: false
@@ -290,7 +290,7 @@
display: false
},
{
- label: "所属部门",
+ label: "所属单位",
prop: "deptName",
slot: true,
display: false
diff --git a/vue.config.js b/vue.config.js
index a3ad8ef..1742295 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -26,7 +26,7 @@
proxy: {
'/api': {
//本地服务接口地址
- target: 'http://localhost',
+ target: 'http://localhost:81',
//远程演示服务地址,可用于直接启动项目
//target: 'https://saber.bladex.vip/api',
ws: true,
--
Gitblit v1.9.3