From 475958b9c193fc364b6bf25af05a50e59375d643 Mon Sep 17 00:00:00 2001 From: wl <173@qq.com> Date: 星期五, 23 十二月 2022 14:52:40 +0800 Subject: [PATCH] feat: 内容提交 --- src/views/cause/Entry.vue | 1093 ++++++++++++---- src/views/manager/Police.vue | 325 +++++ vue.config.js | 5 src/assets/jh.png | 0 public/logo.jpg | 0 src/views/common/Publicity.vue | 381 +++++ src/views/common/Sensitive.vue | 350 +++++ src/api/question.js | 16 src/plugins/element.js | 4 src/api/User.js | 16 src/views/common/Audit.vue | 274 +++- src/views/workbench/Workbench.vue | 2 src/api/cause.js | 61 src/icons/7bedbaa41b1744fbfe0c55b507fd9e28.png | 0 public/favicon.ico | 0 src/api/common.js | 8 src/api/publicty.js | 16 src/assets/1.png | 0 src/views/cause/Group.vue | 357 +++++ public/index.html | 2 src/views/common/Question.vue | 366 +++++ src/api/Police.js | 16 src/router/index.js | 25 src/views/Login.vue | 21 src/plugins/filters.js | 2 /dev/null | 15 src/api/group.js | 78 + package.json | 2 src/views/Home.vue | 49 src/api/Sensitive.js | 16 src/views/manager/User.vue | 323 ++++ 31 files changed, 3,404 insertions(+), 419 deletions(-) diff --git a/package.json b/package.json index 14244be..8eac24e 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "dependencies": { "axios": "^0.27.2", "core-js": "^3.8.3", - "element-ui": "^2.15.9", + "element-ui": "^2.15.7", "vue": "^2.6.14", "vue-router": "^3.5.1", "vuex": "^3.6.2" diff --git a/public/favicon.ico b/public/favicon.ico index df36fcf..8e5e467 100644 --- a/public/favicon.ico +++ b/public/favicon.ico Binary files differ diff --git a/public/index.html b/public/index.html index 3e5a139..51d5523 100644 --- a/public/index.html +++ b/public/index.html @@ -5,7 +5,7 @@ <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width,initial-scale=1.0"> <link rel="icon" href="<%= BASE_URL %>favicon.ico"> - <title><%= htmlWebpackPlugin.options.title %></title> + <title>闈掔緤鍏畨缁忎睛</title> </head> <body> <noscript> diff --git a/public/logo.jpg b/public/logo.jpg new file mode 100644 index 0000000..f82ba87 --- /dev/null +++ b/public/logo.jpg Binary files differ diff --git a/src/api/Police.js b/src/api/Police.js new file mode 100644 index 0000000..984d2c0 --- /dev/null +++ b/src/api/Police.js @@ -0,0 +1,16 @@ +import request from '@/plugins/request' + +export function getPublicityList(params) { + return request({ + url: '/user/manager', + method: 'get', + params + }) +} +export function addPublicityList(params) { + return request({ + url: '/user/manager', + method: 'post', + data:params + }) +} diff --git a/src/api/Sensitive.js b/src/api/Sensitive.js new file mode 100644 index 0000000..b764360 --- /dev/null +++ b/src/api/Sensitive.js @@ -0,0 +1,16 @@ +import request from '@/plugins/request' + +export function getPublicityList(params) { + return request({ + url: '/sensitive', + method: 'get', + params + }) +} +export function addPublicityList(params) { + return request({ + url: '/sensitive', + method: 'post', + data:params + }) +} diff --git a/src/api/User.js b/src/api/User.js new file mode 100644 index 0000000..b81e1ca --- /dev/null +++ b/src/api/User.js @@ -0,0 +1,16 @@ +import request from '@/plugins/request' + +export function getPublicityList(params) { + return request({ + url: '/user', + method: 'get', + params + }) +} +export function addPublicityList(params) { + return request({ + url: '/user/add', + method: 'post', + data:params + }) +} diff --git a/src/api/cause.js b/src/api/cause.js index 55c26f1..4be3a92 100644 --- a/src/api/cause.js +++ b/src/api/cause.js @@ -53,10 +53,65 @@ }) } -export function exportReportExcel(params) { +export function GroupLits(params) { return request({ - url: '/report/exportReporter?id='+params, + url: '/announcement/getAnnouncements', + method: 'get', + params + }) +} + +export function GroupListBycondition(params) { + return request({ + url: '/announcement/getAnnouncements', + method: 'get', + params + }) +} + +export function addGroupAn(params,val) { + return request({ + url: '/announcement/add?groupId='+params, method: 'post', - responseType:'blob' + data: val + }) +} + +export function pOrUGroupAn(params,val) { + return request({ + url: '/announcement/publicOrUnshelve', + method: 'put', + params:{ + id:params, + status:val + } + }) +} +export function deleteGroupAn(params) { + return request({ + url: '/announcement/delete', + method: 'delete', + params:{ + id:params + + } + }) +} +export function detailsGroupAn(params) { + return request({ + url: '/announcement/getAnnouncementsById', + method: 'get', + params:{ + id:params + + } + }) +} + +export function report(params) { + return request({ + url: '/cause/addReporter', + method: 'post', + data: params }) } \ No newline at end of file diff --git a/src/api/common.js b/src/api/common.js index fd002a4..2dfdc43 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -33,3 +33,11 @@ method: 'get', }) } + +export function checkPass(params) { + return request({ + url: `/report/audit`, + method: 'post', + data:params + }) +} \ No newline at end of file diff --git a/src/api/group.js b/src/api/group.js new file mode 100644 index 0000000..d7ec686 --- /dev/null +++ b/src/api/group.js @@ -0,0 +1,78 @@ +import request from '@/plugins/request' + +export function getName() { + return request({ + url: '/group/getAllGroupName', + method: 'get', + }) +} +export function getAllMessage(params) { + return request({ + url: '/group/getAllMessage', + method: 'get', + params:{ + id:params + } + }) +} + +export function getAllNotice(params) { + return request({ + url: '/group/getAllNotice', + method: 'get', + params:{ + id:params + } + }) +} +export function getAllUser(params) { + return request({ + url: '/group/getAllUser', + method: 'get', + params:{ + id:params + } + }) +} + +export function setBanSpeech(params,param1) { + return request({ + url: '/group/banSpeech?id='+params+"&&groupId="+param1, + method: 'put', + }) +} +export function setAllowSpeech(params,param1) { + return request({ + url: '/group/allowSpeech?id='+params+"&&groupId="+param1, + method: 'put', + + }) +} + +export function setBanSpeechAll(params) { + return request({ + url: '/group/banSpeechAll?id='+params, + method: 'put', + }) +} + +export function getGroupMessage(param,param1) { + return request({ + url: '/group/getGroupMessage?report='+param.select+'&groupId='+param1, + method: 'get', + }) +} + +export function getGroupMessageContext(param,param1) { + return request({ + url: '/group/getGroupMessage?context='+param.select+'&groupId='+param1, + method: 'get', + }) +} + +export function seed(param,param1) { + return request({ + url: '/group/sendMessage?text='+param+'&id='+param1, + method: 'get', + }) +} \ No newline at end of file diff --git a/src/api/publicty.js b/src/api/publicty.js new file mode 100644 index 0000000..a6a142b --- /dev/null +++ b/src/api/publicty.js @@ -0,0 +1,16 @@ +import request from '@/plugins/request' + +export function getPublicityList(params) { + return request({ + url: '/publicity', + method: 'get', + params + }) +} +export function addPublicityList(params) { + return request({ + url: '/publicity', + method: 'post', + data:params + }) +} diff --git a/src/api/question.js b/src/api/question.js new file mode 100644 index 0000000..0da33e9 --- /dev/null +++ b/src/api/question.js @@ -0,0 +1,16 @@ +import request from '@/plugins/request' + +export function getPublicityList(params) { + return request({ + url: '/commonQuestion', + method: 'get', + params + }) +} +export function addPublicityList(params) { + return request({ + url: '/commonQuestion', + method: 'post', + data:params + }) +} diff --git a/src/assets/1.png b/src/assets/1.png new file mode 100644 index 0000000..8e5e467 --- /dev/null +++ b/src/assets/1.png Binary files differ diff --git a/src/assets/jh.png b/src/assets/jh.png new file mode 100644 index 0000000..de20d92 --- /dev/null +++ b/src/assets/jh.png Binary files differ diff --git a/src/icons/7bedbaa41b1744fbfe0c55b507fd9e28.png b/src/icons/7bedbaa41b1744fbfe0c55b507fd9e28.png new file mode 100644 index 0000000..f4a3a99 --- /dev/null +++ b/src/icons/7bedbaa41b1744fbfe0c55b507fd9e28.png Binary files differ diff --git a/src/plugins/element.js b/src/plugins/element.js index 98c570d..1d6a143 100644 --- a/src/plugins/element.js +++ b/src/plugins/element.js @@ -12,10 +12,10 @@ MenuItem, Message, Option, Pagination, Row, Select, - Submenu, Table, TableColumn, Upload + Submenu, Table, TableColumn, Upload,Tree } from 'element-ui' Vue.use(Button).use(Container).use(Header).use(Aside).use(Menu).use(Submenu).use(MenuItem).use(Main).use(Icon).use(Card) .use(Col).use(Row).use(Card).use(Table).use(TableColumn).use(Form).use(FormItem).use(Input).use(Select).use(Option) - .use(Pagination).use(Dialog).use(Upload).use(DatePicker).use(Image) + .use(Pagination).use(Dialog).use(Upload).use(DatePicker).use(Image).use(Tree) Vue.prototype.$message = Message diff --git a/src/plugins/filters.js b/src/plugins/filters.js index fd4d889..25f7989 100644 --- a/src/plugins/filters.js +++ b/src/plugins/filters.js @@ -1,7 +1,7 @@ import {getImgUrl} from "@/api/common"; export function fileNameToPath(val) { - if (val === '' || val === null) return './logo.png'; + if (val === '' || val === null) return './logo.jpg'; getImgUrl(val).then(res => { return res }) diff --git a/src/router/index.js b/src/router/index.js index 670c9b2..ce49b54 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -24,15 +24,20 @@ name: 'workbench', component: () => import('../views/workbench/Workbench.vue') }, - { - path: '/people', - name: 'people', - component: () => import('../views/manager/People.vue') - }, + // { + // path: '/people', + // name: 'people', + // component: () => import('../views/manager/People.vue') + // }, { path: '/user', name: 'user', component: () => import('../views/manager/User.vue') + }, + { + path: '/police', + name: 'police', + component: () => import('../views/manager/Police.vue') }, { path: '/entry', @@ -44,11 +49,11 @@ name: 'group', component: () => import('../views/cause/Group.vue') }, - { - path: '/search', - name: 'search', - component: () => import('../views/cause/Search.vue') - }, + // { + // path: '/search', + // name: 'search', + // component: () => import('../views/cause/Search.vue') + // }, { path: '/audit', name: 'audit', diff --git a/src/views/Home.vue b/src/views/Home.vue index 9a0dfc6..aa58ab5 100644 --- a/src/views/Home.vue +++ b/src/views/Home.vue @@ -2,9 +2,9 @@ <el-container class="home-container"> <!-- 澶撮儴鍖哄煙 --> <el-header> - <div> - <img src="../assets/logo.png" alt=""> - <span>闈掔緤缁忎睛鍚庡彴</span> + <div class="image"> + <img src="../assets/jh.png" alt=""> + <span>闈掔緤鍏畨缁忎睛</span> </div> <el-button type="info" @click="logout">閫�鍑�</el-button> </el-header> @@ -16,8 +16,7 @@ @click="toggleCollapse">||| </div> <!-- 渚ц竟鏍忚彍鍗曞尯鍩� --> - <el-menu text-color="#000" - active-text-color="#000" + <el-menu text-color="rgb(191, 203, 217)" :collapse="isCollapse" :collapse-transition="false" router @@ -25,7 +24,7 @@ <el-submenu index="/workbench"> <template slot="title"> <!-- 鍥炬爣 --> - <i class="iconfont icon-user"></i> + <i class="el-icon-s-platform"></i> <!-- 鏂囨湰 --> <span>宸ヤ綔鍙�</span> </template> @@ -38,7 +37,7 @@ </el-submenu> <el-submenu index="/cause"> <template slot="title"> - <i class="iconfont icon-user"></i> + <i class="el-icon-notebook-1"></i> <span>妗堜欢鍖�</span> </template> <el-menu-item index="/entry"> @@ -53,16 +52,16 @@ <span>缇ょ粍浜ゆ祦</span> </template> </el-menu-item> - <el-menu-item index="/search"> + <!-- <el-menu-item index="/search"> <template slot="title"> <i class="el-icon-menu"></i> <span>缇ょ粍鎼滅储</span> </template> - </el-menu-item> + </el-menu-item> --> </el-submenu> <el-submenu index="/common"> <template slot="title"> - <i class="iconfont icon-user"></i> + <i class="el-icon-bangzhu"></i> <span>鍏叡鍖�</span> </template> <el-menu-item index="/audit"> @@ -92,7 +91,7 @@ </el-submenu> <el-submenu index="/manager"> <template slot="title"> - <i class="iconfont icon-user"></i> + <i class="el-icon-s-custom"></i> <span>绠$悊鍖�</span> </template> <el-menu-item index="/user"> @@ -101,10 +100,10 @@ <span>鐢ㄦ埛绠$悊</span> </template> </el-menu-item> - <el-menu-item index="/people"> + <el-menu-item index="/police"> <template slot="title"> <i class="el-icon-menu"></i> - <span>浜哄憳绠$悊</span> + <span>璀﹀憳绠$悊</span> </template> </el-menu-item> </el-submenu> @@ -145,12 +144,12 @@ } .el-header { - background-color: #fff; + background-color: #242f42; display: flex; justify-content: space-between; padding-left: 0; align-items: center; - color: #000; + color: #FFFFFF; font-size: 20px; > div { display: flex; @@ -164,14 +163,18 @@ } .el-aside { - background-color: #fff; + background-color: rgb(50, 65, 87); .el-menu { border-right: none; + background-color: rgb(50, 65, 87); + .el-menu-item{ + background-color: rgb(50, 65, 87); + } } } .el-main { - background-color: #eaedf1; + } .iconfont { @@ -179,13 +182,21 @@ } .toggle-button { - background-color: #fff; + background-color:rgb(50, 65, 87); font-size: 10px; line-height: 24px; - color: #6495EDFF; + color:rgb(191, 203, 217); text-align: center; letter-spacing: 0.2em; cursor: pointer; } +.image { + img { + width: 100%; + height: 100%; + border-radius: 50%; + background-color: #eee; + } + } </style> diff --git a/src/views/Login.vue b/src/views/Login.vue index bbb8b38..d108e48 100644 --- a/src/views/Login.vue +++ b/src/views/Login.vue @@ -1,9 +1,13 @@ <template> <div class='login_container'> + <div class="login_span"> + <!-- 澶村儚鍖哄煙 --> + <span style="text-align: center;display:block;font-size: 100px;color: #FFFFFF;">闈掔緤缁忎睛鍚庡彴绯荤粺</span> + </div> <div class="login_box"> <!-- 澶村儚鍖哄煙 --> <div class="avater_box"> - <img src="../assets/logo.png" + <img src="../assets/jh.png" alt=""> </div> <!-- 鐧诲綍琛ㄥ崟鍖哄煙 --> @@ -19,7 +23,7 @@ </el-form-item> <!-- 瀵嗙爜 --> <el-form-item prop="password"> - <el-input v-model="loginForm.password" + <el-input v-model="loginForm.password" show-password prefix-icon="iconfont icon-3702mima" type="password" @keyup.enter.native="login"></el-input> </el-form-item> @@ -43,8 +47,8 @@ data() { return { loginForm: { - username: 'admin', - password: 'admin' + username: '', + password: '' }, // 琛ㄥ崟楠岃瘉瑙勫垯瀵硅薄 loginFormRules: { @@ -126,6 +130,15 @@ } } + +// .login_span { +// position: absolute; +// bottom: 0; +// width: 100%; +// padding: 0 20px; +// box-sizing: border-box; +// } + .login_form { position: absolute; bottom: 0; diff --git a/src/views/cause/Entry.vue b/src/views/cause/Entry.vue index e39f3c0..be937ec 100644 --- a/src/views/cause/Entry.vue +++ b/src/views/cause/Entry.vue @@ -7,7 +7,7 @@ <el-input placeholder="璇疯緭鍏ユ浠剁紪鍙锋垨鍚嶇О" v-model="queryInfo.cause"></el-input> </el-form-item> <el-form-item label="妗堜欢鐘舵�侊細"> - <el-select v-model="queryInfo.status" placeholder="璇烽�夋嫨"> + <el-select v-model="queryInfo.status" placeholder="璇烽�夋嫨" :style="{ width: '120px' }"> <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> </el-option> </el-select> @@ -35,15 +35,17 @@ </el-table-column> <el-table-column prop="reportNumber" label="鎶ユ浜烘暟" width="100" header-align="center" align="center"> </el-table-column> + <el-table-column prop="totalMoney" label="棰勪及鎬婚噾棰�" width="100" header-align="center" align="center"> + </el-table-column> <el-table-column prop="firstTime" label="鏈�鏃╁彂妗堟棩鏈�" width="160" header-align="center" align="center"> </el-table-column> <el-table-column prop="status" label="妗堜欢鐘舵��" width="110" header-align="center" align="center"> <template slot-scope="scope"> - <span v-if="scope.row.status == 0">鏈鏍�</span> + <span v-if="scope.row.status == 0">鍙楃悊涓�</span> <span v-if="scope.row.status == 1">涓嶄簣绔嬫</span> - <span v-if="scope.row.status == 2">鍙楃悊涓�</span> + <span v-if="scope.row.status == 2">浠ョ珛妗�</span> <span v-if="scope.row.status == 3">宸茬粨妗�</span> - <span v-if="scope.row.status == 4">宸叉挙妗�</span> + <span v-if="scope.row.status == 4">宸茬珛妗�</span> </template> </el-table-column> <el-table-column prop="userName" label="璐熻矗浜�" width="130" header-align="center" align="center"> @@ -54,7 +56,7 @@ <template slot-scope="scope"> <el-button type="text" size="medium" @click="updateCauseDialogVisible(scope.row)">缂栬緫</el-button> <el-button type="text" size="medium" @click="reporterVisibleBefore(scope.row.id)">鎶ユ浜哄憳</el-button> - <el-button type="text" size="medium" @click="handleAudit(scope.row)">缇ゅ叕鍛�</el-button> + <el-button type="text" size="medium" @click="groupAn(scope.row.groupId)">缇ゅ叕鍛�</el-button> <el-button type="text" size="medium" @click="removeCause(scope.row.id)" style="color:#ff0000">鍒犻櫎 </el-button> </template> @@ -66,29 +68,34 @@ </el-card> <!--娣诲姞妗堜欢寮圭獥--> - <el-dialog title="娣诲姞妗堜欢" :visible.sync="addAduitDialogVisible" width="50%" :before-close="addAduitClose"> + <el-dialog title="娣诲姞妗堜欢" :visible.sync="addAduitDialogVisible" :before-close="addAduitClose"> <el-row :gutter="15"> - <el-form ref="addAduitForm" :model="causeForm" :rules="rules" size="medium" label-width="100px"> - <el-col :span="18"> + <el-form ref="causeForm" :model="causeForm" :rules="addCauseRules" size="medium" label-width="100px"> + <el-col :span="12"> <el-form-item label="妗堜欢缂栧彿 " prop="number"> - <el-input v-model="causeForm.number" clearable :style="{ width: '100%' }"> + <el-input v-model="causeForm.number" clearable :style="{ width: '100%' }" placeholder="杈撳叆妗堜欢缂栧彿"> </el-input> </el-form-item> </el-col> - <el-col :span="18"> + <el-col :span="12"> <el-form-item label="妗堜欢鍚嶇О" prop="name"> - <el-input v-model="causeForm.name" clearable :style="{ width: '100%' }"> + <el-input v-model="causeForm.name" clearable :style="{ width: '100%' }" placeholder="杈撳叆妗堜欢鍚嶇О"> </el-input> </el-form-item> </el-col> - <el-col :span="18"> - <el-form-item label="鏈�鏃╁彂妗堟椂闂�" prop="firstTime"> - <el-date-picker v-model="causeForm.firstTime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" + <el-col :span="12"> + <el-form-item label="棰勪及鎬婚噾棰�" prop="totalMoney"> + <el-input v-model="causeForm.totalMoney" clearable :style="{ width: '100%' }" placeholder="杈撳叆棰勪及鎬婚噾棰�"></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鏈�鏃╁彂妗�" prop="firstTime"> + <el-date-picker v-model="causeForm.firstTime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" clearable :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss"> </el-date-picker> </el-form-item> </el-col> - <el-col :span="18"> + <el-col :span="12"> <el-form-item label="妗堜欢鐘舵��" prop="status"> <el-select v-model="causeForm.status" placeholder="璇烽�夋嫨涓嬫媺閫夋嫨" clearable :style="{ width: '100%' }"> <el-option v-for="item in causeOptions" :key="item.value" :label="item.label" :value="item.value"> @@ -96,7 +103,7 @@ </el-select> </el-form-item> </el-col> - <el-col :span="18"> + <el-col :span="12"> <el-form-item label="璐熻矗浜�" prop="userId"> <el-select v-model="causeForm.userId" placeholder="璇烽�夋嫨涓嬫媺閫夋嫨" clearable :style="{ width: '100%' }"> <el-option v-for="item in user" :key="item.userId" :label="item.userName" :value="item.userId" @@ -104,9 +111,12 @@ </el-select> </el-form-item> </el-col> - <el-col :span="18"> + + <el-col :span="24"> <el-form-item label="妗堜欢鎻忚堪" prop="description"> - <el-input v-model="causeForm.description" clearable :style="{ width: '100%', height: '50%' }"></el-input> + <el-input v-model="causeForm.description" type="textarea" placeholder="璇疯緭鍏ュ琛屾枃鏈�" + :autosize="{ minRows: 4, maxRows: 8 }" :style="{ width: '100%' }"> + </el-input> </el-form-item> </el-col> </el-form> @@ -120,27 +130,32 @@ <!--淇敼妗堜欢寮圭獥--> <el-dialog title="淇敼妗堜欢" :visible.sync="updateAduitDialogVisible" width="50%" :before-close="updateAduitClose"> <el-row :gutter="15"> - <el-form ref="addAduitForm" :model="updataCauseForm" :rules="rules" size="medium" label-width="100px"> - <el-col :span="18"> + <el-form ref="addAduitForm" :model="updataCauseForm" size="medium" label-width="100px"> + <el-col :span="12"> <el-form-item label="妗堜欢缂栧彿 " prop="number"> <el-input v-model="updataCauseForm.number" clearable :style="{ width: '100%' }"> </el-input> </el-form-item> </el-col> - <el-col :span="18"> + <el-col :span="12"> <el-form-item label="妗堜欢鍚嶇О" prop="name"> <el-input v-model="updataCauseForm.name" clearable :style="{ width: '100%' }"> </el-input> </el-form-item> </el-col> - <el-col :span="18"> + <el-col :span="12"> + <el-form-item label="棰勪及鎬婚噾棰�" prop="totalMoney"> + <el-input v-model="updataCauseForm.totalMoney" clearable :style="{ width: '100%' }"></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> <el-form-item label="鏈�鍙戞棭妗堟椂闂�" prop="firstTime"> <el-date-picker v-model="updataCauseForm.firstTime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss"> </el-date-picker> </el-form-item> </el-col> - <el-col :span="18"> + <el-col :span="12"> <el-form-item label="妗堜欢鐘舵��" prop="status"> <el-select v-model="updataCauseForm.status" clearable :style="{ width: '100%' }"> <el-option v-for="item in causeOptions" :key="item.value" :label="item.label" :value="item.value"> @@ -148,7 +163,7 @@ </el-select> </el-form-item> </el-col> - <el-col :span="18"> + <el-col :span="12"> <el-form-item label="璐熻矗浜�" prop="userId"> <el-select v-model="updataCauseForm.userName" clearable :style="{ width: '100%' }"> <el-option v-for="item in user" :key="item.userId" :label="item.userName" :value="item.userId" @@ -156,9 +171,10 @@ </el-select> </el-form-item> </el-col> - <el-col :span="18"> + <el-col :span="24"> <el-form-item label="妗堜欢鎻忚堪" prop="description"> - <el-input v-model="updataCauseForm.description" clearable :style="{ width: '100%', height: '50%' }"> + <el-input v-model="updataCauseForm.description" type="textarea" placeholder="璇疯緭鍏ュ琛屾枃鏈�" + :autosize="{ minRows: 4, maxRows: 8 }" :style="{ width: '100%' }"> </el-input> </el-form-item> </el-col> @@ -176,34 +192,41 @@ <el-card style="height: 100%"> <template slot="header"> <el-form :inline="true" :model="queryInfoReport" class="demo-form-inline"> - <el-form-item label="鎶ユ浜猴細"> - <el-input placeholder="璇疯緭鍏ュ鍚嶆垨韬唤璇�" v-model="queryInfoReport.people"></el-input> + <el-form-item label="鎶ユ浜�:"> + <el-input placeholder="璇疯緭鍏ュ鍚嶆垨韬唤璇�" v-model="queryInfoReport.people" :style="{ width: '180px' }"> + </el-input> </el-form-item> - <el-form-item label="鎵嬫満鍙风爜锛�"> - <el-input placeholder="璇疯緭鍏�" v-model="queryInfoReport.phoneNumber"></el-input> + <el-form-item label="鎵嬫満鍙风爜:"> + <el-input placeholder="璇疯緭鍏�" v-model="queryInfoReport.phoneNumber" :style="{ width: '120px' }"> + </el-input> </el-form-item> - <el-form-item label="鏄惁宸茶繘缇わ細"> - <el-select v-model="queryInfoReport.isInGroup" placeholder="璇烽�夋嫨" style="width:50%"> + <el-form-item label="鏄惁宸茶繘缇�:"> + <el-select v-model="queryInfoReport.isInGroup" :style="{ width: '100px' }"> <el-option v-for="item in optionsGroup" :key="item.value" :label="item.label" :value="item.value"> </el-option> </el-select> </el-form-item> - <el-form-item label="鎶ユ鏉愭枡锛�"> - <el-select v-model="queryInfoReport.HavaMaterial" placeholder="璇烽�夋嫨" style="width:50%"> + + <el-form-item label="鎶ユ鏉愭枡:"> + <el-select v-model="queryInfoReport.HavaMaterial" :style="{ width: '100px' }"> <el-option v-for="item in optionsMate" :key="item.value" :label="item.label" :value="item.value"> </el-option> </el-select> </el-form-item> <el-form-item> - <el-button type="primary" @click="search">鏌ヨ</el-button> + <el-button type="primary" @click="searchByCondition">鏌ヨ</el-button> </el-form-item> <el-form-item> - <el-button type="primary" @click="addAduitDialogOpen">娣诲姞</el-button> + <el-button type="primary" @click="addVisibelReport">娣诲姞</el-button> </el-form-item> - <!-- <el-form-item> - <el-button type="primary" @click="exportExcel">瀵煎叆</el-button> - </el-form-item> --> + <el-form-item> + <el-upload name="multipartFile" class="upload-demo" action="/api/cause/reporterUpload" + :show-file-list="false" :data="{ causeId: this.reportCauseId }" :before-upload="beforeAvatarUpload" + :on-success="reporterRespond" :limit="1"> + <el-button type="primary">瀵煎叆</el-button> + </el-upload> + </el-form-item> <el-form-item> <el-button type="primary" @click="exportExcel">鎶ユ鏉愭枡瀵煎嚭</el-button> </el-form-item> @@ -216,18 +239,18 @@ <img :src="scope.row.pic" style="width: 40px;height: 40px; border-radius: 50%;"> </template> </el-table-column> - <el-table-column width="80" prop="userName" label="鎶ユ浜�"></el-table-column> - <el-table-column width="120" prop="userMobile" label="鎵嬫満鍙风爜"></el-table-column> - <el-table-column width="180" prop="userIdcard" label="璇佷欢鍙风爜"></el-table-column> + <el-table-column width="80" prop="reporterName" label="鎶ユ浜�"></el-table-column> + <el-table-column width="120" prop="mobile" label="鎵嬫満鍙�"></el-table-column> + <el-table-column width="180" prop="idcard" label="璇佷欢鍙风爜"></el-table-column> <el-table-column width="100" prop="isCommission" label="鏄惁浠e姙"> <template slot-scope="scope"> <span v-if="scope.row.isCommission == 1">鏄�</span> <span v-else>鍚�</span> </template> </el-table-column> - <el-table-column width="100" prop="isIntoGroup" label="鏄惁杩涚兢"> + <el-table-column width="100" prop="isInGroup" label="鏄惁杩涚兢"> <template slot-scope="scope"> - <span v-if="scope.row.isIntoGroup == 1">鏄�</span> + <span v-if="scope.row.isInGroup == 1">鏄�</span> <span v-else>鍚�</span> </template> </el-table-column> @@ -238,7 +261,7 @@ </el-table-column> <el-table-column width="100" prop="reportMaterials" label="鎶ユ鏉愭枡"> <template slot-scope="scope"> - <span>{{ scope.row.reportMaterials === "" ? "鏈彁浜�" : "宸叉彁浜�" }}</span> + <span>{{ scope.row.reportMaterials === null ? "鏈彁浜�" : "宸叉彁浜�" }}</span> </template> </el-table-column> <el-table-column width="200" prop="reportTime" label="鎶ユ鏃堕棿"> @@ -251,65 +274,162 @@ <el-button type="text" size="medium" @click="updataReport(scope.row)">缂栬緫</el-button> <el-button type="text" size="medium" @click="leaveReport(scope.row.id, scope.row.causeId, scope.row.groupId)" style="color:#ff0000" - :disabled="scope.row.isIntoGroup == 0">閫�缇� </el-button> + :disabled="scope.row.isInGroup == 0">閫�缇� </el-button> <el-button type="text" size="medium" @click="removeReport(scope.row.id, scope.row.causeId)" - style="color:#ff0000" :disabled="scope.row.isIntoGroup == 1">鍒犻櫎 </el-button> + style="color:#ff0000" :disabled="scope.row.isInGroup == 1">鍒犻櫎 </el-button> </template> </el-table-column> </el-table> - <el-pagination @current-change="handleCurrentChange" :current-page="queryInfoReport.current" + <el-pagination @current-change="pageReport" :current-page="queryInfoReport.current" :page-size="queryInfoReport.size" layout="prev, pager, next" :total="reportTotal"></el-pagination> </el-card> + + <!--娣诲姞浜哄憳寮圭獥--> + <el-dialog title="娣诲姞浜哄憳" :visible.sync="addReportVisible" width="50%" :append-to-body="true" + :before-close="addReportVisibleClose"> + <el-row :gutter="15"> + <el-form ref="auditFrom" :model="auditFrom" :rules="addReportRules" size="medium" label-width="100px"> + <!-- <el-col :span="12"> + <el-form-item label="澶村儚" prop="pic" required> + <el-upload ref="pic" action="/api/minio/upload" :show-file-list="false" :on-success="handleAvatarSuccess" + list-type="picture-card" accept="image/*"> + <img v-if="picShow" :src="picShow" style="width: 145px;height: 145px"> + <i v-else class="el-icon-plus"></i> + </el-upload> + </el-form-item> + </el-col> --> + <el-col :span="12"> + <el-form-item label="鎶ユ浜� " prop="reporterName"> + <el-input v-model="auditFrom.reporterName" placeholder="璇疯緭鍏ユ姤妗堜汉 " clearable :style="{ width: '100%' }"> + </el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鎵嬫満鍙风爜" prop="mobile"> + <el-input v-model="auditFrom.mobile" placeholder="璇疯緭鍏ユ墜鏈哄彿鐮�" clearable :style="{ width: '100%' }"> + </el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="韬唤璇佸彿" prop="idcard"> + <el-input v-model="auditFrom.idcard" placeholder="璇疯緭鍏ヨ韩浠借瘉鍙�" clearable :style="{ width: '100%' }"> + </el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="琚獥鏃堕棿" prop="cheatTime"> + <el-date-picker v-model="auditFrom.cheatTime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" clearable + :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="娑夋閲戦" prop="amountInvolved"> + <el-input v-model="auditFrom.amountInvolved" placeholder="璇疯緭鍏ユ秹妗堥噾棰�" clearable + :style="{ width: '100%' }"> + </el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="妗堜欢鎻忚堪" prop="reportDescription"> + <el-input v-model="auditFrom.reportDescription" placeholder="璇疯緭鍏ユ浠舵弿杩�" clearable + :style="{ width: '100%' }"></el-input> + </el-form-item> + </el-col> + <el-col :span="24"> + <el-form-item label="琛ュ厖淇℃伅" prop="information"> + <el-input v-model="auditFrom.information" type="textarea" placeholder="璇疯緭鍏ヨˉ鍏呬俊鎭�" clearable + :autosize="{ minRows: 4, maxRows: 4 }" :style="{ width: '100%' }"></el-input> + </el-form-item> + </el-col> + <el-col :span="24"> + <el-form-item label="涓婁紶" prop="fileList"> + <el-upload ref="reportMaterials" :file-list="auditFrom.fileList" action="/api/minio/upload" + list-type="picture" :on-success="handleMaterialSuccess"> + <el-button size="small" type="primary" icon="el-icon-upload">鐐瑰嚮涓婁紶</el-button> + </el-upload> + </el-form-item> + </el-col> + </el-form> + </el-row> + <span slot="footer" class="dialog-footer"> + <el-button @click="addReportVisible = false">鍙� 娑�</el-button> + <el-button type="primary" @click="addAduit">纭� 瀹�</el-button> + </span> + </el-dialog> + <!--淇敼妗堜欢浜哄憳寮圭獥--> <el-dialog title="淇敼浜哄憳" :visible.sync="updateReportVisible" width="50%" :append-to-body="true" :before-close="updateReportVisibleclose"> <el-row :gutter="20"> - <el-form ref="updateReportForm" :model="updateReportForm" :rules="reportRules" size="medium" - label-width="100px"> - <!-- <el-col :span="12"> --> - <!-- <el-form-item label="澶村儚" prop="pic" required> - <el-upload ref="pic" action="/api/minio/upload" :show-file-list="false" - :on-success="handleAvatarSuccess" list-type="picture-card" accept="image/*" disabled> - <el-image style="width: 145px; height: 145px" :src="picShow" :preview-src-list="new Array(picShow)"> - </el-image> - </el-upload> - </el-form-item> --> - <!-- </el-col> --> + <el-form ref="updateReportForm" :model="updateReportForm" size="medium" label-width="100px"> <!-- <el-col :span="12"> - <el-form-item label="鎶ユ浜� " prop="userName" > - <el-input v-model="updateReportForm.userName" placeholder="璇疯緭鍏ユ姤妗堜汉 " clearable - :style="{ width: '100%' }"> + <el-form-item label="鎶ユ浜� " prop="reporterName"> + <el-input v-model="auditFrom.reporterName" placeholder="璇疯緭鍏ユ姤妗堜汉 " clearable :style="{ width: '100%' }"> </el-input> </el-form-item> </el-col> <el-col :span="12"> - <el-form-item label="鎵嬫満鍙风爜" prop="userMobile"> - <el-input v-model="updateReportForm.userMobile" placeholder="璇疯緭鍏ユ墜鏈哄彿鐮�" clearable - :style="{ width: '100%' }"> + <el-form-item label="鎵嬫満鍙风爜" prop="mobile"> + <el-input v-model="auditFrom.mobile" placeholder="璇疯緭鍏ユ墜鏈哄彿鐮�" clearable :style="{ width: '100%' }"> </el-input> </el-form-item> </el-col> <el-col :span="12"> - <el-form-item label="韬唤璇佸彿" prop="userIdcard"> - <el-input v-model="updateReportForm.userIdcard" placeholder="璇疯緭鍏ヨ韩浠借瘉鍙�" clearable - :style="{ width: '100%' }"> + <el-form-item label="韬唤璇佸彿" prop="idcard"> + <el-input v-model="auditFrom.idcard" placeholder="璇疯緭鍏ヨ韩浠借瘉鍙�" clearable :style="{ width: '100%' }"> </el-input> </el-form-item> </el-col> --> <el-col :span="12"> - <el-form-item prop="amountInvolved" label="娑夋閲戦"> + <el-form-item prop="reportTime" label="鎶ユ鏃堕棿"> + <el-date-picker v-model="updateReportForm.reportTime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" clearable + :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss"> + </el-date-picker> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="琚獥鏃堕棿" prop="cheatTime"> + <el-date-picker v-model="updateReportForm.cheatTime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" clearable + :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="娑夋閲戦" prop="amountInvolved"> <el-input v-model="updateReportForm.amountInvolved" placeholder="璇疯緭鍏ユ秹妗堥噾棰�" clearable :style="{ width: '100%' }"> </el-input> </el-form-item> </el-col> - <el-col :span="12"> - <el-form-item prop="reportTime" label="鎶ユ鏃堕棿"> - <el-date-picker v-model="updateReportForm.reportTime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" - :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss"> - </el-date-picker> + <el-col :span="24"> + <el-form-item label="妗堜欢鎻忚堪" prop="reportDescription"> + <el-input v-model="updateReportForm.reportDescription" placeholder="璇疯緭鍏ユ浠舵弿杩�" clearable + :style="{ width: '100%' }"></el-input> </el-form-item> </el-col> + <el-col :span="24"> + <el-form-item label="琛ュ厖淇℃伅" prop="information"> + <el-input v-model="updateReportForm.information" type="textarea" placeholder="璇疯緭鍏ヨˉ鍏呬俊鎭�" clearable + :autosize="{ minRows: 4, maxRows: 4 }" :style="{ width: '100%' }"></el-input> + </el-form-item> + </el-col> + <el-col :span="24"> + <el-form-item label="涓婁紶" prop="fileList" required> + <el-upload ref="reportMaterials" :file-list="updateReportForm.fileList" action="/api/minio/upload" + list-type="picture" :on-success="handleReporterMaterialSuccess"> + <el-button size="small" type="primary" icon="el-icon-upload">鐐瑰嚮涓婁紶</el-button> + </el-upload> + </el-form-item> + </el-col> + <!-- + <el-col :span="24"> + <el-form-item label="涓婁紶" prop="fileList" required> + <el-upload ref="reportMaterials" :file-list="auditFrom.fileList" action="/api/minio/upload" + list-type="picture" :on-success="handleMaterialSuccess"> + <el-button size="small" type="primary" icon="el-icon-upload">鐐瑰嚮涓婁紶</el-button> + </el-upload> + </el-form-item> + </el-col> --> + </el-form> </el-row> <span slot="footer" class="dialog-footer"> @@ -317,86 +437,215 @@ <el-button type="primary" @click="updateReportInCasue">纭� 瀹�</el-button> </span> </el-dialog> - <!-- 鏌ョ湅璇︽儏寮圭獥 - <el-dialog title="妗堜欢璇︽儏" :visible.sync="infoAduitDialogVisible" width="50%" :before-close="infoAduitClose"> - <el-row :gutter="15"> - <el-form ref="infoAduitForm" :model="auditInfo" size="medium" label-width="100px"> - <el-col :span="12"> - <el-form-item label="澶村儚" prop="pic" required> - <el-upload ref="pic" action="/api/minio/upload" :show-file-list="false" - :on-success="handleAvatarSuccess" list-type="picture-card" accept="image/*" disabled> - <el-image style="width: 145px; height: 145px" :src="picShow" :preview-src-list="new Array(picShow)"> - </el-image> - </el-upload> - </el-form-item> - </el-col> - <el-col :span="12"> - <el-form-item label="鎶ユ浜� "> - <el-input v-model="auditInfo.reporterName" disabled :style="{ width: '100%' }"></el-input> - </el-form-item> - </el-col> - <el-col :span="12"> - <el-form-item label="鎵嬫満鍙风爜"> - <el-input v-model="auditInfo.mobile" disabled :style="{ width: '100%' }"> - </el-input> - </el-form-item> - </el-col> - <el-col :span="12"> - <el-form-item label="韬唤璇佸彿"> - <el-input v-model="auditInfo.idcard" disabled :style="{ width: '100%' }"> - </el-input> - </el-form-item> - </el-col> - <el-col :span="12"> - <el-form-item label="琚獥鏃堕棿"> - <el-date-picker v-model="auditInfo.tmpTime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" - :style="{ width: '100%' }" format="yyyy-MM-dd HH:mm:ss" :value-format="auditFrom.cheatTime" - disabled> - </el-date-picker> - </el-form-item> - </el-col> - <el-col :span="12"> - <el-form-item label="娑夋閲戦"> - <el-input v-model="auditInfo.amountInvolved" placeholder="璇疯緭鍏ユ秹妗堥噾棰�" :style="{ width: '100%' }" - disabled> - </el-input> - </el-form-item> - </el-col> - <el-col :span="24"> - <el-form-item label="妗堜欢鎻忚堪"> - <el-input v-model="auditInfo.reportDescription" placeholder="璇疯緭鍏ユ浠舵弿杩�" :style="{ width: '100%' }" - disabled></el-input> - </el-form-item> - </el-col> - <el-col :span="24"> - <el-form-item label="琛ュ厖淇℃伅"> - <el-input v-model="auditInfo.information" type="textarea" placeholder="璇疯緭鍏ヨˉ鍏呬俊鎭�" - :autosize="{ minRows: 4, maxRows: 4 }" :style="{ width: '100%' }" disabled></el-input> - </el-form-item> - </el-col> - <el-col :span="24"> - <el-form-item label="鏉愭枡"> - <div class="metalL"></div> - </el-form-item> - </el-col> - <el-col :span="24"> - <el-form-item label="鍏宠仈妗堜欢" prop="causeId"> - <el-select v-model="auditFrom.causeId" placeholder="璇烽�夋嫨涓嬫媺閫夋嫨" clearable :style="{ width: '50%' }" - disabled> - <el-option v-for="item in causeOptions" :key="item.id" :label="item.name" :value="item.id"> - </el-option> - </el-select> - </el-form-item> - </el-col> - </el-form> - </el-row> - </el-dialog> --> + + + </el-row> <!-- <span slot="footer" class="dialog-footer"> <el-button @click="reporterVisible = false">鍙� 娑�</el-button> <el-button type="primary" @click="updateCause">纭� 瀹�</el-button> </span> --> </el-dialog> + + + <!--缇ゅ叕鍛婂脊绐�--> + <el-dialog title="缇ゅ叕鍛�" :visible.sync="groupAnVisible" width="85%" :before-close="groupAnVisibleClose"> + <el-row :gutter="15"> + <el-card style="height: 100%"> + <template slot="header"> + <el-form :inline="true" :model="queryInfoGroupAn" class="demo-form-inline"> + <el-form-item label="缇ゅ叕鍛婏細"> + <el-input placeholder="璇疯緭鍏�" v-model="queryInfoGroupAn.content"></el-input> + </el-form-item> + <el-form-item label="鐘舵��"> + <el-select v-model="queryInfoGroupAn.status" placeholder="璇烽�夋嫨" :style="{ width: '100px' }"> + <el-option v-for="item in statusMate" :key="item.value" :label="item.label" :value="item.value"> + </el-option> + </el-select> + </el-form-item> + + <el-form-item> + <el-button type="primary" @click="groupAnSearch">鏌ヨ</el-button> + </el-form-item> + <el-form-item> + <el-button type="primary" @click="openGroupAn">娣诲姞</el-button> + </el-form-item> + + </el-form> + </template> + <el-table :data="groupAnFrom"> + <el-table-column label="搴忓彿" type="index" width="120" align="center"> + <template slot-scope="scope"> + <span>{{ (current - 1) * size + scope.$index + 1 }}</span> + </template> + </el-table-column> + <el-table-column width="180" prop="text" label="缇ょ粍鍏憡"></el-table-column> + <el-table-column width="120" prop="status" label="鐘舵��"> + <template slot-scope="scope"> + <span v-if="scope.row.status === 1">宸插彂甯�</span> + <span v-else-if="scope.row.status === 0">鏈彂甯�</span> + <span v-else="scope.row.status=== 2">宸蹭笅鏋�</span> + </template> + </el-table-column> + <el-table-column width="100" prop="createName" label="鍒涘缓浜�"></el-table-column> + <el-table-column width="180" prop="publishTime" label="鍙戝竷鏃堕棿"> + </el-table-column> + <el-table-column label="鎿嶄綔" align="conter"> + <template slot-scope="scope"> + <el-button type="text" size="medium" @click="details(scope.row.id)">璇︽儏</el-button> + <el-button type="text" size="medium" @click="punlishOrUnshelve(scope.row.id, scope.row.status)" + :disabled="scope.row.status == 2"> + <span v-if="scope.row.status === 1" style="color:#ff0000">涓嬫灦</span> + <span v-else>鍙戝竷</span> + </el-button> + <el-button type="text" size="medium" @click="removeGroupAn(scope.row.id)" style="color:#ff0000" + :disabled="scope.row.status == 1">鍒犻櫎 + </el-button> + </template> + </el-table-column> + </el-table> + <el-pagination @current-change="pageGroupAn" :current-page="queryInfoGroupAn.current" + :page-size="queryInfoGroupAn.size" layout="prev, pager, next" :total="groupAnTotal"></el-pagination> + </el-card> + + <!--娣诲姞缇ゅ叕鍛婂脊绐�--> + <el-dialog title="缇ょ粍鍏憡娣诲姞" :visible.sync="addGroupAnVisibel" width="50%" :before-close="addGroupAnClose" + :append-to-body="true"> + <el-row :gutter="15"> + <el-form ref="addGroupForm" :model="addGroupForm" :rules="rules" size="medium" label-width="100px"> + <el-col :span="24"> + <el-form-item label="鍏憡鍐呭 " prop="text"> + <el-input v-model="addGroupForm.text" type="textarea" placeholder="璇疯緭鍏ュ叕鍛婂唴瀹�" clearable + :autosize="{ minRows: 4, maxRows: 4 }" :style="{ width: '100%' }"></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鍏憡鏈夋晥鏈�" prop="effectiveStime"> + <el-date-picker v-model="addGroupForm.effectiveStime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" clearable + :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss"> + </el-date-picker> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鑷�" prop="effectiveEtime"> + <el-date-picker v-model="addGroupForm.effectiveEtime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" clearable + :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss"> + </el-date-picker> + </el-form-item> + </el-col> + <el-col :span="12"> + + <el-form-item label="绔嬪嵆鍙戝竷" prop="status"> + <el-select v-model="addGroupForm.status" clearable placeholder="璇烽�夋嫨涓嬫媺閫夋嫨" :style="{ width: '100%' }"> + <el-option v-for="item in groupStatusMate" :key="item.value" :label="item.label" :value="item.value" + :disabled="item.disabled"></el-option> + </el-select> + </el-form-item> + </el-col> + + </el-form> + </el-row> + <span slot="footer" class="dialog-footer"> + <el-button @click="addGroupAnVisibel = false">鍙� 娑�</el-button> + <el-button type="primary" @click="addGroupAn">纭� 瀹�</el-button> + </span> + </el-dialog> + + <!--缇ゅ叕鍛婅鎯呭脊绐�--> + <el-dialog title="缇ょ粍鍏憡璇︽儏" :visible.sync="detailsVisible" width="50%" :append-to-body="true" + :before-close="detailsVisibleclose"> + + <el-row :gutter="15"> + <el-form ref="addGroupForm" :model="addGroupForm" size="medium" label-width="100px"> + <el-col :span="24"> + <el-form-item label="鍏憡鍐呭 " prop="text"> + <el-input v-model="detailsGroupAn.text" type="textarea" placeholder="璇疯緭鍏ュ叕鍛婂唴瀹�" disabled + :autosize="{ minRows: 4, maxRows: 4 }" :style="{ width: '100%' }"></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鍏憡鏈夋晥鏈�" prop="effectiveStime"> + <el-date-picker v-model="detailsGroupAn.effectiveStime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" disabled + :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss"> + </el-date-picker> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鑷�" prop="effectiveEtime"> + <el-date-picker v-model="detailsGroupAn.effectiveEtime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" disabled + :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss"> + </el-date-picker> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鍙戝竷鏃堕棿" prop="effectiveEtime"> + <el-date-picker v-model="detailsGroupAn.publishTime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" disabled + :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss"> + </el-date-picker> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鍒涘缓浜�" prop="effectiveEtime"> + <el-input v-model="detailsGroupAn.createName" disabled></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鐘舵��" prop="status"> + <span v-if="detailsGroupAn.status === 1">宸插彂甯�</span> + <span v-else-if="detailsGroupAn.status === 0">鏈彂甯�</span> + <span v-else="detailsGroupAn.status === 2">宸蹭笅鏋�</span> + </el-form-item> + </el-col> + </el-form> + </el-row> + + + <!-- <div style="display:flex; width:180;"> + <div style="display:flex; width:180;"> + <h4>缇ょ粍鍏憡</h4> + <p>{{ detailsGroupAn.text }}</p> + </div> + <div style="display:flex; width:180;"> + <h4>鐘舵��</h4> + <p>{{ detailsGroupAn.status }}</p> + </div> + <div style="display:flex; width:180;"> + <h4>鍒涘缓浜�</h4> + <p>{{ detailsGroupAn. }}</p> + </div> + <div style="display:flex; width:180;"> + <h4>鍙戝竷鏃堕棿</h4> + <p>{{ detailsGroupAn.publishTime }}</p> + </div> + <div style="display:flex; width:180;"> + <h4>缇ょ粍鍏憡</h4> + <p>{{ detailsGroupAn.text }}</p> + </div> + </div> --> + + <!-- <el-table-column width="180" prop="effectiveStime" label="缇ょ粍鍏憡"></el-table-column> + <el-table-column width="120" prop="status" label="鐘舵��"> + <template slot-scope="scope"> + <span v-if="scope.row.status === 1">宸插彂甯�</span> + <span v-else-if="scope.row.status === 0">鏈彂甯�</span> + <span v-else="scope.row.status=== 2">宸蹭笅鏋�</span> + </template> + </el-table-column> + <el-table-column width="100" prop="createName" label="鍒涘缓浜�"></el-table-column> + <el-table-column width="180" prop="publishTime" label="鍙戝竷鏃堕棿"> + </el-table-column> --> + + </el-dialog> + + + + </el-row> + <!-- <span slot="footer" class="dialog-footer"> + <el-button @click="reporterVisible = false">鍙� 娑�</el-button> + <el-button type="primary" @click="updateCause">纭� 瀹�</el-button> + </span> --> + </el-dialog> + </div> </template> @@ -408,29 +657,78 @@ leaveReport, user, updataReportCasue, - exportReportExcel + GroupLits, + GroupListBycondition, + pOrUGroupAn, + deleteGroupAn, + detailsGroupAn, + report //saveSubject } from '@/api/cause' -import { getImgUrl, getReportById, report } from '@/api/common' +import { getImgUrl, getReportById } from '@/api/common' export default { name: "Entry", data() { return { + + //娣诲姞妗堜欢浜哄憳寮圭獥鎺у埗 + addReportVisible: false, + //缇ゅ叕鍛婅缁嗗唴瀹� + detailsGroupAn: [], + // { + // text: '', + // groupId: '', + // id: '', + // ctime: '', + // effectiveStime: '', + // effectiveEtime: '', + // createName: '', + // status: null, + // publishTime: null + // }, + //缇ゅ叕鍛婅鎯呭脊妗� + detailsVisible: false, + //缇ゅ叕鍛婃坊鍔犺〃鍗� + addGroupForm: { + text: '', + status: '', + effectiveStime: '', + effectiveEtime: '', + }, + //缇ゅ叕鍛婄兢娣诲姞寮规 + addGroupAnVisibel: false, + //缇ゅ叕鍛婃煡璇� + queryInfoGroupAn: { + status: '', + content: '', + groupId: '', + current: 1, + size: 10, + }, + groupAnTotal: null, + //缇ゅ叕鍛婂簭鍙风浉鍏� + current: 1, + size: 10, + //妗堜欢id causeId: '', + //妗堜欢浜哄憳瀵煎嚭id exportReportId: '', + //缇ゅ叕鍛婃煡璇㈣繑鍥炲�� + groupAnFrom: [], + //妗堜欢浜哄憳鏌ヨ鍙傛暟 queryInfoReport: { + causeId: null, people: '', phoneNumber: '', - isInGroup: '5', + isInGroup: null, current: 1, - HavaMaterial: '5', + HavaMaterial: null, size: 10, }, auditFrom: { - pic: '', reporterName: '', mobile: '', idcard: '', @@ -439,45 +737,110 @@ reportDescription: '', information: '', reportMaterials: "", - causeId: '', fileList: [], tmpTime: '', + causeId: null, }, auditInfo: {}, picShow: "", optionsGroup: [ { - value: '5', + value: null, label: '鍏ㄩ儴' }, { - value: '0', + value: '1', label: '鏄�' }, { - value: '1', + value: '0', label: '鍚�' } ], optionsMate: [ { - value: '5', + value: null, label: '鍏ㄩ儴' }, { value: '0', - label: '宸叉彁浜�' + label: '鏈彁浜�' }, { value: '1', - label: '鏈彁浜�' + label: '宸叉彁浜�' } ], + groupStatusMate: [ + { + value: '0', + label: '鍚�' + }, + { + value: '1', + label: '鏄�' + } + ], + statusMate: [ + { + value: '', + label: '鍏ㄩ儴' + }, + { + value: '0', + label: '鏈彂甯�' + }, + { + value: '1', + label: '宸插彂甯�' + } + ], + //鎶ユ浜哄憳涓垎椤电殑妗堜欢id + reportCauseId: null, reportTotal: 0, reportList: [], addAduitDialogVisible: false, infoAduitDialogVisible: false, causeOptions: [], + groupAnVisible: false, + addCauseRules: { + number: [{ + required: true, + message: '璇疯緭鍏ユ浠剁紪鍙� ', + trigger: 'blur' + }], + name: [{ + required: true, + message: '璇疯緭鍏ユ浠跺悕绉� ', + trigger: 'blur' + }], + firstTime: [{ + required: true, + message: '璇烽�夋嫨鏈�鏃╂鍙戞椂闂� ', + trigger: 'blur' + }], + status: [{ + required: true, + message: '璇烽�夋嫨妗堜欢鐘舵�� ', + trigger: 'blur' + }], + totalMoney: [{ + required: true, + message: '璇疯緭鍏ラ浼版�婚噾棰� ', + trigger: 'blur' + }], + userId: [{ + required: true, + message: '璐熻矗浜洪�夋嫨 ', + trigger: 'blur' + }], + description: [{ + required: true, + message: '璇疯緭鍏ユ浠舵弿杩� ', + trigger: 'blur' + }] + } + , reportRules: { reporterName: [{ required: true, @@ -486,49 +849,74 @@ }], mobile: [{ required: true, - message: '璇疯緭鍏ユ墜鏈哄彿鐮�', + message: '璇疯緭鍏ユ墜鏈哄彿鐮� ', trigger: 'blur' }], idcard: [{ required: true, - message: '璇疯緭鍏ヨ韩浠借瘉鍙�', + message: '璇疯緭鍏ヨ韩浠借瘉鍙� ', trigger: 'blur' }], tmpTime: [{ required: true, - message: '璇疯緭鍏ヨ楠楁椂闂�', + message: '璇疯緭鍏ヨ楠楁椂闂� ', trigger: 'blur' }], amountInvolved: [{ required: true, - message: '璇疯緭鍏ユ秹妗堥噾棰�', + message: '璇疯緭鍏ユ秹妗堥噾棰� ', trigger: 'blur' }], reportDescription: [{ required: true, - message: '璇疯緭鍏ユ浠舵弿杩�', + message: '璇疯緭鍏ユ浠舵弿杩� ', trigger: 'blur' }], information: [{ required: true, - message: '璇疯緭鍏ヨˉ鍏呬俊鎭�', + message: '璇疯緭鍏ヨˉ鍏呬俊鎭� ', trigger: 'blur' }], causeId: [{ required: true, - message: '璇烽�夋嫨涓嬫媺閫夋嫨', + message: '璇烽�夋嫨涓嬫媺閫夋嫨 ', trigger: 'change' }], }, - - - updateReportForm: [], - + fileList: [{ + name: '', + url: '', + data: '' + } + ], + updateReportForm: { + reporterName: '', + mobile: '', + idcard: '', + cheatTime: '', + amountInvolved: '', + reportDescription: '', + information: '', + reportMaterials: "", + ctime: '', + causeId: null, + groupId: null, + }, //妗堜欢浜哄憳琛ㄦ牸鏁版嵁 updateReportPrams: { id: '', + reporterName: '', + mobile: '', + idcard: '', + cheatTime: '', amountInvolved: '', - reportTime: '', + reportDescription: '', + information: '', + reportMaterials: "", + ctime: '', + causeId: null, + groupId: null, + fileList: [], }, //妗堜欢琛ㄦ牸鏁版嵁 @@ -566,7 +954,7 @@ }, { value: '0', - label: '鏈鏍�' + label: '鍙楃悊涓�' }, { value: '1', @@ -574,7 +962,7 @@ }, { value: '2', - label: '鍙楃悊涓�' + label: '宸茬珛妗�' }, { value: '3', @@ -586,6 +974,10 @@ } ], causeOptions: [ + { + value: null, + label: '鍏ㄩ儴' + }, { value: '0', label: '鏈鏍�' @@ -607,52 +999,72 @@ label: '宸叉挙妗�' } ], - total: 0, + total: null, addAduitDialogVisible: false, updateAduitDialogVisible: false, reporterVisible: false, updateReportVisible: false, - rules: { + addReportRules: { reporterName: [{ required: true, message: '璇疯緭鍏ユ姤妗堜汉 ', trigger: 'blur' }], - mobile: [{ + mobile: + [{ required: true, message: '璇疯緭鍏ユ墜鏈哄彿鐮� ', trigger: 'blur' }, + { + validator: function (rule, value, callback) { + if (/^1[34578]\d{9}$/.test(value) == false) { + callback(new Error("璇疯緭鍏ユ纭殑鎵嬫満鍙�")); + } else { + callback(); + } + }, trigger: 'blur' + }], + idcard: [{ required: true, message: '璇疯緭鍏ヨ韩浠借瘉ID ', trigger: 'blur' }, + { pattern: /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/, message: '浣犵殑韬唤璇佹牸寮忎笉姝g‘' }], + cheatTime: [{ required: true, - message: '璇疯緭鍏ユ墜鏈哄彿鐮�', - trigger: 'blur' - }], - idcard: [{ - required: true, - message: '璇疯緭鍏ヨ韩浠借瘉鍙�', - trigger: 'blur' - }], - tmpTime: [{ - required: true, - message: '璇疯緭鍏ヨ楠楁椂闂�', + message: '璇疯緭鍏ヨ楠楁椂闂� ', trigger: 'blur' }], amountInvolved: [{ required: true, - message: '璇疯緭鍏ユ秹妗堥噾棰�', + message: '璇疯緭鍏ユ秹妗堥噾棰� ', trigger: 'blur' }], reportDescription: [{ required: true, - message: '璇疯緭鍏ユ浠舵弿杩�', + message: '璇疯緭鍏ユ浠舵弿杩� ', trigger: 'blur' }], information: [{ required: true, - message: '璇疯緭鍏ヨˉ鍏呬俊鎭�', + message: '璇疯緭鍏ヨˉ鍏呬俊鎭� ', trigger: 'blur' }], - causeId: [{ + }, + rules: { + text: [{ required: true, - message: '璇烽�夋嫨涓嬫媺閫夋嫨', - trigger: 'change' + message: '璇疯緭鍏ュ叕鍛婂唴瀹� ', + trigger: 'blur' }], + effectiveStime: [{ + required: true, + message: '閫夋嫨鍏憡鏈夋晥鏈� ', + trigger: 'blur' + }], + effectiveEtime: [{ + required: true, + message: '閫夋嫨鍏憡鏈夋晥鏈� ', + trigger: 'blur' + }], + status: [{ + required: true, + message: '璇疯緭鍏ヨ楠楁椂闂� ', + trigger: 'blur' + }] }, } }, @@ -664,26 +1076,144 @@ methods: { + //鍏抽棴妗堜欢鐨勬浠朵汉鍛樻坊鍔� + addReportVisibleClose() { + this.addReportVisible = false; + }, + //妗堜欢娣诲姞 + addVisibelReport() { + this.addReportVisible = true; + }, + + detailsVisibleclose() { + this.detailsVisible = false; + }, + //缇ゅ叕鍛婅鎯� + details(val) { + + detailsGroupAn(val).then(res => + this.detailsGroupAn = res + ); + console.log(this.detailsGroupAn); + this.detailsVisible = true; + }, + //缇ゅ叕鍛婂垹闄� + removeGroupAn(val) { + deleteGroupAn(val).then(res => this.$message({ + message: '鎿嶄綔鎴愬姛', + type: 'success' + })); + this.groupAnSearch(); + }, + //鍒嗛〉 + pageGroupAn(val) { + this.queryInfoGroupAn.current = val; + this.groupAnSearch(); + }, + //鍙戝竷鍜屼笅鏋� + punlishOrUnshelve(val, val2) { + pOrUGroupAn(val, val2).then(res => { + this.$message({ + message: '鎿嶄綔鎴愬姛', + type: 'success' + }); + this.groupAnSearch(); + }) + }, + //鎵撳紑寮规 + openGroupAn() { this.addGroupAnVisibel = true; }, + //娣诲姞缇ゅ叕鍛� + addGroupAn() { + this.$refs.addGroupForm.validate(async (vaild) => { + if (!vaild) return this.$message.error('杈撳叆鏈夎') + let from = null; + from = this.addGroupForm; + const data = from; + this.$http.post('/api/announcement/add?groupId=' + this.queryInfoGroupAn.groupId, + data + ).then(res => { + this.$message({ + message: '娣诲姞鎴愬姛', + type: 'success' + }); + this.addGroupForm = {} + this.addGroupAnVisibel = false; + this.groupAnSearch(); + }); + }) + }, + //琛屼负 缇ゅ叕鍛� + addGroupAnClose() { + this.addGroupAnVisibel = false; + }, + groupAnVisibleClose() { + this.groupAnVisible = false + }, + //缇ゅ叕鍛婃煡璇� + groupAnSearch() { + let params = null; + params = this.queryInfoGroupAn; + GroupListBycondition(params).then(res => { + this.queryInfoGroupAn.current = res.current; + this.queryInfoGroupAn.size = res.size; + this.groupAnFrom = res.records; + this.current = res.current; + this.size = res.size; + this.groupAnTotal = res.total; + }) + }, + //缇ゅ叕鍛� + //鎵撳紑 缇ゅ叕鍛婂脊绐� + groupAn(val) { + this.groupAnVisible = true; + this.getGroupAn(val); + }, + getGroupAn(val) { + let params = null; + this.queryInfoGroupAn.groupId = val; + params = this.queryInfoGroupAn; + GroupLits(params).then(res => { + this.queryInfoGroupAn.current = res.current; + this.queryInfoGroupAn.size = res.size; + this.groupAnFrom = res.records; + this.current = res.current; + this.size = res.size; + this.groupAnTotal = res.total; + }) + }, + //妗堜欢浜哄憳 //瀵煎嚭鏂囦欢 exportExcel() { - this.$http.post('/api/report/exportReporter?id=' + this.exportReportId,{},{ responseType: 'blob' }) + this.$http.post('/api/report/exportReporter?id=' + this.exportReportId, {}, { responseType: 'blob' }) .then(res => { const fileName = decodeURI(res.headers['content-disposition'].split(';')[1].split('=')[1]) const blob = new Blob([res.data], { type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' }) const elink = document.createElement('a') elink.download = fileName elink.href = URL.createObjectURL(blob) - document.body.appendChild(elink) + document.body.appendChild(elink) elink.click() document.body.removeChild(elink) + }) + }, //妗堜欢浜哄憳缂栬緫琛ㄥ崟鎻愪氦 updateReportInCasue() { - this.updateReportPrams.id = this.updateReportForm.id; - this.updateReportPrams.amountInvolved = this.updateReportForm.amountInvolved; - this.updateReportPrams.reportTime = this.updateReportForm.reportTime; + this.updateReportPrams.reporterName = this.updateReportForm.reporterName + this.updateReportPrams.mobile = this.updateReportForm.mobile + this.updateReportPrams.idcard = this.updateReportForm.idcard + this.updateReportPrams.cheatTime = this.updateReportForm.cheatTime + this.updateReportPrams.amountInvolved = this.updateReportForm.amountInvolved + this.updateReportPrams.reportDescription = this.updateReportForm.reportDescription + this.updateReportPrams.information = this.updateReportForm.information + this.updateReportPrams.reportMaterials = this.updateReportForm.reportMaterials + this.updateReportPrams.ctime = this.updateReportForm.ctime + this.updateReportPrams.causeId = this.updateReportForm.causeId + this.updateReportPrams.groupId = this.updateReportForm.groupId + this.updateReportPrams.id = this.updateReportForm.id + this.updateReportPrams.reportMaterials = this.updateReportPrams.fileList.map(i => i.data).join(',') let form = null; form = this.updateReportPrams; const data = form; @@ -693,10 +1223,9 @@ message: '淇敼鎴愬姛', type: 'success' }); - this.get(this.causeId); + this.searchByCondition(); } ); - this.updateReportVisible = false; }, @@ -714,6 +1243,7 @@ reporterVisibleBefore(row) { this.reporterVisible = true; this.exportReportId = row; + this.reportCauseId = row; this.get(row); }, //鎶ユ浜哄憳鏌ヨ @@ -724,7 +1254,7 @@ this.reportList = res.data.data.records this.reportList.forEach(x => { if (x.pic === '' || x.pic === null) { - x.pic = './logo.png'; + x.pic = './logo.jpg'; } else { getImgUrl(x.pic).then(res => { x.pic = res @@ -738,16 +1268,21 @@ this.infoAduitDialogVisible = false this.$refs.infoAduitForm.resetFields() }, + //娣诲姞妗堜欢涓殑妗堜欢浜哄憳 addAduit() { - this.$refs.addAduitForm.validate(async (vaild) => { + this.$refs.auditFrom.validate(async (vaild) => { if (!vaild) return this.$message.error('杈撳叆鏈夎') - this.auditFrom.reportMaterials = this.auditFrom.fileList.map(i => i.data).join(',') + this.auditFrom.reportMaterials = this.auditFrom.fileList.map(i => i.data).join(','); + this.auditFrom.causeId = this.reportCauseId; + console.log(this.reportCauseId); report(this.auditFrom).then(res => { this.$message.success('鎻愪氦鎴愬姛') - this.addAduitDialogVisible = false - this.getReportList() + this.auditFrom = {} + this.addReportVisible = false + this.get(this.reportCauseId) + this.init() }).catch(err => { - this.addAduitClose() + this.addReportVisibleClose() }) }) }, @@ -769,59 +1304,13 @@ data: res.data }) }, - addAduitClose() { - this.addAduitDialogVisible = false - this.$refs.addAduitForm.resetFields() - this.picShow = "" - }, - getReportList() { - let param = {} - param.people = this.queryInfoReport.people - param.phoneNumber = this.queryInfoReport.phoneNumber - param.current = this.queryInfoReport.current - param.size = this.queryInfoReport.size - param.isInGroup = this.queryInfoReport.isInGroup !== '5' ? this.queryInfoReport.isInGroup : '' - param.HavaMaterial = this.queryInfoReport.HavaMaterial !== '5' ? this.queryInfoReport.HavaMaterial : '' - getAuditList(param).then(res => { - this.total = res.total - this.list = res.records - this.list.forEach(x => { - if (x.pic === '' || x.pic === null) { - x.pic = './logo.png'; - } else { - getImgUrl(x.pic).then(res => { - x.pic = res - }) - } - }) - }) - }, - search() { - this.getReportList() - }, - addAduitDialogOpen() { - this.addAduitDialogVisible = true - }, - handleCurrentChange(val) { - this.queryInfoReport.current = val; - this.getReportList(); - }, - details(id) { - getReportById(id).then(res => { - this.auditInfo = res - if (res.pic === '' || res.pic === null) { - this.picShow = './logo.png'; - } else { - getImgUrl(res.pic).then(res => { - this.picShow = res - }) - } - this.infoAduitDialogVisible = true + async handleReporterMaterialSuccess(res, file) { + this.updateReportPrams.fileList.push({ + name: file.name, + url: await getImgUrl(res.data), + data: res.data }) - }, - audit(id) { - }, //妗堜欢褰曞叆鐩稿叧 @@ -856,25 +1345,30 @@ this.reporterVisible = false }, async createCause() { - let form = null; - form = this.causeForm; - const data = form; - this.$http.post('/api/cause/addCause', - data - ).then(res => { - if (res.data.code == 200) { - this.$message({ - type: "success", - message: "娣诲姞鎴愬姛" - }); - this.addAduitDialogVisible = false; - this.getList(); - } else { - this.$message({ - type: "error", - message: "琛ㄥ崟涓嶈兘涓虹┖" - }) + this.$refs.causeForm.validate(async (vaild) => { + if (!vaild) return this.$message.error('杈撳叆鏈夎') + let form = null; + form = this.causeForm; + const data = form; + this.$http.post('/api/cause/addCause', + data + ).then(res => { + if (res.data.code == 200) { + this.$message({ + type: "success", + message: "娣诲姞鎴愬姛" + }); + this.causeForm = {} + this.addAduitDialogVisible = false; + this.getList(); + } else { + this.$message({ + type: "error", + message: "琛ㄥ崟涓嶈兘涓虹┖" + }) + } } + ) }) }, @@ -959,6 +1453,23 @@ } location.reload(); }, + //妗堜欢浜哄憳瀵煎叆鎴愬姛鍚� + reporterRespond(res) { + if (res.code == 200) { + this.$message({ + message: '涓婁紶鎴愬姛', + type: 'success' + } + ) + } else { + this.$message({ + message: res.msg, + type: 'error' + }) + } + this.get(this.reportCauseId); + }, + beforeAvatarUpload(file) { let Xls = file.name.split('.'); if (Xls[1] === 'xls' || Xls[1] === 'xlsx') { @@ -994,6 +1505,28 @@ } ) + }, + //妗堜欢浜哄憳寮圭獥涓殑鏌ヨ + searchByCondition() { + this.queryInfoReport.causeId = this.reportCauseId; + this.$http.get('/api/cause/getAllReportList', { + params: this.queryInfoReport + }).then( + res => { + this.reportTotal = res.data.data.total + this.reportList = res.data.data.records + this.reportList.forEach(x => { + if (x.pic === '' || x.pic === null) { + x.pic = './logo.jpg'; + } else { + getImgUrl(x.pic).then(res => { + x.pic = res + }) + } + }) + } + ) + } , addDialogOpen() { @@ -1002,6 +1535,10 @@ handleCurrentChange(val) { this.queryInfo.current = val; this.getList(); + }, + pageReport(val) { + this.queryInfoReport.current = val; + this.searchByCondition(); }, removeCause(val) { remove(val).then( @@ -1022,7 +1559,7 @@ message: '鍒犻櫎鎴愬姛', type: 'success' }); - this.get(row); + this.searchByCondition(); } ) }, @@ -1035,7 +1572,7 @@ message: '閫�缇ゆ垚鍔�', type: 'success' }); - this.get(row); + this.searchByCondition(); } ) }, diff --git a/src/views/cause/Group.vue b/src/views/cause/Group.vue index 9e95289..557457b 100644 --- a/src/views/cause/Group.vue +++ b/src/views/cause/Group.vue @@ -1,15 +1,368 @@ <template> <div> - 缇ょ粍浜ゆ祦 + <el-container style="height: 600px; border: 1px solid #eee"> + <el-aside width="20%" style="background-color: rgb(238, 241, 246)"> + <el-input placeholder="璇疯緭鍏�" v-model="filterText" class="inputleft"> + <!-- <el-button slot="append" icon="el-icon-search" style="width:10px;" @click="pick"></el-button> --> + </el-input> + + <el-tree :data="treeData" :props="treeProps" @node-click="handleNodeClick" :filter-node-method="filterNode" + ref="tree"></el-tree> + </el-aside> + + <el-container class="container"> + <el-header style="text-align: left; font-size: 20px;margin-top: 15px"> + <span>{{ this.groupName }}</span> + <el-form :inline="true" :model="queryInfo" class="demo-form-inline"> + <el-form-item class="select"> + <el-select v-model="queryInfo.status" placeholder="璇烽�夋嫨"> + <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> + </el-option> + </el-select> + </el-form-item> + <el-form-item class="input"> + <el-input placeholder="璇疯緭鍏ユ垚鍛樻垨鍐呭" v-model="queryInfo.select"></el-input> + </el-form-item> + <el-form-item> + <el-button type="primary" @click="search">鏌ヨ</el-button> + </el-form-item> + </el-form> + </el-header> + + <el-main class="mian1"> + <ul v-infinite-scroll="load" style="overflow:auto"> + <li v-for="messageOne in messageList" class="infinite-list-item"> + <div class="msglist"> + <img v-if="messageOne.pic!=null&&messageOne.pic!=''" class="face" :src="'http://172.35.1.173:19001/img/'+messageOne.pic"> + <img v-if="messageOne.pic==null||messageOne.pic==''" class="face" src="../../icons/7bedbaa41b1744fbfe0c55b507fd9e28.png"> + <div class="name">{{messageOne.userName}} {{messageOne.ctime}}</div> + <div class="message">{{messageOne.text}}</div> + </div> + </li> + </ul> + <!-- <div class="table"> + <el-table :data="messageList" :show-header="false"> + <el-table-column prop="userName"> + </el-table-column> + <el-table-column prop="ctime"> + </el-table-column> + <el-table-column prop="text"> + </el-table-column> + </el-table> + </div> --> + </el-main> + </el-container> + + + <el-container> + <el-header style="height: 0px; margin-top: 0px;"> + </el-header> + + + + <el-container class="container1" direction="horizontal"> + + + + <el-table class="table1" max-height="360" size:medium :data="groupAnList" + style="width: 30%;border: 1px solid #eee;"> + <el-table-column prop="text" label="缇ゅ叕鍛�" style="color:#000000;"> + </el-table-column> + </el-table> + <el-table class="table2" max-height="360" :data="tableData" style="width: 20%;border: 1px solid #eee;"> + <el-table-column prop="userName" label="缇ゆ垚鍛�"> + + </el-table-column> + <el-table-column> + <template slot="header" slot-scope="scope"> + <el-button size="small" icon="el-icon-turn-off-microphone" type="primary" @click="allBanSpeech">鍏ㄤ綋绂佽█ + </el-button> + </template> + <template slot-scope="scope"> + <el-button @click="speech(scope.row.userId, scope.row.banSpeech, scope.row.groupId)" type="text" + size="medium"> + <span v-if="scope.row.banSpeech === 1" style="color:#ff0000">宸茬瑷�</span> + <span v-else style="color:#ff0000">绂佽█</span> + </el-button> + </template> + </el-table-column> + </el-table> + + + </el-container> + + <el-container class="container2" style="border: 1px solid #eee"> + <el-header style="text-align:left ; font-size: 15px; height: 10px; width: 100%; margin-top: 10px;"> + <span>娑堟伅鍥炲</span> + </el-header> + <el-main class="main5"> + <el-form ref="elForm" size="medium" label-width="100px"> + <el-form-item style="margin-bottom: 5px;"> + <el-input v-model="field103" type="textarea" placeholder="璇疯緭鍏ュ琛屾枃鏈�" + :autosize="{ minRows: 4, maxRows: 8 }" :style="{ width: '100%' }"> + </el-input> + </el-form-item> + </el-form> + <el-button style="margin-left: 90%;" size="small" type="primary" @click="seedMessage">鎻愪氦</el-button> + </el-main> + </el-container> + + </el-container> + </el-container> </div> </template> <script> +import { + getName, + getAllMessage, + getAllNotice, + getAllUser, + setBanSpeech, + setAllowSpeech, + setBanSpeechAll, + getGroupMessage, + getGroupMessageContext, + seed, + //saveSubject +} from '@/api/group' +import { Message } from 'element-ui'; + export default { - name: "Group" + name: "Group", + watch: { + filterText(val) { + this.$refs.tree.filter(val); + } + }, + data() { + return { + options: [ + { + value: '0', + label: '鎴愬憳' + }, + { + value: '1', + label: '璁板綍' + } + ], + groupName: '缇ょ粍', + filterText: '', + //缇d + groupId: null, + //娑堟伅鍒楄〃 + messageList: [], + //缇ゅ叕鍛婂垪琛� + groupAnList: [], + treeData: [{ + groupName: '闈掔緤鍖哄叕瀹夊垎灞�缁忎睛澶ч槦', + children: [ + ] + }], + treeProps: { + children: 'children', + label: 'groupName' + }, + field103: '', + queryInfo: { + }, + input: '', + //缇ゆ垚鍛樺垪琛� + tableData: [], + } + }, + created() { + this.init(); + }, + methods: + { + //缇ょ粍鍚嶇О + init() { + getName().then( + res => { + this.treeData[0].children = res; + } + ) + }, + filterNode(value, data) { + if (!value) return true; + return data.groupName.indexOf(value) !== -1; + }, + // pick(){ + // this.filterNode(this.filterVal,this.data); + // }, + handleNodeClick(data) { + if (data.id != null) { + this.groupName = data.groupName; + getAllMessage(data.id).then(res => this.messageList = res) + getAllNotice(data.id).then(res => this.groupAnList = res) + getAllUser(data.id).then(res => this.tableData = res) + this.groupId = data.id; + } + }, + search() { + if (this.queryInfo.status == 0) { + getGroupMessage(this.queryInfo, this.groupId).then(res => this.messageList = res) + } + if (this.queryInfo.status == 1) { + getGroupMessageContext(this.queryInfo, this.groupId).then(res => this.messageList = res) + } + }, + allBanSpeech() { + setBanSpeechAll(this.groupId).then( + res => { + this.$message({ + message: '绂佽█鎴愬姛', + type: 'success' + }); + getAllUser(this.groupId).then(res => this.tableData = res) + } + ) + }, + speech(val, val2, val3) { + if (val2 == 0) { + setBanSpeech(val, val3).then( + res => { + this.$message({ + message: '绂佽█鎴愬姛', + type: 'success' + }); + getAllUser(val3).then(res => this.tableData = res) + } + ) + + } + if (val2 == 1) { + setAllowSpeech(val, val3).then( + res => { + this.$message({ + message: '鍏佽鍙戣█', + type: 'success' + }); + getAllUser(val3).then(res => this.tableData = res) + } + ) + } + }, + seedMessage() { + seed(this.field103, this.groupId).then(res => { + this.$message({ + message: '鍥炲鎴愬姛', + type: 'success' + }); + getAllMessage(this.groupId).then(res => this.messageList = res) + this.field103 = ''; + } + ) + }, + }, + } </script> <style scoped> +* { + list-style: none; +} +.container { + width: 34%; +} + +.container1 { + width: 98%; + height: 60%; + margin-top: 8%; + margin-left: 2%; +} + +.container2 { + width: 100%; + height: 30%; + margin-top: 2%; + margin-left: 2%; +} + +.msglist{ +margin-bottom: 3%; +} +.face { + float: left; + width: 25px; + height: 25px; + border-radius: 50%; +} + +.name { + float: right; + margin-right: 43%; + color: #7F7F7F; + font-size: 14px; +} +.message{ + margin-top: 2%; +} +.mian1 { + margin-top: 20px; +} + +.mian4 { + margin-top: 0px; + width: 24%; +} + +.mian2 { + width: 38%; + margin-top: 0px; + margin-right: 2%; +} + +.table1 { + width: 360px; + margin-top: 0px; + margin-right: 2%; +} + +.table2 { + margin-top: 0px; +} + +.select { + width: 25%; +} + +.table>>>.el-table__row>td { + /* 鍘婚櫎琛ㄦ牸绾� */ + border: none; +} + +.table1>>>.el-table__row>td { + /* 鍘婚櫎琛ㄦ牸绾� */ + border: none; +} + +.table2>>>.el-table__row>td { + /* 鍘婚櫎琛ㄦ牸绾� */ + border: none; +} + +.mian5 { + margin-top: 0px; + width: 100%; + height: 30%; +} + +.input { + width: 49%; +} + +.button { + margin-right: 50px; + size: small; +} + +::v-deep(.el-table thead) { + color: #000000; +} </style> \ No newline at end of file diff --git a/src/views/cause/Search.vue b/src/views/cause/Search.vue deleted file mode 100644 index a8cb955..0000000 --- a/src/views/cause/Search.vue +++ /dev/null @@ -1,15 +0,0 @@ -<template> - <div> - 缇ょ粍鎼滅储 - </div> -</template> - -<script> -export default { - name: "Search" -} -</script> - -<style scoped> - -</style> \ No newline at end of file diff --git a/src/views/common/Audit.vue b/src/views/common/Audit.vue index 9a6b812..b8f503c 100644 --- a/src/views/common/Audit.vue +++ b/src/views/common/Audit.vue @@ -28,12 +28,20 @@ <el-button type="primary" @click="addAduitDialogOpen">娣诲姞</el-button> </el-form-item> <el-form-item> - <el-button type="primary" @click="exportExcel">瀵煎叆</el-button> + <el-upload name="multipartFile" class="upload-demo" action="/api/cause/reporterUpload" + :show-file-list="false" :before-upload="beforeAvatarUpload" + :on-success="reporterRespond" :limit="1"> + <el-button type="primary">瀵煎叆</el-button> + </el-upload> </el-form-item> </el-form> </template> <el-table :data="list"> - <el-table-column prop="id" label="搴忓彿" width="60"></el-table-column> + <el-table-column label="搴忓彿" type="index" width="180" align="center"> + <template slot-scope="scope"> + <span>{{ (current - 1) * size + scope.$index + 1 }}</span> + </template> + </el-table-column> <el-table-column width="80" prop="pic" label="澶村儚"> <template slot-scope="scope"> <img :src="scope.row.pic" style="width: 40px;height: 40px; border-radius: 50%;"> @@ -66,87 +74,85 @@ <el-table-column label="鎿嶄綔"> <template slot-scope="scope"> <el-button type="text" size="small" @click="details(scope.row.id)" style="font-size:14px">璇︽儏</el-button> - <el-button type="text" size="small" @click="audit(scope.row.id)" style="font-size:14px;color: red">瀹℃牳 + <el-button type="text" size="small" @click="check(scope.row.id)" style="font-size:14px;color: red">瀹℃牳 </el-button> </template> </el-table-column> </el-table> - <el-pagination @current-change="handleCurrentChange" :current-page="queryInfo.current" - :page-size="queryInfo.size" layout="prev, pager, next" - :total="total"></el-pagination> + <el-pagination @current-change="handleCurrentChange" :current-page="queryInfo.current" :page-size="queryInfo.size" + layout="prev, pager, next" :total="total"></el-pagination> </el-card> <!--娣诲姞浜哄憳寮圭獥--> <el-dialog title="娣诲姞浜哄憳" :visible.sync="addAduitDialogVisible" width="50%" :before-close="addAduitClose"> <el-row :gutter="15"> <el-form ref="addAduitForm" :model="auditFrom" :rules="rules" size="medium" label-width="100px"> <el-col :span="12"> - <el-form-item label="澶村儚" prop="pic" required> + <!-- <el-form-item label="澶村儚" prop="pic" required> <el-upload ref="pic" action="/api/minio/upload" :show-file-list="false" :on-success="handleAvatarSuccess" list-type="picture-card" accept="image/*"> <img v-if="picShow" :src="picShow" style="width: 145px;height: 145px"> <i v-else class="el-icon-plus"></i> </el-upload> - </el-form-item> + </el-form-item> --> </el-col> <el-col :span="12"> <el-form-item label="鎶ユ浜� " prop="reporterName"> - <el-input v-model="auditFrom.reporterName" placeholder="璇疯緭鍏ユ姤妗堜汉 " clearable - :style="{width: '100%'}"></el-input> + <el-input v-model="auditFrom.reporterName" placeholder="璇疯緭鍏ユ姤妗堜汉 " clearable :style="{ width: '100%' }"> + </el-input> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="鎵嬫満鍙风爜" prop="mobile"> - <el-input v-model="auditFrom.mobile" placeholder="璇疯緭鍏ユ墜鏈哄彿鐮�" clearable :style="{width: '100%'}"> + <el-input v-model="auditFrom.mobile" placeholder="璇疯緭鍏ユ墜鏈哄彿鐮�" clearable :style="{ width: '100%' }"> </el-input> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="韬唤璇佸彿" prop="idcard"> - <el-input v-model="auditFrom.idcard" placeholder="璇疯緭鍏ヨ韩浠借瘉鍙�" clearable :style="{width: '100%'}"> + <el-input v-model="auditFrom.idcard" placeholder="璇疯緭鍏ヨ韩浠借瘉鍙�" clearable :style="{ width: '100%' }"> </el-input> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="琚獥鏃堕棿" prop="cheatTime"> - <el-date-picker v-model="auditFrom.tmpTime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" - :style="{width: '100%'}" format="yyyy-MM-dd HH:mm:ss" - :value-format="auditFrom.cheatTime"></el-date-picker> + <el-date-picker v-model="auditFrom.cheatTime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" :style="{ width: '100%' }" + format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss"></el-date-picker> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="娑夋閲戦" prop="amountInvolved"> - <el-input v-model="auditFrom.amountInvolved" placeholder="璇疯緭鍏ユ秹妗堥噾棰�" clearable - :style="{width: '100%'}"></el-input> + <el-input v-model="auditFrom.amountInvolved" placeholder="璇疯緭鍏ユ秹妗堥噾棰�" clearable :style="{ width: '100%' }"> + </el-input> </el-form-item> </el-col> <el-col :span="24"> <el-form-item label="妗堜欢鎻忚堪" prop="reportDescription"> - <el-input v-model="auditFrom.reportDescription" placeholder="璇疯緭鍏ユ浠舵弿杩�" clearable - :style="{width: '100%'}"></el-input> + <el-input v-model="auditFrom.reportDescription" placeholder="璇疯緭鍏ユ浠舵弿杩�" clearable :style="{ width: '100%' }"> + </el-input> </el-form-item> </el-col> <el-col :span="24"> <el-form-item label="琛ュ厖淇℃伅" prop="information"> <el-input v-model="auditFrom.information" type="textarea" placeholder="璇疯緭鍏ヨˉ鍏呬俊鎭�" - :autosize="{minRows: 4, maxRows: 4}" :style="{width: '100%'}"></el-input> + :autosize="{ minRows: 4, maxRows: 4 }" :style="{ width: '100%' }"></el-input> </el-form-item> </el-col> <el-col :span="24"> - <el-form-item label="涓婁紶" prop="fileList" required> - <el-upload ref="reportMaterials" :file-list="auditFrom.fileList" - action="/api/minio/upload" list-type="picture" :on-success="handleMaterialSuccess"> + <el-form-item label="涓婁紶" prop="fileList" > + <el-upload ref="reportMaterials" :file-list="auditFrom.fileList" action="/api/minio/upload" + list-type="picture" :on-success="handleMaterialSuccess"> <el-button size="small" type="primary" icon="el-icon-upload">鐐瑰嚮涓婁紶</el-button> </el-upload> </el-form-item> </el-col> - <el-col :span="24"> + <!-- <el-col :span="24"> <el-form-item label="鍏宠仈妗堜欢" prop="causeId"> <el-select v-model="auditFrom.causeId" placeholder="璇烽�夋嫨涓嬫媺閫夋嫨" clearable :style="{width: '50%'}"> <el-option v-for="item in causeOptions" :key="item.id" :label="item.name" :value="item.id"></el-option> </el-select> </el-form-item> - </el-col> + </el-col> --> </el-form> </el-row> <span slot="footer" class="dialog-footer"> @@ -154,60 +160,59 @@ <el-button type="primary" @click="addAduit">纭� 瀹�</el-button> </span> </el-dialog> - <!--鏌ョ湅璇︽儏寮圭獥--> - <el-dialog title="妗堜欢璇︽儏" :visible.sync="infoAduitDialogVisible" width="50%" :before-close="infoAduitClose"> + + <!--瀹℃牳寮圭獥--> + <el-dialog title="瀹℃牳" :visible.sync="checkVisible" width="50%" :before-close="infoAduitClose"> <el-row :gutter="15"> <el-form ref="infoAduitForm" :model="auditInfo" size="medium" label-width="100px"> <el-col :span="12"> <el-form-item label="澶村儚" prop="pic" required> <el-upload ref="pic" action="/api/minio/upload" :show-file-list="false" :on-success="handleAvatarSuccess" - list-type="picture-card" accept="image/*" disabled> - <el-image style="width: 145px; height: 145px" :src="picShow" - :preview-src-list="new Array(picShow)"></el-image> + list-type="picture-card" accept="image/*" disabled> + <el-image style="width: 145px; height: 145px" :src="picShow" :preview-src-list="new Array(picShow)"> + </el-image> </el-upload> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="鎶ユ浜� "> - <el-input v-model="auditInfo.reporterName" disabled - :style="{width: '100%'}"></el-input> + <el-input v-model="auditInfo.reporterName" disabled :style="{ width: '100%' }"></el-input> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="鎵嬫満鍙风爜"> - <el-input v-model="auditInfo.mobile" disabled :style="{width: '100%'}"> + <el-input v-model="auditInfo.mobile" disabled :style="{ width: '100%' }"> </el-input> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="韬唤璇佸彿"> - <el-input v-model="auditInfo.idcard" disabled :style="{width: '100%'}"> + <el-input v-model="auditInfo.idcard" disabled :style="{ width: '100%' }"> </el-input> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="琚獥鏃堕棿"> - <el-date-picker v-model="auditInfo.tmpTime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" - :style="{width: '100%'}" format="yyyy-MM-dd HH:mm:ss" - :value-format="auditFrom.cheatTime" disabled></el-date-picker> + <el-date-picker v-model="auditInfo.tmpTime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" :style="{ width: '100%' }" + format="yyyy-MM-dd HH:mm:ss" :value-format="auditFrom.cheatTime" disabled></el-date-picker> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="娑夋閲戦"> - <el-input v-model="auditInfo.amountInvolved" placeholder="璇疯緭鍏ユ秹妗堥噾棰�" - :style="{width: '100%'}" disabled></el-input> + <el-input v-model="auditInfo.amountInvolved" placeholder="璇疯緭鍏ユ秹妗堥噾棰�" :style="{ width: '100%' }" disabled> + </el-input> </el-form-item> </el-col> <el-col :span="24"> <el-form-item label="妗堜欢鎻忚堪"> - <el-input v-model="auditInfo.reportDescription" placeholder="璇疯緭鍏ユ浠舵弿杩�" - :style="{width: '100%'}" disabled></el-input> + <el-input v-model="auditInfo.reportDescription" placeholder="璇疯緭鍏ユ浠舵弿杩�" :style="{ width: '100%' }" disabled> + </el-input> </el-form-item> </el-col> <el-col :span="24"> <el-form-item label="琛ュ厖淇℃伅"> <el-input v-model="auditInfo.information" type="textarea" placeholder="璇疯緭鍏ヨˉ鍏呬俊鎭�" - :autosize="{minRows: 4, maxRows: 4}" :style="{width: '100%'}" disabled></el-input> + :autosize="{ minRows: 4, maxRows: 4 }" :style="{ width: '100%' }" disabled></el-input> </el-form-item> </el-col> <el-col :span="24"> @@ -217,12 +222,86 @@ </el-col> <el-col :span="24"> <el-form-item label="鍏宠仈妗堜欢" prop="causeId"> - <el-select v-model="auditFrom.causeId" placeholder="璇烽�夋嫨涓嬫媺閫夋嫨" clearable :style="{width: '50%'}" disabled> - <el-option v-for="item in causeOptions" :key="item.id" :label="item.name" - :value="item.id"></el-option> + <el-select v-model="auditInfo.causeId" placeholder="璇烽�夋嫨涓嬫媺閫夋嫨" clearable :style="{ width: '50%' }"> + <el-option v-for="item in causeOptions" :key="item.id" :label="item.name" :value="item.id"></el-option> </el-select> </el-form-item> </el-col> + </el-form> + </el-row> + <span slot="footer" class="dialog-footer"> + <el-button @click="checkVisible = false">鍙� 娑�</el-button> + <el-button type="primary" @click="checkAdd">纭� 瀹�</el-button> + </span> + </el-dialog> + + + <!--鏌ョ湅璇︽儏寮圭獥--> + <el-dialog title="妗堜欢璇︽儏" :visible.sync="infoAduitDialogVisible" width="50%" :before-close="detailsClose"> + <el-row :gutter="15"> + <el-form ref="infoAduitForm" :model="auditInfo" size="medium" label-width="100px"> + <el-col :span="12"> + <el-form-item label="澶村儚" prop="pic" required> + <el-upload ref="pic" action="/api/minio/upload" :show-file-list="false" :on-success="handleAvatarSuccess" + list-type="picture-card" accept="image/*" disabled> + <el-image style="width: 145px; height: 145px" :src="picShow" :preview-src-list="new Array(picShow)"> + </el-image> + </el-upload> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鎶ユ浜� "> + <el-input v-model="auditInfo.reporterName" disabled :style="{ width: '100%' }"></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鎵嬫満鍙风爜"> + <el-input v-model="auditInfo.mobile" disabled :style="{ width: '100%' }"> + </el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="韬唤璇佸彿"> + <el-input v-model="auditInfo.idcard" disabled :style="{ width: '100%' }"> + </el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="琚獥鏃堕棿"> + <el-date-picker v-model="auditInfo.tmpTime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" :style="{ width: '100%' }" + format="yyyy-MM-dd HH:mm:ss" :value-format="auditFrom.cheatTime" disabled></el-date-picker> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="娑夋閲戦"> + <el-input v-model="auditInfo.amountInvolved" placeholder="璇疯緭鍏ユ秹妗堥噾棰�" :style="{ width: '100%' }" disabled> + </el-input> + </el-form-item> + </el-col> + <el-col :span="24"> + <el-form-item label="妗堜欢鎻忚堪"> + <el-input v-model="auditInfo.reportDescription" placeholder="璇疯緭鍏ユ浠舵弿杩�" :style="{ width: '100%' }" disabled> + </el-input> + </el-form-item> + </el-col> + <el-col :span="24"> + <el-form-item label="琛ュ厖淇℃伅"> + <el-input v-model="auditInfo.information" type="textarea" placeholder="璇疯緭鍏ヨˉ鍏呬俊鎭�" + :autosize="{ minRows: 4, maxRows: 4 }" :style="{ width: '100%' }" disabled></el-input> + </el-form-item> + </el-col> + <el-col :span="24"> + <el-form-item label="鏉愭枡"> + <div class="metalL"></div> + </el-form-item> + </el-col> + <!-- <el-col :span="24"> + <el-form-item label="鍏宠仈妗堜欢" prop="causeId"> + <el-select v-model="auditFrom.causeId" placeholder="璇烽�夋嫨涓嬫媺閫夋嫨" clearable :style="{ width: '50%' }" disabled> + <el-option v-for="item in causeOptions" :key="item.id" :label="item.name" :value="item.id"></el-option> + </el-select> + </el-form-item> + </el-col> --> </el-form> </el-row> </el-dialog> @@ -230,18 +309,20 @@ </template> <script> -import {getAuditList, getImgUrl, getReportById, report} from '@/api/common' +import { getAuditList, getImgUrl, getReportById, report, checkPass } from '@/api/common' export default { name: "Audit", data() { return { + current: null, + size: null, queryInfo: { people: '', phoneNumber: '', - isInGroup: '5', + isInGroup: null, current: 1, - HavaMaterial: '5', + HavaMaterial: null, size: 10, }, auditFrom: { @@ -262,7 +343,7 @@ picShow: "", optionsGroup: [ { - value: '5', + value: null, label: '鍏ㄩ儴' }, { @@ -276,7 +357,7 @@ ], optionsMate: [ { - value: '5', + value: null, label: '鍏ㄩ儴' }, { @@ -292,6 +373,7 @@ list: [], addAduitDialogVisible: false, infoAduitDialogVisible: false, + checkVisible: false, causeOptions: [], rules: { reporterName: [{ @@ -299,17 +381,25 @@ message: '璇疯緭鍏ユ姤妗堜汉 ', trigger: 'blur' }], - mobile: [{ + mobile: + [{ required: true, message: '璇疯緭鍏ユ墜鏈哄彿鐮�', trigger: 'blur' }, + { + validator: function (rule, value, callback) { + if (/^1[34578]\d{9}$/.test(value) == false) { + callback(new Error("璇疯緭鍏ユ纭殑鎵嬫満鍙�")); + } else { + callback(); + } + }, trigger: 'blur' + }], + idcard: [{ required: true, message: '璇疯緭鍏ヨ韩浠借瘉ID', trigger: 'blur' }, + { pattern: /(^\d{15}$)|(^\d{19}$)|(^\d{17}(\d|X|x)$)/, message: '浣犵殑韬唤璇佹牸寮忎笉姝g‘' }], + cheatTime: [{ required: true, - message: '璇疯緭鍏ユ墜鏈哄彿鐮�', + message: '璇疯緭鍏ヨ楠楁椂闂�', trigger: 'blur' }], - idcard: [{ - required: true, - message: '璇疯緭鍏ヨ韩浠借瘉鍙�', - trigger: 'blur' - }], - tmpTime: [{ + cheatTime: [{ required: true, message: '璇疯緭鍏ヨ楠楁椂闂�', trigger: 'blur' @@ -341,8 +431,62 @@ this.getList() this.getCauseOptions() }, + methods: { + //妗堜欢浜哄憳瀵煎叆鎴愬姛鍚� + reporterRespond(res) { + if (res.code == 200) { + this.$message({ + message: '涓婁紶鎴愬姛', + type: 'success' + } + ) + } else { + this.$message({ + message: res.msg, + type: 'error' + }) + } + this.getList() + }, + beforeAvatarUpload(file) { + let Xls = file.name.split('.'); + if (Xls[1] === 'xls' || Xls[1] === 'xlsx') { + return file + } else { + this.$message.error('涓婁紶鏂囦欢鍙兘鏄� xls/xlsx 鏍煎紡!') + return false + } + }, + //瀹℃牳纭畾 + checkAdd() { + let form = null; + form = this.auditInfo; + checkPass(form).then(res => { + this.$message.success('鎻愪氦鎴愬姛') + this.getList() + this.checkVisible = false; + }) + }, + //瀹℃牳 + check(val) { + getReportById(val).then(res => { + this.auditInfo = res + if (res.pic === '' || res.pic === null) { + this.picShow = './logo.jpg'; + } else { + getImgUrl(res.pic).then(res => { + this.picShow = res + }) + } + this.checkVisible = true + }) + }, infoAduitClose() { + this.checkVisible = false + this.$refs.infoAduitForm.resetFields() + }, + detailsClose() { this.infoAduitDialogVisible = false this.$refs.infoAduitForm.resetFields() }, @@ -352,6 +496,7 @@ this.auditFrom.reportMaterials = this.auditFrom.fileList.map(i => i.data).join(',') report(this.auditFrom).then(res => { this.$message.success('鎻愪氦鎴愬姛') + this.auditFrom = {} this.addAduitDialogVisible = false this.getList() }).catch(err => { @@ -360,7 +505,7 @@ }) }, async getCauseOptions() { - const {data: data} = await this.$http.get('/api/cause/getCauseIdAndName'); + const { data: data } = await this.$http.get('/api/cause/getCauseIdAndName'); this.causeOptions = data.data; }, handleAvatarSuccess(res, file) { @@ -388,14 +533,16 @@ param.phoneNumber = this.queryInfo.phoneNumber param.current = this.queryInfo.current param.size = this.queryInfo.size - param.isInGroup = this.queryInfo.isInGroup !== '5' ? this.queryInfo.isInGroup : '' - param.HavaMaterial = this.queryInfo.HavaMaterial !== '5' ? this.queryInfo.HavaMaterial : '' + param.isInGroup = this.queryInfo.isInGroup + param.HavaMaterial = this.queryInfo.HavaMaterial getAuditList(param).then(res => { this.total = res.total this.list = res.records + this.size = res.size + this.current = res.current this.list.forEach(x => { if (x.pic === '' || x.pic === null) { - x.pic = './logo.png'; + x.pic = './logo.jpg'; } else { getImgUrl(x.pic).then(res => { x.pic = res @@ -420,7 +567,7 @@ getReportById(id).then(res => { this.auditInfo = res if (res.pic === '' || res.pic === null) { - this.picShow = './logo.png'; + this.picShow = './logo.jpg'; } else { getImgUrl(res.pic).then(res => { this.picShow = res @@ -448,5 +595,4 @@ .el-form-item { margin-top: 20px; } - </style> diff --git a/src/views/common/Publicity.vue b/src/views/common/Publicity.vue index 3a25d27..d5b5f15 100644 --- a/src/views/common/Publicity.vue +++ b/src/views/common/Publicity.vue @@ -1,15 +1,388 @@ <template> - <div> - 鍏叡瀹d紶 + <div style="height: 100%"> + <el-card style="height: 100%"> + <template slot="header"> + <el-form :inline="true" :model="queryInfo" class="demo-form-inline"> + <el-form-item label="鏍囬锛�"> + <el-input placeholder="璇疯緭鍏�" v-model="queryInfo.publicityTitle"></el-input> + </el-form-item> + <el-form-item label="鐘舵�侊細"> + <el-select v-model="queryInfo.status" placeholder="璇烽�夋嫨" :style="{ width: '120px' }"> + <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> + </el-option> + </el-select> + </el-form-item> + <el-form-item> + <el-button type="primary" @click="search">鏌ヨ</el-button> + </el-form-item> + <el-form-item> + <el-button type="primary" @click="addPublicityVisibel = true">娣诲姞</el-button> + </el-form-item> + + <el-form-item> + <el-upload name="multipartFile" class="upload-demo" action="/api/publicity/upload " :show-file-list="false" + :before-upload="beforeAvatarUpload" :on-success="respond" :limit="1"> + <el-button type="primary">瀵煎叆</el-button> + </el-upload> + </el-form-item> + </el-form> + </template> + <template> + <el-table :data="publicityList" style="width: 100%"> + + <el-table-column label="搴忓彿" type="index" width="180" align="center"> + <template slot-scope="scope"> + <span>{{ (current - 1) * size + scope.$index + 1 }}</span> + </template> + </el-table-column> + <el-table-column prop="publicityTitle" label="鏍囬" width="180" align="center"> + </el-table-column> + <el-table-column prop="status" label="鐘舵��" width="180" header-align="center" align="center"> + <template slot-scope="scope"> + <span v-if="scope.row.status == 0">鏈彂甯�</span> + <span v-if="scope.row.status == 1">宸插彂甯�</span> + <span v-if="scope.row.status == 2">涓嬫灦</span> + </template> + </el-table-column> + <el-table-column prop="userName" label="鍒涘缓浜�" width="180" header-align="center" align="center"> + </el-table-column> + <el-table-column prop="releaseTime" label="鍙戝竷鏃堕棿" width="180" header-align="center" align="center"> + </el-table-column> + <el-table-column label="鎿嶄綔" align="conter"> + <template slot-scope="scope"> + <el-button type="text" size="medium" @click="details(scope.row.id)">璇︽儏</el-button> + <el-button type="text" size="medium" @click="punlish(scope.row.id, scope.row.status)" + :disabled="scope.row.status == 2"> + <span v-if="scope.row.status === 1" style="color:#ff0000">涓嬫灦</span> + <span v-else>鍙戝竷</span> + </el-button> + <el-button type="text" size="medium" @click="remove(scope.row.id)" style="color:#ff0000">鍒犻櫎 + </el-button> + </template> + </el-table-column> + </el-table> + </template> + <el-pagination @current-change="handleCurrentChange" :current-page="queryInfo.current" :page-size="queryInfo.size" + layout="prev, pager, next" :total="total"></el-pagination> + </el-card> + + <!--娣诲姞鍏叡瀹d紶寮圭獥--> + <el-dialog title="鍏叡瀹d紶娣诲姞" :visible.sync="addPublicityVisibel" width="50%" :before-close="addPublicityClose" + :append-to-body="true"> + <el-row :gutter="15"> + <el-form ref="addPublicityForm" :model="addPublicityForm" :rules="rules" size="medium" label-width="100px"> + <el-col :span="12"> + <el-form-item label="鏍囬 " prop="publicityTitle"> + <el-input v-model="addPublicityForm.publicityTitle" clearable placeholder="璇疯緭鍏ユ爣棰�" + :style="{ width: '100%' }"></el-input> + </el-form-item> + </el-col> + <el-col :span="24"> + <el-form-item label="鍐呭 " prop="content"> + <el-input v-model="addPublicityForm.content" type="textarea" placeholder="璇疯緭鍏ュ叕鍛婂唴瀹�" clearable + :autosize="{ minRows: 4, maxRows: 4 }" :style="{ width: '100%' }"></el-input> + </el-form-item> + </el-col> + </el-form> + </el-row> + <span slot="footer" class="dialog-footer"> + <el-button @click="addPublicityVisibel = false">鍙� 娑�</el-button> + <el-button type="primary" @click="add">纭� 瀹�</el-button> + </span> + </el-dialog> + + <!--鍏叡瀹d紶璇︽儏寮圭獥--> + <el-dialog title="鍏叡瀹d紶璇︽儏" :visible.sync="detailsVisible" width="50%" :append-to-body="true" + :before-close="detailsVisibleclose"> + + <el-row :gutter="15"> + <el-form ref="addGroupForm" :model="addGroupForm" size="medium" label-width="100px"> + <el-col :span="12"> + <el-form-item label="鏍囬" prop="effectiveEtime"> + <el-input v-model="detailsRow.publicityTitle" disabled></el-input> + </el-form-item> + </el-col> + <el-col :span="24"> + <el-form-item label="鍐呭 " prop="text"> + <el-input v-model="detailsRow.text" type="textarea" placeholder="璇疯緭鍏ュ叕鍛婂唴瀹�" disabled + :autosize="{ minRows: 4, maxRows: 4 }" :style="{ width: '100%' }"></el-input> + </el-form-item> + </el-col> + <!-- <el-col :span="12"> + <el-form-item label="鍏憡鏈夋晥鏈�" prop="effectiveStime"> + <el-date-picker v-model="detailsGroupAn.effectiveStime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" disabled + :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss"> + </el-date-picker> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鑷�" prop="effectiveEtime"> + <el-date-picker v-model="detailsGroupAn.effectiveEtime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" disabled + :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss"> + </el-date-picker> + </el-form-item> + </el-col> --> + <el-col :span="12"> + <el-form-item label="鍙戝竷鏃堕棿" prop="effectiveEtime"> + <el-date-picker v-model="detailsRow.releaseTime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" disabled + :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss"> + </el-date-picker> + </el-form-item> + </el-col> + <!-- <el-col :span="12"> + <el-form-item label="鍒涘缓浜�" prop="effectiveEtime"> + <el-input v-model="detailsGroupAn.createName" disabled></el-input> + </el-form-item> + </el-col> --> + <el-col :span="12"> + <el-form-item label="鐘舵��" prop="status"> + <span v-if="detailsRow.status === 1">宸插彂甯�</span> + <span v-else-if="detailsRow.status === 0">鏈彂甯�</span> + <span v-else="detailsRow.status === 2">宸蹭笅鏋�</span> + </el-form-item> + </el-col> + </el-form> + </el-row> + + + <!-- <div style="display:flex; width:180;"> + <div style="display:flex; width:180;"> + <h4>鏍囬</h4> + <p>{{ detailsRow.publicityTitle }}</p> + </div> + <div style="display:flex; width:180;"> + <h4>鍐呭</h4> + <p>{{ detailsRow.text }}</p> + </div> + <div style="display:flex; width:180;"> + <h4>鍒涘缓鏃堕棿</h4> + <p>{{ detailsRow.ctime }}</p> + </div> + </div> --> + + <!-- <el-table-column width="180" prop="effectiveStime" label="缇ょ粍鍏憡"></el-table-column> + <el-table-column width="120" prop="status" label="鐘舵��"> + <template slot-scope="scope"> + <span v-if="scope.row.status === 1">宸插彂甯�</span> + <span v-else-if="scope.row.status === 0">鏈彂甯�</span> + <span v-else="scope.row.status=== 2">宸蹭笅鏋�</span> + </template> + </el-table-column> + <el-table-column width="100" prop="createName" label="鍒涘缓浜�"></el-table-column> + <el-table-column width="180" prop="publishTime" label="鍙戝竷鏃堕棿"> + </el-table-column> --> + + </el-dialog> + </div> </template> <script> +import { + getPublicityList, + addPublicityList +} from '@/api/publicty' + + export default { - name: "Publicity" + name: "Publicity", + data() { + return { + + + //璇︾粏鍐呭寮规 + detailsVisible: false, + //璇︾粏鍐呭 + detailsRow: [], + //琛ㄥ崟鎻愪氦鍐呭 + addPublicityForm: { + publicityTitle: '', + text: '' + }, + //娣诲姞寮规 + addPublicityVisibel: false, + //搴忓彿褰撳墠椤� + current: 1, + //搴忓彿鏁扮洰 + size: 10, + //椤甸潰鏌ヨ鎬绘暟 + total: null, + //鏌ヨ鏉′欢 + queryInfo: { + publicityTitle: '', + status: null, + current: 1, + size: 10 + }, + rules: { + publicityTitle: [{ + required: true, + message: '璇疯緭鍏ユ爣棰� ', + trigger: 'blur' + }], + content: [{ + required: true, + message: '璇疯緭鍏ュ唴瀹� ', + trigger: 'blur' + }], + }, + + options: [ + { + value: null, + label: '鍏ㄩ儴' + }, + { + value: '0', + label: '鏈彂甯�' + }, + { + value: '1', + label: '宸插彂甯�' + } + , { + value: '2', + label: '涓嬫灦 ' + } + ], + publicityList: [] + , + } + }, + created() { + this.init(); + + }, + methods: + { + //鍒犻櫎 + remove(val) { + this.$http.delete('/api/publicity/' + val).then(res => { + this.$message({ + message: '鍒犻櫎鎴愬姛', + type: 'success' + }) + + this.search(); + }) + }, + //鍙戝竷/涓嬫灦 + punlish(val, val2) { + if (val2 == 0) { + this.$http.get('/api/publicity/release/' + val).then(res => { + this.$message({ + message: '鍙戝竷鎴愬姛', + type: 'success' + }) + + this.search(); + } + ) + } + if (val2 == 1) { + this.$http.get('/api/publicity/offline/' + val).then(res => { + this.$message({ + message: '涓嬫灦鎴愬姛', + type: 'success' + }) + this.search(); + } + ); + } + }, + + //璇︽儏 + details(val) { + this.detailsVisible = true; + this.$http.get('/api/publicity/' + val).then(res => this.detailsRow = res.data.data); + }, + //娣诲姞 + add() { + this.$refs.addPublicityForm.validate(async (vaild) => { + if (!vaild) return this.$message.error('杈撳叆鏈夎') + let param = null; + param = this.addPublicityForm; + addPublicityList(param).then(res => { + this.$message({ + message: '鎿嶄綔鎴愬姛', + type: 'success' + }); + this.addPublicityForm = {} + this.init(); + } + ) + this.addPublicityVisibel = false; + }) + }, + //鍏抽棴涔嬪墠 + addPublicityClose() { + this.addPublicityVisibel = false; + }, + detailsVisibleclose() { + this.detailsVisible = false; + }, + //鍒嗛〉鏂规硶 + handleCurrentChange(val) { + this.queryInfo.current = val; + this.search(); + }, + //瀵煎叆 + beforeAvatarUpload(file) { + let Xls = file.name.split('.'); + if (Xls[1] === 'xls' || Xls[1] === 'xlsx') { + return file + } else { + this.$message.error('涓婁紶鏂囦欢鍙兘鏄� xls/xlsx 鏍煎紡!') + return false + } + }, + //瀵煎叆鎴愬姛 + respond(res) { + if (res.code == 200) { + this.$message({ + message: '涓婁紶鎴愬姛', + type: 'success' + } + ) + } else { + this.$message({ + message: res.msg, + type: 'error' + }) + } + location.reload(); + }, + //鍏叡瀹d紶鍔犺浇 + init() { + let param = {} + param.current = this.queryInfo.current + param.size = this.queryInfo.size + param.status = this.queryInfo.status !== null ? this.queryInfo.status : '' + getPublicityList(param).then(res => { + this.publicityList = res.records; + this.total = res.total + }) + }, + //鏌ヨ + search() { + let param = {} + param.publicityTitle = this.queryInfo.publicityTitle; + param.current = this.queryInfo.current + param.size = this.queryInfo.size + param.status = this.queryInfo.status !== null ? this.queryInfo.status : '' + getPublicityList(param).then(res => { + this.publicityList = res.records; + this.total = res.total + this.current = res.current + }) + }, + + } } </script> <style scoped> - +::v-deep(.el-table thead) { + color: #000000; +} </style> \ No newline at end of file diff --git a/src/views/common/Question.vue b/src/views/common/Question.vue index 1e76cb4..a1dc7b1 100644 --- a/src/views/common/Question.vue +++ b/src/views/common/Question.vue @@ -1,15 +1,373 @@ <template> - <div> - 甯歌闂 + <div style="height: 100%"> + <el-card style="height: 100%"> + <template slot="header"> + <el-form :inline="true" :model="queryInfo" class="demo-form-inline"> + <el-form-item label="鍏抽敭瀛楋細"> + <el-input placeholder="璇疯緭鍏�" v-model="queryInfo.questionTitle"></el-input> + </el-form-item> + <el-form-item label="鐘舵�侊細"> + <el-select v-model="queryInfo.status" placeholder="璇烽�夋嫨" :style="{ width: '120px' }"> + <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> + </el-option> + </el-select> + </el-form-item> + <el-form-item> + <el-button type="primary" @click="search">鏌ヨ</el-button> + </el-form-item> + <el-form-item> + <el-button type="primary" @click="addPublicityVisibel = true">娣诲姞</el-button> + </el-form-item> + </el-form> + </template> + <template> + <el-table :data="publicityList" style="width: 100%"> + + <el-table-column label="搴忓彿" type="index" width="180" align="center"> + <template slot-scope="scope"> + <span>{{ (current - 1) * size + scope.$index + 1 }}</span> + </template> + </el-table-column> + <el-table-column prop="questionTitle" label="闂鍏抽敭瀛�" width="180" align="center"> + </el-table-column> + <el-table-column prop="status" label="鐘舵��" width="180" header-align="center" align="center"> + <template slot-scope="scope"> + <span v-if="scope.row.status == 0">鏈彂甯�</span> + <span v-if="scope.row.status == 1">宸插彂甯�</span> + <span v-if="scope.row.status == 2">涓嬫灦</span> + </template> + </el-table-column> + <el-table-column prop="userName" label="鍒涘缓浜�" width="180" header-align="center" align="center"> + </el-table-column> + <el-table-column prop="releaseTime" label="鍙戝竷鏃堕棿" width="180" header-align="center" align="center"> + </el-table-column> + <el-table-column label="鎿嶄綔" align="conter"> + <template slot-scope="scope"> + <el-button type="text" size="medium" @click="details(scope.row.id)">璇︽儏</el-button> + <el-button type="text" size="medium" @click="punlish(scope.row.id, scope.row.status)" + :disabled="scope.row.status == 2"> + <span v-if="scope.row.status === 1" style="color:#ff0000">涓嬫灦</span> + <span v-else>鍙戝竷</span> + </el-button> + <el-button type="text" size="medium" @click="remove(scope.row.id)" style="color:#ff0000">鍒犻櫎 + </el-button> + </template> + </el-table-column> + </el-table> + </template> + <el-pagination @current-change="handleCurrentChange" :current-page="queryInfo.current" :page-size="queryInfo.size" + layout="prev, pager, next" :total="total"></el-pagination> + </el-card> + + <!--娣诲姞甯歌闂寮圭獥--> + <el-dialog title="甯歌闂娣诲姞" :visible.sync="addPublicityVisibel" width="50%" :before-close="addPublicityClose" + :append-to-body="true"> + <el-row :gutter="15"> + <el-form ref="addPublicityForm" :model="addPublicityForm" :rules="rules" size="medium" label-width="100px"> + <el-col :span="18"> + <el-form-item label="鍏抽敭瀛�" prop="questionTitle"> + <el-input v-model="addPublicityForm.questionTitle" type="textarea" clearable placeholder="璇疯緭鍏ュ叧閿瓧,骞剁敤','鍒嗛殧" + :autosize="{ minRows: 4, maxRows: 4 }" :style="{ width: '100%' }"></el-input> + </el-form-item> + </el-col> + <el-col :span="18"> + <el-form-item label="鍖归厤绫诲瀷" prop="matchQuestion"> + <el-input v-model="addPublicityForm.matchQuestion" clearable placeholder="璇疯緭鍏ュ尮閰嶇被鍨�"></el-input> + </el-form-item> + </el-col> + <el-col :span="18"> + <el-form-item label="闂瑙g瓟" prop="answer"> + <el-input v-model="addPublicityForm.answer" type="textarea" clearable placeholder="璇疯緭鍏ラ棶棰樿В绛�" + :autosize="{ minRows: 4, maxRows: 4 }" :style="{ width: '100%' }"></el-input> + </el-form-item> + </el-col> + </el-form> + </el-row> + <span slot="footer" class="dialog-footer"> + <el-button @click="addPublicityVisibel = false">鍙� 娑�</el-button> + <el-button type="primary" @click="add">纭� 瀹�</el-button> + </span> + </el-dialog> + + <!--鍏叡瀹d紶璇︽儏寮圭獥--> + <el-dialog title="鍏叡瀹d紶璇︽儏" :visible.sync="detailsVisible" width="50%" :append-to-body="true" + :before-close="detailsVisibleclose"> + + <el-row :gutter="15"> + <el-form ref="addGroupForm" :model="addGroupForm" size="medium" label-width="100px"> + <el-col :span="24"> + <el-form-item label="鍏抽敭瀛� " prop="text"> + <el-input v-model="detailsRow.questionTitle" type="textarea" placeholder="璇疯緭鍏ュ叕鍛婂唴瀹�" disabled + :autosize="{ minRows: 4, maxRows: 4 }" :style="{ width: '100%' }"></el-input> + </el-form-item> + </el-col> + <el-col :span="24"> + <el-form-item label="鍖归厤闂" prop="effectiveEtime"> + <el-input v-model="detailsRow.matchQuestion" disabled></el-input> + </el-form-item> + </el-col> + <el-col :span="24"> + <el-form-item label="闂瑙g瓟 " prop="text"> + <el-input v-model="detailsRow.answer" type="textarea" placeholder="璇疯緭鍏ュ叕鍛婂唴瀹�" disabled + :autosize="{ minRows: 4, maxRows: 4 }" :style="{ width: '100%' }"></el-input> + </el-form-item> + </el-col> + <!-- <el-col :span="12"> + <el-form-item label="鍏憡鏈夋晥鏈�" prop="effectiveStime"> + <el-date-picker v-model="detailsGroupAn.effectiveStime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" disabled + :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss"> + </el-date-picker> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鑷�" prop="effectiveEtime"> + <el-date-picker v-model="detailsGroupAn.effectiveEtime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" disabled + :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss"> + </el-date-picker> + </el-form-item> + </el-col> --> + <el-col :span="12"> + <el-form-item label="鍙戝竷鏃堕棿" prop="effectiveEtime"> + <el-date-picker v-model="detailsRow.releaseTime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" disabled + :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss"> + </el-date-picker> + </el-form-item> + </el-col> + <!-- <el-col :span="12"> + <el-form-item label="鍒涘缓浜�" prop="effectiveEtime"> + <el-input v-model="detailsGroupAn.createName" disabled></el-input> + </el-form-item> + </el-col> --> + <el-col :span="12"> + <el-form-item label="鐘舵��" prop="status"> + <span v-if="detailsRow.status === 1">宸插彂甯�</span> + <span v-else-if="detailsRow.status === 0">鏈彂甯�</span> + <span v-else="detailsRow.status === 2">宸蹭笅鏋�</span> + </el-form-item> + </el-col> + </el-form> + </el-row> +<!-- + <div style="display:flex; width:180;"> + <div style="display:flex; width:180;"> + <h4>鍏抽敭瀛�</h4> + <p>{{ detailsRow.questionTitle }}</p> + </div> + <div style="display:flex; width:180;"> + <h4>鍖归厤闂</h4> + <p>{{ detailsRow.matchQuestion }}</p> + </div> + <div style="display:flex; width:180;"> + <h4>闂瑙g瓟</h4> + <p>{{ detailsRow.answer }}</p> + </div> + <div style="display:flex; width:180;"> + <h4>鍒涘缓鏃堕棿</h4> + <p>{{ detailsRow.ctime }}</p> + </div> + </div> --> + + <!-- <el-table-column width="180" prop="effectiveStime" label="缇ょ粍鍏憡"></el-table-column> + <el-table-column width="120" prop="status" label="鐘舵��"> + <template slot-scope="scope"> + <span v-if="scope.row.status === 1">宸插彂甯�</span> + <span v-else-if="scope.row.status === 0">鏈彂甯�</span> + <span v-else="scope.row.status=== 2">宸蹭笅鏋�</span> + </template> + </el-table-column> + <el-table-column width="100" prop="createName" label="鍒涘缓浜�"></el-table-column> + <el-table-column width="180" prop="publishTime" label="鍙戝竷鏃堕棿"> + </el-table-column> --> + + </el-dialog> + </div> </template> <script> +import { + getPublicityList, + addPublicityList +} from '@/api/question' + + export default { - name: "Question" + name: "Question", + data() { + return { + rules: { + questionTitle: [{ + required: true, + message: '璇疯緭鍏ュ叧閿瓧 ', + trigger: 'blur' + }], + matchQuestion: [{ + required: true, + message: '璇疯緭鍏ュ尮閰嶉棶棰�', + trigger: 'blur' + }], + answer: [{ + required: true, + message: '璇疯緭鍏ラ棶棰樿В绛� ', + trigger: 'blur' + }], + }, + + //璇︾粏鍐呭寮规 + detailsVisible: false, + //璇︾粏鍐呭 + detailsRow: [], + //琛ㄥ崟鎻愪氦鍐呭 + addPublicityForm: { + publicityTitle: '', + text: '' + }, + //娣诲姞寮规 + addPublicityVisibel: false, + //搴忓彿褰撳墠椤� + current: 1, + //搴忓彿鏁扮洰 + size: 10, + //椤甸潰鏌ヨ鎬绘暟 + total: null, + //鏌ヨ鏉′欢 + queryInfo: { + questionTitle: '', + status: null, + current: 1, + size: 10 + }, + options: [ + { + value: null, + label: '鍏ㄩ儴' + }, + { + value: '0', + label: '鏈彂甯�' + }, + { + value: '1', + label: '宸插彂甯�' + } + , { + value: '2', + label: '涓嬫灦 ' + } + ], + publicityList: [] + , + } + }, + created() { + this.init(); + + }, + methods: + { + //鍒犻櫎 + remove(val) { + this.$http.delete('/api/commonQuestion',{params: {id:val}}).then(res => { + this.$message({ + message: '鍒犻櫎鎴愬姛', + type: 'success' + }) + + this.search(); + }) + }, + //鍙戝竷/涓嬫灦 + punlish(val, val2) { + if (val2 == 0) { + this.$http.get('/api/commonQuestion/release/' + val).then(res => { + this.$message({ + message: '鍙戝竷鎴愬姛', + type: 'success' + }) + + this.search(); + } + ) + } + if (val2 == 1) { + this.$http.get('/api/commonQuestion/offline/' + val).then(res => { + this.$message({ + message: '涓嬫灦鎴愬姛', + type: 'success' + }) + this.search(); + } + ); + } + }, + + //璇︽儏 + details(val) { + this.detailsVisible = true; + this.$http.get('/api/commonQuestion/' + val).then(res => this.detailsRow = res.data.data); + }, + //娣诲姞 + add() { + this.$refs.addPublicityForm.validate(async (vaild) => { + if (!vaild) return this.$message.error('杈撳叆鏈夎') + let param = null; + param = this.addPublicityForm; + addPublicityList(param).then(res => { + this.$message({ + message: '鎿嶄綔鎴愬姛', + type: 'success' + }); + this.addPublicityForm={} + this.init(); + } + ) + this.addPublicityVisibel = false; + }) + }, + //鍏抽棴涔嬪墠 + addPublicityClose() { + this.addPublicityVisibel = false; + }, + detailsVisibleclose() { + this.detailsVisible = false; + }, + //鍒嗛〉鏂规硶 + handleCurrentChange(val) { + this.queryInfo.current = val; + this.search(); + }, + + //鍏叡瀹d紶鍔犺浇 + init() { + let param = {} + param.current = this.queryInfo.current + param.size = this.queryInfo.size + param.status = this.queryInfo.status !== null ? this.queryInfo.status : '' + getPublicityList(param).then(res => { + this.publicityList = res.records; + this.total = res.total + }) + }, + //鏌ヨ + search() { + let param = {} + param.questionTitle = this.queryInfo.questionTitle; + param.current = this.queryInfo.current + param.size = this.queryInfo.size + param.status = this.queryInfo.status !== null ? this.queryInfo.status : '' + getPublicityList(param).then(res => { + this.publicityList = res.records; + this.total = res.total + this.current = res.current + }) + }, + + } } </script> <style scoped> - +::v-deep(.el-table thead) { + color: #000000; +} </style> \ No newline at end of file diff --git a/src/views/common/Sensitive.vue b/src/views/common/Sensitive.vue index 7fdacc0..48a9ae7 100644 --- a/src/views/common/Sensitive.vue +++ b/src/views/common/Sensitive.vue @@ -1,15 +1,355 @@ <template> - <div> - 鏁忔劅璇� + <div style="height: 100%"> + <el-card style="height: 100%"> + <template slot="header"> + <el-form :inline="true" :model="queryInfo" class="demo-form-inline"> + <el-form-item label="鍏抽敭瀛楋細"> + <el-input placeholder="璇疯緭鍏�" v-model="queryInfo.word"></el-input> + </el-form-item> + <!-- <el-form-item label="鐘舵�侊細"> + <el-select v-model="queryInfo.status" placeholder="璇烽�夋嫨"> + <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value"> + </el-option> + </el-select> + </el-form-item> --> + <el-form-item> + <el-button type="primary" @click="search">鏌ヨ</el-button> + </el-form-item> + <el-form-item> + <el-button type="primary" @click="addPublicityVisibel = true">娣诲姞</el-button> + </el-form-item> + </el-form> + </template> + <template> + <el-table :data="publicityList" style="width: 100%"> + + <el-table-column label="搴忓彿" type="index" width="180" align="center"> + <template slot-scope="scope"> + <span>{{ (current - 1) * size + scope.$index + 1 }}</span> + </template> + </el-table-column> + <el-table-column prop="words" label="鏁忔劅璇�" width="180" align="center"> + </el-table-column> + <!-- <el-table-column prop="status" label="鐘舵��" width="180" header-align="center" align="center"> + <template slot-scope="scope"> + <span v-if="scope.row.status == 0">鏈彂甯�</span> + <span v-if="scope.row.status == 1">宸插彂甯�</span> + <span v-if="scope.row.status == 2">涓嬫灦</span> + </template> + </el-table-column> --> + <el-table-column prop="creator" label="鍒涘缓浜�" width="180" header-align="center" align="center"> + </el-table-column> + <el-table-column prop="ctime" label="鍒涘缓鏃堕棿" width="180" header-align="center" align="center"> + </el-table-column> + <el-table-column label="鎿嶄綔" align="conter"> + <template slot-scope="scope"> + <el-button type="text" size="medium" @click="details(scope.row.id)">璇︽儏</el-button> + <!-- <el-button type="text" size="medium" @click="punlish(scope.row.id, scope.row.status)" + :disabled="scope.row.status == 2"> + <span v-if="scope.row.status === 1" style="color:#ff0000">涓嬫灦</span> + <span v-else>鍙戝竷</span> + </el-button> --> + <el-button type="text" size="medium" @click="remove(scope.row.id)" style="color:#ff0000">鍒犻櫎 + </el-button> + </template> + </el-table-column> + </el-table> + </template> + <el-pagination @current-change="handleCurrentChange" :current-page="queryInfo.current" :page-size="queryInfo.size" + layout="prev, pager, next" :total="total"></el-pagination> + </el-card> + + <!--娣诲姞鏁忔劅瀛楀脊绐�--> + <el-dialog title="鏁忔劅瀛楁坊鍔�" :visible.sync="addPublicityVisibel" width="50%" :before-close="addPublicityClose" + :append-to-body="true"> + <el-row :gutter="15"> + <el-form ref="addPublicityForm" :model="addPublicityForm" :rules="rules" size="medium" label-width="100px"> + <el-col :span="18"> + <el-form-item label="鍏抽敭瀛�" prop="words"> + <el-input v-model="addPublicityForm.words" type="textarea" placeholder="璇疯緭鍏ュ叧閿瓧,骞剁敤','鍒嗛殧" clearable + :autosize="{ minRows: 4, maxRows: 4 }" :style="{ width: '100%' }"></el-input> + </el-form-item> + </el-col> + <!-- <el-col :span="18"> + <el-form-item label="鍖归厤绫诲瀷" prop="content"> + <el-input v-model="addPublicityForm.matchQuestion" type="textares" :row="4"></el-input> + </el-form-item> + </el-col> + <el-col :span="18"> + <el-form-item label="闂瑙g瓟" prop="content"> + <el-input v-model="addPublicityForm.answer" type="textares" :row="4"></el-input> + </el-form-item> + </el-col> --> + </el-form> + </el-row> + <span slot="footer" class="dialog-footer"> + <el-button @click="addPublicityVisibel = false">鍙� 娑�</el-button> + <el-button type="primary" @click="add">纭� 瀹�</el-button> + </span> + </el-dialog> + + <!--鍏叡瀹d紶璇︽儏寮圭獥--> + <el-dialog title="鍏叡瀹d紶璇︽儏" :visible.sync="detailsVisible" width="50%" :append-to-body="true" + :before-close="detailsVisibleclose"> + + <el-row :gutter="15"> + <el-form ref="addGroupForm" :model="addGroupForm" size="medium" label-width="100px"> + <el-col :span="24"> + <el-form-item label="鍏抽敭瀛� " prop="text"> + <el-input v-model="detailsRow.words" type="textarea" placeholder="璇疯緭鍏ュ叕鍛婂唴瀹�" disabled + :autosize="{ minRows: 4, maxRows: 4 }" :style="{ width: '100%' }"></el-input> + </el-form-item> + </el-col> + <!-- <el-col :span="24"> + <el-form-item label="鍖归厤闂" prop="effectiveEtime"> + <el-input v-model="detailsRow.matchQuestion" disabled></el-input> + </el-form-item> + </el-col> + <el-col :span="24"> + <el-form-item label="闂瑙g瓟 " prop="text"> + <el-input v-model="detailsRow.answer" type="textarea" placeholder="璇疯緭鍏ュ叕鍛婂唴瀹�" disabled + :autosize="{ minRows: 4, maxRows: 4 }" :style="{ width: '100%' }"></el-input> + </el-form-item> + </el-col> --> + <!-- <el-col :span="12"> + <el-form-item label="鍏憡鏈夋晥鏈�" prop="effectiveStime"> + <el-date-picker v-model="detailsGroupAn.effectiveStime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" disabled + :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss"> + </el-date-picker> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鑷�" prop="effectiveEtime"> + <el-date-picker v-model="detailsGroupAn.effectiveEtime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" disabled + :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss"> + </el-date-picker> + </el-form-item> + </el-col> --> + <el-col :span="12"> + <el-form-item label="鍙戝竷鏃堕棿" prop="effectiveEtime"> + <el-date-picker v-model="detailsRow.ctime" type="datetime" placeholder="閫夋嫨鏃ユ湡鏃堕棿" disabled + :style="{ width: '100%' }" value-format="yyyy-MM-dd HH:mm:ss"> + </el-date-picker> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鍒涘缓浜�" prop="effectiveEtime"> + <el-input v-model="detailsRow.creator" disabled></el-input> + </el-form-item> + </el-col> + <!-- <el-col :span="12"> + <el-form-item label="鐘舵��" prop="status"> + <span v-if="detailsRow.status === 1">宸插彂甯�</span> + <span v-else-if="detailsRow.status === 0">鏈彂甯�</span> + <span v-else="detailsRow.status === 2">宸蹭笅鏋�</span> + </el-form-item> + </el-col> --> + </el-form> + </el-row> + + + <!-- <div style="display:flex; width:180;"> + <div style="display:flex; width:180;"> + <h4>鏁忔劅瀛�</h4> + <p>{{ detailsRow.words }}</p> + </div> + <div style="display:flex; width:180;"> + <h4>鍖归厤闂</h4> + <p>{{ detailsRow.creator }}</p> + </div> + <div style="display:flex; width:180;"> + <h4>鍒涘缓鏃堕棿</h4> + <p>{{ detailsRow.ctime }}</p> + </div> + </div> --> + + <!-- <el-table-column width="180" prop="effectiveStime" label="缇ょ粍鍏憡"></el-table-column> + <el-table-column width="120" prop="status" label="鐘舵��"> + <template slot-scope="scope"> + <span v-if="scope.row.status === 1">宸插彂甯�</span> + <span v-else-if="scope.row.status === 0">鏈彂甯�</span> + <span v-else="scope.row.status=== 2">宸蹭笅鏋�</span> + </template> + </el-table-column> + <el-table-column width="100" prop="createName" label="鍒涘缓浜�"></el-table-column> + <el-table-column width="180" prop="publishTime" label="鍙戝竷鏃堕棿"> + </el-table-column> --> + + </el-dialog> + </div> </template> - <script> +import { + getPublicityList, + addPublicityList +} from '@/api/Sensitive' export default { - name: "Sensitive" + name: "Sensitive", + data() { + return { + + rules: { + words: [{ + required: true, + message: '璇疯緭鍏ュ叧閿瓧 ', + trigger: 'blur' + }], + + }, + //璇︾粏鍐呭寮规 + detailsVisible: false, + //璇︾粏鍐呭 + detailsRow: [], + //琛ㄥ崟鎻愪氦鍐呭 + addPublicityForm: { + words: '' + }, + //娣诲姞寮规 + addPublicityVisibel: false, + //搴忓彿褰撳墠椤� + current: 1, + //搴忓彿鏁扮洰 + size: 10, + //椤甸潰鏌ヨ鎬绘暟 + total: null, + //鏌ヨ鏉′欢 + queryInfo: { + word: '', + status: null, + current: 1, + size: 10 + }, + options: [ + { + value: null, + label: '鍏ㄩ儴' + }, + { + value: '0', + label: '鏈彂甯�' + }, + { + value: '1', + label: '宸插彂甯�' + } + , { + value: '2', + label: '涓嬫灦 ' + } + ], + publicityList: [] + , + } + }, + created() { + this.init(); + + }, + methods: + { + //鍒犻櫎 + remove(val) { + this.$http.delete('/api/sensitive', { params: { id: val } }).then(res => { + this.$message({ + message: '鍒犻櫎鎴愬姛', + type: 'success' + }) + + this.search(); + }) + }, + // //鍙戝竷/涓嬫灦 + // punlish(val, val2) { + // if (val2 == 0) { + // this.$http.get('/api/sensitive/release/' + val).then(res => { + // this.$message({ + // message: '鍙戝竷鎴愬姛', + // type: 'success' + // }) + + // this.search(); + // } + // ) + // } + // if (val2 == 1) { + // this.$http.get('/api/sensitive/offline/' + val).then(res => { + // this.$message({ + // message: '涓嬫灦鎴愬姛', + // type: 'success' + // }) + // this.search(); + // } + // ); + // } + // }, + + //璇︽儏 + details(val) { + this.detailsVisible = true; + this.$http.get('/api/sensitive/' + val).then(res => this.detailsRow = res.data.data); + }, + //娣诲姞 + add() { + this.$refs.addPublicityForm.validate(async (vaild) => { + if (!vaild) return this.$message.error('杈撳叆鏈夎') + let param = null; + param = this.addPublicityForm; + addPublicityList(param).then(res => { + this.$message({ + message: '鎿嶄綔鎴愬姛', + type: 'success' + }); + this.addPublicityForm = {} + this.init(); + } + ) + this.addPublicityVisibel = false;}) + }, + //鍏抽棴涔嬪墠 + addPublicityClose() { + this.addPublicityVisibel = false; + }, + detailsVisibleclose() { + this.detailsVisible = false; + }, + //鍒嗛〉鏂规硶 + handleCurrentChange(val) { + this.queryInfo.current = val; + this.search(); + }, + + //鍏叡瀹d紶鍔犺浇 + init() { + let param = {} + param.current = this.queryInfo.current + param.size = this.queryInfo.size + param.status = this.queryInfo.status !== null ? this.queryInfo.status : '' + getPublicityList(param).then(res => { + this.publicityList = res.records; + this.total = res.total + }) + }, + //鏌ヨ + search() { + let param = {} + param.word = this.queryInfo.word; + param.current = this.queryInfo.current + param.size = this.queryInfo.size + param.status = this.queryInfo.status !== null ? this.queryInfo.status : '' + getPublicityList(param).then(res => { + this.publicityList = res.records; + this.total = res.total + this.current = res.current + }) + }, + + } } </script> <style scoped> - +::v-deep(.el-table thead) { + color: #000000; +} </style> \ No newline at end of file diff --git a/src/views/manager/People.vue b/src/views/manager/People.vue deleted file mode 100644 index f0dbacc..0000000 --- a/src/views/manager/People.vue +++ /dev/null @@ -1,15 +0,0 @@ -<template> - <div> - 浜哄憳绠$悊 - </div> -</template> - -<script> -export default { - name: "People" -} -</script> - -<style scoped> - -</style> \ No newline at end of file diff --git a/src/views/manager/Police.vue b/src/views/manager/Police.vue new file mode 100644 index 0000000..c8d285b --- /dev/null +++ b/src/views/manager/Police.vue @@ -0,0 +1,325 @@ +<template> + <div style="height: 100%"> + <el-card style="height: 100%"> + <template slot="header"> + <el-form :inline="true" :model="queryInfo" class="demo-form-inline"> + <el-form-item label="濮撳悕锛�"> + <el-input placeholder="璇疯緭鍏�" v-model="queryInfo.realName"></el-input> + </el-form-item> + <el-form-item label="鎵嬫満鍙凤細"> + <el-input placeholder="璇疯緭鍏�" v-model="queryInfo.userMobile"></el-input> + </el-form-item> + <el-form-item> + <el-button type="primary" @click="search">鏌ヨ</el-button> + </el-form-item> + <el-form-item> + <el-button type="primary" @click="addPublicityVisibel = true">娣诲姞</el-button> + </el-form-item> + </el-form> + </template> + <template> + <el-table :data="publicityList" style="width: 100%"> + <el-table-column prop="realName" label="濮撳悕" width="180" align="center"> + </el-table-column> + <el-table-column prop="userMobile" label="鎵嬫満鍙�" width="180" header-align="center" align="center"> + </el-table-column> + <el-table-column prop="ctime" label="鍒涘缓鏃堕棿" width="180" header-align="center" align="center"> + </el-table-column> + <el-table-column label="鎿嶄綔" align="conter"> + <template slot-scope="scope"> + <el-button type="text" size="medium" @click="details(scope.row)">淇敼瀵嗙爜</el-button> + <!-- <el-button type="text" size="medium" @click="reset(scope.row)">淇敼瀵嗙爜</el-button> --> + <el-button type="text" size="medium" @click="remove(scope.row.id)" style="color:#ff0000">鍒犻櫎 + </el-button> + </template> + </el-table-column> + </el-table> + </template> + <el-pagination @current-change="handleCurrentChange" :current-page="queryInfo.current" :page-size="queryInfo.size" + layout="prev, pager, next" :total="total"></el-pagination> + </el-card> + + <!--娣诲姞鐢ㄦ埛寮圭獥--> + <el-dialog title="璀﹀憳娣诲姞" :visible.sync="addPublicityVisibel" width="50%" :before-close="addPublicityClose" + :append-to-body="true"> + <el-row :gutter="15"> + <el-form ref="addPublicityForm" :model="addPublicityForm" :rules="rules" size="medium" label-width="100px"> + + <el-col :span="12"> + <el-form-item label="濮撳悕" prop="realName"> + <el-input v-model="addPublicityForm.realName" clearable placeholder="濮撳悕"></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鎵嬫満鍙�" prop="phoneNumber"> + <el-input v-model="addPublicityForm.phoneNumber" clearable placeholder="璇疯緭鍏ユ墜鏈哄彿"></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="瀵嗙爜" prop="password"> + <el-input v-model="addPublicityForm.password" clearable show-password :style="{width: '100%'}" placeholder="璇疯緭鍏ュ瘑鐮�"></el-input> + </el-form-item> + </el-col> + <!-- <el-col :span="12"> + <el-form-item label="韬唤璇�" prop="userIdcard"> + <el-input v-model="addPublicityForm.userIdcard" clearable placeholder="璇疯緭鍏ヨ韩浠借瘉"> </el-input> + </el-form-item> + </el-col> --> + </el-form> + </el-row> + <span slot="footer" class="dialog-footer"> + <el-button @click="addPublicityVisibel = false">鍙� 娑�</el-button> + <el-button type="primary" @click="add">纭� 瀹�</el-button> + </span> + </el-dialog> + + <el-dialog title="缂栬緫" :visible.sync="detailsVisible" width="50%" :append-to-body="true" + :before-close="detailsVisibleclose"> + <el-row :gutter="15"> + <el-form ref="detailsRow" :model="detailsRow" :rule="ruless" size="medium" + label-width="100px"> + <el-col :span="12"> + <el-form-item label="濮撳悕" prop="realName"> + <el-input v-model="detailsRow.realName" + :style="{ width: '100%' }"> + </el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鎵嬫満鍙�" prop="phoneNumber"> + <el-input v-model="detailsRow.userMobile" + :style="{ width: '100%' }"> + </el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="瀵嗙爜" prop="password" > + <el-input v-model="detailsRow.password" show-password placeholder="璇疯緭鍏ユ柊瀵嗙爜" clearable + :style="{ width: '100%' }"> + </el-input> + </el-form-item> + </el-col> + + </el-form> + </el-row> + <span slot="footer" class="dialog-footer"> + <el-button @click="detailsVisible = false">鍙� 娑�</el-button> + <el-button type="primary" @click="update">纭� 瀹�</el-button> + </span> + </el-dialog> + + </div> +</template> + +<script> +import { + getPublicityList, + addPublicityList +} from '@/api/Police' + + +export default { + name: "Police", + data() { + return { + + rules: { + realName: [{ + required: true, + message: '璇疯緭鍏ュ鍚� ', + trigger: 'blur' + }], + phoneNumber: [{ + required: true, + message: '璇疯緭鍏ユ墜鏈哄彿 ', + trigger: 'blur' + }], + password: [{ + required: true, + message: '璇疯緭鍏ュ瘑鐮� ', + trigger: 'blur' + }] + }, + ruless:{ + password: [{ + required: true, + message: '璇疯緭鍏ュ瘑鐮� ', + trigger: 'blur' + }] + }, + //璇︾粏鍐呭寮规 + detailsVisible: false, + //璇︾粏鍐呭 + detailsRow: + { + } + , + //琛ㄥ崟鎻愪氦鍐呭 + addPublicityForm: { + nickName: '', + realName: '' + }, + //娣诲姞寮规 + addPublicityVisibel: false, + //搴忓彿褰撳墠椤� + current: 1, + //搴忓彿鏁扮洰 + size: 10, + //椤甸潰鏌ヨ鎬绘暟 + total: null, + //鏌ヨ鏉′欢 + queryInfo: { + nickName: '', + current: 1, + size: 10 + }, + options: [ + { + value: null, + label: '鍏ㄩ儴' + }, + { + value: '0', + label: '鏈彂甯�' + }, + { + value: '1', + label: '宸插彂甯�' + } + , { + value: '2', + label: '涓嬫灦 ' + } + ], + publicityList: [] + , + } + }, + created() { + this.init(); + + }, + methods: + { + //鍒犻櫎 + remove(val) { + this.$http.delete('/api/user/manager', { params: { id: val } }).then(res => { + this.$message({ + message: '鍒犻櫎鎴愬姛', + type: 'success' + }) + + this.search(); + }) + }, + // //鍙戝竷/涓嬫灦 + // punlish(val, val2) { + // if (val2 == 0) { + // this.$http.get('/api/commonQuestion/release/' + val).then(res => { + // this.$message({ + // message: '鍙戝竷鎴愬姛', + // type: 'success' + // }) + + // this.search(); + // } + // ) + // } + // if (val2 == 1) { + // this.$http.get('/api/commonQuestion/offline/' + val).then(res => { + // this.$message({ + // message: '涓嬫灦鎴愬姛', + // type: 'success' + // }) + // this.search(); + // } + // ); + // } + // }, + + //缂栬緫 + details(val) { + this.detailsVisible = true; + this.detailsRow = Object.assign({}, val); + }, + update(){ + this.detailsRow.phoneNumber=this.detailsRow.userMobile + this.$http.put('/api/user/manager',this.detailsRow).then(res => {this.$message({ + message: '缂栬緫鎴愬姛', + type: 'success'} + ) + this.search();} + ); + this.detailsVisible =false; + }, + + //閲嶇疆瀵嗙爜 + reset(val) { + this.$http.get('/api/user/resetPassword/' + val).then(res => this.$message({ + message: '閲嶇疆鎴愬姛', + type: 'success' + })); + }, + //娣诲姞 + add() { + this.$refs.addPublicityForm.validate(async (vaild) => { + if (!vaild) return this.$message.error('杈撳叆鏈夎') + let param = null; + param = this.addPublicityForm; + addPublicityList(param).then(res => { + this.$message({ + message: '鎿嶄綔鎴愬姛', + type: 'success' + }); + this.addPublicityForm={}; + this.init(); + } + ) + this.addPublicityVisibel = false; + }) + }, + //鍏抽棴涔嬪墠 + addPublicityClose() { + this.addPublicityVisibel = false; + }, + detailsVisibleclose() { + this.detailsVisible = false; + }, + //鍒嗛〉鏂规硶 + handleCurrentChange(val) { + this.queryInfo.current = val; + this.search(); + }, + + //鍏叡瀹d紶鍔犺浇 + init() { + let param = {} + param.current = this.queryInfo.current + param.size = this.queryInfo.size + getPublicityList(param).then(res => { + this.publicityList = res.records; + this.total = res.total + }) + }, + //鏌ヨ + search() { + let param = {} + param.realName = this.queryInfo.realName + param.userMobile = this.queryInfo.userMobile + param.size = this.queryInfo.size + getPublicityList(param).then(res => { + this.publicityList = res.records; + this.total = res.total + this.current = res.current + }) + }, + + } +} +</script> + +<style scoped> +::v-deep(.el-table thead) { + color: #000000; +} +</style> \ No newline at end of file diff --git a/src/views/manager/User.vue b/src/views/manager/User.vue index a778f95..7642170 100644 --- a/src/views/manager/User.vue +++ b/src/views/manager/User.vue @@ -1,15 +1,330 @@ <template> - <div> - 鐢ㄦ埛绠$悊 + <div style="height: 100%"> + <el-card style="height: 100%"> + <template slot="header"> + <el-form :inline="true" :model="queryInfo" class="demo-form-inline"> + <el-form-item label="鐢ㄦ埛鍚嶏細"> + <el-input placeholder="璇疯緭鍏�" v-model="queryInfo.nickName"></el-input> + </el-form-item> + <el-form-item label="鐢ㄦ埛濮撳悕锛�"> + <el-input placeholder="璇疯緭鍏�" v-model="queryInfo.realName"></el-input> + </el-form-item> + <el-form-item> + <el-button type="primary" @click="search">鏌ヨ</el-button> + </el-form-item> + <el-form-item> + <el-button type="primary" @click="addPublicityVisibel = true">娣诲姞</el-button> + </el-form-item> + </el-form> + </template> + <template> + <el-table :data="publicityList" style="width: 100%"> + <el-table-column prop="nickName" label="鐢ㄦ埛鍚�" width="180" align="center"> + </el-table-column> + <el-table-column prop="realName" label="鐢ㄦ埛濮撳悕" width="180" header-align="center" align="center"> + </el-table-column> + <el-table-column prop="userMobile" label="鎵嬫満鍙风爜" width="180" header-align="center" align="center"> + </el-table-column> + <el-table-column prop="ctime" label="鍒涘缓鏃堕棿" width="180" header-align="center" align="center"> + </el-table-column> + <el-table-column label="鎿嶄綔" align="conter"> + <template slot-scope="scope"> + <el-button type="text" size="medium" @click="details(scope.row)">缂栬緫</el-button> + <el-button type="text" size="medium" @click="reset(scope.row.id)">閲嶇疆瀵嗙爜</el-button> + <el-button type="text" size="medium" @click="remove(scope.row.id)" style="color:#ff0000">鍒犻櫎 + </el-button> + </template> + </el-table-column> + </el-table> + </template> + <el-pagination @current-change="handleCurrentChange" :current-page="queryInfo.current" :page-size="queryInfo.size" + layout="prev, pager, next" :total="total"></el-pagination> + </el-card> + + <!--娣诲姞鐢ㄦ埛寮圭獥--> + <el-dialog title="鐢ㄦ埛娣诲姞" :visible.sync="addPublicityVisibel" width="50%" :before-close="addPublicityClose" + :append-to-body="true"> + <el-row :gutter="15"> + <el-form ref="addPublicityForm" :model="addPublicityForm" :rules="rules" size="medium" label-width="100px"> + + <el-col :span="12"> + <el-form-item label="鐢ㄦ埛鍚�" prop="nickName"> + <el-input v-model="addPublicityForm.nickName" clearable placeholder="璇疯緭鍏ョ敤鎴峰悕"></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鐢ㄦ埛濮撳悕" prop="realName"> + <el-input v-model="addPublicityForm.realName" clearable placeholder="璇疯緭鍏ョ敤鎴峰鍚�"></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鎵嬫満鍙�" prop="userMobile"> + <el-input v-model="addPublicityForm.userMobile" clearable placeholder="璇疯緭鍏ユ墜鏈哄彿"></el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="韬唤璇�" prop="userIdcard"> + <el-input v-model="addPublicityForm.userIdcard" clearable placeholder="璇疯緭鍏ヨ韩浠借瘉"> </el-input> + </el-form-item> + </el-col> + </el-form> + </el-row> + <span slot="footer" class="dialog-footer"> + <el-button @click="addPublicityVisibel = false">鍙� 娑�</el-button> + <el-button type="primary" @click="add">纭� 瀹�</el-button> + </span> + </el-dialog> + + <el-dialog title="缂栬緫" :visible.sync="detailsVisible" width="50%" :append-to-body="true" + :before-close="detailsVisibleclose"> + <el-row :gutter="15"> + <el-form ref="detailsRow" :model="detailsRow" size="medium" + label-width="100px"> + <el-col :span="12"> + <el-form-item label="鐢ㄦ埛鍚�" prop="nickName"> + <el-input v-model="detailsRow.nickName" placeholder="璇疯緭鍏ョ敤鎴峰悕" clearable + :style="{ width: '100%' }"> + </el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鐢ㄦ埛濮撳悕" prop="realName"> + <el-input v-model="detailsRow.realName" placeholder="璇疯緭鍏ョ敤鎴峰鍚�" clearable + :style="{ width: '100%' }"> + </el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="鎵嬫満鍙风爜" prop="userMobile"> + <el-input v-model="detailsRow.userMobile" placeholder="璇疯緭鍏ユ墜鏈哄彿鐮�" clearable + :style="{ width: '100%' }"> + </el-input> + </el-form-item> + </el-col> + <el-col :span="12"> + <el-form-item label="韬唤璇佸彿" prop="userIdcard"> + <el-input v-model="detailsRow.userIdcard" placeholder="璇疯緭鍏ヨ韩浠借瘉鍙�" clearable + :style="{ width: '100%' }"> + </el-input> + </el-form-item> + </el-col> + </el-form> + </el-row> + <span slot="footer" class="dialog-footer"> + <el-button @click="detailsVisible = false">鍙� 娑�</el-button> + <el-button type="primary" @click="update">纭� 瀹�</el-button> + </span> + </el-dialog> + </div> </template> <script> +import { + getPublicityList, + addPublicityList +} from '@/api/User' + + export default { - name: "User" + name: "User", + data() { + return { + + rules: { + nickName: [{ + required: true, + message: '璇疯緭鍏ョ敤鎴峰悕 ', + trigger: 'blur' + }], + realName: [{ + required: true, + message: '璇疯緭鍏ョ敤鎴峰鍚�', + trigger: 'blur' + }], + userMobile: [{ + required: true, + message: '璇疯緭鍏ユ墜鏈哄彿 ', + trigger: 'blur' + }], + userIdcard: [{ + required: true, + message: '璇疯緭鍏ヨ韩浠借瘉 ', + trigger: 'blur' + }], + }, + //璇︾粏鍐呭寮规 + detailsVisible: false, + //璇︾粏鍐呭 + detailsRow: + { + } + , + //琛ㄥ崟鎻愪氦鍐呭 + addPublicityForm: { + nickName: '', + realName: '' + }, + //娣诲姞寮规 + addPublicityVisibel: false, + //搴忓彿褰撳墠椤� + current: 1, + //搴忓彿鏁扮洰 + size: 10, + //椤甸潰鏌ヨ鎬绘暟 + total: null, + //鏌ヨ鏉′欢 + queryInfo: { + nickName: '', + current: 1, + size: 10 + }, + options: [ + { + value: null, + label: '鍏ㄩ儴' + }, + { + value: '0', + label: '鏈彂甯�' + }, + { + value: '1', + label: '宸插彂甯�' + } + , { + value: '2', + label: '涓嬫灦 ' + } + ], + publicityList: [] + , + } + }, + created() { + this.init(); + + }, + methods: + { + //鍒犻櫎 + remove(val) { + this.$http.delete('/api/user', { params: { id: val } }).then(res => { + this.$message({ + message: '鍒犻櫎鎴愬姛', + type: 'success' + }) + + this.search(); + }) + }, + // //鍙戝竷/涓嬫灦 + // punlish(val, val2) { + // if (val2 == 0) { + // this.$http.get('/api/commonQuestion/release/' + val).then(res => { + // this.$message({ + // message: '鍙戝竷鎴愬姛', + // type: 'success' + // }) + + // this.search(); + // } + // ) + // } + // if (val2 == 1) { + // this.$http.get('/api/commonQuestion/offline/' + val).then(res => { + // this.$message({ + // message: '涓嬫灦鎴愬姛', + // type: 'success' + // }) + // this.search(); + // } + // ); + // } + // }, + + //缂栬緫 + details(val) { + this.detailsVisible = true; + this.detailsRow = Object.assign({}, val); + }, + update(){ + this.$http.put('/api/user',this.detailsRow).then(res => {this.$message({ + message: '缂栬緫鎴愬姛', + type: 'success'} + ) + this.search();} + ); + this.detailsVisible =false; + }, + + //閲嶇疆瀵嗙爜 + reset(val) { + this.$http.get('/api/user/resetPassword/' + val).then(res => this.$message({ + message: '閲嶇疆鎴愬姛', + type: 'success' + })); + }, + //娣诲姞 + add() { + this.$refs.addPublicityForm.validate(async (vaild) => { + if (!vaild) return this.$message.error('杈撳叆鏈夎') + let param = null; + param = this.addPublicityForm; + addPublicityList(param).then(res => { + this.$message({ + message: '鎿嶄綔鎴愬姛', + type: 'success' + }); + this.addPublicityForm={}; + this.init(); + } + ) + this.addPublicityVisibel = false; + }) + }, + //鍏抽棴涔嬪墠 + addPublicityClose() { + this.addPublicityVisibel = false; + }, + detailsVisibleclose() { + this.detailsVisible = false; + }, + //鍒嗛〉鏂规硶 + handleCurrentChange(val) { + this.queryInfo.current = val; + this.search(); + }, + + //鍏叡瀹d紶鍔犺浇 + init() { + let param = {} + param.current = this.queryInfo.current + param.size = this.queryInfo.size + getPublicityList(param).then(res => { + this.publicityList = res.records; + this.total = res.total + }) + }, + //鏌ヨ + search() { + let param = {} + param.realName = this.queryInfo.realName + param.nickName = this.queryInfo.nickName + param.size = this.queryInfo.size + getPublicityList(param).then(res => { + this.publicityList = res.records; + this.total = res.total + this.current = res.current + }) + }, + + } } </script> <style scoped> - +::v-deep(.el-table thead) { + color: #000000; +} </style> \ No newline at end of file diff --git a/src/views/workbench/Workbench.vue b/src/views/workbench/Workbench.vue index 34b8b1d..af289ca 100644 --- a/src/views/workbench/Workbench.vue +++ b/src/views/workbench/Workbench.vue @@ -143,7 +143,7 @@ ) }, handleAudit(row) { - console.log(row) + window.open('/#/audit') }, toGroup(groupId) { console.log(groupId) diff --git a/vue.config.js b/vue.config.js index 1015bca..e2c85b3 100644 --- a/vue.config.js +++ b/vue.config.js @@ -2,9 +2,12 @@ module.exports = defineConfig({ transpileDependencies: true, devServer: { + host: 'localhost', + port: 9098, + open: true, proxy: { '/api': { - target: 'http://localhost:8081', + target: 'http://localhost:9099', changeOrigin: true, pathRewrite: { '^/api': '' -- Gitblit v1.8.0