Commit ce1de2616dbf6cbd95c84a13838cdd89881c1603
1 parent
b4af9364
专项行动
Showing
10 changed files
with
561 additions
and
180 deletions
src/api/baseData/externalAssistance.js
0 → 100644
| 1 | +// 外协信息 | ||
| 2 | +import request from "@/utils/request"; | ||
| 3 | + | ||
| 4 | +// 获取公司信息列表 | ||
| 5 | +export async function getExternalAssistanceList() { | ||
| 6 | + return await request({ | ||
| 7 | + url: '/extend/systeminformation/GetExternalAssistanceList', | ||
| 8 | + method: 'get', | ||
| 9 | + }); | ||
| 10 | +} | ||
| 0 | \ No newline at end of file | 11 | \ No newline at end of file |
src/assets/style/common.scss
src/store/modules/meta.js
| @@ -6,12 +6,15 @@ import { getSystemTypeList } from "@/api/common"; | @@ -6,12 +6,15 @@ import { getSystemTypeList } from "@/api/common"; | ||
| 6 | import { getAreaSelect } from "@/api/baseData/area"; | 6 | import { getAreaSelect } from "@/api/baseData/area"; |
| 7 | // 系统分类 | 7 | // 系统分类 |
| 8 | import { getSystemClassSelect } from "@/api/baseData/systemClass"; | 8 | import { getSystemClassSelect } from "@/api/baseData/systemClass"; |
| 9 | +// 外协列表 | ||
| 10 | +import { getExternalAssistanceList } from "@/api/baseData/externalAssistance" | ||
| 9 | 11 | ||
| 10 | const meta = { | 12 | const meta = { |
| 11 | state: { | 13 | state: { |
| 12 | system: '', // 系统类型 | 14 | system: '', // 系统类型 |
| 13 | area: '', // 系统类型 | 15 | area: '', // 系统类型 |
| 14 | systemClass: {}, | 16 | systemClass: {}, |
| 17 | + externalAssistanceList: '', // 外协 | ||
| 15 | }, | 18 | }, |
| 16 | 19 | ||
| 17 | mutations: { | 20 | mutations: { |
| @@ -24,6 +27,9 @@ const meta = { | @@ -24,6 +27,9 @@ const meta = { | ||
| 24 | SET_SYSTEM_CLASS: (state, {key, data}) => { | 27 | SET_SYSTEM_CLASS: (state, {key, data}) => { |
| 25 | state.systemClass[key] = data; | 28 | state.systemClass[key] = data; |
| 26 | }, | 29 | }, |
| 30 | + SET_EXTERNALASSISTANCE_CLASS: (state, data) => { | ||
| 31 | + state.externalAssistanceList = data; | ||
| 32 | + }, | ||
| 27 | }, | 33 | }, |
| 28 | 34 | ||
| 29 | actions: { | 35 | actions: { |
| @@ -42,6 +48,12 @@ const meta = { | @@ -42,6 +48,12 @@ const meta = { | ||
| 42 | resolve(res.data) | 48 | resolve(res.data) |
| 43 | }).catch(error => { reject(error) }) | 49 | }).catch(error => { reject(error) }) |
| 44 | break; | 50 | break; |
| 51 | + case 'externalAssistance': | ||
| 52 | + getExternalAssistanceList().then(res => { | ||
| 53 | + commit('SET_EXTERNALASSISTANCE_CLASS', res.data) | ||
| 54 | + resolve(res.data) | ||
| 55 | + }).catch(error => { reject(error) }) | ||
| 56 | + break; | ||
| 45 | 57 | ||
| 46 | default: | 58 | default: |
| 47 | break; | 59 | break; |
src/store/modules/user.js
| @@ -18,6 +18,7 @@ const user = { | @@ -18,6 +18,7 @@ const user = { | ||
| 18 | userInfo: {}, | 18 | userInfo: {}, |
| 19 | menuList: [], | 19 | menuList: [], |
| 20 | socket: '', | 20 | socket: '', |
| 21 | + islader: false, | ||
| 21 | }, | 22 | }, |
| 22 | 23 | ||
| 23 | mutations: { | 24 | mutations: { |
| @@ -50,7 +51,10 @@ const user = { | @@ -50,7 +51,10 @@ const user = { | ||
| 50 | }, | 51 | }, |
| 51 | SET_MENULIST: (state, menuList) => { | 52 | SET_MENULIST: (state, menuList) => { |
| 52 | state.menuList = menuList | 53 | state.menuList = menuList |
| 53 | - } | 54 | + }, |
| 55 | + SET_ISLADER: (state, islader) => { | ||
| 56 | + state.islader = islader | ||
| 57 | + }, | ||
| 54 | }, | 58 | }, |
| 55 | 59 | ||
| 56 | actions: { | 60 | actions: { |
| @@ -187,6 +191,8 @@ const user = { | @@ -187,6 +191,8 @@ const user = { | ||
| 187 | commit('SET_AVATAR', avatar) | 191 | commit('SET_AVATAR', avatar) |
| 188 | commit('SET_ADDRESS', userInfo.loginIPAddressName) | 192 | commit('SET_ADDRESS', userInfo.loginIPAddressName) |
| 189 | commit('SET_USERINFO', userInfo) | 193 | commit('SET_USERINFO', userInfo) |
| 194 | + // 是否为市级领导 | ||
| 195 | + commit('SET_ISLADER', userInfo.organizeId == '580547494862128389') | ||
| 190 | commit('SET_MENULIST', menuList) | 196 | commit('SET_MENULIST', menuList) |
| 191 | resolve(routerList) | 197 | resolve(routerList) |
| 192 | }).catch(error => { | 198 | }).catch(error => { |
src/views/DisposalSuggestions/Form.vue
| @@ -129,7 +129,7 @@ | @@ -129,7 +129,7 @@ | ||
| 129 | computed: { | 129 | computed: { |
| 130 | isSHILevel() { | 130 | isSHILevel() { |
| 131 | // 判断角色是否为‘市级办公室’ | 131 | // 判断角色是否为‘市级办公室’ |
| 132 | - return this.$store.state.user.userInfo.organizeId == '580547494862128389'; | 132 | + return this.$store.state.user.islader; |
| 133 | }, | 133 | }, |
| 134 | }, | 134 | }, |
| 135 | watch: {}, | 135 | watch: {}, |
src/views/baseSpecialAction/Form.vue
| @@ -28,7 +28,7 @@ | @@ -28,7 +28,7 @@ | ||
| 28 | </el-input> | 28 | </el-input> |
| 29 | </el-form-item> | 29 | </el-form-item> |
| 30 | </el-col> | 30 | </el-col> |
| 31 | - <el-col :span="23" v-if="ncc.hasFormP('title')"> | 31 | + <el-col :span="23" v-if="ncc.hasFormP('title') && !dataForm.id"> |
| 32 | <el-form-item label="标题" prop="title"> | 32 | <el-form-item label="标题" prop="title"> |
| 33 | <el-input | 33 | <el-input |
| 34 | v-model="dataForm.title" | 34 | v-model="dataForm.title" |
| @@ -40,7 +40,14 @@ | @@ -40,7 +40,14 @@ | ||
| 40 | </el-input> | 40 | </el-input> |
| 41 | </el-form-item> | 41 | </el-form-item> |
| 42 | </el-col> | 42 | </el-col> |
| 43 | - <el-col :span="23" v-if="ncc.hasFormP('annex')"> | 43 | + <el-col :span="23" v-if="ncc.hasFormP('content') && !dataForm.id"> |
| 44 | + <el-form-item label="内容" prop="content"> | ||
| 45 | + <el-input v-model="dataForm.content" placeholder="请输入" show-word-limit :style="{ width: '100%' }" | ||
| 46 | + type="textarea" :autosize="{ minRows: 4, maxRows: 4 }"> | ||
| 47 | + </el-input> | ||
| 48 | + </el-form-item> | ||
| 49 | + </el-col> | ||
| 50 | + <el-col :span="23" v-if="ncc.hasFormP('annex') && !dataForm.id"> | ||
| 44 | <el-form-item label="附件" prop="annex"> | 51 | <el-form-item label="附件" prop="annex"> |
| 45 | <NCC-UploadFz | 52 | <NCC-UploadFz |
| 46 | v-model="dataForm.annex" | 53 | v-model="dataForm.annex" |
| @@ -52,7 +59,7 @@ | @@ -52,7 +59,7 @@ | ||
| 52 | </NCC-UploadFz> | 59 | </NCC-UploadFz> |
| 53 | </el-form-item> | 60 | </el-form-item> |
| 54 | </el-col> | 61 | </el-col> |
| 55 | - <el-col :span="23" v-if="ncc.hasFormP('communicationArea')"> | 62 | + <el-col :span="23" v-if="ncc.hasFormP('communicationArea') && dataForm.id"> |
| 56 | <el-form-item label="传达区域" prop="communicationArea"> | 63 | <el-form-item label="传达区域" prop="communicationArea"> |
| 57 | <el-checkbox-group v-model="dataForm.communicationArea" :style="{}"> | 64 | <el-checkbox-group v-model="dataForm.communicationArea" :style="{}"> |
| 58 | <el-checkbox | 65 | <el-checkbox |
| @@ -63,21 +70,43 @@ | @@ -63,21 +70,43 @@ | ||
| 63 | > | 70 | > |
| 64 | </el-checkbox-group> | 71 | </el-checkbox-group> |
| 65 | <div style="margin-top: 10px"> | 72 | <div style="margin-top: 10px"> |
| 66 | - <el-button size="mini" @click="selectAreaAll">全选</el-button> | ||
| 67 | - <el-button size="mini" @click="closeAreaAll">反选</el-button> | 73 | + <el-button size="mini" @click="selectAreaAll('area')">全选</el-button> |
| 74 | + <el-button size="mini" @click="closeAreaAll('area')">反选</el-button> | ||
| 68 | </div> | 75 | </div> |
| 69 | </el-form-item> | 76 | </el-form-item> |
| 70 | </el-col> | 77 | </el-col> |
| 71 | - <el-col :span="23" v-if="ncc.hasFormP('communicationArea')"> | ||
| 72 | - <el-form-item label="传达外协" prop="communicationArea"> | ||
| 73 | - <el-checkbox-group v-model="dataForm.communicationArea" :style="{}"> | 78 | + <el-col :span="23" v-if="ncc.hasFormP('communicationOut') && dataForm.id"> |
| 79 | + <el-form-item label="传达外协" prop="communicationOut"> | ||
| 80 | + <el-checkbox-group v-model="dataForm.communicationOut" :style="{}"> | ||
| 74 | <el-checkbox | 81 | <el-checkbox |
| 75 | - v-for="(item, index) in communicationAreaOptions" | 82 | + v-for="(item, index) in communicationOutOptions" |
| 76 | :key="index" | 83 | :key="index" |
| 77 | :label="item.id" | 84 | :label="item.id" |
| 78 | >{{ item.fullName }}</el-checkbox | 85 | >{{ item.fullName }}</el-checkbox |
| 79 | > | 86 | > |
| 80 | </el-checkbox-group> | 87 | </el-checkbox-group> |
| 88 | + <div style="margin-top: 10px"> | ||
| 89 | + <el-button size="mini" @click="selectAreaAll">全选</el-button> | ||
| 90 | + <el-button size="mini" @click="closeAreaAll">反选</el-button> | ||
| 91 | + </div> | ||
| 92 | + </el-form-item> | ||
| 93 | + </el-col> | ||
| 94 | + <el-col :span="23" v-if="ncc.hasFormP('relationId') && dataForm.id"> | ||
| 95 | + <el-form-item label="填报表单" prop="relationId"> | ||
| 96 | + <el-select v-model="dataForm.relationId" placeholder="请选择专项行动填报表单" style="margin-right: 10px;width: 300px;"> | ||
| 97 | + <el-option v-for="item in BaseList" :key="item.id" :label="item.fullName" :value="item.id"> | ||
| 98 | + </el-option> | ||
| 99 | + </el-select> | ||
| 100 | + <el-button size="mini" type="text" @click="dialogVisible = true">没有找到表单?点击设计表单</el-button> | ||
| 101 | + </el-form-item> | ||
| 102 | + </el-col> | ||
| 103 | + <el-col :span="23" v-if="ncc.hasFormP('deadline') && dataForm.id"> | ||
| 104 | + <el-form-item label="截止日期" prop="deadline"> | ||
| 105 | + <el-date-picker | ||
| 106 | + v-model="dataForm.deadline" | ||
| 107 | + type="date" | ||
| 108 | + placeholder="选择截止日期"> | ||
| 109 | + </el-date-picker> | ||
| 81 | </el-form-item> | 110 | </el-form-item> |
| 82 | </el-col> | 111 | </el-col> |
| 83 | </el-form> | 112 | </el-form> |
| @@ -88,6 +117,15 @@ | @@ -88,6 +117,15 @@ | ||
| 88 | >确 定</el-button | 117 | >确 定</el-button |
| 89 | > | 118 | > |
| 90 | </span> | 119 | </span> |
| 120 | + <el-dialog class="zxDialog" title="专项行动表单设计" :visible.sync="dialogVisible" fullscreen @close="handleClose" :modal="false"> | ||
| 121 | + <iframe | ||
| 122 | + :src="nestedPageUrl" | ||
| 123 | + width="100%" | ||
| 124 | + :height="viewportHeight - 58 + 'px'" | ||
| 125 | + frameborder="0" | ||
| 126 | + allowfullscreen> | ||
| 127 | + </iframe> | ||
| 128 | + </el-dialog> | ||
| 91 | </el-dialog> | 129 | </el-dialog> |
| 92 | </template> | 130 | </template> |
| 93 | <script> | 131 | <script> |
| @@ -111,11 +149,14 @@ export default { | @@ -111,11 +149,14 @@ export default { | ||
| 111 | releaseTime: undefined, | 149 | releaseTime: undefined, |
| 112 | annex: [], | 150 | annex: [], |
| 113 | communicationArea: [], | 151 | communicationArea: [], |
| 152 | + communicationOut: [], | ||
| 114 | state: undefined, | 153 | state: undefined, |
| 115 | creatorUserId: undefined, | 154 | creatorUserId: undefined, |
| 116 | creatorTime: undefined, | 155 | creatorTime: undefined, |
| 117 | lastModifyUserId: undefined, | 156 | lastModifyUserId: undefined, |
| 118 | lastModifyTime: undefined, | 157 | lastModifyTime: undefined, |
| 158 | + deadline: undefined, | ||
| 159 | + relationId: undefined | ||
| 119 | }, | 160 | }, |
| 120 | rules: { | 161 | rules: { |
| 121 | specialActionType: [ | 162 | specialActionType: [ |
| @@ -132,35 +173,96 @@ export default { | @@ -132,35 +173,96 @@ export default { | ||
| 132 | trigger: "blur", | 173 | trigger: "blur", |
| 133 | }, | 174 | }, |
| 134 | ], | 175 | ], |
| 176 | + deadline: [ | ||
| 177 | + { | ||
| 178 | + required: true, | ||
| 179 | + message: "请输入截止日期", | ||
| 180 | + trigger: "change", | ||
| 181 | + } | ||
| 182 | + ] | ||
| 135 | }, | 183 | }, |
| 136 | areaOptions: [], | 184 | areaOptions: [], |
| 137 | - communicationAreaOptions: [], | 185 | + communicationOutOptions: [], |
| 186 | + BaseList:[], | ||
| 187 | + viewportHeight: 0, | ||
| 188 | + nestedPageUrl:"http://8.130.38.56:8043/old/#/onlineDev/webDesign/indexNew", | ||
| 189 | + dialogVisible: false, | ||
| 138 | }; | 190 | }; |
| 139 | }, | 191 | }, |
| 140 | computed: {}, | 192 | computed: {}, |
| 141 | watch: {}, | 193 | watch: {}, |
| 142 | created() { | 194 | created() { |
| 143 | this.initAreaTypeList(); | 195 | this.initAreaTypeList(); |
| 196 | + this.initCommunicationOutOptions(); | ||
| 197 | + this.updateViewportHeight(); | ||
| 198 | + this.getDataForm(); | ||
| 199 | + // 监听窗口大小变化事件 | ||
| 200 | + window.addEventListener('resize', this.updateViewportHeight); | ||
| 144 | }, | 201 | }, |
| 145 | mounted() {}, | 202 | mounted() {}, |
| 203 | + beforeDestroy() { | ||
| 204 | + // 移除窗口大小变化事件监听器 | ||
| 205 | + window.removeEventListener('resize', this.updateViewportHeight); | ||
| 206 | + }, | ||
| 146 | methods: { | 207 | methods: { |
| 208 | + updateViewportHeight() { | ||
| 209 | + // 获取页面显示高度 | ||
| 210 | + this.viewportHeight = window.innerHeight || document.documentElement.clientHeight; | ||
| 211 | + }, | ||
| 212 | + handleClose() { | ||
| 213 | + // 这里是对话框关闭后需要执行的代码 | ||
| 214 | + this.getDataForm(); | ||
| 215 | + // 例如,你可以在这里添加任何其他的逻辑 | ||
| 216 | + }, | ||
| 217 | + //查询表单 | ||
| 218 | + getDataForm() { | ||
| 219 | + request({ | ||
| 220 | + url: "/visualdev/Base?type=1", | ||
| 221 | + method: "get", | ||
| 222 | + }).then((res) => { | ||
| 223 | + this.BaseList = res.data.list[0].children; | ||
| 224 | + console.log(this.BaseList) | ||
| 225 | + }); | ||
| 226 | + }, | ||
| 147 | async initAreaTypeList() { | 227 | async initAreaTypeList() { |
| 148 | let list = this.$store.state.meta.area; | 228 | let list = this.$store.state.meta.area; |
| 149 | !list && (list = await this.$store.dispatch("getTypeListByCode", "area")); | 229 | !list && (list = await this.$store.dispatch("getTypeListByCode", "area")); |
| 150 | this.areaOptions = list; | 230 | this.areaOptions = list; |
| 151 | }, | 231 | }, |
| 152 | - selectAreaAll() { | ||
| 153 | - this.dataForm.communicationArea = this.areaOptions.map( | ||
| 154 | - (option) => option.id | ||
| 155 | - ); | 232 | + async initCommunicationOutOptions() { |
| 233 | + let list = this.$store.state.meta.externalAssistanceList; | ||
| 234 | + !list && (list = await this.$store.dispatch("getTypeListByCode", "externalAssistance")); | ||
| 235 | + this.communicationOutOptions = list; | ||
| 156 | }, | 236 | }, |
| 157 | - closeAreaAll() { | ||
| 158 | - this.dataForm.communicationArea = this.areaOptions | ||
| 159 | - .filter( | ||
| 160 | - (option) => !this.dataForm.communicationArea.includes(option.id) | ||
| 161 | - ) | ||
| 162 | - .map((option) => option.id); | 237 | + // 全选 |
| 238 | + selectAreaAll(type) { | ||
| 239 | + if(type == 'area') { | ||
| 240 | + this.dataForm.communicationArea = this.areaOptions.map( | ||
| 241 | + (option) => option.id | ||
| 242 | + ); | ||
| 243 | + } else { | ||
| 244 | + this.dataForm.communicationOut = this.communicationOutOptions.map( | ||
| 245 | + (option) => option.id | ||
| 246 | + ); | ||
| 247 | + } | ||
| 163 | }, | 248 | }, |
| 249 | + // 反选 | ||
| 250 | + closeAreaAll(type) { | ||
| 251 | + if(type == 'area') { | ||
| 252 | + this.dataForm.communicationArea = this.areaOptions | ||
| 253 | + .filter( | ||
| 254 | + (option) => !this.dataForm.communicationArea.includes(option.id) | ||
| 255 | + ) | ||
| 256 | + .map((option) => option.id); | ||
| 257 | + } else { | ||
| 258 | + this.dataForm.communicationOut = this.communicationOutOptions | ||
| 259 | + .filter( | ||
| 260 | + (option) => !this.dataForm.communicationOut.includes(option.id) | ||
| 261 | + ) | ||
| 262 | + .map((option) => option.id); | ||
| 263 | + } | ||
| 264 | + }, | ||
| 265 | + | ||
| 164 | goBack() { | 266 | goBack() { |
| 165 | this.$emit("refresh"); | 267 | this.$emit("refresh"); |
| 166 | }, | 268 | }, |
| @@ -170,27 +272,18 @@ export default { | @@ -170,27 +272,18 @@ export default { | ||
| 170 | this.isDetail = isDetail || false; | 272 | this.isDetail = isDetail || false; |
| 171 | this.$nextTick(() => { | 273 | this.$nextTick(() => { |
| 172 | this.$refs["elForm"].resetFields(); | 274 | this.$refs["elForm"].resetFields(); |
| 173 | - if (this.dataForm.id) { | ||
| 174 | - request({ | ||
| 175 | - url: "/Extend/BaseSpecialAction/" + this.dataForm.id, | ||
| 176 | - method: "get", | ||
| 177 | - }).then((res) => { | ||
| 178 | - this.dataForm = res.data; | ||
| 179 | - if (!this.dataForm.annex) this.dataForm.annex = []; | ||
| 180 | - if (!this.dataForm.communicationArea) | ||
| 181 | - this.dataForm.communicationArea = []; | ||
| 182 | - }); | ||
| 183 | - } | ||
| 184 | }); | 275 | }); |
| 185 | }, | 276 | }, |
| 186 | dataFormSubmit() { | 277 | dataFormSubmit() { |
| 187 | this.$refs["elForm"].validate((valid) => { | 278 | this.$refs["elForm"].validate((valid) => { |
| 188 | if (valid) { | 279 | if (valid) { |
| 189 | if (!this.dataForm.id) { | 280 | if (!this.dataForm.id) { |
| 281 | + let {title, content} = this.dataForm; | ||
| 282 | + // 新增 | ||
| 190 | request({ | 283 | request({ |
| 191 | url: `/Extend/BaseSpecialAction`, | 284 | url: `/Extend/BaseSpecialAction`, |
| 192 | method: "post", | 285 | method: "post", |
| 193 | - data: this.dataForm, | 286 | + data: { title, content }, |
| 194 | }).then((res) => { | 287 | }).then((res) => { |
| 195 | this.$message({ | 288 | this.$message({ |
| 196 | message: res.msg, | 289 | message: res.msg, |
| @@ -202,8 +295,9 @@ export default { | @@ -202,8 +295,9 @@ export default { | ||
| 202 | }); | 295 | }); |
| 203 | }); | 296 | }); |
| 204 | } else { | 297 | } else { |
| 298 | + // 发布任务 | ||
| 205 | request({ | 299 | request({ |
| 206 | - url: "/Extend/BaseSpecialAction/" + this.dataForm.id, | 300 | + url: "/Extend/BaseSpecialAction/Release", |
| 207 | method: "PUT", | 301 | method: "PUT", |
| 208 | data: this.dataForm, | 302 | data: this.dataForm, |
| 209 | }).then((res) => { | 303 | }).then((res) => { |
| @@ -224,3 +318,10 @@ export default { | @@ -224,3 +318,10 @@ export default { | ||
| 224 | }, | 318 | }, |
| 225 | }; | 319 | }; |
| 226 | </script> | 320 | </script> |
| 321 | +<style lang="scss" scoped> | ||
| 322 | +.el-dialog__wrapper.zxDialog { | ||
| 323 | + :deep(.el-dialog__body) { | ||
| 324 | + max-height: unset; | ||
| 325 | + } | ||
| 326 | +} | ||
| 327 | +</style> |
src/views/baseSpecialAction/index.vue
| @@ -8,33 +8,21 @@ | @@ -8,33 +8,21 @@ | ||
| 8 | <el-form @submit.native.prevent size="mini"> | 8 | <el-form @submit.native.prevent size="mini"> |
| 9 | <el-col :span="6"> | 9 | <el-col :span="6"> |
| 10 | <el-form-item label=""> | 10 | <el-form-item label=""> |
| 11 | - <el-input | ||
| 12 | - v-model="query.title" | ||
| 13 | - placeholder="标题" | ||
| 14 | - clearable | ||
| 15 | - /> | 11 | + <el-input v-model="query.title" placeholder="标题" clearable/> |
| 16 | </el-form-item> | 12 | </el-form-item> |
| 17 | </el-col> | 13 | </el-col> |
| 18 | <el-col :span="6"> | 14 | <el-col :span="6"> |
| 19 | <el-form-item label=""> | 15 | <el-form-item label=""> |
| 20 | - <el-input | ||
| 21 | - v-model="query.state" | ||
| 22 | - placeholder="状态" | ||
| 23 | - clearable | ||
| 24 | - /> | 16 | + <el-select v-model="query.state" placeholder="请选择状态" clearable> |
| 17 | + <el-option label="已发布" value="已发布"></el-option> | ||
| 18 | + <el-option label="未发布" value="未发布"></el-option> | ||
| 19 | + </el-select> | ||
| 25 | </el-form-item> | 20 | </el-form-item> |
| 26 | </el-col> | 21 | </el-col> |
| 27 | <el-col :span="6"> | 22 | <el-col :span="6"> |
| 28 | <el-form-item> | 23 | <el-form-item> |
| 29 | - <el-button | ||
| 30 | - type="primary" | ||
| 31 | - icon="el-icon-search" | ||
| 32 | - @click="search()" | ||
| 33 | - >查询</el-button | ||
| 34 | - > | ||
| 35 | - <el-button icon="el-icon-refresh-right" @click="reset()" | ||
| 36 | - >重置</el-button | ||
| 37 | - > | 24 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> |
| 25 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | ||
| 38 | </el-form-item> | 26 | </el-form-item> |
| 39 | </el-col> | 27 | </el-col> |
| 40 | </el-form> | 28 | </el-form> |
| @@ -45,94 +33,46 @@ | @@ -45,94 +33,46 @@ | ||
| 45 | <div class="NCC-common-layout-main NCC-flex-main"> | 33 | <div class="NCC-common-layout-main NCC-flex-main"> |
| 46 | <div class="NCC-common-head"> | 34 | <div class="NCC-common-head"> |
| 47 | <div> | 35 | <div> |
| 48 | - <el-button | ||
| 49 | - type="primary" | ||
| 50 | - icon="el-icon-plus" | ||
| 51 | - @click="addOrUpdateHandle()" | ||
| 52 | - size="mini" | ||
| 53 | - >新增</el-button | ||
| 54 | - > | 36 | + <el-button type="primary" icon="el-icon-plus" @click="addOrUpdateHandle()" size="mini" >新增</el-button> |
| 55 | </div> | 37 | </div> |
| 56 | </div> | 38 | </div> |
| 57 | <NCC-table v-loading="listLoading" :data="list"> | 39 | <NCC-table v-loading="listLoading" :data="list"> |
| 58 | <el-table-column prop="id" label="主键" align="left" show-overflow-tooltip/> | 40 | <el-table-column prop="id" label="主键" align="left" show-overflow-tooltip/> |
| 59 | <el-table-column prop="title" label="标题" align="left" show-overflow-tooltip/> | 41 | <el-table-column prop="title" label="标题" align="left" show-overflow-tooltip/> |
| 60 | - <el-table-column | ||
| 61 | - prop="releaseTime" | ||
| 62 | - label="发布时间" | ||
| 63 | - align="left" | ||
| 64 | - show-overflow-tooltip | ||
| 65 | - /> | ||
| 66 | - <el-table-column | ||
| 67 | - label="传达区域" | ||
| 68 | - prop="communicationArea" | ||
| 69 | - align="left" | ||
| 70 | - show-overflow-tooltip | ||
| 71 | - > | ||
| 72 | - <template slot-scope="scope">{{ | ||
| 73 | - scope.row.communicationArea | ||
| 74 | - | dynamicText(communicationAreaOptions) | ||
| 75 | - }}</template> | 42 | + <el-table-column prop="state" label="状态" align="left" show-overflow-tooltip/> |
| 43 | + <el-table-column prop="creatorTime" label="发布时间" align="left" :formatter="ncc.tableDateFormat" show-overflow-tooltip/> | ||
| 44 | + <el-table-column label="传达区域" prop="communicationArea" align="left" show-overflow-tooltip> | ||
| 45 | + <template slot-scope="scope">{{ JSON.parse(scope.row.communicationArea) | dynamicText(communicationAreaOptions) }}</template> | ||
| 76 | </el-table-column> | 46 | </el-table-column> |
| 77 | - <el-table-column | ||
| 78 | - label="传达外协" | ||
| 79 | - prop="communicationArea" | ||
| 80 | - align="left" | ||
| 81 | - show-overflow-tooltip | ||
| 82 | - > | ||
| 83 | - <template slot-scope="scope">{{ | ||
| 84 | - scope.row.communicationArea | ||
| 85 | - | dynamicText(communicationAreaOptions) | ||
| 86 | - }}</template> | 47 | + <el-table-column label="传达外协" prop="communicationOut" align="left" show-overflow-tooltip> |
| 48 | + <template slot-scope="scope">{{ JSON.parse(scope.row.communicationOut) | dynamicText(communicationOutOptions) }}</template> | ||
| 87 | </el-table-column> | 49 | </el-table-column> |
| 88 | - <el-table-column | ||
| 89 | - prop="creatorUserId" | ||
| 90 | - show-overflow-tooltip | ||
| 91 | - label="创建用户" | ||
| 92 | - align="left" | ||
| 93 | - /> | ||
| 94 | - <el-table-column label="操作" fixed="right" width="100"> | 50 | + <el-table-column prop="deadline" label="截止日期" align="left" :formatter="ncc.tableDateFormat" show-overflow-tooltip/> |
| 51 | + <el-table-column prop="creatorUserId" show-overflow-tooltip label="创建用户" align="left"/> | ||
| 52 | + <el-table-column label="操作" fixed="right" width="130"> | ||
| 95 | <template slot-scope="scope"> | 53 | <template slot-scope="scope"> |
| 96 | - <el-button | ||
| 97 | - type="text" | ||
| 98 | - @click="addOrUpdateHandle(scope.row.id)" | ||
| 99 | - >编辑</el-button | ||
| 100 | - > | ||
| 101 | - <el-button | ||
| 102 | - type="text" | ||
| 103 | - @click="handleDel(scope.row.id)" | ||
| 104 | - class="NCC-table-delBtn" | ||
| 105 | - >删除</el-button | ||
| 106 | - > | 54 | + <el-button type="text" @click="addOrUpdateHandle(scope.row.id)">发布任务</el-button> |
| 55 | + <el-button type="text" @click="toDetail(scope.row)" v-if="scope.row.state == '已发布'">行动情况</el-button> | ||
| 107 | </template> | 56 | </template> |
| 108 | </el-table-column> | 57 | </el-table-column> |
| 109 | </NCC-table> | 58 | </NCC-table> |
| 110 | - <pagination | ||
| 111 | - :total="total" | ||
| 112 | - :page.sync="listQuery.currentPage" | ||
| 113 | - :limit.sync="listQuery.pageSize" | ||
| 114 | - @pagination="initData" | ||
| 115 | - /> | 59 | + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/> |
| 116 | </div> | 60 | </div> |
| 117 | </div> | 61 | </div> |
| 118 | <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> | 62 | <NCC-Form v-if="formVisible" ref="NCCForm" @refresh="refresh" /> |
| 119 | - <ExportBox | ||
| 120 | - v-if="exportBoxVisible" | ||
| 121 | - ref="ExportBox" | ||
| 122 | - @download="download" | ||
| 123 | - /> | 63 | + <ExportBox v-if="exportBoxVisible" ref="ExportBox" @download="download"/> |
| 64 | + <InfoForm v-if="InfoFormVisible" ref="InfoForm" @refresh="InfoFormVisible = false"/> | ||
| 124 | </div> | 65 | </div> |
| 125 | </div> | 66 | </div> |
| 126 | </div> | 67 | </div> |
| 127 | </template> | 68 | </template> |
| 128 | <script> | 69 | <script> |
| 129 | import request from "@/utils/request"; | 70 | import request from "@/utils/request"; |
| 130 | -import { getDictionaryDataSelector } from "@/api/systemData/dictionary"; | ||
| 131 | import NCCForm from "./Form"; | 71 | import NCCForm from "./Form"; |
| 132 | import ExportBox from "./ExportBox"; | 72 | import ExportBox from "./ExportBox"; |
| 133 | -import { previewDataInterface } from "@/api/systemData/dataInterface"; | 73 | +import InfoForm from "./infoForm.vue"; |
| 134 | export default { | 74 | export default { |
| 135 | - components: { NCCForm, ExportBox }, | 75 | + components: { NCCForm, ExportBox, InfoForm }, |
| 136 | data() { | 76 | data() { |
| 137 | return { | 77 | return { |
| 138 | query: { | 78 | query: { |
| @@ -141,7 +81,6 @@ export default { | @@ -141,7 +81,6 @@ export default { | ||
| 141 | }, | 81 | }, |
| 142 | list: [], | 82 | list: [], |
| 143 | listLoading: false, | 83 | listLoading: false, |
| 144 | - multipleSelection: [], | ||
| 145 | total: 0, | 84 | total: 0, |
| 146 | listQuery: { | 85 | listQuery: { |
| 147 | currentPage: 1, | 86 | currentPage: 1, |
| @@ -151,33 +90,32 @@ export default { | @@ -151,33 +90,32 @@ export default { | ||
| 151 | }, | 90 | }, |
| 152 | formVisible: false, | 91 | formVisible: false, |
| 153 | exportBoxVisible: false, | 92 | exportBoxVisible: false, |
| 154 | - columnList: [ | ||
| 155 | - { prop: "id", label: "主键" }, | ||
| 156 | - { prop: "specialActionType", label: "类型" }, | ||
| 157 | - { prop: "title", label: "标题" }, | ||
| 158 | - { prop: "releaseTime", label: "发布时间" }, | ||
| 159 | - { prop: "communicationArea", label: "传达区域" }, | ||
| 160 | - { prop: "state", label: "状态" }, | ||
| 161 | - { prop: "creatorUserId", label: "创建用户" }, | ||
| 162 | - { prop: "creatorTime", label: "创建时间" }, | ||
| 163 | - { prop: "lastModifyUserId", label: "修改用户" }, | ||
| 164 | - { prop: "lastModifyTime", label: "修改时间" }, | ||
| 165 | - { prop: "content", label: "内容" }, | ||
| 166 | - ], | ||
| 167 | - specialActionTypeOptions: [], | 93 | + InfoFormVisible: false, |
| 168 | communicationAreaOptions: [], | 94 | communicationAreaOptions: [], |
| 95 | + communicationOutOptions: [], | ||
| 169 | }; | 96 | }; |
| 170 | }, | 97 | }, |
| 171 | - computed: {}, | ||
| 172 | created() { | 98 | created() { |
| 99 | + this.initAreaTypeList(); | ||
| 100 | + this.initCommunicationOutOptions(); | ||
| 173 | this.initData() | 101 | this.initData() |
| 174 | - this.getspecialActionTypeOptions(); | ||
| 175 | }, | 102 | }, |
| 103 | + computed: { | ||
| 104 | + isSHILevel() { | ||
| 105 | + // 判断角色是否为‘市级办公室’ | ||
| 106 | + return this.$store.state.user.islader; | ||
| 107 | + }, | ||
| 108 | + }, | ||
| 176 | methods: { | 109 | methods: { |
| 177 | - getspecialActionTypeOptions() { | ||
| 178 | - getDictionaryDataSelector("576310654982423813").then((res) => { | ||
| 179 | - this.specialActionTypeOptions = res.data.list; | ||
| 180 | - }); | 110 | + async initAreaTypeList() { |
| 111 | + let list = this.$store.state.meta.area; | ||
| 112 | + !list && (list = await this.$store.dispatch("getTypeListByCode", "area")); | ||
| 113 | + this.communicationAreaOptions = list; | ||
| 114 | + }, | ||
| 115 | + async initCommunicationOutOptions() { | ||
| 116 | + let list = this.$store.state.meta.externalAssistanceList; | ||
| 117 | + !list && (list = await this.$store.dispatch("getTypeListByCode", "externalAssistance")); | ||
| 118 | + this.communicationOutOptions = list; | ||
| 181 | }, | 119 | }, |
| 182 | initData() { | 120 | initData() { |
| 183 | this.listLoading = true; | 121 | this.listLoading = true; |
| @@ -193,46 +131,35 @@ export default { | @@ -193,46 +131,35 @@ export default { | ||
| 193 | query[key] = _query[key]; | 131 | query[key] = _query[key]; |
| 194 | } | 132 | } |
| 195 | } | 133 | } |
| 134 | + // 市级专项行动列表 | ||
| 196 | request({ | 135 | request({ |
| 197 | - url: `/Extend/BaseSpecialAction`, | 136 | + url: '/Extend/BaseSpecialAction', |
| 198 | method: "GET", | 137 | method: "GET", |
| 199 | - data: query, | 138 | + params: query, |
| 200 | }).then((res) => { | 139 | }).then((res) => { |
| 201 | this.list = res.data.list; | 140 | this.list = res.data.list; |
| 141 | + // console.log(this.list, 'list'); | ||
| 202 | this.total = res.data.pagination.total; | 142 | this.total = res.data.pagination.total; |
| 203 | this.listLoading = false; | 143 | this.listLoading = false; |
| 204 | }); | 144 | }); |
| 205 | }, | 145 | }, |
| 206 | - handleDel(id) { | ||
| 207 | - this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", { | ||
| 208 | - type: "warning", | ||
| 209 | - }) | ||
| 210 | - .then(() => { | ||
| 211 | - request({ | ||
| 212 | - url: `/Extend/BaseSpecialAction/${id}`, | ||
| 213 | - method: "DELETE", | ||
| 214 | - }).then((res) => { | ||
| 215 | - this.$message({ | ||
| 216 | - type: "success", | ||
| 217 | - message: res.msg, | ||
| 218 | - onClose: () => { | ||
| 219 | - this.initData(); | ||
| 220 | - }, | ||
| 221 | - }); | ||
| 222 | - }); | ||
| 223 | - }) | ||
| 224 | - .catch(() => {}); | ||
| 225 | - }, | 146 | + |
| 226 | addOrUpdateHandle(id, isDetail) { | 147 | addOrUpdateHandle(id, isDetail) { |
| 227 | this.formVisible = true; | 148 | this.formVisible = true; |
| 228 | this.$nextTick(() => { | 149 | this.$nextTick(() => { |
| 229 | this.$refs.NCCForm.init(id, isDetail); | 150 | this.$refs.NCCForm.init(id, isDetail); |
| 230 | }); | 151 | }); |
| 231 | }, | 152 | }, |
| 153 | + toDetail(row) { | ||
| 154 | + this.InfoFormVisible = true; | ||
| 155 | + this.$nextTick(() => { | ||
| 156 | + this.$refs.InfoForm.init(row); | ||
| 157 | + }); | ||
| 158 | + }, | ||
| 232 | exportData() { | 159 | exportData() { |
| 233 | this.exportBoxVisible = true; | 160 | this.exportBoxVisible = true; |
| 234 | this.$nextTick(() => { | 161 | this.$nextTick(() => { |
| 235 | - this.$refs.ExportBox.init(this.columnList); | 162 | + this.$refs.ExportBox.init(this.list); |
| 236 | }); | 163 | }); |
| 237 | }, | 164 | }, |
| 238 | download(data) { | 165 | download(data) { |
src/views/baseSpecialAction/infoForm.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <!-- 专项行动填报情况 --> | ||
| 3 | + <el-dialog | ||
| 4 | + title="行动情况" | ||
| 5 | + :close-on-click-modal="false" | ||
| 6 | + :visible.sync="visible" | ||
| 7 | + class="NCC-dialog NCC-dialog_center" | ||
| 8 | + lock-scroll | ||
| 9 | + width="70%" | ||
| 10 | + > | ||
| 11 | + <el-row :gutter="15" style="height: 65vh"> | ||
| 12 | + <el-col :span="24" style="margin-bottom: 20px;"> | ||
| 13 | + <el-col :span="12" class="form-item"> | ||
| 14 | + <div class="label w-100">行动标题:</div> | ||
| 15 | + <div>{{ form.title }}</div> | ||
| 16 | + </el-col> | ||
| 17 | + <el-col :span="12" class="form-item"> | ||
| 18 | + <div class="label w-100">截止日期:</div> | ||
| 19 | + <div>{{ ncc.dateFormat(form.deadline) }}</div> | ||
| 20 | + </el-col> | ||
| 21 | + </el-col> | ||
| 22 | + <el-col :span="24" style="height: calc(100% - 100px);"> | ||
| 23 | + <el-table :data="tableData" style="width: 100%" v-loading="loading" stripe> | ||
| 24 | + <el-table-column type="index" width="50" /> | ||
| 25 | + <el-table-column prop="originName" label="部门名称" /> | ||
| 26 | + <el-table-column prop="state" label="状态" /> | ||
| 27 | + </el-table> | ||
| 28 | + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initList"/> | ||
| 29 | + </el-col> | ||
| 30 | + </el-row> | ||
| 31 | + <span slot="footer" class="dialog-footer"> | ||
| 32 | + <el-button @click="close">取 消</el-button> | ||
| 33 | + </span> | ||
| 34 | + </el-dialog> | ||
| 35 | +</template> | ||
| 36 | +<script> | ||
| 37 | +import request from "@/utils/request"; | ||
| 38 | +export default { | ||
| 39 | + components: {}, | ||
| 40 | + props: [], | ||
| 41 | + data() { | ||
| 42 | + return { | ||
| 43 | + loading: false, | ||
| 44 | + visible: false, | ||
| 45 | + tableData: [{}], | ||
| 46 | + listQuery: { | ||
| 47 | + currentPage: 1, | ||
| 48 | + pageSize: 20, | ||
| 49 | + }, | ||
| 50 | + total: 0, | ||
| 51 | + form: {}, | ||
| 52 | + }; | ||
| 53 | + }, | ||
| 54 | + computed: {}, | ||
| 55 | + watch: {}, | ||
| 56 | + created() {}, | ||
| 57 | + mounted() {}, | ||
| 58 | + methods: { | ||
| 59 | + close() { | ||
| 60 | + this.form = {}; | ||
| 61 | + this.$emit("refresh"); | ||
| 62 | + }, | ||
| 63 | + init(row) { | ||
| 64 | + this.form = row; | ||
| 65 | + this.visible = true; | ||
| 66 | + this.loading = true; | ||
| 67 | + this.$nextTick(() => { | ||
| 68 | + this.initList(); | ||
| 69 | + }) | ||
| 70 | + }, | ||
| 71 | + initList() { | ||
| 72 | + request({ | ||
| 73 | + url: `/Extend/BaseSpecialActionInfo/GetListById`, | ||
| 74 | + method: "GET", | ||
| 75 | + params: { | ||
| 76 | + ...this.listQuery, | ||
| 77 | + specialActionId: this.form.id, | ||
| 78 | + }, | ||
| 79 | + }).then((res) => { | ||
| 80 | + this.tableData = res.data.list; | ||
| 81 | + this.total = res.data.pagination.total; | ||
| 82 | + this.loading = false; | ||
| 83 | + }); | ||
| 84 | + } | ||
| 85 | + }, | ||
| 86 | +}; | ||
| 87 | +</script> | ||
| 88 | +<style lang="scss" scoped> | ||
| 89 | +.NCC-dialog { | ||
| 90 | + :deep(.el-pagination__total) { | ||
| 91 | + color: #606266; | ||
| 92 | + } | ||
| 93 | + :deep(.el-pagination__jump) { | ||
| 94 | + color: #606266; | ||
| 95 | + } | ||
| 96 | +} | ||
| 97 | +</style> |
src/views/baseSpecialhandle/index.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <div class="baseSpecialAction item-box common-info-box"> | ||
| 3 | + <div class="item-title">专项行动处理</div> | ||
| 4 | + <div class="item-body"> | ||
| 5 | + <div class="NCC-common-layout"> | ||
| 6 | + <div class="NCC-common-layout-center"> | ||
| 7 | + <el-row class="NCC-common-search-box" :gutter="16"> | ||
| 8 | + <el-form @submit.native.prevent size="mini"> | ||
| 9 | + <el-col :span="6"> | ||
| 10 | + <el-form-item label=""> | ||
| 11 | + <el-input v-model="query.title" placeholder="标题" clearable/> | ||
| 12 | + </el-form-item> | ||
| 13 | + </el-col> | ||
| 14 | + <el-col :span="6"> | ||
| 15 | + <el-form-item label=""> | ||
| 16 | + <el-select v-model="query.state" placeholder="请选择状态" clearable> | ||
| 17 | + <el-option label="已填写" value="已填写"></el-option> | ||
| 18 | + <el-option label="未填写" value="未填写"></el-option> | ||
| 19 | + </el-select> | ||
| 20 | + </el-form-item> | ||
| 21 | + </el-col> | ||
| 22 | + <el-col :span="6"> | ||
| 23 | + <el-form-item> | ||
| 24 | + <el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button> | ||
| 25 | + <el-button icon="el-icon-refresh-right" @click="reset()">重置</el-button> | ||
| 26 | + </el-form-item> | ||
| 27 | + </el-col> | ||
| 28 | + </el-form> | ||
| 29 | + <div class="NCC-common-search-box-right"> | ||
| 30 | + <el-button type="primary" icon="el-icon-download" size="mini" @click="exportData()">导出</el-button> | ||
| 31 | + </div> | ||
| 32 | + </el-row> | ||
| 33 | + <div class="NCC-common-layout-main NCC-flex-main"> | ||
| 34 | + <NCC-table v-loading="listLoading" :data="list"> | ||
| 35 | + <el-table-column prop="id" label="主键" align="left" show-overflow-tooltip/> | ||
| 36 | + <el-table-column prop="title" label="标题" align="left" show-overflow-tooltip/> | ||
| 37 | + <el-table-column prop="state" label="状态" align="left" show-overflow-tooltip/> | ||
| 38 | + <el-table-column prop="deadline" label="截止日期" align="left" :formatter="ncc.tableDateFormat" show-overflow-tooltip/> | ||
| 39 | + <el-table-column label="操作" fixed="right" width="130"> | ||
| 40 | + <template slot-scope="scope"> | ||
| 41 | + <el-button type="text" @click="toFillForm(scope.row)">处理</el-button> | ||
| 42 | + </template> | ||
| 43 | + </el-table-column> | ||
| 44 | + </NCC-table> | ||
| 45 | + <pagination :total="total" :page.sync="listQuery.currentPage" :limit.sync="listQuery.pageSize" @pagination="initData"/> | ||
| 46 | + </div> | ||
| 47 | + </div> | ||
| 48 | + </div> | ||
| 49 | + </div> | ||
| 50 | + <el-dialog title="专项行动处理" :visible.sync="dialogVisible" fullscreen :modal="false"> | ||
| 51 | + <iframe | ||
| 52 | + :src="nestedPageUrl" | ||
| 53 | + width="100%" | ||
| 54 | + :height="viewportHeight - 58 + 'px'" | ||
| 55 | + frameborder="0" | ||
| 56 | + allowfullscreen> | ||
| 57 | + </iframe> | ||
| 58 | + </el-dialog> | ||
| 59 | + </div> | ||
| 60 | + </template> | ||
| 61 | + <script> | ||
| 62 | + import request from "@/utils/request"; | ||
| 63 | + export default { | ||
| 64 | + components: { }, | ||
| 65 | + data() { | ||
| 66 | + return { | ||
| 67 | + query: { | ||
| 68 | + title: undefined, | ||
| 69 | + state: undefined, | ||
| 70 | + }, | ||
| 71 | + list: [], | ||
| 72 | + listLoading: false, | ||
| 73 | + total: 0, | ||
| 74 | + listQuery: { | ||
| 75 | + currentPage: 1, | ||
| 76 | + pageSize: 20, | ||
| 77 | + sort: "desc", | ||
| 78 | + sidx: "", | ||
| 79 | + }, | ||
| 80 | + communicationAreaOptions: [], | ||
| 81 | + communicationOutOptions: [], | ||
| 82 | + dialogVisible: false, | ||
| 83 | + nestedPageUrl: '', | ||
| 84 | + viewportHeight: 0, | ||
| 85 | + }; | ||
| 86 | + }, | ||
| 87 | + created() { | ||
| 88 | + this.updateViewportHeight(); | ||
| 89 | + this.initData() | ||
| 90 | + // 监听窗口大小变化事件 | ||
| 91 | + window.addEventListener('resize', this.updateViewportHeight); | ||
| 92 | + }, | ||
| 93 | + beforeDestroy() { | ||
| 94 | + // 移除窗口大小变化事件监听器 | ||
| 95 | + window.removeEventListener('resize', this.updateViewportHeight); | ||
| 96 | + }, | ||
| 97 | + computed: { | ||
| 98 | + isSHILevel() { | ||
| 99 | + // 判断角色是否为‘市级办公室’ | ||
| 100 | + return this.$store.state.user.islader; | ||
| 101 | + }, | ||
| 102 | + }, | ||
| 103 | + methods: { | ||
| 104 | + updateViewportHeight() { | ||
| 105 | + // 获取页面显示高度 | ||
| 106 | + this.viewportHeight = window.innerHeight || document.documentElement.clientHeight; | ||
| 107 | + }, | ||
| 108 | + initData() { | ||
| 109 | + this.listLoading = true; | ||
| 110 | + let _query = { | ||
| 111 | + ...this.listQuery, | ||
| 112 | + ...this.query, | ||
| 113 | + }; | ||
| 114 | + let query = {}; | ||
| 115 | + for (let key in _query) { | ||
| 116 | + if (Array.isArray(_query[key])) { | ||
| 117 | + query[key] = _query[key].join(); | ||
| 118 | + } else { | ||
| 119 | + query[key] = _query[key]; | ||
| 120 | + } | ||
| 121 | + } | ||
| 122 | + request({ | ||
| 123 | + url: '/Extend/BaseSpecialAction/getCurrentUserSpecialAction', | ||
| 124 | + method: "GET", | ||
| 125 | + params: query, | ||
| 126 | + }).then((res) => { | ||
| 127 | + this.list = res.data.list; | ||
| 128 | + this.total = res.data.pagination.total; | ||
| 129 | + this.listLoading = false; | ||
| 130 | + }); | ||
| 131 | + }, | ||
| 132 | + toFillForm(row) { | ||
| 133 | + this.dialogVisible = true; | ||
| 134 | + this.nestedPageUrl = `http://8.130.38.56:8043/old/#/previewModel?isPreview=1&id=${row.originId}`; | ||
| 135 | + request({ | ||
| 136 | + url: '/visualdev/Base', | ||
| 137 | + method: "GET", | ||
| 138 | + data: {type: 1}, | ||
| 139 | + }).then((res) => { | ||
| 140 | + this.BaseList = res.data.list[0].children.find(v => v.category == row.originId); | ||
| 141 | + | ||
| 142 | + res.data. | ||
| 143 | + console.log(res); | ||
| 144 | + }); | ||
| 145 | + }, | ||
| 146 | + | ||
| 147 | + exportData() { | ||
| 148 | + this.exportBoxVisible = true; | ||
| 149 | + this.$nextTick(() => { | ||
| 150 | + this.$refs.ExportBox.init(this.list); | ||
| 151 | + }); | ||
| 152 | + }, | ||
| 153 | + download(data) { | ||
| 154 | + let query = { ...data, ...this.listQuery, ...this.query }; | ||
| 155 | + request({ | ||
| 156 | + url: `/Extend/BaseSpecialAction/Actions/Export`, | ||
| 157 | + method: "GET", | ||
| 158 | + data: query, | ||
| 159 | + }).then((res) => { | ||
| 160 | + if (!res.data.url) return; | ||
| 161 | + window.location.href = this.define.comUrl + res.data.url; | ||
| 162 | + this.$refs.ExportBox.visible = false; | ||
| 163 | + this.exportBoxVisible = false; | ||
| 164 | + }); | ||
| 165 | + }, | ||
| 166 | + search() { | ||
| 167 | + this.listQuery = { | ||
| 168 | + currentPage: 1, | ||
| 169 | + pageSize: 20, | ||
| 170 | + sort: "desc", | ||
| 171 | + sidx: "", | ||
| 172 | + }; | ||
| 173 | + this.initData(); | ||
| 174 | + }, | ||
| 175 | + refresh(isrRefresh) { | ||
| 176 | + this.formVisible = false; | ||
| 177 | + if (isrRefresh) this.reset(); | ||
| 178 | + }, | ||
| 179 | + reset() { | ||
| 180 | + for (let key in this.query) { | ||
| 181 | + this.query[key] = undefined; | ||
| 182 | + } | ||
| 183 | + this.listQuery = { | ||
| 184 | + currentPage: 1, | ||
| 185 | + pageSize: 20, | ||
| 186 | + sort: "desc", | ||
| 187 | + sidx: "", | ||
| 188 | + }; | ||
| 189 | + this.initData(); | ||
| 190 | + }, | ||
| 191 | + }, | ||
| 192 | + }; | ||
| 193 | + </script> | ||
| 194 | + <style scoped lang="scss"> | ||
| 195 | + .common-info-box { | ||
| 196 | + :deep(.el-table__body-wrapper.is-scrolling-none) { | ||
| 197 | + height: calc(100% - 47px); | ||
| 198 | + overflow-y: scroll; | ||
| 199 | + } | ||
| 200 | + } | ||
| 201 | + </style> | ||
| 202 | + | ||
| 0 | \ No newline at end of file | 203 | \ No newline at end of file |
src/views/overView/Overview.vue
| @@ -2,8 +2,8 @@ | @@ -2,8 +2,8 @@ | ||
| 2 | <div class="overview"> | 2 | <div class="overview"> |
| 3 | <el-row :gutter="20"> | 3 | <el-row :gutter="20"> |
| 4 | <el-col :span="16"> | 4 | <el-col :span="16"> |
| 5 | - <div class="item-box todo" v-if="isSHILevel"> | ||
| 6 | - <div class="item-title">任务待办</div> | 5 | + <div class="item-box todo"> |
| 6 | + <div class="item-title">事件中心</div> | ||
| 7 | <div class="item-body"> | 7 | <div class="item-body"> |
| 8 | <template> | 8 | <template> |
| 9 | <el-table :data="todoTableData" style="width: 100%" stripe> | 9 | <el-table :data="todoTableData" style="width: 100%" stripe> |
| @@ -47,8 +47,12 @@ | @@ -47,8 +47,12 @@ | ||
| 47 | </template> | 47 | </template> |
| 48 | </div> | 48 | </div> |
| 49 | </div> | 49 | </div> |
| 50 | - <div class="item-box earmarked" :style="`height: calc(${isSHILevel ? '50vh - 115px' : '100vh - 205px'});`"> | ||
| 51 | - <!-- :style=`"height: ${isSHILevel ? calc(50vh - 115px) : calc(100vh - 205px)};"` --> | 50 | + <!--<div |
| 51 | + class="item-box earmarked" | ||
| 52 | + :style="`height: calc(${ | ||
| 53 | + isSHILevel ? '50vh - 115px' : '100vh - 205px' | ||
| 54 | + });`" | ||
| 55 | + > | ||
| 52 | <div class="item-title">专项行动</div> | 56 | <div class="item-title">专项行动</div> |
| 53 | <div class="item-body"> | 57 | <div class="item-body"> |
| 54 | <el-row :gutter="6" class="item-one-list"> | 58 | <el-row :gutter="6" class="item-one-list"> |
| @@ -80,7 +84,7 @@ | @@ -80,7 +84,7 @@ | ||
| 80 | </el-col> | 84 | </el-col> |
| 81 | </el-row> | 85 | </el-row> |
| 82 | </div> | 86 | </div> |
| 83 | - </div> | 87 | + </div>--> |
| 84 | </el-col> | 88 | </el-col> |
| 85 | <el-col :span="8"> | 89 | <el-col :span="8"> |
| 86 | <!-- <div class="item-box tip"> | 90 | <!-- <div class="item-box tip"> |
| @@ -105,10 +109,19 @@ | @@ -105,10 +109,19 @@ | ||
| 105 | </div> | 109 | </div> |
| 106 | </div> --> | 110 | </div> --> |
| 107 | <div class="item-box msg"> | 111 | <div class="item-box msg"> |
| 108 | - <div class="item-title">通知公告</div> | 112 | + <div class="item-title"> |
| 113 | + <div class="left">通知公告</div> | ||
| 114 | + <el-tooltip effect="dark" content="刷新" placement="top"> | ||
| 115 | + <el-link | ||
| 116 | + icon="icon-ym icon-ym-Refresh NCC-common-head-icon" | ||
| 117 | + :underline="false" | ||
| 118 | + @click="resetMsg()" | ||
| 119 | + /> | ||
| 120 | + </el-tooltip> | ||
| 121 | + </div> | ||
| 109 | <div class="item-body"> | 122 | <div class="item-body"> |
| 110 | <template> | 123 | <template> |
| 111 | - <el-table :data="todoTableData" style="width: 100%" stripe> | 124 | + <el-table :data="msgList" style="width: 100%" stripe> |
| 112 | <el-table-column | 125 | <el-table-column |
| 113 | prop="teskName" | 126 | prop="teskName" |
| 114 | label="内容" | 127 | label="内容" |
| @@ -137,33 +150,39 @@ import { | @@ -137,33 +150,39 @@ import { | ||
| 137 | areaObj, | 150 | areaObj, |
| 138 | chObj, | 151 | chObj, |
| 139 | } from "@/assets/mockdata/demodata.json"; | 152 | } from "@/assets/mockdata/demodata.json"; |
| 140 | -import { computed } from 'vue'; | 153 | +import { computed } from "vue"; |
| 141 | export default { | 154 | export default { |
| 142 | name: "Overview", | 155 | name: "Overview", |
| 143 | data() { | 156 | data() { |
| 144 | return { | 157 | return { |
| 145 | todoTableData: [], | 158 | todoTableData: [], |
| 159 | + msgList: [], | ||
| 146 | tipTableData: [], | 160 | tipTableData: [], |
| 147 | aimList: [], | 161 | aimList: [], |
| 148 | - } | 162 | + }; |
| 149 | }, | 163 | }, |
| 150 | created() { | 164 | created() { |
| 151 | - this.getTodoList(); | 165 | + this.getMsgList(); |
| 152 | this.getTipList(); | 166 | this.getTipList(); |
| 153 | this.getAimList(); | 167 | this.getAimList(); |
| 154 | }, | 168 | }, |
| 155 | computed: { | 169 | computed: { |
| 156 | isSHILevel() { | 170 | isSHILevel() { |
| 157 | // 判断角色是否为‘市级办公室’ | 171 | // 判断角色是否为‘市级办公室’ |
| 158 | - return this.$store.state.user.userInfo.organizeId == '580547494862128389'; | 172 | + return this.$store.state.user.islader; |
| 159 | }, | 173 | }, |
| 160 | }, | 174 | }, |
| 161 | methods: { | 175 | methods: { |
| 162 | - getTodoList() { | 176 | + getMsgList() { |
| 163 | for (let index = 0; index < 10; index++) { | 177 | for (let index = 0; index < 10; index++) { |
| 178 | + this.msgList.push(todoObj); | ||
| 164 | this.todoTableData.push(todoObj); | 179 | this.todoTableData.push(todoObj); |
| 165 | } | 180 | } |
| 166 | }, | 181 | }, |
| 182 | + resetMsg() { | ||
| 183 | + this.msgList = []; | ||
| 184 | + this.getMsgList(); | ||
| 185 | + }, | ||
| 167 | getTipList() { | 186 | getTipList() { |
| 168 | for (let index = 0; index < 10; index++) { | 187 | for (let index = 0; index < 10; index++) { |
| 169 | this.tipTableData.push(tipObj); | 188 | this.tipTableData.push(tipObj); |
| @@ -179,7 +198,6 @@ export default { | @@ -179,7 +198,6 @@ export default { | ||
| 179 | } | 198 | } |
| 180 | }, | 199 | }, |
| 181 | }, | 200 | }, |
| 182 | - | ||
| 183 | }; | 201 | }; |
| 184 | </script> | 202 | </script> |
| 185 | <style scoped lang="scss"> | 203 | <style scoped lang="scss"> |
| @@ -190,12 +208,12 @@ export default { | @@ -190,12 +208,12 @@ export default { | ||
| 190 | background-color: rgba(244, 244, 245, 0.38); | 208 | background-color: rgba(244, 244, 245, 0.38); |
| 191 | margin-bottom: 15px; | 209 | margin-bottom: 15px; |
| 192 | &.todo { | 210 | &.todo { |
| 193 | - height: calc(50vh - 115px); | 211 | + height: calc(100vh - 210px); |
| 194 | } | 212 | } |
| 195 | - &.earmarked { | 213 | + //&.earmarked { |
| 196 | // height: calc(50vh - 115px); | 214 | // height: calc(50vh - 115px); |
| 197 | - margin-bottom: 0; | ||
| 198 | - } | 215 | + //margin-bottom: 0; |
| 216 | + //} | ||
| 199 | // &.tip { | 217 | // &.tip { |
| 200 | // height: calc(50vh - 60px); | 218 | // height: calc(50vh - 60px); |
| 201 | // } | 219 | // } |
| @@ -204,10 +222,16 @@ export default { | @@ -204,10 +222,16 @@ export default { | ||
| 204 | margin-bottom: 0; | 222 | margin-bottom: 0; |
| 205 | } | 223 | } |
| 206 | .item-title { | 224 | .item-title { |
| 225 | + display: flex; | ||
| 226 | + justify-content: space-between; | ||
| 227 | + align-items: center; | ||
| 207 | color: rgba(255, 255, 255, 1); | 228 | color: rgba(255, 255, 255, 1); |
| 208 | font-size: 16px; | 229 | font-size: 16px; |
| 209 | line-height: 23px; | 230 | line-height: 23px; |
| 210 | padding: 10px; | 231 | padding: 10px; |
| 232 | + .el-link.el-link--default { | ||
| 233 | + color: #fff !important; | ||
| 234 | + } | ||
| 211 | } | 235 | } |
| 212 | .item-body { | 236 | .item-body { |
| 213 | height: calc(100% - 68px); | 237 | height: calc(100% - 68px); |