From ec59ab15df819e21a73435b7522b51982a3b4ca5 Mon Sep 17 00:00:00 2001
From: Lou <luzhiping@qqyjz.com>
Date: Sat, 20 Jan 2024 17:37:13 +0800
Subject: [PATCH] merge
---
src/config/website.js | 3
src/page/login/index.vue | 15
src/views/article/discussionManage.vue | 1442 +++++++-------
src/page/login/tenement.vue | 157 +
src/views/wel/index.vue | 11
vue.config.js | 8
package-lock.json | 24
src/styles/login.scss | 10
src/views/work/process/maintenanceFundApply/handle.vue | 739 +++---
src/views/property/propertyCompany.vue | 3
src/views/place/components/baseAllInfo.vue | 49
src/router/avue-router.js | 171
src/store/modules/common.js | 73
src/views/property/propertyCapitalApply.vue | 947 ++++----
src/store/getters.js | 65
src/views/place/index.vue | 6
src/views/property/components/propertyEdit.vue | 10
src/router/page/index.js | 123
src/views/work/process/maintenanceFundApply/detail.vue | 2
src/views/system/dept.vue | 2
public/index.html | 212 +-
src/views/cGovernance/reportForRepairs.vue | 899 ++++++++
src/views/authority/role.vue | 665 +++---
src/page/index/logo.vue | 124
src/views/work/process/maintenanceFundApply/edit.vue | 2
src/lang/en.js | 198
src/views/work/process/maintenanceFundApply/form.vue | 2
src/views/grid/gridman.vue | 4
src/page/index/top/index.vue | 10
29 files changed, 3,567 insertions(+), 2,409 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 67f597b..e736bfe 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -5484,7 +5484,11 @@
},
"node_modules/echarts": {
"version": "5.4.3",
+<<<<<<< HEAD
"resolved": "https://registry.npmjs.org/echarts/-/echarts-5.4.3.tgz",
+=======
+ "resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.4.3.tgz",
+>>>>>>> 7777a40af5210dce0abe07360a48042b1bc8d264
"integrity": "sha512-mYKxLxhzy6zyTi/FaEbJMOZU1ULGEQHaeIeuMR5L+JnJTpz+YR03mnnpBhbR4+UYJAgiXgpyTVLffPAjOTLkZA==",
"dependencies": {
"tslib": "2.3.0",
@@ -14957,7 +14961,11 @@
},
"node_modules/tslib": {
"version": "2.3.0",
+<<<<<<< HEAD
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz",
+=======
+ "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
+>>>>>>> 7777a40af5210dce0abe07360a48042b1bc8d264
"integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
},
"node_modules/tty-browserify": {
@@ -16911,7 +16919,11 @@
},
"node_modules/zrender": {
"version": "5.4.4",
+<<<<<<< HEAD
"resolved": "https://registry.npmjs.org/zrender/-/zrender-5.4.4.tgz",
+=======
+ "resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.4.4.tgz",
+>>>>>>> 7777a40af5210dce0abe07360a48042b1bc8d264
"integrity": "sha512-0VxCNJ7AGOMCWeHVyTrGzUgrK4asT4ml9PEkeGirAkKNYXYzoPJCLvmyfdoOXcjTHPs10OZVMfD1Rwg16AZyYw==",
"dependencies": {
"tslib": "2.3.0"
@@ -21353,7 +21365,11 @@
},
"echarts": {
"version": "5.4.3",
+<<<<<<< HEAD
"resolved": "https://registry.npmjs.org/echarts/-/echarts-5.4.3.tgz",
+=======
+ "resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.4.3.tgz",
+>>>>>>> 7777a40af5210dce0abe07360a48042b1bc8d264
"integrity": "sha512-mYKxLxhzy6zyTi/FaEbJMOZU1ULGEQHaeIeuMR5L+JnJTpz+YR03mnnpBhbR4+UYJAgiXgpyTVLffPAjOTLkZA==",
"requires": {
"tslib": "2.3.0",
@@ -29241,7 +29257,11 @@
},
"tslib": {
"version": "2.3.0",
+<<<<<<< HEAD
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.0.tgz",
+=======
+ "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
+>>>>>>> 7777a40af5210dce0abe07360a48042b1bc8d264
"integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
},
"tty-browserify": {
@@ -30861,7 +30881,11 @@
},
"zrender": {
"version": "5.4.4",
+<<<<<<< HEAD
"resolved": "https://registry.npmjs.org/zrender/-/zrender-5.4.4.tgz",
+=======
+ "resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.4.4.tgz",
+>>>>>>> 7777a40af5210dce0abe07360a48042b1bc8d264
"integrity": "sha512-0VxCNJ7AGOMCWeHVyTrGzUgrK4asT4ml9PEkeGirAkKNYXYzoPJCLvmyfdoOXcjTHPs10OZVMfD1Rwg16AZyYw==",
"requires": {
"tslib": "2.3.0"
diff --git a/public/index.html b/public/index.html
index 89d4858..d6a4965 100644
--- a/public/index.html
+++ b/public/index.html
@@ -2,124 +2,124 @@
<html>
<head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta http-equiv="X-UA-Compatible" content="chrome=1"/>
- <meta name="renderer" content="webkit">
- <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black">
- <meta name="format-detection" content="telephone=no">
- <link rel="stylesheet" href="<%= BASE_URL %>cdn/element-ui/2.15.6/theme-chalk/index.css">
- <link rel="stylesheet" href="<%= BASE_URL %>cdn/animate/3.5.2/animate.css">
- <link rel="stylesheet" href="<%= BASE_URL %>cdn/iconfont/index.css">
- <link rel="stylesheet" href="<%= BASE_URL %>cdn/iconfont/avue/iconfont.css">
- <link rel="stylesheet" href="<%= BASE_URL %>cdn/iconfont/saber/iconfont.css">
- <link rel="stylesheet" href="<%= BASE_URL %>cdn/avue/2.10.16/index.css">
- <script src="<%= BASE_URL %>cdn/xlsx/FileSaver.min.js"></script>
- <script src="<%= BASE_URL %>cdn/xlsx/xlsx.full.min.js"></script>
- <!-- AvueMap-begin-->
- <script>
- window._AMapSecurityConfig = {
- securityJsCode: '5c569caedb31676fc64da5be4c5e8cee',
- }
- </script>
- <script type="text/javascript" src='https://webapi.amap.com/maps?v=1.4.11&key=fce315b8c816ec06755a523ccae9922d&plugin=AMap.PlaceSearch'></script>
- <script src="https://webapi.amap.com/ui/1.0/main.js?v=1.0.11"></script>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta http-equiv="X-UA-Compatible" content="chrome=1" />
+ <meta name="renderer" content="webkit">
+ <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0">
+ <meta name="apple-mobile-web-app-capable" content="yes">
+ <meta name="apple-mobile-web-app-status-bar-style" content="black">
+ <meta name="format-detection" content="telephone=no">
+ <link rel="stylesheet" href="<%= BASE_URL %>cdn/element-ui/2.15.6/theme-chalk/index.css">
+ <link rel="stylesheet" href="<%= BASE_URL %>cdn/animate/3.5.2/animate.css">
+ <link rel="stylesheet" href="<%= BASE_URL %>cdn/iconfont/index.css">
+ <link rel="stylesheet" href="<%= BASE_URL %>cdn/iconfont/avue/iconfont.css">
+ <link rel="stylesheet" href="<%= BASE_URL %>cdn/iconfont/saber/iconfont.css">
+ <link rel="stylesheet" href="<%= BASE_URL %>cdn/avue/2.10.16/index.css">
+ <script src="<%= BASE_URL %>cdn/xlsx/FileSaver.min.js"></script>
+ <script src="<%= BASE_URL %>cdn/xlsx/xlsx.full.min.js"></script>
+ <!-- AvueMap-begin-->
+ <script>
+ window._AMapSecurityConfig={
+ securityJsCode: '5c569caedb31676fc64da5be4c5e8cee',
+ }
+ </script>
+ <script type="text/javascript"
+ src='https://webapi.amap.com/maps?v=1.4.11&key=fce315b8c816ec06755a523ccae9922d&plugin=AMap.PlaceSearch'></script>
+ <script src="https://webapi.amap.com/ui/1.0/main.js?v=1.0.11"></script>
<!-- AvueMap-end-->
- <link rel="icon" href="<%= BASE_URL %>favicon.png">
- <title>基层智治综合协同平台</title>
+ <link rel="icon" href="<%= BASE_URL %>favicon.png">
- <style>
- html,
- body,
- #app {
- height: 100%;
- margin: 0;
- padding: 0;
- }
+ <style>
+ html,
+ body,
+ #app {
+ height: 100%;
+ margin: 0;
+ padding: 0;
+ }
- .avue-home {
- background-color: #303133;
- height: 100%;
- display: flex;
- flex-direction: column;
- }
+ .avue-home {
+ background-color: #303133;
+ height: 100%;
+ display: flex;
+ flex-direction: column;
+ }
- .avue-home__main {
- user-select: none;
- width: 100%;
- flex-grow: 1;
- display: flex;
- justify-content: center;
- align-items: center;
- flex-direction: column;
- }
+ .avue-home__main {
+ user-select: none;
+ width: 100%;
+ flex-grow: 1;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ flex-direction: column;
+ }
- .avue-home__footer {
- width: 100%;
- flex-grow: 0;
- text-align: center;
- padding: 1em 0;
- }
+ .avue-home__footer {
+ width: 100%;
+ flex-grow: 0;
+ text-align: center;
+ padding: 1em 0;
+ }
- .avue-home__footer > a {
- font-size: 12px;
- color: #ABABAB;
- text-decoration: none;
- }
+ .avue-home__footer>a {
+ font-size: 12px;
+ color: #ABABAB;
+ text-decoration: none;
+ }
- .avue-home__loading {
- height: 32px;
- width: 32px;
- margin-bottom: 20px;
- }
+ .avue-home__loading {
+ height: 32px;
+ width: 32px;
+ margin-bottom: 20px;
+ }
- .avue-home__title {
- color: #FFF;
- font-size: 14px;
- margin-bottom: 10px;
- }
+ .avue-home__title {
+ color: #FFF;
+ font-size: 14px;
+ margin-bottom: 10px;
+ }
- .avue-home__sub-title {
- color: #ABABAB;
- font-size: 12px;
- }
- </style>
+ .avue-home__sub-title {
+ color: #ABABAB;
+ font-size: 12px;
+ }
+ </style>
</head>
<body>
-<noscript>
- <strong>
- 很抱歉,如果没有 JavaScript 支持,Saber 将不能正常工作。请启用浏览器的 JavaScript 然后继续。
- </strong>
-</noscript>
-<div id="app">
- <div class="avue-home">
- <div class="avue-home__main">
- <img class="avue-home__loading" src="<%= BASE_URL %>svg/loading-spin.svg" alt="loading">
- <div class="avue-home__title">
- 正在加载资源
- </div>
- <div class="avue-home__sub-title d">
- 初次加载资源可能需要较多时间 请耐心等待
- </div>
+ <noscript>
+ <strong>
+ 很抱歉,如果没有 JavaScript 支持,Saber 将不能正常工作。请启用浏览器的 JavaScript 然后继续。
+ </strong>
+ </noscript>
+ <div id="app">
+ <div class="avue-home">
+ <div class="avue-home__main">
+ <img class="avue-home__loading" src="<%= BASE_URL %>svg/loading-spin.svg" alt="loading">
+ <div class="avue-home__title">
+ 正在加载资源
+ </div>
+ <div class="avue-home__sub-title d">
+ 初次加载资源可能需要较多时间 请耐心等待
+ </div>
+ </div>
+ <div class="avue-home__footer">
+ <a href="https://bladex.cn" target="_blank">
+ https://bladex.cn </a>
+ </div>
+ </div>
</div>
- <div class="avue-home__footer">
- <a href="https://bladex.cn" target="_blank">
- https://bladex.cn </a>
- </div>
- </div>
-</div>
-<!-- built files will be auto injected -->
-<script src="<%= BASE_URL %>util/aes.js" charset="utf-8"></script>
-<script src="<%= BASE_URL %>cdn/vue/2.6.10/vue.min.js" charset="utf-8"></script>
-<script src="<%= BASE_URL %>cdn/vuex/3.1.1/vuex.min.js" charset="utf-8"></script>
-<script src="<%= BASE_URL %>cdn/vue-router/3.0.1/vue-router.min.js" charset="utf-8"></script>
-<script src="<%= BASE_URL %>cdn/axios/1.0.0/axios.min.js" charset="utf-8"></script>
-<script src="<%= BASE_URL %>cdn/element-ui/2.15.6/index.js" charset="utf-8"></script>
-<script src="<%= BASE_URL %>cdn/avue/2.10.16/avue.min.js" charset="utf-8"></script>
-<script src="<%= BASE_URL %>cdn/nutflow/wf-design-base/index.umd.min.js" charset="utf-8"></script>
+ <!-- built files will be auto injected -->
+ <script src="<%= BASE_URL %>util/aes.js" charset="utf-8"></script>
+ <script src="<%= BASE_URL %>cdn/vue/2.6.10/vue.min.js" charset="utf-8"></script>
+ <script src="<%= BASE_URL %>cdn/vuex/3.1.1/vuex.min.js" charset="utf-8"></script>
+ <script src="<%= BASE_URL %>cdn/vue-router/3.0.1/vue-router.min.js" charset="utf-8"></script>
+ <script src="<%= BASE_URL %>cdn/axios/1.0.0/axios.min.js" charset="utf-8"></script>
+ <script src="<%= BASE_URL %>cdn/element-ui/2.15.6/index.js" charset="utf-8"></script>
+ <script src="<%= BASE_URL %>cdn/avue/2.10.16/avue.min.js" charset="utf-8"></script>
+ <script src="<%= BASE_URL %>cdn/nutflow/wf-design-base/index.umd.min.js" charset="utf-8"></script>
</body>
-</html>
+</html>
\ No newline at end of file
diff --git a/src/config/website.js b/src/config/website.js
index b20a08b..e50bdbf 100644
--- a/src/config/website.js
+++ b/src/config/website.js
@@ -4,7 +4,7 @@
export default {
title: "saber",
logo: "S",
- key: 'saber',//配置主键,目前用于存储
+ key: 'saber', //配置主键,目前用于存储
indexTitle: '基层智治综合协同平台',
clientId: 'saber', // 客户端id
clientSecret: 'saber_secret', // 客户端密钥
@@ -44,6 +44,7 @@
authUrl: 'http://localhost/blade-auth/oauth/render',
// 报表设计器地址(cloud端口为8108,boot端口为80)
reportUrl: 'https://srgdjczzxtpt.com:2080/jczz-ureport/ureport',
+ // reportUrl: 'http://localhost:9528/ureport',
// 单点登录系统认证(blade-auth服务的地)
ssoUrl: 'http://localhost:8100/oauth/authorize?client_id=saber&response_type=code&redirect_uri=',
// 单点登录回调地址(Saber服务的地址)
diff --git a/src/lang/en.js b/src/lang/en.js
index 1ec0da0..4cfd4e2 100644
--- a/src/lang/en.js
+++ b/src/lang/en.js
@@ -1,122 +1,122 @@
export default {
- title: '基层智治综合协同平台',
- logoutTip: 'Exit the system, do you want to continue?',
- submitText: 'submit',
- cancelText: 'cancel',
- search: 'Please input search content',
- menuTip: 'none menu list',
+ title: "",
+ logoutTip: "Exit the system, do you want to continue?",
+ submitText: "submit",
+ cancelText: "cancel",
+ search: "Please input search content",
+ menuTip: "none menu list",
common: {
- condition: 'condition',
- display: 'display',
- hide: 'hide'
+ condition: "condition",
+ display: "display",
+ hide: "hide",
},
tip: {
- select: 'Please select',
- input: 'Please input'
+ select: "Please select",
+ input: "Please input",
},
upload: {
- upload: 'upload',
- tip: 'Drag files here,/'
+ upload: "upload",
+ tip: "Drag files here,/",
},
date: {
- start: 'Start date',
- end: 'End date',
- t: 'today',
- y: 'yesterday',
- n: 'nearly 7',
- a: 'whole'
+ start: "Start date",
+ end: "End date",
+ t: "today",
+ y: "yesterday",
+ n: "nearly 7",
+ a: "whole",
},
form: {
- printBtn: 'print',
- mockBtn: 'mock',
- submitBtn: 'submit',
- emptyBtn: 'empty'
+ printBtn: "print",
+ mockBtn: "mock",
+ submitBtn: "submit",
+ emptyBtn: "empty",
},
crud: {
filter: {
- addBtn: 'add',
- clearBtn: 'clear',
- resetBtn: 'reset',
- cancelBtn: 'cancel',
- submitBtn: 'submit'
+ addBtn: "add",
+ clearBtn: "clear",
+ resetBtn: "reset",
+ cancelBtn: "cancel",
+ submitBtn: "submit",
},
column: {
- name: 'name',
- hide: 'hide',
- fixed: 'fixed',
- filters: 'filters',
- sortable: 'sortable',
- index: 'index',
- width: 'width'
+ name: "name",
+ hide: "hide",
+ fixed: "fixed",
+ filters: "filters",
+ sortable: "sortable",
+ index: "index",
+ width: "width",
},
- tipStartTitle: 'Currently selected',
- tipEndTitle: 'items',
- editTitle: 'edit',
- copyTitle: 'copy',
- addTitle: 'add',
- viewTitle: 'view',
- filterTitle: 'filter',
- showTitle: 'showTitle',
- menu: 'menu',
- addBtn: 'add',
- show: 'show',
- hide: 'hide',
- open: 'open',
- shrink: 'shrink',
- printBtn: 'print',
- excelBtn: 'excel',
- updateBtn: 'update',
- cancelBtn: 'cancel',
- searchBtn: 'search',
- emptyBtn: 'empty',
- menuBtn: 'menu',
- saveBtn: 'save',
- viewBtn: 'view',
- editBtn: 'edit',
- copyBtn: 'copy',
- delBtn: 'delete'
+ tipStartTitle: "Currently selected",
+ tipEndTitle: "items",
+ editTitle: "edit",
+ copyTitle: "copy",
+ addTitle: "add",
+ viewTitle: "view",
+ filterTitle: "filter",
+ showTitle: "showTitle",
+ menu: "menu",
+ addBtn: "add",
+ show: "show",
+ hide: "hide",
+ open: "open",
+ shrink: "shrink",
+ printBtn: "print",
+ excelBtn: "excel",
+ updateBtn: "update",
+ cancelBtn: "cancel",
+ searchBtn: "search",
+ emptyBtn: "empty",
+ menuBtn: "menu",
+ saveBtn: "save",
+ viewBtn: "view",
+ editBtn: "edit",
+ copyBtn: "copy",
+ delBtn: "delete",
},
login: {
- title: 'Login ',
- info: 'BladeX Development Platform',
- tenantId: 'Please input tenantId',
- username: 'Please input username',
- password: 'Please input a password',
- wechat: 'Wechat',
- qq: 'QQ',
- github: 'github',
- gitee: 'gitee',
- phone: 'Please input a phone',
- code: 'Please input a code',
- submit: 'Login',
- userLogin: 'userLogin',
- phoneLogin: 'phoneLogin',
- thirdLogin: 'thirdLogin',
- ssoLogin: 'ssoLogin',
- msgText: 'send code',
- msgSuccess: 'reissued code',
+ title: "Login ",
+ info: "BladeX Development Platform",
+ tenantId: "Please input tenantId",
+ username: "Please input username",
+ password: "Please input a password",
+ wechat: "Wechat",
+ qq: "QQ",
+ github: "github",
+ gitee: "gitee",
+ phone: "Please input a phone",
+ code: "Please input a code",
+ submit: "Login",
+ userLogin: "userLogin",
+ phoneLogin: "phoneLogin",
+ thirdLogin: "thirdLogin",
+ ssoLogin: "ssoLogin",
+ msgText: "send code",
+ msgSuccess: "reissued code",
},
navbar: {
- info: 'info',
- logOut: 'logout',
- userinfo: 'userinfo',
- switchDept : 'switch dept',
- dashboard: 'dashboard',
- lock: 'lock',
- bug: 'none bug',
- bugs: 'bug',
- screenfullF: 'exit screenfull',
- screenfull: 'screenfull',
- language: 'language',
- notice: 'notice',
- theme: 'theme',
- color: 'color'
+ info: "info",
+ logOut: "logout",
+ userinfo: "userinfo",
+ switchDept: "switch dept",
+ dashboard: "dashboard",
+ lock: "lock",
+ bug: "none bug",
+ bugs: "bug",
+ screenfullF: "exit screenfull",
+ screenfull: "screenfull",
+ language: "language",
+ notice: "notice",
+ theme: "theme",
+ color: "color",
},
tagsView: {
- search: 'Search',
- menu: 'menu',
- clearCache: 'Clear Cache',
- closeOthers: 'Close Others',
- closeAll: 'Close All'
- }
+ search: "Search",
+ menu: "menu",
+ clearCache: "Clear Cache",
+ closeOthers: "Close Others",
+ closeAll: "Close All",
+ },
};
diff --git a/src/page/index/logo.vue b/src/page/index/logo.vue
index de07ead..63580cc 100644
--- a/src/page/index/logo.vue
+++ b/src/page/index/logo.vue
@@ -1,73 +1,89 @@
+<!--
+ * @Author: shuishen 1109946754@qq.com
+ * @Date: 2023-12-14 17:10:00
+ * @LastEditors: shuishen 1109946754@qq.com
+ * @LastEditTime: 2024-01-19 15:47:47
+ * @FilePath: \jczz_web\src\page\index\logo.vue
+ * @Description:
+ *
+ * Copyright (c) 2024 by shuishen, All Rights Reserved.
+-->
<template>
- <div class="avue-logo">
- <transition name="fade">
- <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>
- </template>
- </transition-group>
- </div>
+ <div class="avue-logo">
+ <transition name="fade">
+ <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">{{ webTitle }} </span>
+ </template>
+ </transition-group>
+ </div>
</template>
<script>
-import { mapGetters } from "vuex";
+import { getStore } from "@/util/store"
+import { mapGetters } from "vuex"
+
export default {
- name: "logo",
- data() {
- return {};
- },
- created() {},
- computed: {
- ...mapGetters(["website", "keyCollapse"])
- },
- methods: {}
-};
+ name: "logo",
+ data () {
+ return {
+ webTitle: getStore({ name: "webTitle" })
+ }
+ },
+ created () { },
+ computed: {
+ ...mapGetters(["website", "keyCollapse"])
+ },
+ methods: {}
+}
</script>
<style lang="scss">
.fade-leave-active {
- transition: opacity 0.2s;
+ transition: opacity 0.2s;
}
+
.fade-enter-active {
- transition: opacity 2.5s;
+ transition: opacity 2.5s;
}
+
.fade-enter,
.fade-leave-to {
- opacity: 0;
+ opacity: 0;
}
+
.avue-logo {
- position: fixed;
- top: 0;
- left: 0;
- width: 240px;
- height: 64px;
- line-height: 64px;
- background-color: #20222a;
- font-size: 20px;
- overflow: hidden;
- box-sizing: border-box;
- box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15);
- color: rgba(255, 255, 255, 0.8);
- z-index: 1024;
- &_title {
- display: block;
- text-align: center;
- font-weight: 300;
+ position: fixed;
+ top: 0;
+ left: 0;
+ width: 240px;
+ height: 64px;
+ line-height: 64px;
+ background-color: #20222a;
font-size: 20px;
- }
- &_subtitle {
- display: block;
- text-align: center;
- font-size: 18px;
- font-weight: bold;
- color: #fff;
- }
+ overflow: hidden;
+ box-sizing: border-box;
+ box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.15);
+ color: rgba(255, 255, 255, 0.8);
+ z-index: 1024;
+
+ &_title {
+ display: block;
+ text-align: center;
+ font-weight: 300;
+ font-size: 20px;
+ }
+
+ &_subtitle {
+ display: block;
+ text-align: center;
+ font-size: 18px;
+ font-weight: bold;
+ color: #fff;
+ }
}
</style>
\ No newline at end of file
diff --git a/src/page/index/top/index.vue b/src/page/index/top/index.vue
index 7594a19..ad8822f 100644
--- a/src/page/index/top/index.vue
+++ b/src/page/index/top/index.vue
@@ -94,6 +94,7 @@
</div>
</template>
<script>
+import { getStore } from "@/util/store"
import { setTheme } from "@/util/util"
import { resetRouter } from '@/router/router'
import { mapGetters, mapState } from "vuex"
@@ -121,6 +122,7 @@
name: "top",
data () {
return {
+ webType: getStore({ name: "webType" }),
searchShow: false,
userBox: false,
userForm: {
@@ -242,7 +244,13 @@
}).then(() => {
this.$store.dispatch("LogOut").then(() => {
resetRouter()
- this.$router.push({ path: "/login" })
+
+
+ if (this.webType == 'default') {
+ this.$router.push({ path: "/login" })
+ } else {
+ this.$router.push({ path: "/tenementLogin" })
+ }
})
})
}
diff --git a/src/page/login/index.vue b/src/page/login/index.vue
index 87b8f01..f57b3a9 100644
--- a/src/page/login/index.vue
+++ b/src/page/login/index.vue
@@ -7,7 +7,8 @@
{{ time }}
</div>
<!-- <img class="img" src="/img/logo.png" alt=""> -->
- <p class="title">{{ $t('login.info') }}</p>
+ <!-- <p class="title">{{ $t('login.info') }}</p> -->
+ <p class="title">基层智治综合协同平台</p>
</div>
<div class="login-border">
<img class="img" src="/img/logo.png" alt="">
@@ -33,6 +34,7 @@
</div>
</template>
<script>
+import { setStore, getStore } from "@/util/store"
import Watermark from "@/warterMarkVUE"
import userLogin from "./userlogin"
import codeLogin from "./codelogin"
@@ -71,6 +73,17 @@
}
},
created () {
+ document.title = "基层智治综合协同平台"
+ setStore({
+ name: "webTitle",
+ content: '基层智治综合协同平台',
+ })
+
+ setStore({
+ name: "webType",
+ content: 'default',
+ })
+
Watermark.remove()
this.handleLogin()
diff --git a/src/page/login/tenement.vue b/src/page/login/tenement.vue
new file mode 100644
index 0000000..523301a
--- /dev/null
+++ b/src/page/login/tenement.vue
@@ -0,0 +1,157 @@
+<template>
+ <div class="login-container" ref="login" @keyup.enter.native="handleLogin">
+ <top-color v-show="false"></top-color>
+
+ <div class="login-weaper animated bounceInDown">
+ <div class="login-left">
+ <div class="login-time">
+ {{ time }}
+ </div>
+ <!-- <img class="img" src="/img/logo.png" alt=""> -->
+ <!-- <p class="title">{{ $t('login.info') }}</p> -->
+ <p class="title">上饶市智慧物业管理平台</p>
+ </div>
+ <div class="login-border">
+ <img class="img" src="/img/logo.png" alt="">
+ <div class="login-main">
+
+ <h4 class="login-title">
+ {{ $t('login.title') }}
+ <!-- <top-lang></top-lang> -->
+ </h4>
+ <userLogin v-if="activeName === 'user'"></userLogin>
+ <!-- <codeLogin v-else-if="activeName==='code'"></codeLogin> -->
+ <!-- <thirdLogin v-else-if="activeName==='third'"></thirdLogin> -->
+ <div class="login-menu">
+ <!-- <a href="#" @click.stop="activeName='user'">{{ $t('login.userLogin') }}</a> -->
+ <!--<a href="#" @click.stop="activeName='code'">{{ $t('login.phoneLogin') }}</a>-->
+ <!-- <a href="#" @click.stop="activeName='third'">{{ $t('login.thirdLogin') }}</a> -->
+ <!-- <a :href="website.ssoUrl + website.redirectUri">{{ $t('login.ssoLogin') }}</a> -->
+ </div>
+ </div>
+
+ </div>
+ </div>
+
+ <div class="copyright-box">
+ 版权所有:上饶市住房和城乡建设局
+ <br />
+ 技术支持:上饶国控数字科技有限公司
+ </div>
+ </div>
+</template>
+<script>
+import { setStore, getStore } from "@/util/store"
+import Watermark from "@/warterMarkVUE"
+import userLogin from "./userlogin"
+import codeLogin from "./codelogin"
+import thirdLogin from "./thirdlogin"
+import { mapGetters } from "vuex"
+import { dateFormat } from "@/util/date"
+import { validatenull } from "@/util/validate"
+import topLang from "@/page/index/top/top-lang"
+import topColor from "@/page/index/top/top-color"
+import { getQueryString, getTopUrl } from "@/util/util"
+
+export default {
+ name: "login",
+ components: {
+ userLogin,
+ codeLogin,
+ thirdLogin,
+ topLang,
+ topColor
+ },
+ data () {
+ return {
+ time: "",
+ activeName: "user",
+ socialForm: {
+ tenantId: "000000",
+ source: "",
+ code: "",
+ state: "",
+ }
+ }
+ },
+ watch: {
+ $route () {
+ this.handleLogin()
+ }
+ },
+ created () {
+ document.title = "上饶市智慧物业管理平台"
+ setStore({
+ name: "webTitle",
+ content: '上饶市智慧物业管理平台',
+ })
+
+ setStore({
+ name: "webType",
+ content: 'secend',
+ })
+
+ Watermark.remove()
+
+ this.handleLogin()
+ this.getTime()
+ },
+ mounted () {
+ },
+ computed: {
+ ...mapGetters(["website", "tagWel"])
+ },
+ props: [],
+ methods: {
+ getTime () {
+ setInterval(() => {
+ this.time = dateFormat(new Date())
+ }, 1000)
+ },
+ handleLogin () {
+ const topUrl = getTopUrl()
+ const redirectUrl = "/oauth/redirect/"
+ const ssoCode = "?code="
+ this.socialForm.source = getQueryString("source")
+ this.socialForm.code = getQueryString("code")
+ this.socialForm.state = getQueryString("state")
+ if (validatenull(this.socialForm.source) && topUrl.includes(redirectUrl)) {
+ let source = topUrl.split("?")[0]
+ source = source.split(redirectUrl)[1]
+ this.socialForm.source = source
+ }
+ if (topUrl.includes(redirectUrl) && !validatenull(this.socialForm.source) && !validatenull(this.socialForm.code) && !validatenull(this.socialForm.state)) {
+ const loading = this.$loading({
+ lock: true,
+ text: '第三方系统登录中,请稍后。。。',
+ spinner: "el-icon-loading"
+ })
+ this.$store.dispatch("LoginBySocial", this.socialForm).then(() => {
+ window.location.href = topUrl.split(redirectUrl)[0]
+ this.$router.push({ path: this.tagWel.value })
+ loading.close()
+ }).catch(() => {
+ loading.close()
+ })
+ } else if (!topUrl.includes(redirectUrl) && !validatenull(this.socialForm.code) && !validatenull(this.socialForm.state)) {
+ const loading = this.$loading({
+ lock: true,
+ text: '单点系统登录中,请稍后。。。',
+ spinner: "el-icon-loading"
+ })
+ this.$store.dispatch("LoginBySso", this.socialForm).then(() => {
+ window.location.href = topUrl.split(ssoCode)[0]
+ this.$router.push({ path: this.tagWel.value })
+ loading.close()
+ }).catch(() => {
+ loading.close()
+ })
+ }
+ }
+ }
+}
+</script>
+
+<style lang="scss">
+@import "@/styles/login.scss";
+</style>
diff --git a/src/router/avue-router.js b/src/router/avue-router.js
index 0e68bda..88b3df0 100644
--- a/src/router/avue-router.js
+++ b/src/router/avue-router.js
@@ -1,8 +1,10 @@
let RouterPlugin = function () {
this.$router = null;
this.$store = null;
-
};
+
+import { getStore } from "@/util/store";
+
RouterPlugin.install = function (vue, option = {}) {
this.$router = option.router;
this.$store = option.store;
@@ -10,53 +12,58 @@
// 这个的作用是 为了检查出网页链接,因为本项目用到了 iframe
function isURL(s) {
- if (s.includes('html')) return true;
- return /^http[s]?:\/\/.*/.test(s)
+ if (s.includes("html")) return true;
+ return /^http[s]?:\/\/.*/.test(s);
}
// 将参数处理为参数的形式拼接
function objToform(obj) {
let result = [];
- Object.keys(obj).forEach(ele => {
+ Object.keys(obj).forEach((ele) => {
result.push(`${ele}=${obj[ele]}`);
- })
- return result.join('&');
+ });
+ return result.join("&");
}
this.$router.$avueRouter = {
//全局配置
$website: this.$store.getters.website,
- group: '',
+ group: "",
meta: {},
safe: this,
// 设置标题
setTitle: (title) => {
- const defaultTitle = this.$vue.$t('title');
- title = title ? `${title}-${defaultTitle}` : defaultTitle;
+ // const defaultTitle = this.$vue.$t("title");
+
+ title = title
+ ? `${title}-${getStore({ name: "webTitle" })}`
+ : getStore({ name: "webTitle" });
document.title = title;
},
closeTag: (value) => {
let tag = value || this.$store.getters.tag;
- if (typeof value === 'string') {
- tag = this.$store.getters.tagList.filter(ele => ele.value === value)[0]
+ if (typeof value === "string") {
+ tag = this.$store.getters.tagList.filter(
+ (ele) => ele.value === value
+ )[0];
}
- this.$store.commit('DEL_TAG', tag)
+ this.$store.commit("DEL_TAG", tag);
},
generateTitle: (title, key) => {
if (!key) return title;
- const hasKey = this.$vue.$te('route.' + key)
+ const hasKey = this.$vue.$te("route." + key);
if (hasKey) {
// $t :this method from vue-i18n, inject in @/lang/index.js
- const translatedTitle = this.$vue.$t('route.' + key)
+ const translatedTitle = this.$vue.$t("route." + key);
- return translatedTitle
+ return translatedTitle;
}
- return title
+ return title;
},
//处理路由
getPath: function (params) {
- let {src} = params;
- let result = src || '/';
+ let { src } = params;
+ let result = src || "/";
if (isURL(src)) {
result = `/myiframe/urlPath?${objToform(params)}`;
}
@@ -65,12 +72,11 @@
//正则处理路由
vaildPath: function (list, path) {
let result = false;
- list.forEach(ele => {
+ list.forEach((ele) => {
if (new RegExp("^" + ele + ".*", "g").test(path)) {
- result = true
+ result = true;
}
-
- })
+ });
return result;
},
//设置路由值
@@ -85,24 +91,24 @@
},
//动态路由
// 路由是专门的一个接口获取
- /**
- * aMenu: 接受到的动态路由数据 menu的结构外层有父级path 里面有一个childen 记录页面的路由
- * first: 为了区分外界 调用formatRoutes 和 当前文件调用 formatRoutes
- */
+ /**
+ * aMenu: 接受到的动态路由数据 menu的结构外层有父级path 里面有一个childen 记录页面的路由
+ * first: 为了区分外界 调用formatRoutes 和 当前文件调用 formatRoutes
+ */
formatRoutes: function (aMenu = [], first) {
// window.console.log('aMenu')
// window.console.log(aMenu)
- const aRouter = []
+ const aRouter = [];
// 获取到全局配置中的 props
const propsConfig = this.$website.menu.props;
// 设置 props默认值 作用就是将字段设置成配置的
const propsDefault = {
- label: propsConfig.label || 'name',
- path: propsConfig.path || 'path',
- icon: propsConfig.icon || 'icon',
- children: propsConfig.children || 'children',
- meta: propsConfig.meta || 'meta',
- }
+ label: propsConfig.label || "name",
+ path: propsConfig.path || "path",
+ icon: propsConfig.icon || "icon",
+ children: propsConfig.children || "children",
+ meta: propsConfig.meta || "meta",
+ };
// 如果没有权限菜单就结束
if (aMenu.length === 0) return;
// 开始处理menu
@@ -113,25 +119,28 @@
let path = (() => {
if (first) {
// 将 '/index' 替换为 ''
- return oMenu[propsDefault.path].replace('/index', '')
+ return oMenu[propsDefault.path].replace("/index", "");
} else {
- return oMenu[propsDefault.path]
+ return oMenu[propsDefault.path];
}
})(),
//特殊处理组件 执行完这个 component 也就是精确到具体的文件了 views文件夹下面就是具体的页面代码
- component = 'views' + oMenu.path,
+ component = "views" + oMenu.path,
name = oMenu[propsDefault.label],
icon = oMenu[propsDefault.icon],
children = oMenu[propsDefault.children],
meta = oMenu[propsDefault.meta] || {};
- // meta中 keepalive 的处理
- meta = Object.assign(meta, (function () {
- if (option.keepAlive === true) {
- return {
- keepAlive: true
+ // meta中 keepalive 的处理
+ meta = Object.assign(
+ meta,
+ (function () {
+ if (option.keepAlive === true) {
+ return {
+ keepAlive: true,
+ };
}
- }
- })());
+ })()
+ );
//是否有子路由
const isChild = children.length !== 0;
const oRouter = {
@@ -139,15 +148,15 @@
component(resolve) {
// 判断是否为首路由
if (first) {
- require(['../page/index'], resolve)
- return
+ require(["../page/index"], resolve);
+ return;
// 判断是否为多层路由
} else if (isChild && !first) {
- require(['../page/index/layout'], resolve)
- return
+ require(["../page/index/layout"], resolve);
+ return;
// 判断是否为最终的页面视图
} else {
- require([`../${component}.vue`], resolve)
+ require([`../${component}.vue`], resolve);
}
},
name: name,
@@ -155,45 +164,49 @@
meta: meta,
redirect: (() => {
// 第一次进来但是没有子路由的 需要添加redirect
- if (!isChild && first && !isURL(path)) return `${path}/index`
- else return '';
+ if (!isChild && first && !isURL(path)) return `${path}/index`;
+ else return "";
})(),
// 整理子路由的route 配置
// 处理是否为一级路由
- children: !isChild ? (() => {
- if (first) {
- // 这里的isURL判断,因为这个网站有使用 iframe。所以需要判断是否为网页链接
- if (!isURL(path)) oMenu[propsDefault.path] = `${path}/index`;
- return [{
- component(resolve) {
- require([`../${component}.vue`], resolve)
- },
- icon: icon,
- name: name,
- meta: meta,
- path: 'index'
- }]
- }
- return [];
- })() : (() => {
- /**
- * 这里是重点,当有子路由的时候 会再去执行 formatRoutes 方法,然后又会有一个新的 aMenu for循环。
- * 最后返回的是一个数组 aRouter 这个数组就会作为 childen的值被 return
- */
- return this.formatRoutes(children, false)
- })()
- }
- aRouter.push(oRouter)
+ children: !isChild
+ ? (() => {
+ if (first) {
+ // 这里的isURL判断,因为这个网站有使用 iframe。所以需要判断是否为网页链接
+ if (!isURL(path)) oMenu[propsDefault.path] = `${path}/index`;
+ return [
+ {
+ component(resolve) {
+ require([`../${component}.vue`], resolve);
+ },
+ icon: icon,
+ name: name,
+ meta: meta,
+ path: "index",
+ },
+ ];
+ }
+ return [];
+ })()
+ : (() => {
+ /**
+ * 这里是重点,当有子路由的时候 会再去执行 formatRoutes 方法,然后又会有一个新的 aMenu for循环。
+ * 最后返回的是一个数组 aRouter 这个数组就会作为 childen的值被 return
+ */
+ return this.formatRoutes(children, false);
+ })(),
+ };
+ aRouter.push(oRouter);
}
// for循环结束
// 这个first 卡的其实就是首路由
if (first) {
- this.safe.$router.addRoutes(aRouter)
+ this.safe.$router.addRoutes(aRouter);
} else {
// 这里返回的是子组件
- return aRouter
+ return aRouter;
}
- }
- }
-}
+ },
+ };
+};
export default RouterPlugin;
diff --git a/src/router/page/index.js b/src/router/page/index.js
index 1136402..3fd53b8 100644
--- a/src/router/page/index.js
+++ b/src/router/page/index.js
@@ -1,81 +1,102 @@
-import Layout from '@/page/index/'
+/*
+ * @Author: shuishen 1109946754@qq.com
+ * @Date: 2023-12-14 17:10:00
+ * @LastEditors: shuishen 1109946754@qq.com
+ * @LastEditTime: 2024-01-19 11:40:51
+ * @FilePath: \jczz_web\src\router\page\index.js
+ * @Description:
+ *
+ * Copyright (c) 2024 by shuishen, All Rights Reserved.
+ */
+import Layout from "@/page/index/";
-export default [{
- path: '/login',
- name: '登录页',
- component: () =>
- import( /* webpackChunkName: "page" */ '@/page/login/index'),
- meta: {
- keepAlive: true,
- isTab: false,
- isAuth: false
- }
-},
+export default [
{
- path: '/lock',
- name: '锁屏页',
+ path: "/login",
+ name: "登录页",
component: () =>
- import( /* webpackChunkName: "page" */ '@/page/lock/index'),
+ import(/* webpackChunkName: "page" */ "@/page/login/index"),
meta: {
keepAlive: true,
isTab: false,
- isAuth: false
- }
+ isAuth: false,
+ },
},
{
- path: '/404',
+ path: "/tenementLogin",
+ name: "登录页",
component: () =>
- import( /* webpackChunkName: "page" */ '@/components/error-page/404'),
- name: '404',
+ import(/* webpackChunkName: "page" */ "@/page/login/tenement.vue"),
meta: {
keepAlive: true,
isTab: false,
- isAuth: false
- }
-
+ isAuth: false,
+ },
},
{
- path: '/403',
- component: () =>
- import( /* webpackChunkName: "page" */ '@/components/error-page/403'),
- name: '403',
+ path: "/lock",
+ name: "锁屏页",
+ component: () => import(/* webpackChunkName: "page" */ "@/page/lock/index"),
meta: {
keepAlive: true,
isTab: false,
- isAuth: false
- }
+ isAuth: false,
+ },
},
{
- path: '/500',
+ path: "/404",
component: () =>
- import( /* webpackChunkName: "page" */ '@/components/error-page/500'),
- name: '500',
+ import(/* webpackChunkName: "page" */ "@/components/error-page/404"),
+ name: "404",
meta: {
keepAlive: true,
isTab: false,
- isAuth: false
- }
+ isAuth: false,
+ },
},
{
- path: '/',
- name: '主页',
- redirect: '/wel'
+ path: "/403",
+ component: () =>
+ import(/* webpackChunkName: "page" */ "@/components/error-page/403"),
+ name: "403",
+ meta: {
+ keepAlive: true,
+ isTab: false,
+ isAuth: false,
+ },
},
{
- path: '/myiframe',
+ path: "/500",
+ component: () =>
+ import(/* webpackChunkName: "page" */ "@/components/error-page/500"),
+ name: "500",
+ meta: {
+ keepAlive: true,
+ isTab: false,
+ isAuth: false,
+ },
+ },
+ {
+ path: "/",
+ name: "主页",
+ redirect: "/wel",
+ },
+ {
+ path: "/myiframe",
component: Layout,
- redirect: '/myiframe',
- children: [{
- path: ":routerPath",
- name: 'iframe',
- component: () =>
- import( /* webpackChunkName: "page" */ '@/components/iframe/main'),
- props: true
- }]
-
+ redirect: "/myiframe",
+ children: [
+ {
+ path: ":routerPath",
+ name: "iframe",
+ component: () =>
+ import(/* webpackChunkName: "page" */ "@/components/iframe/main"),
+ props: true,
+ },
+ ],
},
{
- path: '*',
- redirect: '/404'
- }
-]
+ path: "*",
+ redirect: "/404",
+ },
+];
diff --git a/src/store/getters.js b/src/store/getters.js
index e6fcd6f..90fb411 100644
--- a/src/store/getters.js
+++ b/src/store/getters.js
@@ -1,29 +1,40 @@
+/*
+ * @Author: shuishen 1109946754@qq.com
+ * @Date: 2023-12-14 17:10:00
+ * @LastEditors: shuishen 1109946754@qq.com
+ * @LastEditTime: 2024-01-19 15:58:57
+ * @FilePath: \jczz_web\src\store\getters.js
+ * @Description:
+ *
+ * Copyright (c) 2024 by shuishen, All Rights Reserved.
+ */
const getters = {
- tag: state => state.tags.tag,
- language: state => state.common.language,
- website: state => state.common.website,
- userInfo: state => state.user.userInfo,
- colorName: state => state.common.colorName,
- themeName: state => state.common.themeName,
- isShade: state => state.common.isShade,
- isCollapse: state => state.common.isCollapse,
- keyCollapse: (state, getters) => getters.screen > 1 ? getters.isCollapse : false,
- screen: state => state.common.screen,
- isLock: state => state.common.isLock,
- isFullScren: state => state.common.isFullScren,
- isMenu: state => state.common.isMenu,
- lockPasswd: state => state.common.lockPasswd,
- tagList: state => state.tags.tagList,
- tagWel: state => state.tags.tagWel,
- token: state => state.user.token,
- roles: state => state.user.roles,
- permission: state => state.user.permission,
- menu: state => state.user.menu,
- menuId: state => state.user.menuId,
- menuAll: state => state.user.menuAll,
- logsList: state => state.logs.logsList,
- logsLen: state => state.logs.logsList.length || 0,
+ tag: (state) => state.tags.tag,
+ language: (state) => state.common.language,
+ website: (state) => state.common.website,
+ userInfo: (state) => state.user.userInfo,
+ colorName: (state) => state.common.colorName,
+ themeName: (state) => state.common.themeName,
+ isShade: (state) => state.common.isShade,
+ isCollapse: (state) => state.common.isCollapse,
+ keyCollapse: (state, getters) =>
+ getters.screen > 1 ? getters.isCollapse : false,
+ screen: (state) => state.common.screen,
+ isLock: (state) => state.common.isLock,
+ isFullScren: (state) => state.common.isFullScren,
+ isMenu: (state) => state.common.isMenu,
+ lockPasswd: (state) => state.common.lockPasswd,
+ tagList: (state) => state.tags.tagList,
+ tagWel: (state) => state.tags.tagWel,
+ token: (state) => state.user.token,
+ roles: (state) => state.user.roles,
+ permission: (state) => state.user.permission,
+ menu: (state) => state.user.menu,
+ menuId: (state) => state.user.menuId,
+ menuAll: (state) => state.user.menuAll,
+ logsList: (state) => state.logs.logsList,
+ logsLen: (state) => state.logs.logsList.length || 0,
logsFlag: (state, getters) => getters.logsLen === 0,
- flowRoutes: state => state.dict.flowRoutes,
-}
-export default getters
+ flowRoutes: (state) => state.dict.flowRoutes,
+};
+export default getters;
diff --git a/src/store/modules/common.js b/src/store/modules/common.js
index 1021541..b0840a7 100644
--- a/src/store/modules/common.js
+++ b/src/store/modules/common.js
@@ -1,20 +1,25 @@
-import {
- setStore,
- getStore,
- removeStore
-} from '@/util/store'
-import website from '@/config/website'
+/*
+ * @Author: shuishen 1109946754@qq.com
+ * @Date: 2023-12-14 17:10:00
+ * @LastEditors: shuishen 1109946754@qq.com
+ * @LastEditTime: 2024-01-19 16:43:29
+ * @FilePath: \jczz_web\src\store\modules\common.js
+ * @Description:
+ *
+ * Copyright (c) 2024 by shuishen, All Rights Reserved.
+ */
+import { setStore, getStore, removeStore } from "@/util/store";
+import website from "@/config/website";
const common = {
-
state: {
- language: getStore({name: 'language'}) || 'zh',
+ language: getStore({ name: "language" }) || "zh",
isCollapse: false,
isFullScren: false,
isMenu: true,
isShade: false,
screen: -1,
- isLock: getStore({name: 'isLock'}) || false,
+ isLock: getStore({ name: "isLock" }) || false,
showTag: true,
showDebug: true,
showCollapse: true,
@@ -24,18 +29,18 @@
showTheme: true,
showMenu: true,
showColor: true,
- colorName: getStore({name: 'colorName'}) || '#409EFF',
- themeName: 'theme-white',
- lockPasswd: getStore({name: 'lockPasswd'}) || '',
+ colorName: getStore({ name: "colorName" }) || "#409EFF",
+ themeName: "theme-white",
+ lockPasswd: getStore({ name: "lockPasswd" }) || "",
website: website,
},
mutations: {
SET_LANGUAGE: (state, language) => {
- state.language = language
+ state.language = language;
setStore({
- name: 'language',
- content: state.language
- })
+ name: "language",
+ content: state.language,
+ });
},
SET_SHADE: (state, active) => {
state.isShade = active;
@@ -52,10 +57,10 @@
SET_LOCK: (state) => {
state.isLock = true;
setStore({
- name: 'isLock',
+ name: "isLock",
content: state.isLock,
- type: 'session'
- })
+ type: "session",
+ });
},
SET_SCREEN: (state, screen) => {
state.screen = screen;
@@ -63,37 +68,37 @@
SET_COLOR_NAME: (state, colorName) => {
state.colorName = colorName;
setStore({
- name: 'colorName',
+ name: "colorName",
content: state.colorName,
- })
+ });
},
SET_THEME_NAME: (state, themeName) => {
state.themeName = themeName;
setStore({
- name: 'themeName',
+ name: "themeName",
content: state.themeName,
- })
+ });
},
SET_LOCK_PASSWD: (state, lockPasswd) => {
state.lockPasswd = lockPasswd;
setStore({
- name: 'lockPasswd',
+ name: "lockPasswd",
content: state.lockPasswd,
- type: 'session'
- })
+ type: "session",
+ });
},
CLEAR_LOCK: (state) => {
state.isLock = false;
- state.lockPasswd = '';
+ state.lockPasswd = "";
removeStore({
- name: 'lockPasswd',
- type: 'session'
+ name: "lockPasswd",
+ type: "session",
});
removeStore({
- name: 'isLock',
- type: 'session'
+ name: "isLock",
+ type: "session",
});
},
- }
-}
-export default common
+ },
+};
+export default common;
diff --git a/src/styles/login.scss b/src/styles/login.scss
index 8d5c5db..ed6bdbe 100644
--- a/src/styles/login.scss
+++ b/src/styles/login.scss
@@ -8,6 +8,16 @@
background-color: #469BC0;
// background-image: url("/img/bg/bg.jpg");
background-size: 100% 100%;
+
+ .copyright-box {
+ width: 100%;
+ position: absolute;
+ bottom: 40px;
+ text-align: center;
+ color: #fff;
+ line-height: 24px;
+ font-size: 14px;
+ }
}
.login-weaper {
diff --git a/src/views/article/discussionManage.vue b/src/views/article/discussionManage.vue
index f5751d6..597f5a4 100644
--- a/src/views/article/discussionManage.vue
+++ b/src/views/article/discussionManage.vue
@@ -1,777 +1,773 @@
<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">
- <template slot="menuLeft">
- <el-button size="small" icon="el-icon-delete" plain v-if="permission.article_delete" @click="handleDelete">删
- 除
- </el-button>
- </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">
+ <template slot="menuLeft">
+ <el-button size="small" icon="el-icon-delete" plain v-if="permission.article_delete" @click="handleDelete">删
+ 除
+ </el-button>
+ </template>
- <template slot-scope="{type,size,row }" slot="menu">
- <el-button icon="el-icon-s-tools" :size="size" :type="type" @click.stop="openDilog(row, 1)">
- 设置
- </el-button>
+ <template slot-scope="{type,size,row }" slot="menu">
+ <el-button icon="el-icon-s-tools" :size="size" :type="type" @click.stop="openDilog(row, 1)">
+ 设置
+ </el-button>
- <el-button icon="el-icon-edit" :size="size" :type="type" @click.stop="openEditPopup(row, 1)">
- 编辑议题
- </el-button>
+ <el-button icon="el-icon-edit" :size="size" :type="type" @click.stop="openEditPopup(row, 1)">
+ 编辑议题
+ </el-button>
- <el-button icon="el-icon-user" :size="size" :type="type" @click.stop="openUserPopup(row, 1)">
- 参与用户
- </el-button>
+ <el-button icon="el-icon-user" :size="size" :type="type" @click.stop="openUserPopup(row, 1)">
+ 参与用户
+ </el-button>
- <el-button v-if="row.publish == '1'" icon="el-icon-close" :size="size" :type="type"
- @click.stop="updateFb(row)">
- 撤销
- </el-button>
+ <el-button v-if="row.publish == '1'" icon="el-icon-close" :size="size" :type="type" @click.stop="updateFb(row)">
+ 撤销
+ </el-button>
- <el-button v-if="row.publish == '0'" icon="el-icon-check" :size="size" :type="type"
- @click.stop="updateFb(row)">
- 发布
- </el-button>
- </template>
+ <el-button v-if="row.publish == '0'" icon="el-icon-check" :size="size" :type="type" @click.stop="updateFb(row)">
+ 发布
+ </el-button>
+ </template>
- <template slot-scope="{ row, size }" slot="publish">
- <el-tag :size="size" :type="showStatus(row.publish, 1).type" v-text="showStatus(row.publish, 1).text">
- </el-tag>
- </template>
+ <template slot-scope="{ row, size }" slot="publish">
+ <el-tag :size="size" :type="showStatus(row.publish, 1).type" v-text="showStatus(row.publish, 1).text">
+ </el-tag>
+ </template>
- <template slot-scope="{ row, size }" slot="iscomment">
- <el-tag :size="size" :type="showStatus(row.iscomment, 2).type" v-text="showStatus(row.iscomment, 2).text">
- </el-tag>
- </template>
- </avue-crud>
+ <template slot-scope="{ row, size }" slot="iscomment">
+ <el-tag :size="size" :type="showStatus(row.iscomment, 2).type" v-text="showStatus(row.iscomment, 2).text">
+ </el-tag>
+ </template>
+ </avue-crud>
- <deitDiscussion ref="DeitDiscussion">
- </deitDiscussion>
+ <deitDiscussion ref="DeitDiscussion">
+ </deitDiscussion>
- <discussionManageChild ref="discussionManageChild" />
+ <discussionManageChild ref="discussionManageChild" />
- </basic-container>
+ </basic-container>
</template>
<script>
-import {
+ import {
getList,
remove,
update,
add,
getNotice,
upcomment
-} from "@/api/article/article"
+ } from "@/api/article/article"
-import {
+ import {
getListPd,
removePd,
updatePd,
addPd,
getNoticePd,
upcommentPd
-} from "@/api/discuss/publicDiscuss"
-import website from '@/config/website'
-import {
+ } from "@/api/discuss/publicDiscuss"
+ import website from '@/config/website'
+ import {
getDistrictTree
-} from "@/api/district/index"
-import {
+ } from "@/api/district/index"
+ import {
mapGetters
-} from "vuex"
-import deitDiscussion from "./components/deitDiscussion"
-import discussionManageChild from "./components/discussionManageChild"
+ } from "vuex"
+ import deitDiscussion from "./components/deitDiscussion"
+ import discussionManageChild from "./components/discussionManageChild"
-export default {
+ export default {
components: {
- deitDiscussion,
- discussionManageChild,
+ deitDiscussion,
+ discussionManageChild,
},
- data () {
- return {
- discussForm: {
- ontitle: '',
- title: '',
- openFlag: 0,
- numberRestrictions: 0,
- voteRestrictions: 0,
- userRestrictions: 0,
- signatureFlag: 0,
- endTime: '',
- articleId: '',
- createTime: '',
- updateTime: '',
- deleteFlag: '',
- repeatVote: 0,
- voteNumberPublic: 0,
- appointUser: 0,
- userIds: '',
- eventType: 1,
- },
- form: {},
- query: {},
- loading: true,
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0,
- },
- datetime: "",
- selectionList: [],
- option: {
- labelWidth: 96,
- searchLabelWidth: 96,
- searchShow: true,
- searchMenuSpan: 3,
- menuWidth: 500,
+ data() {
+ return {
+ discussForm: {
+ ontitle: '',
+ title: '',
+ openFlag: 0,
+ numberRestrictions: 0,
+ voteRestrictions: 0,
+ userRestrictions: 0,
+ signatureFlag: 0,
+ endTime: '',
+ articleId: '',
+ createTime: '',
+ updateTime: '',
+ deleteFlag: '',
+ repeatVote: 0,
+ voteNumberPublic: 0,
+ appointUser: 0,
+ userIds: '',
+ eventType: 1,
+ },
+ form: {},
+ query: {},
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+ datetime: "",
+ selectionList: [],
+ option: {
+ labelWidth: 96,
+ searchLabelWidth: 96,
+ searchShow: true,
+ searchMenuSpan: 3,
+ menuWidth: 500,
- height: "auto",
- calcHeight: 54,
- dialogWidth: 950,
- tip: false,
- border: false,
- //stripe:true,
- index: true,
- viewBtn: false,
- selection: true,
- excelBtn: true,
- dialogClickModal: false,
- column: [
- {
- overHidden: true,
- label: "议事标题",
- prop: "title",
- span: 24,
- row: true,
- searchSpan: 4,
- search: true,
- rules: [{
- required: true,
- message: "请输入议事标题",
- trigger: "blur",
- },],
- },
- {
- label: "范围",
- prop: "articleList",
- span: 24,
- minRows: 2,
- tags: true,
- type: "tree",
- multiple: true,
- dicData: [],
- rules: [{
- required: true,
- message: "请选择范围",
- trigger: "blur",
- },],
- props: {
- label: "name",
- value: 'id'
- },
- hide: true,
- },
- {
- width: 110,
- label: "封面",
- prop: "url",
- // align:'center',
- type: "upload",
- listType: "picture-img",
- action: "/api/blade-resource/oss/endpoint/put-file",
- propsHttp: {
- res: "data",
- url: "link",
- },
- // hide: true,
- span: 24,
- },
- {
- width: 110,
- label: "文章类型",
- prop: "articleType",
- addDisplay: true,
- editDisplay: true,
- viewDisplay: true,
- searchSpan: 4,
- checkStrictly: true,
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=investigateType",
- props: {
- label: "dictValue",
- value: "dictKey",
- },
- search: true,
- type: "tree",
- rules: [{
- required: true,
- message: "请选择文章类型",
- trigger: "blur",
- },],
- },
- {
- label: "发布时间",
- prop: "dateTime",
- type: "daterange",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- searchSpan: 6,
- searchRange: true,
- hide: true,
- addDisplay: false,
- editDisplay: false,
- viewDisplay: false,
- search: true,
- rules: [{
- required: true,
- message: "请选择发布时间",
- trigger: "blur",
- },],
- },
- {
- width: 100,
- label: "发布时间",
- prop: "createTime",
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd HH:mm:ss",
- },
- {
- width: 100,
- label: "发布状态",
- prop: "publish",
- searchSpan: 4,
- value: "0",
- slot: true,
- search: true,
- type: "select",
- rules: [{
- required: true,
- message: "请选择发布状态",
- trigger: "blur",
- },],
- dicData: [{
- label: "未发布",
- value: "0",
- },
- {
- label: "已发布",
- value: "1",
- }
- ],
- },
- {
- span: 24,
- label: "评论区",
- prop: "iscomment",
- width: 80,
- slot: true,
- type: "switch",
- activeColor: "#13ce66",
- inactiveColor: "#ccc",
- value: '1',
- dicData: [{
- label: "关闭",
- value: "0",
- },
- {
- label: "开启",
- value: "1",
- }
- ],
- },
- {
- label: "视频",
- prop: "videoUrl",
- type: "upload",
- accept: "video/mp4",
- display: false,
- hide: true,
- span: 24,
- listType: "picture-img",
- action: "/api/depl/put-depl",
- propsHttp: {
- url: "data",
- },
- },
- {
- label: "议事内容",
- prop: "content",
- component: "AvueUeditor",
- options: {
- action: "/api/blade-resource/oss/endpoint/put-file",
- // customConfig: {
- // lineHeights: ['1', '1.15', '1.6', '2', '2.5', '3']
- // },//wangEditor编辑的配置
- props: {
- res: "data",
- url: "link",
- },
- },
- hide: true,
- minRows: 6,
- span: 24,
- },
- ],
+ height: "auto",
+ calcHeight: 54,
+ dialogWidth: 950,
+ tip: false,
+ border: false,
+ //stripe:true,
+ index: true,
+ viewBtn: false,
+ selection: true,
+ excelBtn: true,
+ dialogClickModal: false,
+ column: [{
+ overHidden: true,
+ label: "议事标题",
+ prop: "title",
+ span: 24,
+ row: true,
+ searchSpan: 4,
+ search: true,
+ rules: [{
+ required: true,
+ message: "请输入议事标题",
+ trigger: "blur",
+ }, ],
},
- data: [],
- optionDiscuss: {
- column: [{
- label: "",
- type: 'title',
- prop: "title",
- span: 24,
- row: true,
- offset: 2,
- styles: {
- fontSize: '24px'
- }
- }, {
- labelWidth: 100,
- label: '开启投票',
- prop: 'openFlag',
- type: 'radio',
- button: true,
- row: true,
- offset: 6,
- dicData: [{
- label: '开启',
- value: 0
- }, {
- label: '不开启',
- value: 1
- }],
- rules: [{
- required: true,
- message: "请选择开启状态",
- trigger: "blur",
- },],
- }, {
- labelWidth: 100,
- label: '投票限制',
- prop: 'voteRestrictions',
- type: 'radio',
- button: true,
- row: true,
- offset: 6,
- dicData: [{
- label: '一人一票',
- value: 0
- }, {
- label: '一户一票',
- value: 1
- }],
- rules: [{
- required: true,
- message: "请选择投票限制",
- trigger: "blur",
- },],
- }, {
- labelWidth: 100,
- label: '签名',
- prop: 'signatureFlag',
- type: 'radio',
- button: true,
- row: true,
- offset: 6,
- dicData: [{
- label: '不需要',
- value: 0
- }, {
- label: '需要',
- value: 1
- }],
- rules: [{
- required: true,
- message: "请选择是否签名",
- trigger: "blur",
- },],
- }, {
- labelWidth: 100,
- label: '指定用户',
- prop: 'appointUser',
- type: 'radio',
- button: true,
- row: true,
- offset: 6,
- dicData: [{
- label: '不限制',
- value: 0
- }, {
- label: '指定用户',
- value: 1
- }],
- rules: [{
- required: true,
- message: "请选择是否指定用户",
- trigger: "blur",
- },],
+ {
+ label: "范围",
+ prop: "articleList",
+ span: 24,
+ minRows: 2,
+ tags: true,
+ type: "cascader",
+ multiple: true,
+ dicData: [],
+ rules: [{
+ required: true,
+ message: "请选择范围",
+ trigger: "blur",
+ }, ],
+ props: {
+ label: "name",
+ value: 'id'
+ },
+ hide: true,
+ },
+ {
+ width: 110,
+ label: "封面",
+ prop: "url",
+ // align:'center',
+ type: "upload",
+ listType: "picture-img",
+ action: "/api/blade-resource/oss/endpoint/put-file",
+ propsHttp: {
+ res: "data",
+ url: "link",
+ },
+ // hide: true,
+ span: 24,
+ },
+ {
+ width: 110,
+ label: "文章类型",
+ prop: "articleType",
+ addDisplay: true,
+ editDisplay: true,
+ viewDisplay: true,
+ searchSpan: 4,
+ checkStrictly: true,
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=investigateType",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ search: true,
+ type: "tree",
+ rules: [{
+ required: true,
+ message: "请选择文章类型",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ label: "发布时间",
+ prop: "dateTime",
+ type: "daterange",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ searchSpan: 6,
+ searchRange: true,
+ hide: true,
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ search: true,
+ rules: [{
+ required: true,
+ message: "请选择发布时间",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ width: 100,
+ label: "发布时间",
+ prop: "createTime",
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
+ },
+ {
+ width: 100,
+ label: "发布状态",
+ prop: "publish",
+ searchSpan: 4,
+ value: "0",
+ slot: true,
+ search: true,
+ type: "select",
+ rules: [{
+ required: true,
+ message: "请选择发布状态",
+ trigger: "blur",
+ }, ],
+ dicData: [{
+ label: "未发布",
+ value: "0",
},
{
- label: "截止时间",
- row: true,
- offset: 6,
- prop: "endTime",
- type: "datetime",
- format: "yyyy-MM-dd hh:mm:ss",
- valueFormat: "timestamp",
- rules: [{
- required: true,
- message: "请选择截止时间",
- trigger: "blur",
- },],
- },
- ]
+ label: "已发布",
+ value: "1",
+ }
+ ],
},
- districtTree: [],
- }
+ {
+ span: 24,
+ label: "评论区",
+ prop: "iscomment",
+ width: 80,
+ slot: true,
+ type: "switch",
+ activeColor: "#13ce66",
+ inactiveColor: "#ccc",
+ value: '1',
+ dicData: [{
+ label: "关闭",
+ value: "0",
+ },
+ {
+ label: "开启",
+ value: "1",
+ }
+ ],
+ },
+ {
+ label: "视频",
+ prop: "videoUrl",
+ type: "upload",
+ accept: "video/mp4",
+ display: false,
+ hide: true,
+ span: 24,
+ listType: "picture-img",
+ action: "/api/depl/put-depl",
+ propsHttp: {
+ url: "data",
+ },
+ },
+ {
+ label: "议事内容",
+ prop: "content",
+ component: "AvueUeditor",
+ options: {
+ action: "/api/blade-resource/oss/endpoint/put-file",
+ // customConfig: {
+ // lineHeights: ['1', '1.15', '1.6', '2', '2.5', '3']
+ // },//wangEditor编辑的配置
+ props: {
+ res: "data",
+ url: "link",
+ },
+ },
+ hide: true,
+ minRows: 6,
+ span: 24,
+ },
+ ],
+ },
+ data: [],
+ optionDiscuss: {
+ column: [{
+ label: "",
+ type: 'title',
+ prop: "title",
+ span: 24,
+ row: true,
+ offset: 2,
+ styles: {
+ fontSize: '24px'
+ }
+ }, {
+ labelWidth: 100,
+ label: '开启投票',
+ prop: 'openFlag',
+ type: 'radio',
+ button: true,
+ row: true,
+ offset: 6,
+ dicData: [{
+ label: '开启',
+ value: 0
+ }, {
+ label: '不开启',
+ value: 1
+ }],
+ rules: [{
+ required: true,
+ message: "请选择开启状态",
+ trigger: "blur",
+ }, ],
+ }, {
+ labelWidth: 100,
+ label: '投票限制',
+ prop: 'voteRestrictions',
+ type: 'radio',
+ button: true,
+ row: true,
+ offset: 6,
+ dicData: [{
+ label: '一人一票',
+ value: 0
+ }, {
+ label: '一户一票',
+ value: 1
+ }],
+ rules: [{
+ required: true,
+ message: "请选择投票限制",
+ trigger: "blur",
+ }, ],
+ }, {
+ labelWidth: 100,
+ label: '签名',
+ prop: 'signatureFlag',
+ type: 'radio',
+ button: true,
+ row: true,
+ offset: 6,
+ dicData: [{
+ label: '不需要',
+ value: 0
+ }, {
+ label: '需要',
+ value: 1
+ }],
+ rules: [{
+ required: true,
+ message: "请选择是否签名",
+ trigger: "blur",
+ }, ],
+ }, {
+ labelWidth: 100,
+ label: '指定用户',
+ prop: 'appointUser',
+ type: 'radio',
+ button: true,
+ row: true,
+ offset: 6,
+ dicData: [{
+ label: '不限制',
+ value: 0
+ }, {
+ label: '指定用户',
+ value: 1
+ }],
+ rules: [{
+ required: true,
+ message: "请选择是否指定用户",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ label: "截止时间",
+ row: true,
+ offset: 6,
+ prop: "endTime",
+ type: "datetime",
+ format: "yyyy-MM-dd hh:mm:ss",
+ valueFormat: "timestamp",
+ rules: [{
+ required: true,
+ message: "请选择截止时间",
+ trigger: "blur",
+ }, ],
+ },
+ ]
+ },
+ districtTree: [],
+ }
},
watch: {
- "form.articleType": {
- handler (val) {
- if (val) {
- var videoUrl = this.findObject(this.option.column, "videoUrl")
- var content = this.findObject(this.option.column, "content")
- if (val.indexOf('ksp') != -1) {
- videoUrl.display = true
- content.display = false
- videoUrl.rules = [{
- required: false,
- message: "请选择视频",
- trigger: "blur",
- },]
- } else {
- videoUrl.display = false
- content.display = true
- videoUrl.rules = ""
- }
- }
- },
- immediate: true,
- }
+ "form.articleType": {
+ handler(val) {
+ if (val) {
+ var videoUrl = this.findObject(this.option.column, "videoUrl")
+ var content = this.findObject(this.option.column, "content")
+ if (val.indexOf('ksp') != -1) {
+ videoUrl.display = true
+ content.display = false
+ videoUrl.rules = [{
+ required: false,
+ message: "请选择视频",
+ trigger: "blur",
+ }, ]
+ } else {
+ videoUrl.display = false
+ content.display = true
+ videoUrl.rules = ""
+ }
+ }
+ },
+ immediate: true,
+ }
},
computed: {
- ...mapGetters(["permission", "userInfo"]),
- permissionList () {
- return {
- addBtn: this.vaildData(this.permission.article_add, true),
- viewBtn: this.vaildData(this.permission.article_view, true),
- delBtn: this.vaildData(this.permission.article_delete, true),
- editBtn: this.vaildData(this.permission.article_edit, true),
- }
- },
-
- ids () {
- let ids = []
- this.selectionList.forEach((ele) => {
- ids.push(ele.id)
- })
- return ids.join(",")
- },
-
- showStatus () {
- return (data, type) => {
- if (data == 0) {
- return {
- text: type == 1 ? '未发布' : '关闭',
- type: 'info'
- }
- } else if (data == 1) {
- return {
- text: type == 1 ? '已发布' : '开启',
- type: 'success'
- }
- }
- }
+ ...mapGetters(["permission", "userInfo"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.article_add, true),
+ viewBtn: this.vaildData(this.permission.article_view, true),
+ delBtn: this.vaildData(this.permission.article_delete, true),
+ editBtn: this.vaildData(this.permission.article_edit, true),
}
+ },
+
+ ids() {
+ let ids = []
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id)
+ })
+ return ids.join(",")
+ },
+
+ showStatus() {
+ return (data, type) => {
+ if (data == 0) {
+ return {
+ text: type == 1 ? '未发布' : '关闭',
+ type: 'info'
+ }
+ } else if (data == 1) {
+ return {
+ text: type == 1 ? '已发布' : '开启',
+ type: 'success'
+ }
+ }
+ }
+ }
},
methods: {
- openEditPopup (row) {
- this.$refs.DeitDiscussion.initData(row)
- },
+ openEditPopup(row) {
+ this.$refs.DeitDiscussion.initData(row)
+ },
- openUserPopup (row) {
- this.$refs.DeitDiscussion.openUser(row)
- },
+ openUserPopup(row) {
+ this.$refs.DeitDiscussion.openUser(row)
+ },
- openDilog (row, type) {
- var that = this
- this.$nextTick(() => {
- that.$refs.discussionManageChild.init(row)
- })
- },
+ openDilog(row, type) {
+ var that = this
+ this.$nextTick(() => {
+ that.$refs.discussionManageChild.init(row)
+ })
+ },
- rowSave (row, done, loading) {
- if (row.videoUrl.length == 0) {
- row.videoUrl = ""
- }
- row.userid = this.userInfo.user_id
- row.articleRange = JSON.stringify(row.articleList)
- if (row.url.length > 0) {
- var urls = []
- var split = row.url.split(",")
- split.forEach(url => {
- var names = url.split("jczz/")
- urls.push(names[1])
- })
- row.url = urls.join(",")
- }
- // 类型 0:文章 1经营性收支,2:物业招标 3:公益报名 4:选举调查
- row.type = 4
- row.publish = 1
-
- add(row).then(
- () => {
- this.onLoad(this.page)
- this.$message({
- type: "success",
- message: "操作成功!",
- })
- done()
- },
- (error) => {
- window.console.log(error)
- loading()
- }
- )
- },
- rowUpdate (row, index, done, loading) {
- row.articleRange = JSON.stringify(row.articleList)
- if (row.url.length > 0) {
- var urls = []
- var split = row.url.split(",")
- split.forEach(url => {
- var names = url.split("jczz/")
- urls.push(names[1])
- })
- row.url = urls.join(",")
- }
-
- 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)) {
- getNotice(this.form.id).then((res) => {
- let data = res.data.data
- // data.forEach(item=>{
- if (data.url.length > 0) {
- var urls = []
- var names = data.url.split(",")
- names.forEach(name => {
- urls.push(website.minioUrl + name)
- })
- data.url = urls.join(",")
- }
- // })
- this.form = {
- ...data,
- articleList: JSON.parse(data.articleRange)
- }
- })
- }
- // con
- done()
- },
- currentChange (currentPage) {
- this.page.currentPage = currentPage
- },
- sizeChange (pageSize) {
- this.page.pageSize = pageSize
- },
- refreshChange () {
- this.onLoad(this.page, this.query)
- },
- onLoad (page, params = {}) {
- const {
- dateTime
- } = this.query
- let values = {
- ...params,
- }
- if (dateTime) {
- values = {
- ...params,
- startTime: dateTime[0],
- endTime: dateTime[1],
- ...this.query,
- }
- values.dateTime = null
- }
- values.type = 4
- this.loading = true
- console.log(values)
- getList(page.currentPage, page.pageSize, values).then((res) => {
- const data = res.data.data
- this.page.total = data.total
- this.data = data.records
- this.data.forEach(item => {
- if (item.url.length > 0) {
- var urls = []
- var names = item.url.split(",")
- names.forEach(name => {
- urls.push(website.minioUrl + name)
- })
- item.url = urls.join(",")
- }
- })
- this.loading = false
- this.selectionClear()
- })
- getDistrictTree(params = {}).then((res) => {
- const data = res.data.data
- this.districtTree = data
- const column = this.findObject(this.option.column, "articleList")
- column.dicData = res.data.data
- this.loading = false
- })
- },
- updateFb (row) {
- if (row.publish == "0") {
- row.publish = "1"
- } else {
- row.publish = "0"
- }
- if (row.url.length > 0) {
- var urls = []
- var split = row.url.split(",")
- split.forEach(url => {
- var names = url.split("jczz/")
- urls.push(names[1])
- })
- row.url = urls.join(",")
- }
- update(row).then(
- () => {
- this.onLoad(this.page)
- this.$message({
- type: "success",
- message: "操作成功!",
- })
- done()
- },
- (error) => {
- window.console.log(error)
- loading()
- }
- )
- },
- kqcomment () {
- if (this.selectionList.length === 0) {
- this.$message.warning("请选择至少一条数据")
- return
- }
- this.$confirm("确定将选择数据开启评论?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- }).then(() => {
- return upcomment(this.ids, "1")
- })
- .then(() => {
- this.onLoad(this.page)
- this.$message({
- type: "success",
- message: "操作成功!",
- })
- this.$refs.crud.toggleSelection()
- })
- },
- gbcomment () {
- if (this.selectionList.length === 0) {
- this.$message.warning("请选择至少一条数据")
- return
- }
- this.$confirm("确定将选择数据开启评论?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- }).then(() => {
- return upcomment(this.ids, "0")
- })
- .then(() => {
- this.onLoad(this.page)
- this.$message({
- type: "success",
- message: "操作成功!",
- })
- this.$refs.crud.toggleSelection()
- })
+ rowSave(row, done, loading) {
+ if (row.videoUrl.length == 0) {
+ row.videoUrl = ""
}
+ row.userid = this.userInfo.user_id
+ row.articleRange = JSON.stringify(row.articleList)
+ if (row.url.length > 0) {
+ var urls = []
+ var split = row.url.split(",")
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.url = urls.join(",")
+ }
+ // 类型 0:文章 1经营性收支,2:物业招标 3:公益报名 4:选举调查
+ row.type = 4
+ row.publish = 1
+
+ add(row).then(
+ () => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+ rowUpdate(row, index, done, loading) {
+ row.articleRange = JSON.stringify(row.articleList)
+ if (row.url.length > 0) {
+ var urls = []
+ var split = row.url.split(",")
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.url = urls.join(",")
+ }
+
+ 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)) {
+ getNotice(this.form.id).then((res) => {
+ let data = res.data.data
+ // data.forEach(item=>{
+ if (data.url.length > 0) {
+ var urls = []
+ var names = data.url.split(",")
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ data.url = urls.join(",")
+ }
+ // })
+ this.form = {
+ ...data,
+ articleList: JSON.parse(data.articleRange)
+ }
+ })
+ }
+ // con
+ done()
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query)
+ },
+ onLoad(page, params = {}) {
+ const {
+ dateTime
+ } = this.query
+ let values = {
+ ...params,
+ }
+ if (dateTime) {
+ values = {
+ ...params,
+ startTime: dateTime[0],
+ endTime: dateTime[1],
+ ...this.query,
+ }
+ values.dateTime = null
+ }
+ values.type = 4
+ this.loading = true
+ console.log(values)
+ getList(page.currentPage, page.pageSize, values).then((res) => {
+ const data = res.data.data
+ this.page.total = data.total
+ this.data = data.records
+ this.data.forEach(item => {
+ if (item.url.length > 0) {
+ var urls = []
+ var names = item.url.split(",")
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ item.url = urls.join(",")
+ }
+ })
+ this.loading = false
+ this.selectionClear()
+ })
+ getDistrictTree(params = {}).then((res) => {
+ const data = res.data.data
+ this.districtTree = data
+ const column = this.findObject(this.option.column, "articleList")
+ column.dicData = res.data.data
+ this.loading = false
+ })
+ },
+ updateFb(row) {
+ if (row.publish == "0") {
+ row.publish = "1"
+ } else {
+ row.publish = "0"
+ }
+ if (row.url.length > 0) {
+ var urls = []
+ var split = row.url.split(",")
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.url = urls.join(",")
+ }
+ update(row).then(
+ () => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+ kqcomment() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据")
+ return
+ }
+ this.$confirm("确定将选择数据开启评论?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ }).then(() => {
+ return upcomment(this.ids, "1")
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ this.$refs.crud.toggleSelection()
+ })
+ },
+ gbcomment() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据")
+ return
+ }
+ this.$confirm("确定将选择数据开启评论?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ }).then(() => {
+ return upcomment(this.ids, "0")
+ })
+ .then(() => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ this.$refs.crud.toggleSelection()
+ })
+ }
},
-}
+ }
</script>
<style>
-.avue-upload__icon {
+ .avue-upload__icon {
line-height: 6;
-}
-</style>
+ }
+</style>
\ No newline at end of file
diff --git a/src/views/authority/role.vue b/src/views/authority/role.vue
index 1233dfb..3d06d33 100644
--- a/src/views/authority/role.vue
+++ b/src/views/authority/role.vue
@@ -1,53 +1,27 @@
<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">
- <template slot="menuLeft">
- <el-button type="danger"
- size="small"
- icon="el-icon-delete"
- v-if="permission.role_delete"
- plain
- @click="handleDelete">删 除
- </el-button>
- <el-button size="small"
- icon="el-icon-setting"
- @click="handleRole"
- v-if="userInfo.role_name.includes('admin')"
- plain>权限设置
- </el-button>
- </template>
- </avue-crud>
- <el-dialog title="角色权限配置"
- append-to-body
- :visible.sync="box"
- width="345px">
- <el-tabs type="border-card">
- <el-tab-pane label="权限">
- <el-tree :data="menuGrantList"
- show-checkbox
- node-key="id"
- ref="treeMenu"
- :default-checked-keys="menuTreeObj"
- :props="props">
- </el-tree>
- </el-tab-pane>
- <!-- <el-tab-pane label="数据权限">
+ <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">
+ <template slot="menuLeft">
+ <el-button type="danger" size="small" icon="el-icon-delete" v-if="permission.role_delete" plain
+ @click="handleDelete">删 除
+ </el-button>
+ <el-button size="small" icon="el-icon-setting" @click="handleRole"
+ v-if="userInfo.role_name.includes('admin')" plain>权限设置
+ </el-button>
+ </template>
+ </avue-crud>
+ <el-dialog title="角色权限配置" append-to-body :visible.sync="box" width="345px">
+ <el-tabs type="border-card">
+ <el-tab-pane label="权限">
+ <el-tree :data="menuGrantList" show-checkbox node-key="id" ref="treeMenu"
+ :default-checked-keys="menuTreeObj" :props="props">
+ </el-tree>
+ </el-tab-pane>
+ <!-- <el-tab-pane label="数据权限">
<el-tree :data="dataScopeGrantList"
show-checkbox
node-key="id"
@@ -65,316 +39,317 @@
:props="props">
</el-tree>
</el-tab-pane> -->
- </el-tabs>
+ </el-tabs>
- <span slot="footer"
- class="dialog-footer">
- <el-button @click="box = false">取 消</el-button>
- <el-button type="primary"
- @click="submit">确 定</el-button>
- </span>
- </el-dialog>
- </basic-container>
+ <span slot="footer" class="dialog-footer">
+ <el-button @click="box = false">取 消</el-button>
+ <el-button type="primary" @click="submit">确 定</el-button>
+ </span>
+ </el-dialog>
+ </basic-container>
</template>
<script>
- import {add, getList, getRoleList, getRole, getRoleTreeById, grant, grantTree, remove, update} from "@/api/system/role";
- import {mapGetters} from "vuex";
- import website from '@/config/website';
+import { add, getList, getRoleList, getRole, getRoleTreeById, grant, grantTree, remove, update } from "@/api/system/role"
+import { mapGetters } from "vuex"
+import website from '@/config/website'
- export default {
- data() {
- return {
- form: {},
- box: false,
- props: {
- label: "title",
- value: "key"
- },
- menuGrantList: [],
- dataScopeGrantList: [],
- apiScopeGrantList: [],
- apiGrantList: [],
- menuTreeObj: [],
- dataScopeTreeObj: [],
- apiScopeTreeObj: [],
- selectionList: [],
- query: {},
- loading: true,
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- option: {
- tip: false,
- simplePage: true,
- searchShow: true,
- searchMenuSpan: 6,
- tree: true,
- border: true,
- index: true,
- selection: true,
- viewBtn: true,
- dialogWidth: 900,
- dialogClickModal: false,
- column: [
- {
- label: "角色名称",
- prop: "roleName",
- search: true,
- span: 24,
- rules: [
- {
- required: true,
- message: "请输入角色名称",
- trigger: "blur"
- }
- ]
+export default {
+ data () {
+ return {
+ form: {},
+ box: false,
+ props: {
+ label: "title",
+ value: "key"
},
- // {
- // 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,
- // search: website.tenantMode,
- // rules: [{
- // required: true,
- // message: "请输入所属租户",
- // trigger: "click"
- // }]
- // },
- {
- label: "角色别名",
- prop: "roleAlias",
- search: true,
- span: 24,
- rules: [
- {
- required: true,
- message: "请输入角色别名",
- trigger: "blur"
- }
- ]
+ menuGrantList: [],
+ dataScopeGrantList: [],
+ apiScopeGrantList: [],
+ apiGrantList: [],
+ menuTreeObj: [],
+ dataScopeTreeObj: [],
+ apiScopeTreeObj: [],
+ selectionList: [],
+ query: {},
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0
},
- {
- label: "上级角色",
- prop: "parentId",
- dicData: [],
- type: "tree",
- hide: true,
- span: 24,
- props: {
- label: "title"
- },
- rules: [
- {
- required: false,
- message: "请选择上级角色",
- trigger: "click"
- }
- ]
+ option: {
+ lazy: true,
+ tip: false,
+ simplePage: true,
+ searchShow: true,
+ searchMenuSpan: 6,
+ tree: true,
+ border: true,
+ index: true,
+ selection: true,
+ viewBtn: true,
+ dialogWidth: 900,
+ dialogClickModal: false,
+ column: [
+ {
+ label: "角色名称",
+ prop: "roleName",
+ search: true,
+ span: 24,
+ rules: [
+ {
+ required: true,
+ message: "请输入角色名称",
+ trigger: "blur"
+ }
+ ]
+ },
+ // {
+ // 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,
+ // search: website.tenantMode,
+ // rules: [{
+ // required: true,
+ // message: "请输入所属租户",
+ // trigger: "click"
+ // }]
+ // },
+ {
+ label: "角色别名",
+ prop: "roleAlias",
+ search: true,
+ span: 24,
+ rules: [
+ {
+ required: true,
+ message: "请输入角色别名",
+ trigger: "blur"
+ }
+ ]
+ },
+ {
+ label: "上级角色",
+ prop: "parentId",
+ type: "tree",
+ dicData: [],
+ addDisabled: false,
+ hide: true,
+ span: 24,
+ props: {
+ label: "title",
+ value: 'id'
+ },
+ rules: [
+ {
+ required: false,
+ message: "请选择上级角色",
+ trigger: "click"
+ }
+ ]
+ },
+ {
+ label: "角色排序",
+ prop: "sort",
+ type: "number",
+ span: 24,
+ rules: [
+ {
+ required: true,
+ message: "请输入角色排序",
+ trigger: "blur"
+ }
+ ]
+ }
+ ]
},
- {
- label: "角色排序",
- prop: "sort",
- type: "number",
- span: 24,
- rules: [
- {
- required: true,
- message: "请输入角色排序",
- trigger: "blur"
- }
- ]
- }
- ]
- },
- data: []
- };
+ data: []
+ }
},
computed: {
- ...mapGetters(["userInfo", "permission"]),
- permissionList() {
- return {
- addBtn: this.vaildData(this.permission.role_add, false),
- viewBtn: this.vaildData(this.permission.role_view, false),
- delBtn: this.vaildData(this.permission.role_delete, false),
- editBtn: this.vaildData(this.permission.role_edit, false)
- };
- },
- ids() {
- let ids = [];
- this.selectionList.forEach(ele => {
- ids.push(ele.id);
+ ...mapGetters(["userInfo", "permission"]),
+ permissionList () {
+ return {
+ addBtn: this.vaildData(this.permission.role_add, false),
+ viewBtn: this.vaildData(this.permission.role_view, false),
+ delBtn: this.vaildData(this.permission.role_delete, false),
+ editBtn: this.vaildData(this.permission.role_edit, false)
+ }
+ },
+ ids () {
+ let ids = []
+ this.selectionList.forEach(ele => {
+ ids.push(ele.id)
- });
- return ids.join(",");
- },
- idsArray() {
- let ids = [];
- this.selectionList.forEach(ele => {
- ids.push(ele.id);
- });
- return ids;
- }
+ })
+ return ids.join(",")
+ },
+ idsArray () {
+ let ids = []
+ this.selectionList.forEach(ele => {
+ ids.push(ele.id)
+ })
+ return ids
+ }
},
methods: {
- initData(roleId){
- getRoleTreeById(roleId).then(res => {
- const column = this.findObject(this.option.column, "parentId");
- column.dicData = res.data.data;
- });
- },
- submit() {
- const menuList = this.$refs.treeMenu.getCheckedKeys();
- const dataScopeList = [];
- const apiScopeList = [];
- grant(this.idsArray, menuList, dataScopeList, apiScopeList).then(() => {
- this.box = false;
- this.$message({
- type: "success",
- message: "操作成功!"
- });
- this.onLoad(this.page);
- });
- },
- 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: "操作成功!"
- });
- });
- },
+ initData (roleId) {
+ getRoleTreeById(roleId).then(res => {
+ const column = this.findObject(this.option.column, "parentId")
+ column.dicData = res.data.data
+ })
+ },
+ submit () {
+ const menuList = this.$refs.treeMenu.getCheckedKeys()
+ const dataScopeList = []
+ const apiScopeList = []
+ grant(this.idsArray, menuList, dataScopeList, apiScopeList).then(() => {
+ this.box = false
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ })
+ this.onLoad(this.page)
+ })
+ },
+ 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();
- },
- beforeOpen(done, type) {
- if (["add", "edit"].includes(type)) {
- this.initData(this.form.id);
+ 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()
+ },
+ beforeOpen (done, type) {
+ if (["add", "edit"].includes(type)) {
+ this.initData(this.form.id)
+ }
+ done()
+ },
+ handleRole () {
+ if (this.selectionList.length !== 1) {
+ this.$message.warning("只能选择一条数据")
+ return
+ }
+ this.menuTreeObj = []
+ this.dataScopeTreeObj = []
+ this.apiScopeTreeObj = []
+ grantTree()
+ .then(res => {
+ this.menuGrantList = res.data.data.menu
+ // this.dataScopeGrantList = res.data.data.dataScope;
+ // this.apiScopeGrantList = res.data.data.apiScope;
+ getRole(this.ids).then(res => {
+ this.menuTreeObj = res.data.data.menu
+ // this.dataScopeTreeObj = res.data.data.dataScope;
+ // this.apiScopeTreeObj = res.data.data.apiScope;
+ this.box = 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()
+ })
+ },
+ 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
+ getRoleList(Object.assign(params, this.query)).then(res => {
+ this.data = res.data.data
+ this.loading = false
+ this.selectionClear()
+ })
}
- done();
- },
- handleRole() {
- if (this.selectionList.length !== 1) {
- this.$message.warning("只能选择一条数据");
- return;
- }
- this.menuTreeObj = [];
- this.dataScopeTreeObj = [];
- this.apiScopeTreeObj = [];
- grantTree()
- .then(res => {
- this.menuGrantList = res.data.data.menu;
- // this.dataScopeGrantList = res.data.data.dataScope;
- // this.apiScopeGrantList = res.data.data.apiScope;
- getRole(this.ids).then(res => {
- this.menuTreeObj = res.data.data.menu;
- // this.dataScopeTreeObj = res.data.data.dataScope;
- // this.apiScopeTreeObj = res.data.data.apiScope;
- this.box = 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();
- });
- },
- 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;
- getRoleList(Object.assign(params, this.query)).then(res => {
- this.data = res.data.data;
- this.loading = false;
- this.selectionClear();
- });
- }
}
- };
+}
</script>
diff --git a/src/views/cGovernance/reportForRepairs.vue b/src/views/cGovernance/reportForRepairs.vue
new file mode 100644
index 0000000..de0c335
--- /dev/null
+++ b/src/views/cGovernance/reportForRepairs.vue
@@ -0,0 +1,899 @@
+<!--
+ * @Author: shuishen 1109946754@qq.com
+ * @Date: 2023-12-14 17:10:00
+ * @LastEditors: shuishen 1109946754@qq.com
+ * @LastEditTime: 2024-01-09 18:59:37
+ * @FilePath: \jczz_web\src\views\task\reportForRepairs.vue
+ * @Description:
+ *
+ * Copyright (c) 2023 by shuishen, All Rights Reserved.
+-->
+<!-- 走访日志 -->
+<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">
+ <template slot="confirmFlag" slot-scope="{row, size}">
+ <el-tag :size="size" :type="showConfirmFlag(row.confirmFlag).type">
+ {{ showConfirmFlag(row.confirmFlag).text }}
+ </el-tag>
+ </template>
+
+ <template slot="expand" slot-scope="{row, size}">
+ <el-timeline>
+ <el-timeline-item v-for="(item, index) in timeLineData(row)" :key="index" :timestamp="item.createTime"
+ :icon="item.icon" :color="item.color" :hide-timestamp="item.contentType == 3" placement="top">
+ <el-card v-show="item.contentType == 1" :body-style="{ padding: '10px', background: '#f8f8f8' }">
+ <div>
+ 评价:{{ item.content }}
+ </div>
+ <el-rate v-model="item.point" disabled :colors="colors">
+ </el-rate>
+ </el-card>
+
+ <el-card v-show="item.peopleType != 1 && item.contentType == 0"
+ :body-style="{ padding: '10px', background: '#f8f8f8' }">
+ <div>
+ {{ item.name }} {{ item.mobile }}
+ </div>
+ <div>
+ {{ item.content }}
+ </div>
+ <div v-show="item.imageList != '' && item.imageList != null">
+ <el-image style="width: 100px; height: 100px" :src="showCurImage(item.imageList)"
+ :preview-src-list="showImageListData(item.imageList)">
+ </el-image>
+ </div>
+ </el-card>
+
+ <el-card v-show="item.peopleType == 1 && item.contentType == 0"
+ :body-style="{ padding: '10px', background: '#f8f8f8' }">
+ <span style="color: rgb(204, 204, 204);">系统:{{ item.content || '959999' }}</span>
+ </el-card>
+
+ <span v-show="item.contentType == 3">结束</span>
+ </el-timeline-item>
+
+
+ <!-- <el-timeline-item timestamp="2018/4/12" placement="top">
+ <el-card>
+ <h4>更新 Github 模板</h4>
+ <p>王小虎 提交于 2018/4/12 20:46</p>
+ </el-card>
+ </el-timeline-item> -->
+ </el-timeline>
+ </template>
+
+ <template slot-scope="{row, size, index}" slot="menu">
+ <el-button :size="size" v-if="permission.report_for_repairs_details" type="text"
+ icon="el-icon-document-remove" @click="rowExpansion(row)">
+ 详情
+ </el-button>
+
+ <el-button :size="size" v-if="permission.report_for_repairs_reply" type="text"
+ icon="el-icon-chat-dot-square" :disabled="row.confirmFlag === 3" @click="replyBtnClick(row)">
+ 回复
+ </el-button>
+
+ <el-button :size="size" v-if="permission.report_for_repairs_turn_over" type="text"
+ icon="el-icon-document-copy" :disabled="row.confirmFlag === 3" @click="turnOverBtnClick(row)">
+ 移交
+ </el-button>
+
+ <el-button :size="size" v-if="permission.report_for_repairs_del" type="text" icon="el-icon-delete"
+ @click="rowDel(row)">
+ 删除
+ </el-button>
+ </template>
+
+ <template slot="menuLeft">
+ <el-button size="small" icon="el-icon-delete" plain v-if="permission.article_delete" @click="handleDelete">删
+ 除
+ </el-button>
+ </template>
+ </avue-crud>
+
+ <el-dialog title="回复" append-to-body :visible.sync="replyPopup" center @close="popupClose">
+ <avue-form ref="replyForm" :option="replyOption" v-model="replyForm" @submit="handleSubmit"
+ @reset-change="handleReset">
+ <template slot-scope="{row}" slot="videoList">
+ <el-upload class="video-uploader" action="/api/blade-resource/oss/endpoint/put-file"
+ :file-list="fileList" :headers="updateHeader" :show-file-list="true" :limit="1" :on-change="getFile"
+ :on-exceed="handleExceed" :on-success="uploadVideoProcess" :before-upload="beforeUploadVideo"
+ :before-remove="beforeRemove">
+ <el-button size="small" type="primary">点击上传</el-button>
+ <div slot="tip" class="el-upload__tip">上传视频只能是 mp4 格式,且大小不能超过 50MB</div>
+ </el-upload>
+ </template>
+ </avue-form>
+ </el-dialog>
+
+ <el-dialog title="转交" class="turn-over-popup" append-to-body :visible.sync="turnOverPopup" center
+ @close="popupClose">
+ <avue-form ref="turnOverForm" :option="turnOverOption" v-model="turnOverForm" @submit="turnOverHandleSubmit"
+ @reset-change="turnOverHandleReset"></avue-form>
+ </el-dialog>
+ </basic-container>
+</template>
+
+<script>
+import {
+ getList,
+ remove,
+ update,
+ add,
+ getReportForRepairs,
+ saveReply
+} from "@/api/task/reportForRepairs"
+import {
+ mapGetters
+} from "vuex"
+import website from '@/config/website'
+import {
+ Base64
+} from 'js-base64'
+import {
+ getToken
+} from '@/util/auth'
+
+export default {
+ data () {
+ let validatorPhone = function (rule, value, callback) {
+ if (value) {
+ if (!/^1[3456789]\d{9}$/.test(value)) {
+ callback(new Error('手机号格式有误!'))
+ } else {
+ callback()
+ }
+ }
+ callback()
+ }
+
+ return {
+ colors: ['#99A9BF', '#F7BA2A', '#FF9900'],
+ form: {},
+ query: {},
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+ datetime: "",
+ selectionList: [],
+ option: {
+ labelWidth: 96,
+ searchLabelWidth: 96,
+ searchShow: true,
+ searchMenuSpan: 3,
+ menuWidth: 280,
+
+ viewBtn: false,
+ editBtn: false,
+ delBtn: false,
+ index: false,
+ selection: false,
+ expand: true,
+ height: "auto",
+ calcHeight: 54,
+ dialogWidth: 950,
+ tip: false,
+ border: true,
+ //stripe:true,
+ // excelBtn: true,
+ dialogClickModal: false,
+ column: [
+ {
+ width: 100,
+ label: "类型",
+ prop: "type",
+ span: 12,
+ searchLabelWidth: 66,
+ searchSpan: 4,
+ search: true,
+ dataType: "number",
+ type: "select",
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=reportForRepairsType",
+ props: {
+ label: "dictValue",
+ value: "dictKey",
+ },
+ },
+ {
+ width: 110,
+ label: "姓名",
+ prop: "realName",
+ span: 12,
+ searchSpan: 4,
+ searchLabelWidth: 66,
+ search: true,
+ },
+
+ {
+ width: 120,
+ label: "手机号码",
+ prop: "phone",
+ search: true,
+ searchSpan: 4,
+ slot: true,
+ rules: [{
+ validator: validatorPhone,
+ trigger: 'blur'
+ }],
+ },
+
+ {
+ width: 110,
+ label: "图片",
+ prop: "imageUrls",
+ type: "upload",
+ listType: "picture-card",
+ dataType: "string",
+ multiple: true,
+ action: "/api/blade-resource/oss/endpoint/put-file",
+ propsHttp: {
+ res: "data",
+ name: 'name',
+ url: "link",
+ },
+ span: 24,
+ },
+ {
+ overHidden: true,
+ label: "地点",
+ prop: "addressName",
+ },
+ {
+ width: 100,
+ label: "状态",
+ addDisplay: false,
+ editDisplay: false,
+ slot: true,
+ prop: "confirmFlag",
+ overHidden: true
+ },
+ {
+ width: 144,
+ label: "上报时间",
+ prop: "createTime",
+ addDisplay: false,
+ editDisplay: false,
+ type: "date",
+ format: "yyyy-MM-dd HH:mm:ss",
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
+ },
+ {
+ width: 144,
+ label: "处理时间",
+ prop: "confirmTime",
+ addDisplay: false,
+ editDisplay: false,
+ type: "date",
+ format: "yyyy-MM-dd HH:mm:ss",
+ valueFormat: "yyyy-MM-dd HH:mm:ss",
+ },
+ {
+ label: "描述",
+ prop: "remark",
+ type: "textarea",
+ hide: true,
+ span: 24,
+ }
+ ],
+ },
+ data: [],
+
+ replyPopup: false,
+ replyForm: {},
+ replyOption: {
+ submitBtn: true,
+ submitText: '确定',
+ emptyBtn: true,
+ emptyText: '取消',
+
+ column: [{
+ span: 24,
+ label: "说明",
+ prop: "content",
+ type: 'textarea',
+ minRows: 3,
+ maxRows: 5,
+ rules: [{
+ required: true,
+ message: "请输入说明",
+ trigger: "blur",
+ }],
+ },
+
+ {
+ label: '处理状态',
+ prop: 'confirmFlag',
+ type: 'select',
+ dicData: [{
+ label: '待处理',
+ value: 1
+ }, {
+ label: '处理中',
+ value: 2
+ }, {
+ label: '已处理',
+ value: 3
+ }],
+ rules: [{
+ required: true,
+ message: "请选择处理状态",
+ trigger: "blur",
+ }],
+ },
+
+ {
+ width: 110,
+ fileType: 'img',
+ label: "图片",
+ prop: "imageList",
+ type: "upload",
+ listType: "picture-card",
+ dataType: "string",
+ multiple: true,
+ action: "/api/blade-resource/oss/endpoint/put-file",
+ propsHttp: {
+ res: "data",
+ name: 'name',
+ url: "link",
+ },
+ span: 24,
+ },
+
+ {
+ slot: true,
+ label: "视频",
+ prop: "videoList",
+ span: 24,
+ }
+ ]
+ },
+
+ turnOverPopup: false,
+ turnOverForm: {},
+ turnOverOption: {
+ submitBtn: true,
+ submitText: '确定',
+ emptyBtn: true,
+ emptyText: '取消',
+
+ column: [
+ // {
+ // hide: true,
+ // span: 14,
+ // label: "地址",
+ // prop: "addressCode",
+ // },
+
+ {
+ span: 24,
+ label: "人员类型",
+ prop: "peopleType",
+ type: 'select',
+ dicData: [{
+ label: '网格员',
+ value: 0
+ }, {
+ label: '物业公司人员',
+ value: 2
+ }],
+ cascader: ["transferUserId"],
+ rules: [{
+ required: true,
+ message: "请选择人员类型",
+ trigger: "blur",
+ }],
+ },
+
+ {
+ span: 24,
+ label: "指定人员",
+ prop: "transferUserId",
+ type: 'select',
+ dicUrl: `/api/blade-system/user/getUserInfoByCode?houseCode={{addressCode}}&type={{peopleType}}`,
+ props: {
+ label: "name",
+ value: "id",
+ },
+ change: ({
+ value,
+ column,
+ item,
+ dic
+ }) => {
+ this.curPeopleDetails = {}
+
+ if (value) {
+ this.curPeopleDetails = item
+ }
+ },
+ rules: [{
+ required: true,
+ message: "请选择指定人员",
+ trigger: "blur",
+ }],
+ },
+ ]
+ },
+
+ curRow: {},
+
+ fileList: [],
+ updateHeader: {
+ Authorization: `Basic ${Base64.encode(`${website.clientId}:${website.clientSecret}`)}`,
+ 'Blade-Auth': getToken()
+ },
+
+ curPeopleDetails: {},
+
+ videoFlag: false,
+ videoUploadPercent: ''
+ }
+ },
+ watch: {},
+ computed: {
+ ...mapGetters(["permission", "userInfo"]),
+ permissionList () {
+ return {
+ addBtn: this.vaildData(this.permission.reportForRepairs_add, true),
+ viewBtn: this.vaildData(this.permission.reportForRepairs_view, true),
+ delBtn: this.vaildData(this.permission.reportForRepairs_delete, true),
+ editBtn: this.vaildData(this.permission.reportForRepairs_edit, true),
+ }
+ },
+
+ ids () {
+ let ids = []
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id)
+ })
+ return ids.join(",")
+ },
+
+ timeLineData () {
+ return (row) => {
+ let imageList = row.imageUrls
+
+ if (row.taskRepairAppraiseList.length) {
+ return [{
+ createTime: row.createTime,
+ mobile: row.phone,
+ name: row.realName,
+ imageList,
+ content: row.remark,
+ color: '#1890ff',
+ contentType: 0,
+ },
+ ...row.taskRepairStepList.map((item, index) => {
+ if (index == 0) {
+ return {
+ ...item,
+ contentType: 0,
+ }
+ }
+ return {
+ ...item,
+ contentType: 0
+ }
+ }),
+ ...row.taskRepairAppraiseList.map(item => {
+ return {
+ ...item,
+ contentType: 1
+ }
+ }),
+ {
+ contentType: 3,
+ createTime: '',
+ icon: 'el-icon-check',
+ color: '#0bbd87'
+ }
+ ]
+ } else {
+ return [{
+ createTime: row.createTime,
+ mobile: row.phone,
+ name: row.realName,
+ imageList,
+ content: row.remark,
+ color: '#1890ff',
+ contentType: 0,
+ },
+ ...row.taskRepairStepList.map((item, index) => {
+ if (index == 0) {
+ return {
+ ...item,
+ contentType: 0,
+ }
+ }
+ return {
+ ...item,
+ contentType: 0
+ }
+ })
+ ]
+ }
+ }
+ },
+
+ showCurImage () {
+ return (data) => {
+ if (data != null && data.length > 0) {
+ return data.split(',').filter(item => item != '')[0]
+ }
+ return ''
+ }
+ },
+
+ showImageListData () {
+ return (data) => {
+ if (data != null && data.length > 0) {
+ return data.split(',').filter(item => item != '')
+ }
+ return []
+ }
+ },
+
+ showConfirmFlag () {
+ return (data) => {
+ let tags = {}
+
+ if (data == 1) {
+ tags = {
+ type: 'warning',
+ text: '待处理'
+ }
+ } else if (data == 2) {
+ tags = {
+ type: '',
+ text: '处理中'
+ }
+ } else if (data == 3) {
+ tags = {
+ type: 'success',
+ text: '已处理'
+ }
+ } else if (data == 4) {
+ tags = {
+ type: 'success',
+ text: '已评价'
+ }
+ }
+
+ return tags
+ }
+ }
+ },
+ methods: {
+ rowExpansion (row) {
+ this.$refs.crud.toggleRowExpansion(row)
+ },
+
+ popupClose () {
+ this.$refs.replyForm && this.$refs.replyForm.resetForm()
+ this.$refs.turnOverForm && this.$refs.turnOverForm.resetForm()
+ },
+
+ saveReply (data, done) {
+ saveReply(data).then(
+ () => {
+ this.replyPopup = false
+ this.turnOverPopup = false
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ }
+ )
+ },
+
+ handleSubmit (form, done) {
+
+ if (form.imageList.length > 0) {
+ var urls = []
+ var split = form.imageList.split(",").filter(item => item != '')
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ form.imageList = urls.join(",")
+ }
+ // if (form.imageList.length > 0) {
+ // var urls = []
+ // var split = form.imageList.split(",").filter(item => item != '')
+ // split.forEach(url => {
+ // var names = url.split("jczz/")
+ // urls.push(names[1])
+ // })
+ // form.imageList = urls.join(",")
+ // }
+
+ this.saveReply({
+ ...form,
+ videoList: this.fileList.map(item => item.response.data.link).join(','),
+ repairId: this.curRow.id,
+ peopleType: 0,
+ mobile: this.userInfo.phone
+ }, done)
+ },
+
+ handleReset () {
+ this.fileList = []
+ this.replyPopup = false
+ },
+
+ turnOverHandleSubmit (form, done) {
+ let content = ''
+
+ if (form.peopleType == 0) {
+ content = `事件已移交至 网格员 ${this.curPeopleDetails.name}`
+ } else if (form.peopleType == 2) {
+ content = `事件已移交至 物业公司人员 ${this.curPeopleDetails.distictName || ''}${this.curPeopleDetails.name}`
+ }
+
+ this.saveReply({
+ ...form,
+ confirmFlag: 1,
+ content,
+ peopleType: 1,
+ repairId: this.curRow.id,
+ }, done)
+ },
+
+ turnOverHandleReset () {
+ this.turnOverPopup = false
+ },
+
+ //移除
+ beforeRemove (file, fileList) {
+ return this.$confirm(`确定移除 ${file.name}?`).then(() => {
+ this.fileList = fileList
+ })
+ },
+
+ //上传
+ getFile (file, fileList) {
+ this.fileList = fileList
+ },
+
+ beforeUploadVideo (file) {
+ const isLt50M = file.size / 1024 / 1024 < 50
+ if (['video/mp4'].indexOf(file.type) == -1) {
+ this.$message.error('上传视频只能是 mp4 格式!')
+ return false
+ }
+ if (!isLt50M) {
+ this.$message.error('上传视频大小不能超过 50MB!')
+ return false
+ }
+ return true
+ },
+
+ handleExceed (files, fileList) {
+ this.$message.warning("目前只能上传一个视频文件")
+ },
+
+ uploadVideoProcess (event, file, fileList) {
+ console.log(event, file, fileList, this.fileList)
+ },
+
+ replyBtnClick (row) {
+ this.curRow = row
+ this.replyForm = {}
+ this.replyPopup = true
+ },
+
+ turnOverBtnClick (row) {
+ this.curRow = row
+ this.turnOverForm = {
+ addressCode: row.addressCode
+ }
+ this.turnOverPopup = true
+ },
+
+ rowSave (row, done, loading) {
+ if (row.imageUrls.length > 0) {
+ var urls = []
+ var split = row.imageUrls.split(",")
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.imageUrls = urls.join(",")
+ }
+ add(row).then(
+ () => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+ rowUpdate (row, index, done, loading) {
+ if (row.imageUrls.length > 0) {
+ var urls = []
+ var split = row.imageUrls.split(",")
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.imageUrls = urls.join(",")
+ }
+ 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)) {
+ getReportForRepairs(this.form.id).then((res) => {
+ this.form = res.data.data
+ if (this.form.imageUrls) {
+ if (this.form.imageUrls.length > 0) {
+ var urls = []
+ var names = this.form.imageUrls.split(",")
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ this.form.imageUrls = urls.join(",")
+ }
+ }
+ })
+ }
+
+ done()
+ },
+ currentChange (currentPage) {
+ this.page.currentPage = currentPage
+ },
+ sizeChange (pageSize) {
+ this.page.pageSize = pageSize
+ },
+ refreshChange () {
+ this.onLoad(this.page, this.query)
+ },
+ onLoad (page, params = {}) {
+ const {
+ dateTime
+ } = this.query
+ let values = {
+ ...params,
+ }
+ if (dateTime) {
+ values = {
+ ...params,
+ startTime: dateTime[0],
+ endTime: dateTime[1],
+ ...this.query,
+ }
+ values.dateTime = 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.data.forEach(item => {
+ if (item.imageUrls) {
+ if (item.imageUrls.length > 0) {
+ var urls = []
+ var names = item.imageUrls.split(",")
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ item.imageUrls = urls.join(",")
+ }
+ }
+ if (item.taskRepairStepList.length > 0) {
+ item.taskRepairStepList.forEach(ee => {
+ if (ee.imageList) {
+ if (ee.imageList.length > 0) {
+ var urls = []
+ var names = ee.imageList.split(",")
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ ee.imageList = urls.join(",")
+ }
+ }
+ })
+ }
+ })
+ this.loading = false
+ this.selectionClear()
+ })
+ }
+ },
+}
+</script>
+
+<style>
+.avue-upload__icon {
+ line-height: 6;
+}
+</style>
\ No newline at end of file
diff --git a/src/views/grid/gridman.vue b/src/views/grid/gridman.vue
index fe6eac5..1a50f0a 100644
--- a/src/views/grid/gridman.vue
+++ b/src/views/grid/gridman.vue
@@ -125,9 +125,7 @@
{
overHidden: true,
label: "所属社区",
- addDisplay: false,
- editDisplay: false,
- viewDisplay: false,
+ display: false,
prop: "communityName",
search: true,
searchSpan: 4,
diff --git a/src/views/place/components/baseAllInfo.vue b/src/views/place/components/baseAllInfo.vue
index 88930ba..752dfd9 100644
--- a/src/views/place/components/baseAllInfo.vue
+++ b/src/views/place/components/baseAllInfo.vue
@@ -147,7 +147,7 @@
label: "name",
value: "id",
},
- cascader: ["gridId"],
+ cascader: ["gridCode"],
rules: [
{
required: true,
@@ -159,14 +159,14 @@
{
hide: true,
label: "所属网格",
- prop: "gridId",
+ prop: "gridCode",
type: "tree",
cell: true,
props: {
label: "gridName",
- value: "id",
+ value: "gridCode",
},
- dataType: 'string',
+ // dataType: 'string',
dicUrl:
"/api/blade-grid/grid/getGridList?communityCode={{neiCode}}",
rules: [
@@ -392,9 +392,6 @@
getPlaceExt({ placeId: newData['id'] }),
]).then(that.$axios.spread(function (baseInfo, restInfo) {
that.form = baseInfo.data.data
- console.log(that.form, 90999)
-
- // that.$nextTick(() => that.$refs.baseForm.dicInit('cascader'))
that.form.location = [that.form.lng, that.form.lat, that.form.location].join(',')
@@ -436,13 +433,7 @@
planImageUrls
}
}
-
- // that.$nextTick(() => {
- // that.$refs.baseForm.dicInit('select')
- // })
}))
-
- that.holdOnLoad(this.holdPage)
},
locationDispose (data) {
@@ -523,6 +514,7 @@
},
holdOnLoad (holdPage, params = {}) {
+
if (!this.curRow.id) return
let values = {
@@ -549,20 +541,27 @@
this.holdPage.pageSize = pageSize
},
- dataUpdate () {
- const that = this
-
- let imageUrls = this.form.imageUrls
-
- if (imageUrls.length > 0) {
+ desposeImage (data) {
+ if (data.length > 0) {
var urls = []
- var split = imageUrls.split(",").filter(item => item != '')
+ var split = data.split(",").filter(item => item != '')
split.forEach(url => {
var names = url.split("jczz/")
urls.push(names[1])
})
- imageUrls = urls.join(",")
+ data = urls.join(",")
}
+
+ return data
+ },
+
+ dataUpdate () {
+ const that = this
+
+ let imageUrls = this.desposeImage(this.form.imageUrls)
+ let placeImages = this.desposeImage(this.placeForm.imageUrls)
+ let placePlanImageUrls = this.desposeImage(this.placeForm.planImageUrls)
+
let label = this.form.label
@@ -582,14 +581,18 @@
label,
...this.locationDispose(this.form.location)
}),
- updatePlaceExt(this.placeForm)
+ updatePlaceExt({
+ ...this.placeForm,
+ imageUrls: placeImages,
+ planImageUrls: placePlanImageUrls
+ })
]).then(that.$axios.spread(function () {
that.$message({
type: "success",
message: "操作成功!",
})
- that.closeRowDetails()
+ that.roleBoxClose()
that.placeElement.onLoad(that.placeElement.page, that.placeElement.query)
diff --git a/src/views/place/index.vue b/src/views/place/index.vue
index e453047..6116248 100644
--- a/src/views/place/index.vue
+++ b/src/views/place/index.vue
@@ -227,7 +227,7 @@
label: "name",
value: "id",
},
- cascader: ["gridId"],
+ cascader: ["gridCode"],
rules: [
{
required: true,
@@ -256,12 +256,12 @@
{
hide: true,
label: "所属网格",
- prop: "gridId",
+ prop: "gridCode",
type: "tree",
cell: true,
props: {
label: "gridName",
- value: "id",
+ value: "gridCode",
},
dicUrl:
"/api/blade-grid/grid/getGridList?communityCode={{neiCode}}",
diff --git a/src/views/property/components/propertyEdit.vue b/src/views/property/components/propertyEdit.vue
index 44d3b6e..f994763 100644
--- a/src/views/property/components/propertyEdit.vue
+++ b/src/views/property/components/propertyEdit.vue
@@ -7,6 +7,7 @@
<el-tab-pane label="经营信息" name="info2"></el-tab-pane>
<el-tab-pane label="纳税信息" name="info3"></el-tab-pane>
<el-tab-pane label="党建信息" name="info4"></el-tab-pane>
+ <el-tab-pane label="街道社区" name="info8"></el-tab-pane>
<el-tab-pane label="企业良好行为" name="info5"></el-tab-pane>
<el-tab-pane label="项目良好行为" name="info6"></el-tab-pane>
<el-tab-pane label="违法违规行为惩戒" name="info7"></el-tab-pane>
@@ -30,15 +31,16 @@
<div v-if="item.choicesType == 0">
<div v-for="(item1, index1) in item.subjectOptionList" :key="index1">
- <el-radio v-model="item1.ids" :label="item1.id">{{item1.optionName}}-----------{{item1.score}}</el-radio>
+ <el-radio v-model="item1.ids" :label="item1.id">{{item1.optionName}}</el-radio>
</div>
</div>
<!-- </el-radio-group> -->
<div v-if="item.choicesType == 3">
- <!-- <div>{{item1.optionName}}</div> -->
- <div v-for="(item1, index1) in item.subjectOptionList" :key="index1">
+
+ <div v-for="(item1, index1) in item.subjectOptionList" :key="index1" style="display: flex;">
+ <div>{{item1.optionName}}:</div>
<el-input-number v-model="item1.numbers" @change="handleChange" :min="0" :max="25"
:label="item1.optionName"></el-input-number>
</div>
@@ -310,4 +312,4 @@
</script>
<style>
-</style>
\ No newline at end of file
+</style>
diff --git a/src/views/property/propertyCapitalApply.vue b/src/views/property/propertyCapitalApply.vue
index dd1c86a..3bb2e02 100644
--- a/src/views/property/propertyCapitalApply.vue
+++ b/src/views/property/propertyCapitalApply.vue
@@ -1,507 +1,506 @@
<!-- 物业公司管理 -->
<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>
+ <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-scope="{ row, size, index }" slot="menu">
- <el-button :size="size" type="text" v-if="row.applyStatus === 4" @click="handleWork(row)">调整申请
- </el-button>
- <el-button :size="size" type="text" @click="goDetail(row)">查看申请
- </el-button>
- <!-- <el-button :size="size" type="text" @click="goDetail(row)">删 除
+ <template slot-scope="{ row, size, index }" slot="menu">
+ <el-button :size="size" type="text" v-if="row.applyStatus === 4" @click="handleWork(row)">调整申请
+ </el-button>
+ <el-button :size="size" type="text" @click="goDetail(row)">查看申请
+ </el-button>
+ <!-- <el-button :size="size" type="text" @click="goDetail(row)">删 除
</el-button> -->
- </template>
- <!-- <template slot="menuLeft">
+ </template>
+ <!-- <template slot="menuLeft">
<el-button size="small" icon="el-icon-delete" plain v-if="permission.propertyCapitalApply_delete"
@click="handleDelete">删 除
</el-button>
</template> -->
- <!-- <template slot="constructionSchemeUrlsType" slot-scope="{file}">
+ <!-- <template slot="constructionSchemeUrlsType" slot-scope="{file}">
<span>{{ file }}</span>
</template> -->
- </avue-crud>
- </basic-container>
+ </avue-crud>
+ </basic-container>
</template>
<script>
-import {
+ import {
getList,
remove,
update,
add,
getPropertyCapitalApply
-} from "@/api/property/propertyCapitalApply"
-import {
+ } from "@/api/property/propertyCapitalApply"
+ import {
mapGetters
-} from "vuex"
-import website from '@/config/website'
-import func from "@/util/func"
-export default {
- data () {
- return {
- form: {
- // constructionSchemeUrls:[]
- },
- query: {},
- loading: true,
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0,
- },
- datetime: "",
- selectionList: [],
- option: {
- labelWidth: 154,
- searchLabelWidth: 96,
- searchShow: true,
- searchMenuSpan: 3,
- menuWidth: 210,
+ } from "vuex"
+ import website from '@/config/website'
+ import func from "@/util/func"
+ export default {
+ data() {
+ return {
+ form: {
+ // constructionSchemeUrls:[]
+ },
+ query: {},
+ loading: true,
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+ datetime: "",
+ selectionList: [],
+ option: {
+ labelWidth: 154,
+ searchLabelWidth: 96,
+ searchShow: true,
+ searchMenuSpan: 3,
+ menuWidth: 210,
- height: "auto",
- calcHeight: 54,
- dialogWidth: 1150,
- tip: false,
- border: true,
- //stripe:true,
- index: true,
- editBtn: false,
- viewBtn: false,
- delBtn: false,
- selection: true,
- dialogClickModal: false,
- column: [{
- width: 220,
- overHidden: true,
- label: '小区名称',
- addDisplay: false,
- editDisplay: false,
- viewDisplay: false,
- prop: "districtName",
- search: true,
- searchSpan: 4,
- rules: [{
- required: true,
- message: "请输入小区名称",
- trigger: "blur",
- }],
- },
-
- {
- hide: true,
- parent: false,
- label: "小区",
- prop: "districtId",
- search: false,
- type: 'tree',
- dicUrl: `/api/blade-district/district/getDistrictTree`,
- props: {
- label: "name",
- value: "id"
- },
- defaultExpandedKeys: ["361102003"],
- span: 12,
- width: 260,
- rules: [{
- required: true,
- message: "请选择小区",
- trigger: "blur",
- },],
- },
-
- {
- label: '维修项目名称',
- prop: 'name',
- searchSpan: 5,
- searchLabelWidth: 124,
- search: true,
- span: 12,
- rules: [{
- required: true,
- message: "请输入维修项目名称",
- trigger: "blur",
- },],
- },
- {
- width: 100,
- label: "预计开工时间",
- prop: "runTime",
- span: 12,
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- rules: [{
- required: true,
- message: "请选择合同开始时间",
- trigger: "blur",
- },],
- },
- {
- width: 100,
- label: "预计竣工时间",
- prop: "completedTime",
- span: 12,
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- rules: [{
- required: true,
- message: "请选择合同结束时间",
- trigger: "blur",
- },],
- },
- {
- label: "项目分摊方式",
- prop: "allocationWay",
- value: '按建筑面积分摊',
- span: 14,
- row: true,
- },
- {
- width: 110,
- label: '联系人',
- prop: 'linkman',
- span: 12,
- searchSpan: 4,
- searchLabelWidth: 80,
- search: true,
- rules: [{
- required: true,
- message: "请输入联系人",
- trigger: "blur",
- },],
- },
- {
- width: 120,
- label: '联系方式',
- prop: 'linkPhone',
- span: 12,
- rules: [{
- required: true,
- message: "请输入联系方式",
- trigger: "blur",
- },],
- },
- {
- width: 100,
- label: '申请时间',
- prop: 'applyTime',
- span: 12,
- display: false,
- }, {
- label: '审核进度',
- prop: 'applyStatus',
- span: 12,
- display: false,
- dicData: [{
- label: "待审核",
- value: 0,
- }, {
- label: "业委会",
- value: 1,
- }, {
- label: "街道",
- value: 2,
- }, {
- label: "住建局",
- value: 3,
- }, {
- label: "调整申请",
- value: 4,
- }, {
- label: "审核通过",
- value: 5,
- }, {
- label: "审核不通过",
- value: 6,
- }]
- },
- {
- label: "项目预算总金额(元)",
- prop: "budgetAmount",
- span: 12,
- hide: true,
- type: 'number',
- precision: 2,
- value: '0.00'
- },
- {
- label: "实际预算金额(元)",
- prop: "actualAmount",
- span: 12,
- hide: true,
- type: 'number',
- precision: 2,
- value: '0.00'
- },
- {
- label: "自筹金额(元)",
- prop: "selfAmount",
- span: 12,
- hide: true,
- type: 'number',
- precision: 2,
- value: '0.00'
- },
- {
- label: "预算应拨付金额(元)",
- prop: "budgetAppropriateAmount",
- span: 12,
- hide: true,
- type: 'number',
- precision: 2,
- value: '0.00'
- },
- {
- label: "项目摘要",
- span: 24,
- hide: true,
- prop: "projectDigest",
- placeholder: "例如:“XX小区XX栋XX设施设备维修,总的预算金额是X,是否含有审价,本次维修涉及范围共XX户,总面积的建筑面积为XX平方米”",
- type: "textarea"
- },
- {
- label: "项目进度描述",
- span: 24,
- hide: true,
- prop: "projectDescribe",
- type: "textarea"
- },
- {
- label: '施工方案附件',
- prop: 'constructionSchemeUrls',
- type: 'upload',
- span: 24,
- hide: true,
- multiple: true,
- // showFileList: true,
- propsHttp: {
- res: 'data',
- name: "originalName",
- url: "link"
- },
- action: '/api/blade-resource/oss/endpoint/put-file-attach',
- rules: [{
- required: true,
- message: "请上传施工方案",
- trigger: "blur",
- },],
- }
- ],
+ height: "auto",
+ calcHeight: 54,
+ dialogWidth: 1150,
+ tip: false,
+ border: true,
+ //stripe:true,
+ index: true,
+ editBtn: false,
+ viewBtn: false,
+ delBtn: false,
+ selection: true,
+ dialogClickModal: false,
+ column: [{
+ width: 220,
+ overHidden: true,
+ label: '小区名称',
+ addDisplay: false,
+ editDisplay: false,
+ viewDisplay: false,
+ prop: "districtName",
+ search: true,
+ searchSpan: 4,
+ rules: [{
+ required: true,
+ message: "请输入小区名称",
+ trigger: "blur",
+ }],
},
- data: [],
- }
+
+ {
+ hide: true,
+ parent: false,
+ label: "小区",
+ prop: "districtId",
+ search: false,
+ type: 'tree',
+ dicUrl: `/api/blade-district/district/getDistrictTree`,
+ props: {
+ label: "name",
+ value: "id"
+ },
+ defaultExpandedKeys: ["361102003"],
+ span: 12,
+ width: 260,
+ rules: [{
+ required: true,
+ message: "请选择小区",
+ trigger: "blur",
+ }, ],
+ },
+
+ {
+ label: '维修项目名称',
+ prop: 'name',
+ searchSpan: 5,
+ searchLabelWidth: 124,
+ search: true,
+ span: 12,
+ rules: [{
+ required: true,
+ message: "请输入维修项目名称",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ width: 100,
+ label: "预计开工时间",
+ prop: "runTime",
+ span: 12,
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ rules: [{
+ required: true,
+ message: "请选择合同开始时间",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ width: 100,
+ label: "预计竣工时间",
+ prop: "completedTime",
+ span: 12,
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ rules: [{
+ required: true,
+ message: "请选择合同结束时间",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ label: "项目分摊方式",
+ prop: "allocationWay",
+ value: '按建筑面积分摊',
+ span: 12,
+ row: true,
+ },
+ {
+ width: 110,
+ label: '联系人',
+ prop: 'linkman',
+ span: 12,
+ searchSpan: 4,
+ searchLabelWidth: 80,
+ search: true,
+ rules: [{
+ required: true,
+ message: "请输入联系人",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ width: 120,
+ label: '联系方式',
+ prop: 'linkPhone',
+ span: 12,
+ rules: [{
+ required: true,
+ message: "请输入联系方式",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ width: 100,
+ label: '申请时间',
+ prop: 'applyTime',
+ span: 12,
+ display: false,
+ }, {
+ label: '审核进度',
+ prop: 'applyStatus',
+ span: 12,
+ display: false,
+ dicData: [{
+ label: "待审核",
+ value: 0,
+ }, {
+ label: "业委会",
+ value: 1,
+ }, {
+ label: "街道",
+ value: 2,
+ }, {
+ label: "住建局",
+ value: 3,
+ }, {
+ label: "调整申请",
+ value: 4,
+ }, {
+ label: "审核通过",
+ value: 5,
+ }, {
+ label: "审核不通过",
+ value: 6,
+ }]
+ },
+ {
+ label: "项目预算总金额(元)",
+ prop: "budgetAmount",
+ span: 12,
+ hide: true,
+ type: 'number',
+ precision: 2,
+ value: '0.00'
+ },
+ {
+ label: "实际预算金额(元)",
+ prop: "actualAmount",
+ span: 12,
+ hide: true,
+ type: 'number',
+ precision: 2,
+ value: '0.00'
+ },
+ {
+ label: "自筹金额(元)",
+ prop: "selfAmount",
+ span: 12,
+ hide: true,
+ type: 'number',
+ precision: 2,
+ value: '0.00'
+ },
+ {
+ label: "预算应拨付金额(元)",
+ prop: "budgetAppropriateAmount",
+ span: 12,
+ hide: true,
+ type: 'number',
+ precision: 2,
+ value: '0.00'
+ },
+ {
+ label: "项目摘要",
+ span: 24,
+ hide: true,
+ prop: "projectDigest",
+ placeholder: "例如:“XX小区XX栋XX设施设备维修,总的预算金额是X,是否含有审价,本次维修涉及范围共XX户,总面积的建筑面积为XX平方米”",
+ type: "textarea"
+ },
+ {
+ label: "项目进度描述",
+ span: 24,
+ hide: true,
+ prop: "projectDescribe",
+ type: "textarea"
+ },
+ {
+ label: '施工方案附件',
+ prop: 'constructionSchemeUrls',
+ type: 'upload',
+ span: 24,
+ hide: true,
+ multiple: true,
+ // showFileList: true,
+ propsHttp: {
+ res: 'data',
+ name: "originalName",
+ url: "link"
+ },
+ action: '/api/blade-resource/oss/endpoint/put-file-attach',
+ rules: [{
+ required: true,
+ message: "请上传施工方案",
+ trigger: "blur",
+ }, ],
+ }
+ ],
+ },
+ data: [],
+ }
},
watch: {},
computed: {
- ...mapGetters(["permission", "userInfo"]),
- permissionList () {
- return {
- addBtn: this.vaildData(this.permission.propertyCapitalApply_add, true),
- viewBtn: this.vaildData(this.permission.propertyCapitalApply_view, true),
- delBtn: this.vaildData(this.permission.propertyCapitalApply_delete, true),
- editBtn: this.vaildData(this.permission.propertyCapitalApply_edit, true),
- }
- },
- ids () {
- let ids = []
- this.selectionList.forEach((ele) => {
- ids.push(ele.id)
- })
- return ids.join(",")
- },
+ ...mapGetters(["permission", "userInfo"]),
+ permissionList() {
+ return {
+ addBtn: this.vaildData(this.permission.propertyCapitalApply_add, true),
+ viewBtn: this.vaildData(this.permission.propertyCapitalApply_view, true),
+ delBtn: this.vaildData(this.permission.propertyCapitalApply_delete, true),
+ editBtn: this.vaildData(this.permission.propertyCapitalApply_edit, true),
+ }
+ },
+ ids() {
+ let ids = []
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.id)
+ })
+ return ids.join(",")
+ },
},
methods: {
- handleWork (row) {
- this.$router.push({
- path: `/work/process/maintenanceFundApply/edit/${row.taskId}/${row.processInstanceId}/${row.id}`
- })
- },
- goDetail (row) {
- this.$router.push({
- path: `/work/process/maintenanceFundApply/detail/${row.processInstanceId}/${row.id}`
- })
- },
- rowSave (row, done, loading) {
- row.constructionSchemeUrls = func.join(row.constructionSchemeUrls)
- if (row.constructionSchemeUrls.length > 0) {
- var urls = []
- var split = row.constructionSchemeUrls.split(",")
- split.forEach(url => {
- var names = url.split("jczz/")
- urls.push(names[1])
- })
- row.constructionSchemeUrls = urls.join(",")
- }
- row.propertyFlag = 1
- add(row).then(
- () => {
- this.onLoad(this.page)
- this.$message({
- type: "success",
- message: "操作成功!",
- })
- done()
- },
- (error) => {
- window.console.log(error)
- loading()
- }
- )
- },
- rowUpdate (row, index, done, loading) {
- if (row.constructionSchemeUrls.length > 0) {
- var urls = []
- var split = row.constructionSchemeUrls.split(",")
- split.forEach(url => {
- var names = url.split("jczz/")
- urls.push(names[1])
- })
- row.constructionSchemeUrls = urls.join(",")
- }
- 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)) {
- getPropertyCapitalApply(this.form.id).then((res) => {
- this.form = res.data.data
- this.form.propertyFlag = 1
- if (this.form.constructionSchemeUrls.length > 0) {
- var urls = []
- var names = this.form.constructionSchemeUrls.split(",")
- names.forEach(name => {
- urls.push(website.minioUrl + name)
- })
- this.form.constructionSchemeUrls = urls.join(",")
- }
- })
- }
- // con
- done()
- },
- currentChange (currentPage) {
- this.page.currentPage = currentPage
- },
- sizeChange (pageSize) {
- this.page.pageSize = pageSize
- },
- refreshChange () {
- this.onLoad(this.page, this.query)
- },
- onLoad (page, params = {}) {
- const {
- dateTime
- } = this.query
- let values = {
- ...params,
- }
- if (dateTime) {
- values = {
- ...params,
- startTime: dateTime[0],
- endTime: dateTime[1],
- ...this.query,
- }
- values.dateTime = 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.data.forEach(item => {
- if (item.constructionSchemeUrls.length > 0) {
- var urls = []
- var names = item.constructionSchemeUrls.split(",")
- names.forEach(name => {
- urls.push(website.minioUrl + name)
- })
- item.constructionSchemeUrls = urls.join(",")
- }
- })
- this.loading = false
- this.selectionClear()
- })
+ handleWork(row) {
+ this.$router.push({
+ path: `/work/process/maintenanceFundApply/edit/${row.taskId}/${row.processInstanceId}/${row.id}`
+ })
+ },
+ goDetail(row) {
+ this.$router.push({
+ path: `/work/process/maintenanceFundApply/detail/${row.processInstanceId}/${row.id}`
+ })
+ },
+ rowSave(row, done, loading) {
+ row.constructionSchemeUrls = func.join(row.constructionSchemeUrls)
+ if (row.constructionSchemeUrls.length > 0) {
+ var urls = []
+ var split = row.constructionSchemeUrls.split(",")
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.constructionSchemeUrls = urls.join(",")
}
+ row.propertyFlag = 1
+ add(row).then(
+ () => {
+ this.onLoad(this.page)
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ })
+ done()
+ },
+ (error) => {
+ window.console.log(error)
+ loading()
+ }
+ )
+ },
+ rowUpdate(row, index, done, loading) {
+ if (row.constructionSchemeUrls.length > 0) {
+ var urls = []
+ var split = row.constructionSchemeUrls.split(",")
+ split.forEach(url => {
+ var names = url.split("jczz/")
+ urls.push(names[1])
+ })
+ row.constructionSchemeUrls = urls.join(",")
+ }
+ 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)) {
+ getPropertyCapitalApply(this.form.id).then((res) => {
+ this.form = res.data.data
+ this.form.propertyFlag = 1
+ if (this.form.constructionSchemeUrls.length > 0) {
+ var urls = []
+ var names = this.form.constructionSchemeUrls.split(",")
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ this.form.constructionSchemeUrls = urls.join(",")
+ }
+ })
+ }
+ // con
+ done()
+ },
+ currentChange(currentPage) {
+ this.page.currentPage = currentPage
+ },
+ sizeChange(pageSize) {
+ this.page.pageSize = pageSize
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query)
+ },
+ onLoad(page, params = {}) {
+ const {
+ dateTime
+ } = this.query
+ let values = {
+ ...params,
+ }
+ if (dateTime) {
+ values = {
+ ...params,
+ startTime: dateTime[0],
+ endTime: dateTime[1],
+ ...this.query,
+ }
+ values.dateTime = 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.data.forEach(item => {
+ if (item.constructionSchemeUrls.length > 0) {
+ var urls = []
+ var names = item.constructionSchemeUrls.split(",")
+ names.forEach(name => {
+ urls.push(website.minioUrl + name)
+ })
+ item.constructionSchemeUrls = urls.join(",")
+ }
+ })
+ this.loading = false
+ this.selectionClear()
+ })
+ }
}
-}
+ }
</script>
<style>
-.avue-upload__icon {
+ .avue-upload__icon {
line-height: 6;
-}
+ }
</style>
\ No newline at end of file
diff --git a/src/views/property/propertyCompany.vue b/src/views/property/propertyCompany.vue
index 3583278..2ad1b48 100644
--- a/src/views/property/propertyCompany.vue
+++ b/src/views/property/propertyCompany.vue
@@ -18,7 +18,8 @@
@click="openPayConfig(row)">商户配置
</el-button>
- <el-button :size="size" icon="el-icon-circle-plus-outline" type="text" @click="addProperty(row)">物业评定
+ <el-button :size="size" v-if="permission.property_evaluation" icon="el-icon-circle-plus-outline" type="text"
+ @click="addProperty(row)">物业评定
</el-button>
</template>
</avue-crud>
diff --git a/src/views/system/dept.vue b/src/views/system/dept.vue
index 93e2cd3..0da07eb 100644
--- a/src/views/system/dept.vue
+++ b/src/views/system/dept.vue
@@ -140,7 +140,7 @@
label: "管辖区域",
prop: "regionCode",
type: "tree",
- dicUrl: "/api/blade-system/region/tree?cityCode=3611",
+ dicUrl: "/api/blade-system/region/tree?cityCode=361100000000",
props: {
label: "name",
value: "id",
diff --git a/src/views/wel/index.vue b/src/views/wel/index.vue
index 66c66b0..726597f 100644
--- a/src/views/wel/index.vue
+++ b/src/views/wel/index.vue
@@ -1,8 +1,8 @@
<template>
<div id="homeL">
<div class="homeL-up">
- <span class="h1">基层智治综合协同平台</span>
- <span class="h2">Grassroots intelligent governance integrated cooperation platform</span>
+ <span class="h1">{{ webTitle }}</span>
+ <span class="h2"></span>
</div>
<div class="homeL-bar">
<div class="outS" @click="down1">
@@ -29,15 +29,19 @@
</template>
<script>
+import { getToken } from '@/util/auth'
import { getStore } from "@/util/store"
export default {
data () {
return {
+ webTitle: getStore({ name: "webTitle" }),
+ webType: getStore({ name: "webType" }),
a: 1,
globalUserInfo: getStore({ name: "userInfo" }),
}
},
+
methods: {
down1 () {
this.$router.push({ path: "/userHouse/houseHoldList" })
@@ -55,7 +59,8 @@
this.$router.push({ path: "/cGovernance/gridWorkLog" })
},
down6 () {
- window.open('http://srgdjczzxtpt.com:2181/databoard-server/uniformLogin?passwordlessToken=bmtMNkFYcjh1dk50UVlUYXpLV2xHUDZpdGU0d1ZqMStYV01aVzlVMGsyVT0=')
+ let token = 'bearer ' + getToken()
+ window.open(`http://srgdjczzxtpt.com:2181/uniform-auth/login?app=app_smart_aoi&Blade-Auth=${token}`)
},
},
mouted () { },
diff --git a/src/views/work/process/maintenanceFundApply/detail.vue b/src/views/work/process/maintenanceFundApply/detail.vue
index 6e0f176..502caad 100644
--- a/src/views/work/process/maintenanceFundApply/detail.vue
+++ b/src/views/work/process/maintenanceFundApply/detail.vue
@@ -176,7 +176,7 @@
prop: "allocationWay",
labelWidth: 140,
value: '按建筑面积分摊',
- span: 14,
+ span: 12,
row: true,
disabled: true
},
diff --git a/src/views/work/process/maintenanceFundApply/edit.vue b/src/views/work/process/maintenanceFundApply/edit.vue
index 0eb83fb..19231b9 100644
--- a/src/views/work/process/maintenanceFundApply/edit.vue
+++ b/src/views/work/process/maintenanceFundApply/edit.vue
@@ -182,7 +182,7 @@
prop: "allocationWay",
labelWidth: 140,
value: '按建筑面积分摊',
- span: 14,
+ span: 12,
row: true,
},
{
diff --git a/src/views/work/process/maintenanceFundApply/form.vue b/src/views/work/process/maintenanceFundApply/form.vue
index 2428fd3..0c26de1 100644
--- a/src/views/work/process/maintenanceFundApply/form.vue
+++ b/src/views/work/process/maintenanceFundApply/form.vue
@@ -104,7 +104,7 @@
prop: "allocationWay",
labelWidth: 140,
value: '按建筑面积分摊',
- span: 14,
+ span: 12,
row: true,
},
{
diff --git a/src/views/work/process/maintenanceFundApply/handle.vue b/src/views/work/process/maintenanceFundApply/handle.vue
index 9e1d425..793e916 100644
--- a/src/views/work/process/maintenanceFundApply/handle.vue
+++ b/src/views/work/process/maintenanceFundApply/handle.vue
@@ -1,420 +1,419 @@
<template>
- <basic-container>
- <el-form ref="form" :model="form" :rules="rules" label-width="80px">
- <el-row type="flex" class="row-bg" justify="end">
- <el-form-item>
- <el-button @click="handleCancel">关闭</el-button>
- </el-form-item>
- </el-row>
+ <basic-container>
+ <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+ <el-row type="flex" class="row-bg" justify="end">
+ <el-form-item>
+ <el-button @click="handleCancel">关闭</el-button>
+ </el-form-item>
+ </el-row>
- <el-card shadow="hover">
- <div slot="header">
- <span>审批信息</span>
- </div>
- <avue-form :option="option" v-model="form"></avue-form>
- </el-card>
+ <el-card shadow="hover">
+ <div slot="header">
+ <span>审批信息</span>
+ </div>
+ <avue-form :option="option" v-model="form"></avue-form>
+ </el-card>
- <el-card shadow="hover">
- <div slot="header">
- <span>流程信息</span>
- </div>
- <el-row type="flex" class="row-bg">
- <el-timeline>
- <el-timeline-item :key="flow.id" :timestamp="flow.createTime" v-for="flow in flowList"
- placement="top">
- <el-card shadow="hover">
- <p>{{ flow.assigneeName }} 在 [{{ flow.createTime }}] 开始处理 [{{ flow.historyActivityName }}]
- 环节</p>
- <p v-if="flow.historyActivityDurationTime !== ''">任务历时 [{{ flow.historyActivityDurationTime
+ <el-card shadow="hover">
+ <div slot="header">
+ <span>流程信息</span>
+ </div>
+ <el-row type="flex" class="row-bg">
+ <el-timeline>
+ <el-timeline-item :key="flow.id" :timestamp="flow.createTime" v-for="flow in flowList" placement="top">
+ <el-card shadow="hover">
+ <p>{{ flow.assigneeName }} 在 [{{ flow.createTime }}] 开始处理 [{{ flow.historyActivityName }}]
+ 环节</p>
+ <p v-if="flow.historyActivityDurationTime !== ''">任务历时 [{{ flow.historyActivityDurationTime
}}]
- </p>
- <p v-if="flow.comment !== ''">批复意见: [{{ flow.comment }}]</p>
- <p v-if="flow.endTime !== ''">结束时间: [{{ flow.endTime }}]</p>
- </el-card>
- </el-timeline-item>
- </el-timeline>
- </el-row>
- </el-card>
- <el-card shadow="hover">
- <div slot="header">
- <span>流程跟踪</span>
- </div>
- <el-row class="row-bg">
- <flow-design :is-display="true" :process-instance-id="processInstanceId"></flow-design>
- </el-row>
- </el-card>
- </el-form>
+ </p>
+ <p v-if="flow.comment !== ''">批复意见: [{{ flow.comment }}]</p>
+ <p v-if="flow.endTime !== ''">结束时间: [{{ flow.endTime }}]</p>
+ </el-card>
+ </el-timeline-item>
+ </el-timeline>
+ </el-row>
+ </el-card>
+ <el-card shadow="hover">
+ <div slot="header">
+ <span>流程跟踪</span>
+ </div>
+ <el-row class="row-bg">
+ <flow-design :is-display="true" :process-instance-id="processInstanceId"></flow-design>
+ </el-row>
+ </el-card>
+ </el-form>
- <!-- <div style="">
+ <!-- <div style="">
<el-button type="primary" @click="handleAgree">同意</el-button>
<el-button type="danger" @click="handleDisagree">驳回</el-button>
</div> -->
- <div style="text-align: center;
+ <div style="text-align: center;
position: fixed;
left: 0;
right: 0;
bottom: 10px;">
- <el-button type="primary" @click="handleAgree">同意</el-button>
- <el-button type="danger" @click="handleDisagree">驳回</el-button>
- </div>
+ <el-button type="primary" @click="handleAgree">同意</el-button>
+ <el-button type="danger" @click="handleDisagree">驳回</el-button>
+ </div>
- </basic-container>
+ </basic-container>
</template>
<script>
-import {
+ import {
historyFlowList,
leaveDetail
-} from "@/api/work/process"
+ } from "@/api/work/process"
-import {
+ import {
getList,
remove,
update,
add,
getPropertyCapitalApply
-} from "@/api/property/propertyCapitalApply"
-import {
+ } from "@/api/property/propertyCapitalApply"
+ import {
completeTask
-} from "@/api/work/work"
-import website from '@/config/website'
+ } from "@/api/work/work"
+ import website from '@/config/website'
-export default {
- data () {
- return {
- taskId: '',
- businessId: '',
- processInstanceId: '',
- src: '',
- flowList: [],
- form: {
- flow: {
- assigneeName: '',
- },
- startTime: '',
- endTime: '',
- reason: '',
+ export default {
+ data() {
+ return {
+ taskId: '',
+ businessId: '',
+ processInstanceId: '',
+ src: '',
+ flowList: [],
+ form: {
+ flow: {
+ assigneeName: '',
+ },
+ startTime: '',
+ endTime: '',
+ reason: '',
+ },
+ option: {
+ height: "auto",
+ calcHeight: 54,
+ dialogWidth: 1150,
+ tip: false,
+ searchShow: true,
+ searchMenuSpan: 3,
+ menuWidth: 350,
+ border: true,
+ //stripe:true,
+ submitBtn: false,
+ emptyBtn: false,
+ index: true,
+ viewBtn: true,
+ selection: true,
+ dialogClickModal: false,
+ column: [{
+ label: "小区",
+ prop: "districtId",
+ searchSpan: 5,
+ search: true,
+ type: 'tree',
+ dicUrl: `/api/blade-district/district/getDistrictTree`,
+ props: {
+ label: "name",
+ value: "id"
+ },
+ defaultExpandedKeys: ["361102003"],
+ span: 12,
+ labelWidth: 120,
+ width: 220,
+ overHidden: true,
+ rules: [{
+ required: true,
+ message: "请选择小区",
+ trigger: "blur",
+ }, ],
+ disabled: true
},
- option: {
- height: "auto",
- calcHeight: 54,
- dialogWidth: 1150,
- tip: false,
- searchShow: true,
- searchMenuSpan: 3,
- menuWidth: 350,
- border: true,
- //stripe:true,
- submitBtn: false,
- emptyBtn: false,
- index: true,
- viewBtn: true,
- selection: true,
- dialogClickModal: false,
- column: [{
- label: "小区",
- prop: "districtId",
- searchSpan: 5,
- search: true,
- type: 'tree',
- dicUrl: `/api/blade-district/district/getDistrictTree`,
- props: {
- label: "name",
- value: "id"
- },
- defaultExpandedKeys: ["361102003"],
- span: 12,
- labelWidth: 120,
- width: 220,
- overHidden: true,
- rules: [{
- required: true,
- message: "请选择小区",
- trigger: "blur",
- },],
- disabled: true
- },
- {
- label: '维修项目名称',
- prop: 'name',
- searchLabelWidth: 120,
- searchSpan: 5,
- search: true,
- span: 12,
- labelWidth: 140,
- rules: [{
- required: true,
- message: "请输入维修项目名称",
- trigger: "blur",
- },],
- disabled: true
- },
- {
- label: "预计开工时间",
- prop: "runTime",
- span: 12,
- labelWidth: 140,
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- rules: [{
- required: true,
- message: "请选择合同开始时间",
- trigger: "blur",
- },],
- disabled: true
- },
- {
- label: "预计竣工时间",
- prop: "completedTime",
- labelWidth: 140,
- span: 12,
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- rules: [{
- required: true,
- message: "请选择合同结束时间",
- trigger: "blur",
- },],
- disabled: true
- },
- {
- label: "项目分摊方式",
- prop: "allocationWay",
- labelWidth: 140,
- value: '按建筑面积分摊',
- span: 14,
- row: true,
- disabled: true
- },
- {
- label: '联系人',
- prop: 'linkman',
- span: 12,
- labelWidth: 120,
- search: true,
- searchSpan: 4,
- rules: [{
- required: true,
- message: "请输入联系人",
- trigger: "blur",
- },],
- disabled: true
- },
- {
- label: '联系方式',
- prop: 'linkPhone',
- span: 12,
- labelWidth: 140,
- rules: [{
- required: true,
- message: "请输入联系方式",
- trigger: "blur",
- },],
- disabled: true
- },
- {
- label: "项目预算总金额(元)",
- prop: "budgetAmount",
- span: 12,
- hide: true,
- labelWidth: 140,
- type: 'number',
- precision: 2,
- value: '0.00',
- disabled: true
- },
- {
- label: "实际预算金额(元)",
- prop: "actualAmount",
- span: 12,
- hide: true,
- labelWidth: 140,
- type: 'number',
- precision: 2,
- value: '0.00',
- disabled: true
- },
- {
- label: "自筹金额(元)",
- prop: "selfAmount",
- span: 12,
- hide: true,
- labelWidth: 140,
- type: 'number',
- precision: 2,
- value: '0.00',
- disabled: true
- },
- {
- label: "预算应拨付金额(元)",
- prop: "budgetAppropriateAmount",
- span: 12,
- hide: true,
- labelWidth: 140,
- type: 'number',
- precision: 2,
- value: '0.00',
- disabled: true
- },
- {
- label: "项目摘要",
- span: 24,
- hide: true,
- prop: "projectDigest",
- placeholder: "例如:“XX小区XX栋XX设施设备维修,总的预算金额是X,是否含有审价,本次维修涉及范围共XX户,总面积的建筑面积为XX平方米”",
- labelWidth: 140,
- type: "textarea",
- disabled: true
- },
- {
- label: "项目进度描述",
- span: 24,
- hide: true,
- prop: "projectDescribe",
- labelWidth: 140,
- type: "textarea",
- disabled: true
- }, {
- label: "批复意见",
- span: 24,
- hide: true,
- prop: "comment",
- labelWidth: 140,
- type: "textarea",
- rules: [{
- required: true,
- message: "请输入批复意见",
- trigger: "blur",
- },],
- },
- {
- label: '施工方案附件',
- prop: 'constructionSchemeUrls',
- type: 'upload',
- listType: 'picture-img',
- span: 24,
- hide: true,
- labelWidth: 140,
- multiple: true,
- // showFileList: true,
- propsHttp: {
- res: 'data',
- name: "originalName",
- url: "link"
- },
- action: '/api/blade-resource/oss/endpoint/put-file-attach',
- rules: [{
- required: true,
- message: "请上传施工方案",
- trigger: "blur",
- },],
- }
- ],
+ {
+ label: '维修项目名称',
+ prop: 'name',
+ searchLabelWidth: 120,
+ searchSpan: 5,
+ search: true,
+ span: 12,
+ labelWidth: 140,
+ rules: [{
+ required: true,
+ message: "请输入维修项目名称",
+ trigger: "blur",
+ }, ],
+ disabled: true
+ },
+ {
+ label: "预计开工时间",
+ prop: "runTime",
+ span: 12,
+ labelWidth: 140,
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ rules: [{
+ required: true,
+ message: "请选择合同开始时间",
+ trigger: "blur",
+ }, ],
+ disabled: true
+ },
+ {
+ label: "预计竣工时间",
+ prop: "completedTime",
+ labelWidth: 140,
+ span: 12,
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ rules: [{
+ required: true,
+ message: "请选择合同结束时间",
+ trigger: "blur",
+ }, ],
+ disabled: true
+ },
+ {
+ label: "项目分摊方式",
+ prop: "allocationWay",
+ labelWidth: 140,
+ value: '按建筑面积分摊',
+ span: 12,
+ row: true,
+ disabled: true
+ },
+ {
+ label: '联系人',
+ prop: 'linkman',
+ span: 12,
+ labelWidth: 120,
+ search: true,
+ searchSpan: 4,
+ rules: [{
+ required: true,
+ message: "请输入联系人",
+ trigger: "blur",
+ }, ],
+ disabled: true
+ },
+ {
+ label: '联系方式',
+ prop: 'linkPhone',
+ span: 12,
+ labelWidth: 140,
+ rules: [{
+ required: true,
+ message: "请输入联系方式",
+ trigger: "blur",
+ }, ],
+ disabled: true
+ },
+ {
+ label: "项目预算总金额(元)",
+ prop: "budgetAmount",
+ span: 12,
+ hide: true,
+ labelWidth: 140,
+ type: 'number',
+ precision: 2,
+ value: '0.00',
+ disabled: true
+ },
+ {
+ label: "实际预算金额(元)",
+ prop: "actualAmount",
+ span: 12,
+ hide: true,
+ labelWidth: 140,
+ type: 'number',
+ precision: 2,
+ value: '0.00',
+ disabled: true
+ },
+ {
+ label: "自筹金额(元)",
+ prop: "selfAmount",
+ span: 12,
+ hide: true,
+ labelWidth: 140,
+ type: 'number',
+ precision: 2,
+ value: '0.00',
+ disabled: true
+ },
+ {
+ label: "预算应拨付金额(元)",
+ prop: "budgetAppropriateAmount",
+ span: 12,
+ hide: true,
+ labelWidth: 140,
+ type: 'number',
+ precision: 2,
+ value: '0.00',
+ disabled: true
+ },
+ {
+ label: "项目摘要",
+ span: 24,
+ hide: true,
+ prop: "projectDigest",
+ placeholder: "例如:“XX小区XX栋XX设施设备维修,总的预算金额是X,是否含有审价,本次维修涉及范围共XX户,总面积的建筑面积为XX平方米”",
+ labelWidth: 140,
+ type: "textarea",
+ disabled: true
+ },
+ {
+ label: "项目进度描述",
+ span: 24,
+ hide: true,
+ prop: "projectDescribe",
+ labelWidth: 140,
+ type: "textarea",
+ disabled: true
+ }, {
+ label: "批复意见",
+ span: 24,
+ hide: true,
+ prop: "comment",
+ labelWidth: 140,
+ type: "textarea",
+ rules: [{
+ required: true,
+ message: "请输入批复意见",
+ trigger: "blur",
+ }, ],
+ },
+ {
+ label: '施工方案附件',
+ prop: 'constructionSchemeUrls',
+ type: 'upload',
+ listType: 'picture-img',
+ span: 24,
+ hide: true,
+ labelWidth: 140,
+ multiple: true,
+ // showFileList: true,
+ propsHttp: {
+ res: 'data',
+ name: "originalName",
+ url: "link"
+ },
+ action: '/api/blade-resource/oss/endpoint/put-file-attach',
+ rules: [{
+ required: true,
+ message: "请上传施工方案",
+ trigger: "blur",
+ }, ],
}
+ ],
}
+ }
},
- created () {
+ created() {
+ this.init()
+ },
+ beforeRouteUpdate(to, from, next) {
+ // 在当前路由改变,但是该组件被复用时调用
+ // 举例来说,对于一个带有动态参数的路径 /foo/:id,在 /foo/1 和 /foo/2 之间跳转的时候
+ // 由于会渲染同样的 Foo 组件,因此组件实例会被复用。而这个钩子就会在这个情况下被调用
+ // 可以访问组件实例 `this`
+ if (to.fullPath !== from.fullPath) {
+ next()
this.init()
- },
- beforeRouteUpdate (to, from, next) {
- // 在当前路由改变,但是该组件被复用时调用
- // 举例来说,对于一个带有动态参数的路径 /foo/:id,在 /foo/1 和 /foo/2 之间跳转的时候
- // 由于会渲染同样的 Foo 组件,因此组件实例会被复用。而这个钩子就会在这个情况下被调用
- // 可以访问组件实例 `this`
- if (to.fullPath !== from.fullPath) {
- next()
- this.init()
- }
+ }
},
methods: {
- init () {
- this.taskId = this.$route.params.taskId
- this.processInstanceId = this.$route.params.processInstanceId
- this.businessId = this.$route.params.businessId
- historyFlowList(this.processInstanceId).then(res => {
- const data = res.data
- if (data.success) {
- this.flowList = data.data
- }
- })
- getPropertyCapitalApply(this.businessId).then(res => {
- const data = res.data
- if (data.success) {
- data.data.constructionSchemeUrls = website.minioUrl + data.data.constructionSchemeUrls
- this.form = data.data
- }
- })
- },
- handleAgree () {
- if (!this.form.comment) {
- this.$message.warning('请先填写批复意见')
- return
- }
- const params = {
- taskId: this.taskId,
- processInstanceId: this.processInstanceId,
- flag: 'ok',
- comment: this.form.comment,
- }
- completeTask(params).then(res => {
- const data = res.data
- if (data.success) {
- this.$message.success(data.msg)
- this.$router.$avueRouter.closeTag()
- this.$router.push({
- path: `/work/todo`
- })
- } else {
- this.$message.error(data.msg || '提交失败')
- }
- })
- },
- handleDisagree () {
- if (!this.form.comment) {
- this.$message.warning('请先填写批复意见')
- return
- }
- const params = {
- taskId: this.taskId,
- processInstanceId: this.processInstanceId,
- comment: this.form.comment,
- }
- completeTask(params).then(res => {
- const data = res.data
- if (data.success) {
- this.$message.success(data.msg)
- this.$router.$avueRouter.closeTag()
- this.$router.push({
- path: `/work/todo`
- })
- } else {
- this.$message.error(data.msg || '提交失败')
- }
- })
- },
- handleCancel () {
+ init() {
+ this.taskId = this.$route.params.taskId
+ this.processInstanceId = this.$route.params.processInstanceId
+ this.businessId = this.$route.params.businessId
+ historyFlowList(this.processInstanceId).then(res => {
+ const data = res.data
+ if (data.success) {
+ this.flowList = data.data
+ }
+ })
+ getPropertyCapitalApply(this.businessId).then(res => {
+ const data = res.data
+ if (data.success) {
+ data.data.constructionSchemeUrls = website.minioUrl + data.data.constructionSchemeUrls
+ this.form = data.data
+ }
+ })
+ },
+ handleAgree() {
+ if (!this.form.comment) {
+ this.$message.warning('请先填写批复意见')
+ return
+ }
+ const params = {
+ taskId: this.taskId,
+ processInstanceId: this.processInstanceId,
+ flag: 'ok',
+ comment: this.form.comment,
+ }
+ completeTask(params).then(res => {
+ const data = res.data
+ if (data.success) {
+ this.$message.success(data.msg)
this.$router.$avueRouter.closeTag()
this.$router.push({
- path: `/work/todo`
+ path: `/work/todo`
})
+ } else {
+ this.$message.error(data.msg || '提交失败')
+ }
+ })
+ },
+ handleDisagree() {
+ if (!this.form.comment) {
+ this.$message.warning('请先填写批复意见')
+ return
}
+ const params = {
+ taskId: this.taskId,
+ processInstanceId: this.processInstanceId,
+ comment: this.form.comment,
+ }
+ completeTask(params).then(res => {
+ const data = res.data
+ if (data.success) {
+ this.$message.success(data.msg)
+ this.$router.$avueRouter.closeTag()
+ this.$router.push({
+ path: `/work/todo`
+ })
+ } else {
+ this.$message.error(data.msg || '提交失败')
+ }
+ })
+ },
+ handleCancel() {
+ this.$router.$avueRouter.closeTag()
+ this.$router.push({
+ path: `/work/todo`
+ })
+ }
}
-}
+ }
</script>
<style scoped>
-.container {
+ .container {
position: relative;
/* 确保按钮相对于该元素定位 */
-}
+ }
-#myButton {
+ #myButton {
position: fixed;
bottom: 0;
left: 50%;
transform: translateX(-50%);
-}
+ }
</style>
\ No newline at end of file
diff --git a/vue.config.js b/vue.config.js
index 315cf3d..5adf302 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -18,7 +18,9 @@
entry.add("@/mock").end();
},
css: {
- extract: { ignoreOrder: true },
+ extract: {
+ ignoreOrder: true
+ },
},
//开发模式反向代理配置,生产模式请使用Nginx部署并配置反向代理
devServer: {
@@ -26,9 +28,9 @@
proxy: {
"/api": {
//本地服务接口地址
- target: "https://srgdjczzxtpt.com:2080/api",
+ // target: "https://srgdjczzxtpt.com:2080/api",
// target: "http://z4042833u6.wicp.vip",
- // target: "http://localhost:9528",
+ target: "http://localhost:9528",
// target:"http://192.168.0.109:9528",
//远程演示服务地址,可用于直接启动项目
//target: 'https://saber.bladex.cn/api',
--
Gitblit v1.9.3