Merge branch 'master' of http://yun.pashanhoo.com:9090/bdc/bdcdj-web
Showing
46 changed files
with
2062 additions
and
2009 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Description: | 2 | * @Description: |
| 3 | * @Autor: renchao | 3 | * @Autor: renchao |
| 4 | * @LastEditTime: 2023-04-26 09:35:33 | 4 | * @LastEditTime: 2023-05-06 10:24:46 |
| 5 | --> | 5 | --> |
| 6 | <!DOCTYPE html> | 6 | <!DOCTYPE html> |
| 7 | <html> | 7 | <html> |
| ... | @@ -17,17 +17,21 @@ | ... | @@ -17,17 +17,21 @@ |
| 17 | <%= webpackConfig.name %> | 17 | <%= webpackConfig.name %> |
| 18 | </title> | 18 | </title> |
| 19 | </head> | 19 | </head> |
| 20 | <script> | ||
| 21 | fetch('<%= BASE_URL %>config.json') | ||
| 22 | .then(response => response.json()) | ||
| 23 | .then(config => { | ||
| 24 | window.config = config | ||
| 25 | }); | ||
| 26 | </script> | ||
| 20 | 27 | ||
| 21 | <body> | 28 | <body> |
| 22 | <div id="app"></div> | 29 | <div id="app"></div> |
| 23 | <!-- built files will be auto injected --> | ||
| 24 | </body> | 30 | </body> |
| 25 | 31 | ||
| 26 | </html> | 32 | </html> |
| 27 | <script> | 33 | <script> |
| 28 | window.baseUrl = location.origin || location.protocol + '//' + location.host | 34 | window.baseUrl = location.origin || location.protocol + '//' + location.host |
| 29 | // window.authorization = 'bearer AT-14-h4UlUGjPvgmrIgnDO-3QgMP0m4YJGQTR'; | ||
| 30 | // window.authorization = 'bearer AT-223-c-Q86EHx75m7ig3EDf-SwMWl4U0AKn0b'; | ||
| 31 | window.timeout = 5000 | 35 | window.timeout = 5000 |
| 32 | window.authorization = "bearer AT-4-MxSrO29Coe7VTazx8uuixtqqgO-hvCB6" | 36 | window.authorization = "bearer AT-4-MxSrO29Coe7VTazx8uuixtqqgO-hvCB6" |
| 33 | </script> | 37 | </script> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -4,7 +4,7 @@ | ... | @@ -4,7 +4,7 @@ |
| 4 | * @LastEditTime: 2023-04-20 09:40:17 | 4 | * @LastEditTime: 2023-04-20 09:40:17 |
| 5 | */ | 5 | */ |
| 6 | import request from '@/utils/request'; | 6 | import request from '@/utils/request'; |
| 7 | let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) | 7 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) |
| 8 | 8 | ||
| 9 | // 获取不动产权证列表 | 9 | // 获取不动产权证列表 |
| 10 | export function getBdcqzList (params) { | 10 | export function getBdcqzList (params) { | ... | ... |
| 1 | /* | 1 | /* |
| 2 | * @Description: | 2 | * @Description: |
| 3 | * @Autor: renchao | 3 | * @Autor: renchao |
| 4 | * @LastEditTime: 2023-04-20 09:40:36 | 4 | * @LastEditTime: 2023-05-06 09:15:02 |
| 5 | */ | 5 | */ |
| 6 | import request from '@/utils/request' | 6 | import request from '@/utils/request' |
| 7 | let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) | 7 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) |
| 8 | 8 | ||
| 9 | // 材料目录明细初始化 | 9 | // 材料目录明细初始化 |
| 10 | export function InitClml (data) { | 10 | export function InitClml (data) { | ... | ... |
| 1 | import request from '@/utils/request' | 1 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) |
| 2 | let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) | ||
| 3 | export function uploadUrl () { | 2 | export function uploadUrl () { |
| 4 | return process.env.VUE_APP_BASE_API + SERVER.SERVERAPI + '/file/upload' | 3 | return process.env.VUE_APP_BASE_API + SERVER.SERVERAPI + '/file/upload' |
| 5 | } | 4 | } | ... | ... |
| 1 | /* | ||
| 2 | * @Description: | ||
| 3 | * @Autor: renchao | ||
| 4 | * @LastEditTime: 2023-05-06 09:17:56 | ||
| 5 | */ | ||
| 1 | import request from '@/utils/request' | 6 | import request from '@/utils/request' |
| 2 | let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) | 7 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) |
| 3 | // 转出 | 8 | // 转出 |
| 4 | export function completeTask (data) { | 9 | export function completeTask (data) { |
| 5 | return request({ | 10 | return request({ | ... | ... |
| 1 | import request from '@/utils/request' | 1 | import request from '@/utils/request' |
| 2 | let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) | 2 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) |
| 3 | 3 | ||
| 4 | // 新增平台接口 | 4 | // 新增平台接口 |
| 5 | export function addSysInterface (data) { | 5 | export function addSysInterface (data) { | ... | ... |
| 1 | /* | ||
| 2 | * @Description: | ||
| 3 | * @Autor: renchao | ||
| 4 | * @LastEditTime: 2023-05-06 09:17:41 | ||
| 5 | */ | ||
| 1 | import request from '@/utils/request' | 6 | import request from '@/utils/request' |
| 2 | let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) | 7 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) |
| 3 | const url = SERVER.LPBSERVERAPI + '/rest/zhcx/lpcx/' | 8 | const url = SERVER.LPBSERVERAPI + '/rest/zhcx/lpcx/' |
| 4 | /* | 9 | /* |
| 5 | 楼盘查询 | 10 | 楼盘查询 |
| ... | @@ -7,7 +12,6 @@ const url = SERVER.LPBSERVERAPI + '/rest/zhcx/lpcx/' | ... | @@ -7,7 +12,6 @@ const url = SERVER.LPBSERVERAPI + '/rest/zhcx/lpcx/' |
| 7 | // 根据条件进行列表查询 | 12 | // 根据条件进行列表查询 |
| 8 | export function getLpZrz (data) { | 13 | export function getLpZrz (data) { |
| 9 | return request({ | 14 | return request({ |
| 10 | // url: SERVER.SERVERAPI + '/rest/zhcx/lpcx/getLpZrz', | ||
| 11 | url: 'service-lpb/rest/zhcx/lpcx/getLpZrz', | 15 | url: 'service-lpb/rest/zhcx/lpcx/getLpZrz', |
| 12 | method: 'post', | 16 | method: 'post', |
| 13 | data: data | 17 | data: data |
| ... | @@ -18,7 +22,6 @@ export function getLpZrz (data) { | ... | @@ -18,7 +22,6 @@ export function getLpZrz (data) { |
| 18 | export function getLpb (zrzbsm) { | 22 | export function getLpb (zrzbsm) { |
| 19 | return request({ | 23 | return request({ |
| 20 | url: url + 'getLpb?scyclx=1&zrzbsm=' + zrzbsm, | 24 | url: url + 'getLpb?scyclx=1&zrzbsm=' + zrzbsm, |
| 21 | // url: 'service-lpb/rest/zhcx/lpcx/getLpb?zrzbsm=' + zrzbsm , | ||
| 22 | method: 'get' | 25 | method: 'get' |
| 23 | }) | 26 | }) |
| 24 | } | 27 | } | ... | ... |
| 1 | import request from '@/utils/request' | 1 | import request from '@/utils/request' |
| 2 | let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) | 2 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) |
| 3 | // 获取申请查询列表 | 3 | // 获取申请查询列表 |
| 4 | export function getSqcxPage (data) { | 4 | export function getSqcxPage (data) { |
| 5 | return request({ | 5 | return request({ | ... | ... |
| 1 | import request from '@/utils/request' | 1 | import request from '@/utils/request' |
| 2 | let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) | 2 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) |
| 3 | 3 | ||
| 4 | // 上传单个文件 | 4 | // 上传单个文件 |
| 5 | export function upload (data) { | 5 | export function upload (data) { | ... | ... |
| 1 | import request from '@/utils/request' | 1 | import request from '@/utils/request' |
| 2 | let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) | 2 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) |
| 3 | |||
| 4 | // 用户首页 | 3 | // 用户首页 |
| 5 | // 获取首页通知公告列表 | 4 | // 获取首页通知公告列表 |
| 6 | export function getHomeNoticeList () { | 5 | export function getHomeNoticeList () { | ... | ... |
| ... | @@ -4,7 +4,7 @@ | ... | @@ -4,7 +4,7 @@ |
| 4 | * @LastEditTime: 2023-04-20 09:39:44 | 4 | * @LastEditTime: 2023-04-20 09:39:44 |
| 5 | */ | 5 | */ |
| 6 | import request from '@/utils/request' | 6 | import request from '@/utils/request' |
| 7 | let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) | 7 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) |
| 8 | 8 | ||
| 9 | //批量初始化 | 9 | //批量初始化 |
| 10 | export function BatchInit (data) { | 10 | export function BatchInit (data) { | ... | ... |
| 1 | import request from '@/utils/request' | 1 | import request from '@/utils/request' |
| 2 | let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) | 2 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) |
| 3 | 3 | ||
| 4 | // 初始化内容 | 4 | // 初始化内容 |
| 5 | export function Init (data) { | 5 | export function Init (data) { | ... | ... |
| 1 | import request from '@/utils/request' | 1 | import request from '@/utils/request' |
| 2 | let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) | 2 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) |
| 3 | // 初始化内容 | 3 | // 初始化内容 |
| 4 | export function Init (data) { | 4 | export function Init (data) { |
| 5 | let apiUrl = ""; | 5 | let apiUrl = ""; | ... | ... |
| 1 | import request from '@/utils/request' | 1 | import request from '@/utils/request' |
| 2 | let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) | 2 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) |
| 3 | 3 | ||
| 4 | // 初始化内容 | 4 | // 初始化内容 |
| 5 | export function Init (data) { | 5 | export function Init (data) { | ... | ... |
| 1 | import request from '@/utils/request' | 1 | import request from '@/utils/request' |
| 2 | let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) | 2 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) |
| 3 | 3 | ||
| 4 | // 初始化内容 | 4 | // 初始化内容 |
| 5 | export function Init (data) { | 5 | export function Init (data) { | ... | ... |
| 1 | import request from '@/utils/request' | 1 | import request from '@/utils/request' |
| 2 | let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) | 2 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) |
| 3 | // 初始化内容 | 3 | // 初始化内容 |
| 4 | export function Init (data) { | 4 | export function Init (data) { |
| 5 | let apiUrl = ""; | 5 | let apiUrl = ""; | ... | ... |
| 1 | import request from '@/utils/request' | 1 | import request from '@/utils/request' |
| 2 | let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) | 2 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) |
| 3 | // 初始化内容 | 3 | // 初始化内容 |
| 4 | export function Init (data) { | 4 | export function Init (data) { |
| 5 | let apiUrl = ""; | 5 | let apiUrl = ""; | ... | ... |
| 1 | import request from '@/utils/request' | 1 | import request from '@/utils/request' |
| 2 | let SERVER = JSON.parse(localStorage.getItem('ApiUrl')) | 2 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) |
| 3 | 3 | ||
| 4 | // 初始化内容 | 4 | // 初始化内容 |
| 5 | export function Init (data) { | 5 | export function Init (data) { | ... | ... |
| 1 | <!-- | ||
| 2 | * @Description: | ||
| 3 | * @Autor: renchao | ||
| 4 | * @LastEditTime: 2023-05-08 15:19:43 | ||
| 5 | --> | ||
| 1 | <template> | 6 | <template> |
| 2 | <section class="app-main"> | 7 | <section class="app-main"> |
| 3 | <transition name="fade-transform" mode="out-in"> | 8 | <transition name="fade-transform" mode="out-in"> |
| ... | @@ -6,26 +11,25 @@ | ... | @@ -6,26 +11,25 @@ |
| 6 | </section> | 11 | </section> |
| 7 | </template> | 12 | </template> |
| 8 | <script> | 13 | <script> |
| 9 | export default { | 14 | export default { |
| 10 | name: 'AppMain', | 15 | name: 'AppMain', |
| 11 | computed: { | 16 | computed: { |
| 12 | key () { | 17 | key () { |
| 13 | return this.$route.path | 18 | return this.$route.path |
| 19 | }, | ||
| 14 | }, | 20 | }, |
| 15 | }, | 21 | } |
| 16 | } | ||
| 17 | </script> | 22 | </script> |
| 18 | 23 | ||
| 19 | <style lang="scss" scoped> | 24 | <style lang="scss" scoped> |
| 20 | .hasTagsView { | 25 | .hasTagsView { |
| 21 | .app-main { | 26 | .app-main { |
| 22 | height: calc(100% - 41px); | 27 | height: calc(100% - 50px); |
| 23 | overflow-x: auto; | 28 | overflow-x: auto; |
| 24 | padding: 5px; | 29 | padding: 5px; |
| 25 | box-sizing: border-box; | 30 | box-sizing: border-box; |
| 26 | background-color: #EDF1F7; | 31 | background-color: #edf1f7; |
| 27 | box-sizing: border-box; | 32 | box-sizing: border-box; |
| 28 | 33 | } | |
| 29 | } | 34 | } |
| 30 | } | ||
| 31 | </style> | 35 | </style> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -19,278 +19,277 @@ | ... | @@ -19,278 +19,277 @@ |
| 19 | </template> | 19 | </template> |
| 20 | 20 | ||
| 21 | <script> | 21 | <script> |
| 22 | import ScrollPane from './ScrollPane' | 22 | import ScrollPane from './ScrollPane' |
| 23 | import path from 'path' | 23 | import path from 'path' |
| 24 | 24 | ||
| 25 | export default { | 25 | export default { |
| 26 | components: { ScrollPane }, | 26 | components: { ScrollPane }, |
| 27 | data () { | 27 | data () { |
| 28 | return { | 28 | return { |
| 29 | visible: false, | 29 | visible: false, |
| 30 | top: 0, | 30 | top: 0, |
| 31 | left: 0, | 31 | left: 0, |
| 32 | selectedTag: {}, | 32 | selectedTag: {}, |
| 33 | affixTags: [] | 33 | affixTags: [] |
| 34 | } | ||
| 35 | }, | ||
| 36 | computed: { | ||
| 37 | visitedViews () { | ||
| 38 | return this.$store.state.tagsView.visitedViews | ||
| 39 | }, | ||
| 40 | routes () { | ||
| 41 | return this.$store.state.permission.routes | ||
| 42 | } | ||
| 43 | }, | ||
| 44 | watch: { | ||
| 45 | $route () { | ||
| 46 | this.addTags() | ||
| 47 | this.moveToCurrentTag() | ||
| 48 | }, | ||
| 49 | visible (value) { | ||
| 50 | if (value) { | ||
| 51 | document.body.addEventListener('click', this.closeMenu) | ||
| 52 | } else { | ||
| 53 | document.body.removeEventListener('click', this.closeMenu) | ||
| 54 | } | 34 | } |
| 55 | } | ||
| 56 | }, | ||
| 57 | mounted () { | ||
| 58 | this.initTags() | ||
| 59 | this.addTags() | ||
| 60 | }, | ||
| 61 | methods: { | ||
| 62 | isActive (route) { | ||
| 63 | return route.path === this.$route.path | ||
| 64 | }, | ||
| 65 | isAffix (tag) { | ||
| 66 | return tag.meta && tag.meta.affix | ||
| 67 | }, | 35 | }, |
| 68 | filterAffixTags (routes, basePath = '/') { | 36 | computed: { |
| 69 | let tags = [] | 37 | visitedViews () { |
| 70 | routes.forEach(route => { | 38 | return this.$store.state.tagsView.visitedViews |
| 71 | if (route.meta && route.meta.affix) { | 39 | }, |
| 72 | const tagPath = path.resolve(basePath, route.path) | 40 | routes () { |
| 73 | tags.push({ | 41 | return this.$store.state.permission.routes |
| 74 | fullPath: tagPath, | 42 | } |
| 75 | path: tagPath, | ||
| 76 | name: route.name, | ||
| 77 | meta: { ...route.meta } | ||
| 78 | }) | ||
| 79 | } | ||
| 80 | if (route.children) { | ||
| 81 | const tempTags = this.filterAffixTags(route.children, route.path) | ||
| 82 | if (tempTags.length >= 1) { | ||
| 83 | tags = [...tags, ...tempTags] | ||
| 84 | } | ||
| 85 | } | ||
| 86 | }) | ||
| 87 | return tags | ||
| 88 | }, | 43 | }, |
| 89 | initTags () { | 44 | watch: { |
| 90 | const affixTags = this.affixTags = this.filterAffixTags(this.routes) | 45 | $route () { |
| 91 | for (const tag of affixTags) { | 46 | this.addTags() |
| 92 | // Must have tag name | 47 | this.moveToCurrentTag() |
| 93 | if (tag.name) { | 48 | }, |
| 94 | this.$store.dispatch('tagsView/addVisitedView', tag) | 49 | visible (value) { |
| 50 | if (value) { | ||
| 51 | document.body.addEventListener('click', this.closeMenu) | ||
| 52 | } else { | ||
| 53 | document.body.removeEventListener('click', this.closeMenu) | ||
| 95 | } | 54 | } |
| 96 | } | 55 | } |
| 97 | }, | 56 | }, |
| 98 | addTags () { | 57 | mounted () { |
| 99 | const { name } = this.$route | 58 | this.initTags() |
| 100 | if (name) { | 59 | this.addTags() |
| 101 | this.$store.dispatch('tagsView/addView', this.$route) | ||
| 102 | } | ||
| 103 | return false | ||
| 104 | }, | 60 | }, |
| 105 | moveToCurrentTag () { | 61 | methods: { |
| 106 | const tags = this.$refs.tag | 62 | isActive (route) { |
| 107 | this.$nextTick(() => { | 63 | return route.path === this.$route.path |
| 108 | for (const tag of tags) { | 64 | }, |
| 109 | if (tag.to.path === this.$route.path) { | 65 | isAffix (tag) { |
| 110 | this.$refs.scrollPane.moveToTarget(tag) | 66 | return tag.meta && tag.meta.affix |
| 111 | // when query is different then update | 67 | }, |
| 112 | if (tag.to.fullPath !== this.$route.fullPath) { | 68 | filterAffixTags (routes, basePath = '/') { |
| 113 | this.$store.dispatch('tagsView/updateVisitedView', this.$route) | 69 | let tags = [] |
| 70 | routes.forEach(route => { | ||
| 71 | if (route.meta && route.meta.affix) { | ||
| 72 | const tagPath = path.resolve(basePath, route.path) | ||
| 73 | tags.push({ | ||
| 74 | fullPath: tagPath, | ||
| 75 | path: tagPath, | ||
| 76 | name: route.name, | ||
| 77 | meta: { ...route.meta } | ||
| 78 | }) | ||
| 79 | } | ||
| 80 | if (route.children) { | ||
| 81 | const tempTags = this.filterAffixTags(route.children, route.path) | ||
| 82 | if (tempTags.length >= 1) { | ||
| 83 | tags = [...tags, ...tempTags] | ||
| 114 | } | 84 | } |
| 115 | break | 85 | } |
| 86 | }) | ||
| 87 | return tags | ||
| 88 | }, | ||
| 89 | initTags () { | ||
| 90 | const affixTags = this.affixTags = this.filterAffixTags(this.routes) | ||
| 91 | for (const tag of affixTags) { | ||
| 92 | // Must have tag name | ||
| 93 | if (tag.name) { | ||
| 94 | this.$store.dispatch('tagsView/addVisitedView', tag) | ||
| 116 | } | 95 | } |
| 117 | } | 96 | } |
| 118 | }) | 97 | }, |
| 119 | }, | 98 | addTags () { |
| 120 | refreshSelectedTag (view) { | 99 | const { name } = this.$route |
| 121 | this.$store.dispatch('tagsView/delCachedView', view).then(() => { | 100 | if (name) { |
| 122 | const { fullPath } = view | 101 | this.$store.dispatch('tagsView/addView', this.$route) |
| 102 | } | ||
| 103 | return false | ||
| 104 | }, | ||
| 105 | moveToCurrentTag () { | ||
| 106 | const tags = this.$refs.tag | ||
| 123 | this.$nextTick(() => { | 107 | this.$nextTick(() => { |
| 124 | this.$router.replace({ | 108 | for (const tag of tags) { |
| 125 | path: '/redirect' + fullPath | 109 | if (tag.to.path === this.$route.path) { |
| 110 | this.$refs.scrollPane.moveToTarget(tag) | ||
| 111 | // when query is different then update | ||
| 112 | if (tag.to.fullPath !== this.$route.fullPath) { | ||
| 113 | this.$store.dispatch('tagsView/updateVisitedView', this.$route) | ||
| 114 | } | ||
| 115 | break | ||
| 116 | } | ||
| 117 | } | ||
| 118 | }) | ||
| 119 | }, | ||
| 120 | refreshSelectedTag (view) { | ||
| 121 | this.$store.dispatch('tagsView/delCachedView', view).then(() => { | ||
| 122 | const { fullPath } = view | ||
| 123 | this.$nextTick(() => { | ||
| 124 | this.$router.replace({ | ||
| 125 | path: '/redirect' + fullPath | ||
| 126 | }) | ||
| 126 | }) | 127 | }) |
| 127 | }) | 128 | }) |
| 128 | }) | 129 | }, |
| 129 | }, | 130 | closeSelectedTag (view) { |
| 130 | closeSelectedTag (view) { | 131 | this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => { |
| 131 | this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => { | 132 | if (this.isActive(view)) { |
| 132 | if (this.isActive(view)) { | 133 | this.toLastView(visitedViews, view) |
| 134 | } | ||
| 135 | }) | ||
| 136 | }, | ||
| 137 | closeOthersTags () { | ||
| 138 | this.$router.push(this.selectedTag) | ||
| 139 | this.$store.dispatch('tagsView/delOthersViews', this.selectedTag).then(() => { | ||
| 140 | this.moveToCurrentTag() | ||
| 141 | }) | ||
| 142 | }, | ||
| 143 | closeAllTags (view) { | ||
| 144 | this.$store.dispatch('tagsView/delAllViews').then(({ visitedViews }) => { | ||
| 145 | if (this.affixTags.some(tag => tag.path === view.path)) { | ||
| 146 | return | ||
| 147 | } | ||
| 133 | this.toLastView(visitedViews, view) | 148 | this.toLastView(visitedViews, view) |
| 134 | } | 149 | }) |
| 135 | }) | 150 | }, |
| 136 | }, | 151 | toLastView (visitedViews, view) { |
| 137 | closeOthersTags () { | 152 | const latestView = visitedViews.slice(-1)[0] |
| 138 | this.$router.push(this.selectedTag) | 153 | if (latestView) { |
| 139 | this.$store.dispatch('tagsView/delOthersViews', this.selectedTag).then(() => { | 154 | this.$router.push(latestView.fullPath) |
| 140 | this.moveToCurrentTag() | ||
| 141 | }) | ||
| 142 | }, | ||
| 143 | closeAllTags (view) { | ||
| 144 | this.$store.dispatch('tagsView/delAllViews').then(({ visitedViews }) => { | ||
| 145 | if (this.affixTags.some(tag => tag.path === view.path)) { | ||
| 146 | return | ||
| 147 | } | ||
| 148 | this.toLastView(visitedViews, view) | ||
| 149 | }) | ||
| 150 | }, | ||
| 151 | toLastView (visitedViews, view) { | ||
| 152 | const latestView = visitedViews.slice(-1)[0] | ||
| 153 | if (latestView) { | ||
| 154 | this.$router.push(latestView.fullPath) | ||
| 155 | } else { | ||
| 156 | // now the default is to redirect to the home page if there is no tags-view, | ||
| 157 | // you can adjust it according to your needs. | ||
| 158 | if (view.name === 'Dashboard') { | ||
| 159 | // to reload home page | ||
| 160 | this.$router.replace({ path: '/redirect' + view.fullPath }) | ||
| 161 | } else { | 155 | } else { |
| 162 | this.$router.push('/') | 156 | // now the default is to redirect to the home page if there is no tags-view, |
| 157 | // you can adjust it according to your needs. | ||
| 158 | if (view.name === 'Dashboard') { | ||
| 159 | // to reload home page | ||
| 160 | this.$router.replace({ path: '/redirect' + view.fullPath }) | ||
| 161 | } else { | ||
| 162 | this.$router.push('/') | ||
| 163 | } | ||
| 163 | } | 164 | } |
| 164 | } | 165 | }, |
| 165 | }, | 166 | openMenu (tag, e) { |
| 166 | openMenu (tag, e) { | 167 | // const menuMinWidth = 105 |
| 167 | // const menuMinWidth = 105 | 168 | // const offsetLeft = this.$el.getBoundingClientRect().left // container margin left |
| 168 | // const offsetLeft = this.$el.getBoundingClientRect().left // container margin left | 169 | // const offsetWidth = this.$el.offsetWidth // container width |
| 169 | // const offsetWidth = this.$el.offsetWidth // container width | 170 | // const maxLeft = offsetWidth - menuMinWidth // left boundary |
| 170 | // const maxLeft = offsetWidth - menuMinWidth // left boundary | 171 | // const left = e.clientX - offsetLeft + 15 // 15: margin right |
| 171 | // const left = e.clientX - offsetLeft + 15 // 15: margin right | 172 | // if (left > maxLeft) { |
| 172 | // if (left > maxLeft) { | 173 | // this.left = maxLeft |
| 173 | // this.left = maxLeft | 174 | // } else { |
| 174 | // } else { | ||
| 175 | // this.left = left | 175 | // this.left = left |
| 176 | // } | 176 | // } |
| 177 | this.left = e.clientX | 177 | this.left = e.clientX |
| 178 | this.top = e.clientY | 178 | this.top = e.clientY |
| 179 | this.visible = true | 179 | this.visible = true |
| 180 | this.selectedTag = tag | 180 | this.selectedTag = tag |
| 181 | }, | 181 | }, |
| 182 | closeMenu () { | 182 | closeMenu () { |
| 183 | this.visible = false | 183 | this.visible = false |
| 184 | }, | 184 | }, |
| 185 | handleScroll () { | 185 | handleScroll () { |
| 186 | this.closeMenu() | 186 | this.closeMenu() |
| 187 | } | ||
| 187 | } | 188 | } |
| 188 | } | 189 | } |
| 189 | } | ||
| 190 | </script> | 190 | </script> |
| 191 | 191 | ||
| 192 | <style lang="scss" scoped> | 192 | <style lang="scss" scoped> |
| 193 | .tags-view-container { | 193 | .tags-view-container { |
| 194 | height: 40px; | 194 | height: 50px; |
| 195 | width: 100%; | 195 | width: 100%; |
| 196 | background: #fff; | 196 | background: #fff; |
| 197 | border-bottom: 1px solid #d8dce5; | 197 | border-bottom: 1px solid #d8dce5; |
| 198 | box-sizing: border-box; | 198 | box-sizing: border-box; |
| 199 | padding-top: 3px; | 199 | padding-top: 3px; |
| 200 | box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 3px 0 rgba(0, 0, 0, .04); | 200 | box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.12), 0 0 3px 0 rgba(0, 0, 0, 0.04); |
| 201 | 201 | ||
| 202 | .tags-view-wrapper { | 202 | .tags-view-wrapper { |
| 203 | .tags-view-item { | 203 | .tags-view-item { |
| 204 | display: inline-block; | 204 | display: inline-block; |
| 205 | position: relative; | 205 | position: relative; |
| 206 | cursor: pointer; | 206 | cursor: pointer; |
| 207 | height: 26px; | 207 | line-height: 30px; |
| 208 | line-height: 26px; | 208 | border: 1px solid #d8dce5; |
| 209 | border: 1px solid #d8dce5; | 209 | color: #495060; |
| 210 | color: #495060; | 210 | background: #fff; |
| 211 | background: #fff; | 211 | padding: 0 8px; |
| 212 | padding: 0 8px; | 212 | font-size: 12px; |
| 213 | font-size: 12px; | 213 | margin-left: 5px; |
| 214 | margin-left: 5px; | 214 | margin-top: 4px; |
| 215 | margin-top: 4px; | ||
| 216 | 215 | ||
| 217 | &:first-of-type { | 216 | &:first-of-type { |
| 218 | margin-left: 15px; | 217 | margin-left: 15px; |
| 219 | } | 218 | } |
| 220 | 219 | ||
| 221 | &:last-of-type { | 220 | &:last-of-type { |
| 222 | margin-right: 15px; | 221 | margin-right: 15px; |
| 223 | } | 222 | } |
| 224 | 223 | ||
| 225 | &.active { | 224 | &.active { |
| 226 | background-color: #0794FF; | 225 | background-color: #0794ff; |
| 227 | color: #fff; | 226 | color: #fff; |
| 228 | border-color: #0794FF; | 227 | border-color: #0794ff; |
| 229 | 228 | ||
| 230 | &::before { | 229 | &::before { |
| 231 | content: ''; | 230 | content: ""; |
| 232 | background: #fff; | 231 | background: #fff; |
| 233 | display: inline-block; | 232 | display: inline-block; |
| 234 | width: 8px; | 233 | width: 8px; |
| 235 | height: 8px; | 234 | height: 8px; |
| 236 | border-radius: 50%; | 235 | border-radius: 50%; |
| 237 | position: relative; | 236 | position: relative; |
| 238 | margin-right: 2px; | 237 | margin-right: 2px; |
| 238 | } | ||
| 239 | } | 239 | } |
| 240 | } | 240 | } |
| 241 | } | 241 | } |
| 242 | } | ||
| 243 | 242 | ||
| 244 | .contextmenu { | 243 | .contextmenu { |
| 245 | margin: 0; | ||
| 246 | background: #fff; | ||
| 247 | z-index: 3000; | ||
| 248 | position: absolute; | ||
| 249 | list-style-type: none; | ||
| 250 | padding: 5px 0; | ||
| 251 | border-radius: 4px; | ||
| 252 | font-size: 12px; | ||
| 253 | font-weight: 400; | ||
| 254 | color: #333; | ||
| 255 | box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, .3); | ||
| 256 | |||
| 257 | li { | ||
| 258 | margin: 0; | 244 | margin: 0; |
| 259 | padding: 7px 16px; | 245 | background: #fff; |
| 260 | cursor: pointer; | 246 | z-index: 3000; |
| 247 | position: absolute; | ||
| 248 | list-style-type: none; | ||
| 249 | padding: 5px 0; | ||
| 250 | border-radius: 4px; | ||
| 251 | font-size: 12px; | ||
| 252 | font-weight: 400; | ||
| 253 | color: #333; | ||
| 254 | box-shadow: 2px 2px 3px 0 rgba(0, 0, 0, 0.3); | ||
| 255 | |||
| 256 | li { | ||
| 257 | margin: 0; | ||
| 258 | padding: 7px 16px; | ||
| 259 | cursor: pointer; | ||
| 261 | 260 | ||
| 262 | &:hover { | 261 | &:hover { |
| 263 | background: #eee; | 262 | background: #eee; |
| 263 | } | ||
| 264 | } | 264 | } |
| 265 | } | 265 | } |
| 266 | } | 266 | } |
| 267 | } | ||
| 268 | </style> | 267 | </style> |
| 269 | 268 | ||
| 270 | <style lang="scss"> | 269 | <style lang="scss"> |
| 271 | //reset element css of el-icon-close | 270 | //reset element css of el-icon-close |
| 272 | .tags-view-wrapper { | 271 | .tags-view-wrapper { |
| 273 | .tags-view-item { | 272 | .tags-view-item { |
| 274 | .el-icon-close { | 273 | .el-icon-close { |
| 275 | width: 16px; | 274 | width: 16px; |
| 276 | height: 16px; | 275 | height: 16px; |
| 277 | vertical-align: 2px; | 276 | vertical-align: 2px; |
| 278 | border-radius: 50%; | 277 | border-radius: 50%; |
| 279 | text-align: center; | 278 | text-align: center; |
| 280 | transition: all .3s cubic-bezier(.645, .045, .355, 1); | 279 | transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); |
| 281 | transform-origin: 100% 50%; | 280 | transform-origin: 100% 50%; |
| 282 | 281 | ||
| 283 | &:before { | 282 | &:before { |
| 284 | transform: scale(.6); | 283 | transform: scale(0.6); |
| 285 | display: inline-block; | 284 | display: inline-block; |
| 286 | vertical-align: -3px; | 285 | vertical-align: -3px; |
| 287 | } | 286 | } |
| 288 | 287 | ||
| 289 | &:hover { | 288 | &:hover { |
| 290 | background-color: #b4bccc; | 289 | background-color: #b4bccc; |
| 291 | color: #fff; | 290 | color: #fff; |
| 291 | } | ||
| 292 | } | 292 | } |
| 293 | } | 293 | } |
| 294 | } | 294 | } |
| 295 | } | ||
| 296 | </style> | 295 | </style> | ... | ... |
| ... | @@ -109,4 +109,4 @@ export function down (index, data) { | ... | @@ -109,4 +109,4 @@ export function down (index, data) { |
| 109 | data.splice(index + 1, 1); | 109 | data.splice(index + 1, 1); |
| 110 | data.splice(index, 0, downData); | 110 | data.splice(index, 0, downData); |
| 111 | } | 111 | } |
| 112 | } | ||
| ... | \ No newline at end of file | ... | \ No newline at end of file |
| 112 | } | ... | ... |
| ... | @@ -17,8 +17,9 @@ | ... | @@ -17,8 +17,9 @@ |
| 17 | <div class="thumb-wrap"> | 17 | <div class="thumb-wrap"> |
| 18 | <div class="thumb-wrap-button"> | 18 | <div class="thumb-wrap-button"> |
| 19 | <el-button type="primary" @click="clickImage">(放大) 显示(缩小)</el-button> | 19 | <el-button type="primary" @click="clickImage">(放大) 显示(缩小)</el-button> |
| 20 | <el-upload class="fileUpdate" action="" :show-file-list="false" multiple :auto-upload="false" | 20 | <el-upload class="fileUpdate" ref="upload" action="" :show-file-list="false" :multiple="true" :auto-upload="false" |
| 21 | :on-change="handleChange" accept=".JPG, .PNG, .JPEG,.jpg, .png, .jpeg" :before-upload="beforeUpload"> | 21 | :on-change="handleChange" |
| 22 | accept=".JPG, .PNG, .JPEG,.jpg, .png, .jpeg" :before-upload="beforeUpload"> | ||
| 22 | <el-button icon="el-icon-upload" type="primary" v-if="!this.$route.query.viewtype">上传</el-button> | 23 | <el-button icon="el-icon-upload" type="primary" v-if="!this.$route.query.viewtype">上传</el-button> |
| 23 | </el-upload> | 24 | </el-upload> |
| 24 | <el-button type="primary" icon="el-icon-delete-solid" @click="handleDelete" v-if="!this.$route.query.viewtype">删除</el-button> | 25 | <el-button type="primary" icon="el-icon-delete-solid" @click="handleDelete" v-if="!this.$route.query.viewtype">删除</el-button> |
| ... | @@ -36,262 +37,273 @@ | ... | @@ -36,262 +37,273 @@ |
| 36 | </div> | 37 | </div> |
| 37 | </template> | 38 | </template> |
| 38 | <script> | 39 | <script> |
| 39 | import PhotoZoom from '@/components/PhotoZoom' | 40 | import PhotoZoom from '@/components/PhotoZoom' |
| 40 | import { uploadSjClmx, deleteClmx } from "@/api/clxx.js"; | 41 | import { uploadSjClmx, deleteClmx } from "@/api/clxx.js"; |
| 41 | import publicPicture from '@/components/publicPicture/index.vue' | 42 | import publicPicture from '@/components/publicPicture/index.vue' |
| 42 | export default { | 43 | export default { |
| 43 | name: 'PreviewImage', | 44 | name: 'PreviewImage', |
| 44 | props: { | 45 | props: { |
| 45 | previewImg: { | 46 | previewImg: { |
| 46 | type: Object, | 47 | type: Object, |
| 47 | default: () => { } | 48 | default: () => { } |
| 48 | } | ||
| 49 | }, | ||
| 50 | components: { | ||
| 51 | PhotoZoom, | ||
| 52 | publicPicture | ||
| 53 | }, | ||
| 54 | data () { | ||
| 55 | return { | ||
| 56 | transform: { | ||
| 57 | scale: 1, | ||
| 58 | degree: 0 | ||
| 59 | }, | ||
| 60 | // 缩略图 | ||
| 61 | thumbnailImages: [], | ||
| 62 | showViewer: false, | ||
| 63 | initialIndex: undefined, | ||
| 64 | allLi: [], | ||
| 65 | } | ||
| 66 | }, | ||
| 67 | watch: { | ||
| 68 | previewImg: { | ||
| 69 | handler (newValue, oldValue) { | ||
| 70 | this.allLi = _.cloneDeep(newValue.imgList).map(item => item.fjurl) | ||
| 71 | this.thumbnailImages = newValue.imgList | ||
| 72 | }, | ||
| 73 | deep: true | ||
| 74 | } | ||
| 75 | }, | ||
| 76 | created () { | ||
| 77 | this.allLi = _.cloneDeep(this.previewImg.imgList).map(item => item.fjurl) | ||
| 78 | this.thumbnailImages = this.previewImg.imgList | ||
| 79 | }, | ||
| 80 | computed: { | ||
| 81 | isFirst () { | ||
| 82 | return this.previewImg.index === 0 | ||
| 83 | }, | ||
| 84 | isLast () { | ||
| 85 | return this.previewImg.index === this.previewImg.imgList.length - 1 | ||
| 86 | } | ||
| 87 | }, | ||
| 88 | methods: { | ||
| 89 | prev () { | ||
| 90 | let len = this.previewImg.imgList.length | ||
| 91 | if (this.isFirst || len == 0) { | ||
| 92 | this.$emit('prevPriview') | ||
| 93 | } else { | ||
| 94 | this.$parent.previewImg.index = (this.$parent.previewImg.index - 1 + len) % len | ||
| 95 | } | 49 | } |
| 96 | }, | 50 | }, |
| 97 | next () { | 51 | components: { |
| 98 | let len = this.previewImg.imgList.length | 52 | PhotoZoom, |
| 99 | if (this.isLast || len == 0) { | 53 | publicPicture |
| 100 | this.$emit('nextPriview') | ||
| 101 | } else { | ||
| 102 | this.$parent.previewImg.index = (this.$parent.previewImg.index + 1) % len | ||
| 103 | } | ||
| 104 | }, | 54 | }, |
| 105 | showCurrent (index) { | 55 | data () { |
| 106 | this.previewImg.index = index | 56 | return { |
| 57 | transform: { | ||
| 58 | scale: 1, | ||
| 59 | degree: 0 | ||
| 60 | }, | ||
| 61 | maxLength: 0, | ||
| 62 | // 缩略图 | ||
| 63 | thumbnailImages: [], | ||
| 64 | showViewer: false, | ||
| 65 | initialIndex: undefined, | ||
| 66 | allLi: [], | ||
| 67 | } | ||
| 107 | }, | 68 | }, |
| 108 | closeViewer () { | 69 | watch: { |
| 109 | this.showViewer = false | 70 | previewImg: { |
| 71 | handler (newValue, oldValue) { | ||
| 72 | this.allLi = _.cloneDeep(newValue.imgList).map(item => item.fjurl) | ||
| 73 | this.thumbnailImages = newValue.imgList | ||
| 74 | }, | ||
| 75 | deep: true | ||
| 76 | } | ||
| 110 | }, | 77 | }, |
| 111 | clickImage () { | 78 | created () { |
| 112 | this.showViewer = true | 79 | this.maxLength = 0; |
| 80 | this.allLi = _.cloneDeep(this.previewImg.imgList).map(item => item.fjurl) | ||
| 81 | this.thumbnailImages = this.previewImg.imgList | ||
| 113 | }, | 82 | }, |
| 114 | // 上传 | 83 | computed: { |
| 115 | beforeUpload (file) { | 84 | isFirst () { |
| 116 | const isJPEG = file.type === 'image/jpeg' | 85 | return this.previewImg.index === 0 |
| 117 | const isPNG = file.type === 'image/png' | 86 | }, |
| 118 | const isJPG = file.type === 'image/jpg' | 87 | isLast () { |
| 119 | const isGIF = file.type === 'image/gif' | 88 | return this.previewImg.index === this.previewImg.imgList.length - 1 |
| 120 | const isLt5M = file.size / 1024 / 1024 < 5 | ||
| 121 | if (!isJPEG && !isGIF && !isPNG && !isJPG && !isGIF) { | ||
| 122 | this.$message.error('请选择jpeg/png/jpg/bmp/gif格式的图片后重试') | ||
| 123 | this.loading = false | ||
| 124 | } | ||
| 125 | if (!isLt5M) { | ||
| 126 | this.$message.error('上传图片大小不能超过 5MB!') | ||
| 127 | this.loading = false | ||
| 128 | } | 89 | } |
| 129 | this.imgHidden = (isJPG || isJPEG || isPNG || isGIF) && isLt5M | ||
| 130 | return this.imgHidden | ||
| 131 | }, | 90 | }, |
| 132 | async handleChange (file) { | 91 | methods: { |
| 133 | let data = _.cloneDeep(this.previewImg.imgList[this.previewImg.index]) | 92 | prev () { |
| 134 | var formdata = new FormData(); | 93 | let len = this.previewImg.imgList.length |
| 135 | formdata.append("file", file.raw); | 94 | if (this.isFirst || len == 0) { |
| 136 | formdata.append("bsmSj", this.previewImg.bsmSj); | 95 | this.$emit('prevPriview') |
| 137 | formdata.append("bsmSlsq", this.previewImg.bsmSlsq); | 96 | } else { |
| 138 | uploadSjClmx(formdata).then((res) => { | 97 | this.$parent.previewImg.index = (this.$parent.previewImg.index - 1 + len) % len |
| 139 | if (res.code == 200) { | ||
| 140 | this.$emit('updateList', res.result) | ||
| 141 | this.$message({ | ||
| 142 | message: '上传成功!', | ||
| 143 | type: 'success' | ||
| 144 | }) | ||
| 145 | } | 98 | } |
| 146 | }) | 99 | }, |
| 147 | }, | 100 | next () { |
| 148 | handleDelete () { | 101 | let len = this.previewImg.imgList.length |
| 149 | let that = this | 102 | if (this.isLast || len == 0) { |
| 150 | this.$confirm('此操作将永久删除, 是否继续?', '提示', { | 103 | this.$emit('nextPriview') |
| 151 | confirmButtonText: '确定', | 104 | } else { |
| 152 | cancelButtonText: '取消', | 105 | this.$parent.previewImg.index = (this.$parent.previewImg.index + 1) % len |
| 153 | type: 'warning' | 106 | } |
| 154 | }).then(async () => { | 107 | }, |
| 155 | let bsmClmx = this.previewImg.imgList[this.previewImg.index].bsmClmx | 108 | showCurrent (index) { |
| 156 | deleteClmx(bsmClmx).then(res => { | 109 | this.previewImg.index = index |
| 157 | if (res.code == 200) { | 110 | }, |
| 158 | that.$emit('updateList', res.result) | 111 | closeViewer () { |
| 159 | that.$message({ | 112 | this.showViewer = false |
| 160 | message: '删除成功!', | 113 | }, |
| 161 | type: 'success' | 114 | clickImage () { |
| 162 | }) | 115 | this.showViewer = true |
| 163 | } | 116 | }, |
| 117 | // 上传 | ||
| 118 | beforeUpload (file) { | ||
| 119 | const isJPEG = file.type === 'image/jpeg' | ||
| 120 | const isPNG = file.type === 'image/png' | ||
| 121 | const isJPG = file.type === 'image/jpg' | ||
| 122 | const isGIF = file.type === 'image/gif' | ||
| 123 | const isLt5M = file.size / 1024 / 1024 < 5 | ||
| 124 | if (!isJPEG && !isGIF && !isPNG && !isJPG && !isGIF) { | ||
| 125 | this.$message.error('请选择jpeg/png/jpg/bmp/gif格式的图片后重试') | ||
| 126 | this.loading = false | ||
| 127 | } | ||
| 128 | if (!isLt5M) { | ||
| 129 | this.$message.error('上传图片大小不能超过 5MB!') | ||
| 130 | this.loading = false | ||
| 131 | } | ||
| 132 | this.imgHidden = (isJPG || isJPEG || isPNG || isGIF) && isLt5M | ||
| 133 | return this.imgHidden | ||
| 134 | }, | ||
| 135 | async handleChange (file, files) { | ||
| 136 | // 清空 fileList 数组 | ||
| 137 | let length = files.length; | ||
| 138 | this.maxLength = Math.max(length, this.maxLength) | ||
| 139 | this.$refs.upload.clearFiles(); | ||
| 140 | setTimeout(() => { | ||
| 141 | if (length !== this.maxLength) return | ||
| 142 | console.log(files); | ||
| 143 | // let data = _.cloneDeep(this.previewImg.imgList[this.previewImg.index]) | ||
| 144 | var formData = new FormData(); | ||
| 145 | files.forEach(file => { | ||
| 146 | formData.append('file', file.raw) | ||
| 147 | }) | ||
| 148 | formData.append("bsmSj", this.previewImg.bsmSj); | ||
| 149 | formData.append("bsmSlsq", this.previewImg.bsmSlsq); | ||
| 150 | uploadSjClmx(formData).then((res) => { | ||
| 151 | if (res.code == 200) { | ||
| 152 | this.$emit('updateList', res.result) | ||
| 153 | this.$message({ | ||
| 154 | message: '上传成功!', | ||
| 155 | type: 'success' | ||
| 156 | }) | ||
| 157 | |||
| 158 | } | ||
| 159 | }) | ||
| 164 | }) | 160 | }) |
| 165 | }).catch(() => { | 161 | }, |
| 166 | this.$message({ | 162 | handleDelete () { |
| 167 | type: 'info', | 163 | let that = this |
| 168 | message: '已取消删除' | 164 | this.$confirm('此操作将永久删除, 是否继续?', '提示', { |
| 165 | confirmButtonText: '确定', | ||
| 166 | cancelButtonText: '取消', | ||
| 167 | type: 'warning' | ||
| 168 | }).then(async () => { | ||
| 169 | let bsmClmx = this.previewImg.imgList[this.previewImg.index].bsmClmx | ||
| 170 | deleteClmx(bsmClmx).then(res => { | ||
| 171 | if (res.code == 200) { | ||
| 172 | that.$emit('updateList', res.result) | ||
| 173 | that.$message({ | ||
| 174 | message: '删除成功!', | ||
| 175 | type: 'success' | ||
| 176 | }) | ||
| 177 | } | ||
| 178 | }) | ||
| 179 | }).catch(() => { | ||
| 180 | this.$message({ | ||
| 181 | type: 'info', | ||
| 182 | message: '已取消删除' | ||
| 183 | }) | ||
| 169 | }) | 184 | }) |
| 170 | }) | 185 | } |
| 171 | } | 186 | } |
| 172 | } | 187 | } |
| 173 | } | ||
| 174 | </script> | 188 | </script> |
| 175 | |||
| 176 | <style lang="scss" scoped> | 189 | <style lang="scss" scoped> |
| 177 | // 查看大图 | 190 | // 查看大图 |
| 178 | .rlPopup { | 191 | .rlPopup { |
| 179 | position: relative; | 192 | position: relative; |
| 180 | width: 100%; | 193 | width: 100%; |
| 181 | text-align: center; | ||
| 182 | height: 100%; | ||
| 183 | |||
| 184 | .handle-btn { | ||
| 185 | position: absolute; | ||
| 186 | top: 50%; | ||
| 187 | transform: translateY(-100%); | ||
| 188 | width: 66px; | ||
| 189 | height: 66px; | ||
| 190 | line-height: 75px; | ||
| 191 | color: #fff; | ||
| 192 | background-color: rgb(239, 239, 239); | ||
| 193 | border-radius: 50%; | ||
| 194 | cursor: pointer; | ||
| 195 | text-align: center; | 194 | text-align: center; |
| 196 | transition: all 0.3s; | 195 | height: 100%; |
| 197 | |||
| 198 | i { | ||
| 199 | font-size: 24px; | ||
| 200 | } | ||
| 201 | } | ||
| 202 | |||
| 203 | .handle-btn:hover { | ||
| 204 | background-color: rgb(185, 183, 183); | ||
| 205 | } | ||
| 206 | 196 | ||
| 197 | .handle-btn { | ||
| 198 | position: absolute; | ||
| 199 | top: 50%; | ||
| 200 | transform: translateY(-100%); | ||
| 201 | width: 66px; | ||
| 202 | height: 66px; | ||
| 203 | line-height: 75px; | ||
| 204 | color: #fff; | ||
| 205 | background-color: rgb(239, 239, 239); | ||
| 206 | border-radius: 50%; | ||
| 207 | cursor: pointer; | ||
| 208 | text-align: center; | ||
| 209 | transition: all 0.3s; | ||
| 207 | 210 | ||
| 208 | .prev { | 211 | i { |
| 209 | left: 1%; | 212 | font-size: 24px; |
| 210 | } | 213 | } |
| 214 | } | ||
| 211 | 215 | ||
| 212 | .next { | 216 | .handle-btn:hover { |
| 213 | right: 1%; | 217 | background-color: rgb(185, 183, 183); |
| 214 | } | 218 | } |
| 215 | 219 | ||
| 216 | .img-list-wrap { | 220 | .prev { |
| 217 | width: 100%; | 221 | left: 1%; |
| 218 | display: flex; | 222 | } |
| 219 | justify-content: center; | ||
| 220 | height: calc(100% - 80px); | ||
| 221 | align-items: center; | ||
| 222 | background: rgba(194, 190, 190, 0.1); | ||
| 223 | overflow: scroll; | ||
| 224 | 223 | ||
| 225 | img { | 224 | .next { |
| 226 | display: block; | 225 | right: 1%; |
| 227 | object-fit: scale-down; | ||
| 228 | transition: all 0.3s; | ||
| 229 | max-width: 100%; | ||
| 230 | } | 226 | } |
| 231 | } | ||
| 232 | 227 | ||
| 233 | .thumb-wrap { | 228 | .img-list-wrap { |
| 234 | &-button { | 229 | width: 100%; |
| 235 | display: flex; | 230 | display: flex; |
| 236 | justify-content: center; | 231 | justify-content: center; |
| 232 | height: calc(100% - 80px); | ||
| 233 | align-items: center; | ||
| 234 | background: rgba(194, 190, 190, 0.1); | ||
| 235 | overflow: scroll; | ||
| 237 | 236 | ||
| 238 | .fileUpdate { | 237 | img { |
| 239 | margin: 0 10px; | 238 | display: block; |
| 239 | object-fit: scale-down; | ||
| 240 | transition: all 0.3s; | ||
| 241 | max-width: 100%; | ||
| 240 | } | 242 | } |
| 241 | } | 243 | } |
| 242 | 244 | ||
| 243 | li { | 245 | .thumb-wrap { |
| 244 | float: left; | 246 | &-button { |
| 245 | width: 60px; | 247 | display: flex; |
| 246 | height: 45px; | 248 | justify-content: center; |
| 247 | border: solid 1px #ececec; | ||
| 248 | position: relative; | ||
| 249 | margin-right: 5px; | ||
| 250 | cursor: pointer; | ||
| 251 | 249 | ||
| 252 | &:last-child { | 250 | .fileUpdate { |
| 253 | margin-right: 0; | 251 | margin: 0 10px; |
| 252 | } | ||
| 254 | } | 253 | } |
| 255 | 254 | ||
| 256 | img { | 255 | li { |
| 257 | max-width: 57px; | 256 | float: left; |
| 258 | max-height: 42px; | 257 | width: 60px; |
| 259 | display: block; | 258 | height: 45px; |
| 260 | object-fit: scale-down; | 259 | border: solid 1px #ececec; |
| 261 | position: absolute; | 260 | position: relative; |
| 262 | top: 50%; | 261 | margin-right: 5px; |
| 263 | left: 50%; | 262 | cursor: pointer; |
| 264 | transform: translate(-50%, -50%); | 263 | |
| 264 | &:last-child { | ||
| 265 | margin-right: 0; | ||
| 266 | } | ||
| 267 | |||
| 268 | img { | ||
| 269 | max-width: 57px; | ||
| 270 | max-height: 42px; | ||
| 271 | display: block; | ||
| 272 | object-fit: scale-down; | ||
| 273 | position: absolute; | ||
| 274 | top: 50%; | ||
| 275 | left: 50%; | ||
| 276 | transform: translate(-50%, -50%); | ||
| 277 | } | ||
| 265 | } | 278 | } |
| 266 | } | ||
| 267 | 279 | ||
| 268 | .active { | 280 | .active { |
| 269 | border-color: #409eff; | 281 | border-color: #409eff; |
| 282 | } | ||
| 270 | } | 283 | } |
| 271 | } | 284 | } |
| 272 | } | ||
| 273 | </style> | 285 | </style> |
| 274 | <style> | 286 | <style> |
| 275 | .zoom-on-hover { | 287 | .zoom-on-hover { |
| 276 | position: relative; | 288 | position: relative; |
| 277 | overflow: hidden; | 289 | overflow: hidden; |
| 278 | } | 290 | } |
| 279 | 291 | ||
| 280 | .zoom-on-hover .normal { | 292 | .zoom-on-hover .normal { |
| 281 | width: 100%; | 293 | width: 100%; |
| 282 | } | 294 | } |
| 283 | 295 | ||
| 284 | .zoom-on-hover .zoom { | 296 | .zoom-on-hover .zoom { |
| 285 | position: absolute; | 297 | position: absolute; |
| 286 | opacity: 0; | 298 | opacity: 0; |
| 287 | transform-origin: top left; | 299 | transform-origin: top left; |
| 288 | } | 300 | } |
| 289 | 301 | ||
| 290 | .zoom-on-hover.zoomed .zoom { | 302 | .zoom-on-hover.zoomed .zoom { |
| 291 | opacity: 1; | 303 | opacity: 1; |
| 292 | } | 304 | } |
| 293 | 305 | ||
| 294 | .zoom-on-hover.zoomed .normal { | 306 | .zoom-on-hover.zoomed .normal { |
| 295 | opacity: 0; | 307 | opacity: 0; |
| 296 | } | 308 | } |
| 297 | </style> | 309 | </style> | ... | ... |
| ... | @@ -87,7 +87,7 @@ | ... | @@ -87,7 +87,7 @@ |
| 87 | </div> | 87 | </div> |
| 88 | <div id="loginTime"></div> | 88 | <div id="loginTime"></div> |
| 89 | </el-card> | 89 | </el-card> |
| 90 | <el-card class="marginTop10" shadow="hover"> | 90 | <el-card class="marginTop10" shadow="hover" style="height:60%"> |
| 91 | <div slot="header" class="flexst"> | 91 | <div slot="header" class="flexst"> |
| 92 | <h5 class="title">动态信息</h5> | 92 | <h5 class="title">动态信息</h5> |
| 93 | <i class="el-icon-s-unfold pointer"></i> | 93 | <i class="el-icon-s-unfold pointer"></i> |
| ... | @@ -104,259 +104,258 @@ | ... | @@ -104,259 +104,258 @@ |
| 104 | </div> | 104 | </div> |
| 105 | </template> | 105 | </template> |
| 106 | <script> | 106 | <script> |
| 107 | import * as G2 from '@antv/g2' | 107 | import * as G2 from '@antv/g2' |
| 108 | import vueSeamlessScroll from "vue-seamless-scroll" | 108 | import vueSeamlessScroll from "vue-seamless-scroll" |
| 109 | import { getHomeNoticeList, getHomeTodoList, getHomeDoneList, getHomeFrequentProjects } from "@/api/user.js"; | 109 | import { getHomeNoticeList, getHomeTodoList, getHomeDoneList, getHomeFrequentProjects } from "@/api/user.js"; |
| 110 | import { setReadStatus } from '@/api/system' | 110 | import { setReadStatus } from '@/api/system' |
| 111 | import addDialog from "./components/addProject.vue"; | 111 | import addDialog from "./components/addProject.vue"; |
| 112 | export default { | 112 | export default { |
| 113 | name: 'home', | 113 | name: 'home', |
| 114 | components: { vueSeamlessScroll, addDialog }, | 114 | components: { vueSeamlessScroll, addDialog }, |
| 115 | data () { | 115 | data () { |
| 116 | return { | 116 | return { |
| 117 | listData: [ | 117 | listData: [ |
| 118 | { | 118 | { |
| 119 | icon: '', | 119 | icon: '', |
| 120 | title: '任务' | 120 | title: '任务' |
| 121 | }, | 121 | }, |
| 122 | { | 122 | { |
| 123 | icon: '', | 123 | icon: '', |
| 124 | title: '邮件' | 124 | title: '邮件' |
| 125 | }, | 125 | }, |
| 126 | { | 126 | { |
| 127 | icon: '', | 127 | icon: '', |
| 128 | title: '消息' | 128 | title: '消息' |
| 129 | }, | 129 | }, |
| 130 | { | 130 | { |
| 131 | icon: '', | 131 | icon: '', |
| 132 | title: '日历' | 132 | title: '日历' |
| 133 | }, | 133 | }, |
| 134 | { | 134 | { |
| 135 | icon: '', | 135 | icon: '', |
| 136 | title: '常用功能' | 136 | title: '常用功能' |
| 137 | }, | ||
| 138 | { | ||
| 139 | icon: '', | ||
| 140 | title: '申请' | ||
| 141 | } | ||
| 142 | ], | ||
| 143 | newsListColor: ['#61AEFF', '#43DEB3', '#F3C143', '#F09936', '#9C92FF', '#589FFF',], | ||
| 144 | chartData: [{ | ||
| 145 | year: '1991', | ||
| 146 | value: 15468 | ||
| 147 | }, { | ||
| 148 | year: '1992', | ||
| 149 | value: 16100 | ||
| 150 | }, { | ||
| 151 | year: '1993', | ||
| 152 | value: 15900 | ||
| 153 | }, { | ||
| 154 | year: '1994', | ||
| 155 | value: 17409 | ||
| 156 | }, { | ||
| 157 | year: '1995', | ||
| 158 | value: 17000 | ||
| 159 | }, { | ||
| 160 | year: '1996', | ||
| 161 | value: 31056 | ||
| 162 | }, { | ||
| 163 | year: '1996', | ||
| 164 | value: 31056 | ||
| 165 | }], | ||
| 166 | // 系统通知 | ||
| 167 | noticeData: {}, | ||
| 168 | noticeList: [],//通知列表 | ||
| 169 | todoList: [],//待办列表 | ||
| 170 | doneList: [],//已办列表 | ||
| 171 | policyList: [],//法律法规列表 | ||
| 172 | projectList: [],//常办项目列表 | ||
| 173 | projectDialog: false, | ||
| 174 | moreNotice: { | ||
| 175 | fullPath: '/system/xttz/xttzview', | ||
| 176 | name: '系统通知', | ||
| 177 | path: '/system/xttz/xttzview', | ||
| 178 | meta: { title: '系统通知' } | ||
| 137 | }, | 179 | }, |
| 138 | { | 180 | } |
| 139 | icon: '', | ||
| 140 | title: '申请' | ||
| 141 | } | ||
| 142 | ], | ||
| 143 | newsListColor: ['#61AEFF', '#43DEB3', '#F3C143', '#F09936', '#9C92FF', '#589FFF',], | ||
| 144 | chartData: [{ | ||
| 145 | year: '1991', | ||
| 146 | value: 15468 | ||
| 147 | }, { | ||
| 148 | year: '1992', | ||
| 149 | value: 16100 | ||
| 150 | }, { | ||
| 151 | year: '1993', | ||
| 152 | value: 15900 | ||
| 153 | }, { | ||
| 154 | year: '1994', | ||
| 155 | value: 17409 | ||
| 156 | }, { | ||
| 157 | year: '1995', | ||
| 158 | value: 17000 | ||
| 159 | }, { | ||
| 160 | year: '1996', | ||
| 161 | value: 31056 | ||
| 162 | }, { | ||
| 163 | year: '1996', | ||
| 164 | value: 31056 | ||
| 165 | }], | ||
| 166 | // 系统通知 | ||
| 167 | noticeData: {}, | ||
| 168 | noticeList: [],//通知列表 | ||
| 169 | todoList: [],//待办列表 | ||
| 170 | doneList: [],//已办列表 | ||
| 171 | policyList: [],//法律法规列表 | ||
| 172 | projectList: [],//常办项目列表 | ||
| 173 | projectDialog: false, | ||
| 174 | moreNotice: { | ||
| 175 | fullPath: '/system/xttz/xttzview', | ||
| 176 | name: '系统通知', | ||
| 177 | path: '/system/xttz/xttzview', | ||
| 178 | meta: { title: '系统通知' } | ||
| 179 | }, | ||
| 180 | } | ||
| 181 | }, | ||
| 182 | mounted () { | ||
| 183 | this.buildChart();//构建图标 | ||
| 184 | this.loginTimeChart() | ||
| 185 | this.queryTodoList();//获取待办列表 | ||
| 186 | this.queryDoneList();//获取已办列表 | ||
| 187 | this.queryNoticeList();//获取通知、法律法规列表 | ||
| 188 | this.queryProjectList();//获取常办项目列表 | ||
| 189 | }, | ||
| 190 | methods: { | ||
| 191 | handleProject (item) { | ||
| 192 | let url = item.uri.split('/').slice(0, 3).join('/') | ||
| 193 | this.$router.push(url) | ||
| 194 | }, | ||
| 195 | handleView (pdfUrl) { | ||
| 196 | const href = pdfUrl | ||
| 197 | window.open(href, '_blank'); | ||
| 198 | }, | ||
| 199 | //获取待办事项列表 | ||
| 200 | queryTodoList () { | ||
| 201 | getHomeTodoList().then(res => { | ||
| 202 | if (res.result) { | ||
| 203 | this.todoList = res.result | ||
| 204 | } | ||
| 205 | }) | ||
| 206 | }, | ||
| 207 | //获取已办事项列表 | ||
| 208 | queryDoneList () { | ||
| 209 | getHomeDoneList().then(res => { | ||
| 210 | if (res.result) { | ||
| 211 | this.doneList = res.result | ||
| 212 | } | ||
| 213 | }) | ||
| 214 | }, | 181 | }, |
| 215 | //获取通知列表 | 182 | mounted () { |
| 216 | queryNoticeList () { | 183 | this.buildChart();//构建图标 |
| 217 | getHomeNoticeList().then(res => { | 184 | this.loginTimeChart() |
| 218 | if (res.result) { | 185 | this.queryTodoList();//获取待办列表 |
| 219 | this.noticeList = res.result.noticeList | 186 | this.queryDoneList();//获取已办列表 |
| 220 | this.noticeList.forEach(item => { | 187 | this.queryNoticeList();//获取通知、法律法规列表 |
| 221 | item.noticePublishTime = this._timedate(item.noticePublishTime) | 188 | this.queryProjectList();//获取常办项目列表 |
| 222 | }) | ||
| 223 | this.policyList = res.result.policyList | ||
| 224 | } | ||
| 225 | }) | ||
| 226 | }, | 189 | }, |
| 227 | //获取常办项目列表 | 190 | methods: { |
| 228 | queryProjectList () { | 191 | handleProject (item) { |
| 229 | getHomeFrequentProjects().then(res => { | 192 | let url = item.uri.split('/').slice(0, 3).join('/') |
| 230 | if (res.result && res.result.length > 0) { | 193 | this.$router.push(url) |
| 231 | this.projectList = res.result | 194 | }, |
| 195 | handleView (pdfUrl) { | ||
| 196 | const href = pdfUrl | ||
| 197 | window.open(href, '_blank'); | ||
| 198 | }, | ||
| 199 | //获取待办事项列表 | ||
| 200 | queryTodoList () { | ||
| 201 | getHomeTodoList().then(res => { | ||
| 202 | if (res.result) { | ||
| 203 | this.todoList = res.result | ||
| 204 | } | ||
| 205 | }) | ||
| 206 | }, | ||
| 207 | //获取已办事项列表 | ||
| 208 | queryDoneList () { | ||
| 209 | getHomeDoneList().then(res => { | ||
| 210 | if (res.result) { | ||
| 211 | this.doneList = res.result | ||
| 212 | } | ||
| 213 | }) | ||
| 214 | }, | ||
| 215 | //获取通知列表 | ||
| 216 | queryNoticeList () { | ||
| 217 | getHomeNoticeList().then(res => { | ||
| 218 | if (res.result) { | ||
| 219 | this.noticeList = res.result.noticeList | ||
| 220 | this.noticeList.forEach(item => { | ||
| 221 | item.noticePublishTime = this._timedate(item.noticePublishTime) | ||
| 222 | }) | ||
| 223 | this.policyList = res.result.policyList | ||
| 224 | } | ||
| 225 | }) | ||
| 226 | }, | ||
| 227 | //获取常办项目列表 | ||
| 228 | queryProjectList () { | ||
| 229 | getHomeFrequentProjects().then(res => { | ||
| 230 | if (res.result && res.result.length > 0) { | ||
| 231 | this.projectList = res.result | ||
| 232 | } else { | ||
| 233 | this.projectList = this.listData | ||
| 234 | } | ||
| 235 | }) | ||
| 236 | }, | ||
| 237 | _timedate (d) { | ||
| 238 | var td = new Date(); | ||
| 239 | td = new Date(td.getFullYear(), td.getMonth(), td.getDate()); | ||
| 240 | var od = new Date(d); | ||
| 241 | od = new Date(od.getFullYear(), od.getMonth(), od.getDate()); | ||
| 242 | var xc = (od - td) / 1000 / 60 / 60 / 24; | ||
| 243 | if (xc == -1) { | ||
| 244 | return "昨天"; | ||
| 245 | } else if (xc == 0) { | ||
| 246 | return "今天"; | ||
| 232 | } else { | 247 | } else { |
| 233 | this.projectList = this.listData | 248 | return d |
| 234 | } | 249 | } |
| 235 | }) | 250 | }, |
| 236 | }, | 251 | buildChart () { |
| 237 | _timedate (d) { | 252 | let height = document.getElementById("mountNodeCon").offsetHeight - 20 |
| 238 | var td = new Date(); | 253 | var chart = new G2.Chart({ |
| 239 | td = new Date(td.getFullYear(), td.getMonth(), td.getDate()); | 254 | container: 'mountNode', |
| 240 | var od = new Date(d); | 255 | height: height |
| 241 | od = new Date(od.getFullYear(), od.getMonth(), od.getDate()); | 256 | }); |
| 242 | var xc = (od - td) / 1000 / 60 / 60 / 24; | 257 | chart.source(this.chartData); |
| 243 | if (xc == -1) { | 258 | chart.scale({ |
| 244 | return "昨天"; | 259 | value: { |
| 245 | } else if (xc == 0) { | 260 | min: 10000 |
| 246 | return "今天"; | 261 | }, |
| 247 | } else { | 262 | year: { |
| 248 | return d | 263 | range: [0, 1] |
| 249 | } | ||
| 250 | }, | ||
| 251 | buildChart () { | ||
| 252 | let height = document.getElementById("mountNodeCon").offsetHeight - 20 | ||
| 253 | var chart = new G2.Chart({ | ||
| 254 | container: 'mountNode', | ||
| 255 | height: height | ||
| 256 | }); | ||
| 257 | chart.source(this.chartData); | ||
| 258 | chart.scale({ | ||
| 259 | value: { | ||
| 260 | min: 10000 | ||
| 261 | }, | ||
| 262 | year: { | ||
| 263 | range: [0, 1] | ||
| 264 | } | ||
| 265 | }); | ||
| 266 | chart.axis('value', { | ||
| 267 | label: { | ||
| 268 | formatter: function formatter (val) { | ||
| 269 | return (val / 10000).toFixed(1) + 'k'; | ||
| 270 | } | 264 | } |
| 271 | } | 265 | }); |
| 272 | }); | 266 | chart.axis('value', { |
| 273 | chart.tooltip({ | 267 | label: { |
| 274 | crosshairs: true | 268 | formatter: function formatter (val) { |
| 275 | }) | 269 | return (val / 10000).toFixed(1) + 'k'; |
| 276 | chart.forceFit(); | 270 | } |
| 277 | chart.area().position('year*value').shape('smooth'); | ||
| 278 | chart.line().position('year*value').size(2).shape('smooth'); | ||
| 279 | chart.render(); | ||
| 280 | }, | ||
| 281 | loginTimeChart () { | ||
| 282 | var data = [{ | ||
| 283 | item: '用户1', | ||
| 284 | count: 40, | ||
| 285 | percent: 0.4 | ||
| 286 | }, { | ||
| 287 | item: '用户2', | ||
| 288 | count: 21, | ||
| 289 | percent: 0.21 | ||
| 290 | }, { | ||
| 291 | item: '用户3', | ||
| 292 | count: 17, | ||
| 293 | percent: 0.17 | ||
| 294 | }] | ||
| 295 | var chart = new G2.Chart({ | ||
| 296 | container: 'loginTime', | ||
| 297 | height: 260 | ||
| 298 | }); | ||
| 299 | chart.source(data, { | ||
| 300 | percent: { | ||
| 301 | formatter: function formatter (val) { | ||
| 302 | val = val * 100 + '小时'; | ||
| 303 | return val; | ||
| 304 | } | 271 | } |
| 305 | } | 272 | }); |
| 306 | }); | 273 | chart.tooltip({ |
| 307 | chart.coord('theta'); | 274 | crosshairs: true |
| 308 | chart.tooltip({ | 275 | }) |
| 309 | showTitle: false | 276 | chart.forceFit(); |
| 310 | }); | 277 | chart.area().position('year*value').shape('smooth'); |
| 311 | chart.interval().position('percent').color('item').label('percent', { | 278 | chart.line().position('year*value').size(2).shape('smooth'); |
| 312 | offset: -40, | 279 | chart.render(); |
| 313 | textStyle: { | 280 | }, |
| 314 | textAlign: 'center', | 281 | loginTimeChart () { |
| 315 | shadowBlur: 2, | 282 | var data = [{ |
| 316 | shadowColor: 'rgba(0, 0, 0, .45)' | 283 | item: '用户1', |
| 317 | } | 284 | count: 40, |
| 318 | }).tooltip('item*percent', function (item, percent) { | 285 | percent: 0.4 |
| 319 | percent = percent * 100 + '小时'; | 286 | }, { |
| 320 | return { | 287 | item: '用户2', |
| 321 | name: item, | 288 | count: 21, |
| 322 | value: percent | 289 | percent: 0.21 |
| 323 | }; | 290 | }, { |
| 324 | }).style({ | 291 | item: '用户3', |
| 325 | lineWidth: 1, | 292 | count: 17, |
| 326 | stroke: '#fff' | 293 | percent: 0.17 |
| 327 | }); | 294 | }] |
| 328 | chart.forceFit(); | 295 | var chart = new G2.Chart({ |
| 329 | chart.render(); | 296 | container: 'loginTime', |
| 330 | }, | 297 | height: 260 |
| 331 | //跳转到更多通知列表页面 | 298 | }); |
| 332 | jumpToMoreNotice () { | 299 | chart.source(data, { |
| 333 | console.log(this.$route); | 300 | percent: { |
| 334 | }, | 301 | formatter: function formatter (val) { |
| 335 | //配置常办项目 | 302 | val = val * 100 + '小时'; |
| 336 | setFrequencyProject () { | 303 | return val; |
| 337 | this.projectDialog = true; | 304 | } |
| 338 | }, | 305 | } |
| 339 | handleNotice (item) { | 306 | }); |
| 340 | setReadStatus({ bsmNotice: item.bsmNotice }).then(res => { | 307 | chart.coord('theta'); |
| 341 | if (res.code == 200) { | 308 | chart.tooltip({ |
| 342 | this.queryNoticeList() | 309 | showTitle: false |
| 343 | } | 310 | }); |
| 344 | }) | 311 | chart.interval().position('percent').color('item').label('percent', { |
| 345 | this.$alertMes(item.noticeTitle, item.noticeContent) | 312 | offset: -40, |
| 313 | textStyle: { | ||
| 314 | textAlign: 'center', | ||
| 315 | shadowBlur: 2, | ||
| 316 | shadowColor: 'rgba(0, 0, 0, .45)' | ||
| 317 | } | ||
| 318 | }).tooltip('item*percent', function (item, percent) { | ||
| 319 | percent = percent * 100 + '小时'; | ||
| 320 | return { | ||
| 321 | name: item, | ||
| 322 | value: percent | ||
| 323 | }; | ||
| 324 | }).style({ | ||
| 325 | lineWidth: 1, | ||
| 326 | stroke: '#fff' | ||
| 327 | }); | ||
| 328 | chart.forceFit(); | ||
| 329 | chart.render(); | ||
| 330 | }, | ||
| 331 | //跳转到更多通知列表页面 | ||
| 332 | jumpToMoreNotice () { | ||
| 333 | console.log(this.$route); | ||
| 334 | }, | ||
| 335 | //配置常办项目 | ||
| 336 | setFrequencyProject () { | ||
| 337 | this.projectDialog = true; | ||
| 338 | }, | ||
| 339 | handleNotice (item) { | ||
| 340 | setReadStatus({ bsmNotice: item.bsmNotice }).then(res => { | ||
| 341 | if (res.code == 200) { | ||
| 342 | this.queryNoticeList() | ||
| 343 | } | ||
| 344 | }) | ||
| 345 | this.$alertMes(item.noticeTitle, item.noticeContent) | ||
| 346 | } | ||
| 346 | } | 347 | } |
| 347 | } | 348 | } |
| 348 | } | ||
| 349 | </script> | 349 | </script> |
| 350 | <style scoped lang="scss"> | 350 | <style scoped lang="scss"> |
| 351 | @import "~@/styles/mixin.scss"; | 351 | @import "~@/styles/mixin.scss"; |
| 352 | @import "./index.scss"; | 352 | @import "./index.scss"; |
| 353 | 353 | /deep/.el-card__header { | |
| 354 | /deep/.el-card__header { | 354 | padding: 8px 15px; |
| 355 | padding: 8px 15px | 355 | } |
| 356 | } | ||
| 357 | 356 | ||
| 358 | /deep/.el-card__body { | 357 | /deep/.el-card__body { |
| 359 | padding: 3px 10px 5px 10px; | 358 | padding: 3px 10px 5px 10px; |
| 360 | overflow: hidden; | 359 | overflow: hidden; |
| 361 | } | 360 | } |
| 362 | </style> | 361 | </style> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -39,7 +39,7 @@ | ... | @@ -39,7 +39,7 @@ |
| 39 | </tr> | 39 | </tr> |
| 40 | <tr> | 40 | <tr> |
| 41 | <td>权利设定方式</td> | 41 | <td>权利设定方式</td> |
| 42 | <td>{{ zdjbxx.qlsdfs }}</td> | 42 | <td>{{zdjbxx.qlsdfs | qlsdfs}}</td> |
| 43 | <td>容积率</td> | 43 | <td>容积率</td> |
| 44 | <td>{{ zdjbxx.rjl }}</td> | 44 | <td>{{ zdjbxx.rjl }}</td> |
| 45 | </tr> | 45 | </tr> |
| ... | @@ -122,79 +122,87 @@ | ... | @@ -122,79 +122,87 @@ |
| 122 | <td>{{ zdbhqks[0].dbr }}</td> | 122 | <td>{{ zdbhqks[0].dbr }}</td> |
| 123 | </tr> --> | 123 | </tr> --> |
| 124 | 124 | ||
| 125 | |||
| 126 | |||
| 127 | </table> | 125 | </table> |
| 128 | </div> | 126 | </div> |
| 129 | </template> | 127 | </template> |
| 130 | 128 | ||
| 131 | <script> | 129 | <script> |
| 132 | import { getZdjjxxBybdcdyid } from "@/api/registerBook.js"; | 130 | import store from '@/store/index.js' |
| 131 | import { getZdjjxxBybdcdyid } from "@/api/registerBook.js"; | ||
| 133 | 132 | ||
| 134 | export default { | 133 | export default { |
| 135 | data () { | 134 | data () { |
| 136 | return { | 135 | return { |
| 137 | bhqkColumns: [ | 136 | bhqkColumns: [ |
| 138 | { | 137 | { |
| 139 | prop: "ssywh", | 138 | prop: "ssywh", |
| 140 | label: "上手业务号", | 139 | label: "上手业务号", |
| 141 | }, | 140 | }, |
| 142 | { | 141 | { |
| 143 | prop: "zddm", | 142 | prop: "zddm", |
| 144 | label: "宗地代码", | 143 | label: "宗地代码", |
| 145 | }, | 144 | }, |
| 146 | { | 145 | { |
| 147 | prop: "bhqzddm", | 146 | prop: "bhqzddm", |
| 148 | label: "变化前宗地代码", | 147 | label: "变化前宗地代码", |
| 149 | }, | 148 | }, |
| 150 | { | 149 | { |
| 151 | prop: "bhnr", | 150 | prop: "bhnr", |
| 152 | label: "变化内容", | 151 | label: "变化内容", |
| 153 | }, | 152 | }, |
| 154 | { | 153 | { |
| 155 | prop: "bhyy", | 154 | prop: "bhyy", |
| 156 | label: "变化原因", | 155 | label: "变化原因", |
| 157 | }, | 156 | }, |
| 158 | { | 157 | { |
| 159 | prop: "djsj", | 158 | prop: "djsj", |
| 160 | label: "登记时间", | 159 | label: "登记时间", |
| 161 | }, | 160 | }, |
| 162 | { | 161 | { |
| 163 | prop: "dbr", | 162 | prop: "dbr", |
| 164 | label: "登簿人", | 163 | label: "登簿人", |
| 165 | }, | 164 | }, |
| 166 | { | 165 | { |
| 167 | prop: "fj", | 166 | prop: "fj", |
| 168 | label: "附记", | 167 | label: "附记", |
| 169 | }, | 168 | }, |
| 170 | ], | 169 | ], |
| 171 | bhqkTableWidth: 745, | 170 | bhqkTableWidth: 745, |
| 172 | zdjbxx: {}, | 171 | zdjbxx: {}, |
| 173 | zdbhqks: [], | 172 | zdbhqks: [], |
| 174 | propsParam: this.$attrs, | 173 | propsParam: this.$attrs, |
| 175 | showGroup: false, | 174 | showGroup: false, |
| 176 | bdclxList: ["", "宗地", "宗海", "自然幢", "多幢", "构筑物", "林权", "户"], | 175 | bdclxList: ["", "宗地", "宗海", "自然幢", "多幢", "构筑物", "林权", "户"], |
| 177 | }; | 176 | }; |
| 178 | }, | 177 | }, |
| 179 | created () { | 178 | filters: { |
| 180 | this.loadData(); | 179 | qlsdfs: function (value) { |
| 181 | }, | 180 | const foundItem = store.getters.dictData['A10'].find(item => item.dcode === String(value)); |
| 182 | methods: { | 181 | if (foundItem) { |
| 183 | loadData () { | 182 | console.log(foundItem.dname, 'foundItem.dname'); |
| 184 | getZdjjxxBybdcdyid({ bdcdyid: this.propsParam.bdcdyid }).then((res) => { | 183 | return foundItem.dname; |
| 185 | if (res.code === 200) { | ||
| 186 | this.zdjbxx = res.result.zdjbxx; | ||
| 187 | this.zdbhqks = res.result.zdbhqkList; | ||
| 188 | if (this.zdbhqks != null && this.zdbhqks.length > 0) { | ||
| 189 | this.showGroup = true; | ||
| 190 | } | ||
| 191 | } | 184 | } |
| 192 | }); | 185 | } |
| 186 | }, | ||
| 187 | created () { | ||
| 188 | this.loadData(); | ||
| 189 | }, | ||
| 190 | methods: { | ||
| 191 | loadData () { | ||
| 192 | getZdjjxxBybdcdyid({ bdcdyid: this.propsParam.bdcdyid }).then((res) => { | ||
| 193 | if (res.code === 200) { | ||
| 194 | this.zdjbxx = res.result.zdjbxx; | ||
| 195 | this.zdbhqks = res.result.zdbhqkList; | ||
| 196 | if (this.zdbhqks != null && this.zdbhqks.length > 0) { | ||
| 197 | this.showGroup = true; | ||
| 198 | } | ||
| 199 | } | ||
| 200 | }); | ||
| 201 | }, | ||
| 193 | }, | 202 | }, |
| 194 | }, | 203 | }; |
| 195 | }; | ||
| 196 | </script> | 204 | </script> |
| 197 | 205 | ||
| 198 | <style lang="scss" scoped> | 206 | <style lang="scss" scoped> |
| 199 | @import "~@/styles/tablecss.scss"; | 207 | @import "~@/styles/tablecss.scss"; |
| 200 | </style> | 208 | </style> | ... | ... |
| ... | @@ -36,497 +36,496 @@ | ... | @@ -36,497 +36,496 @@ |
| 36 | </div> | 36 | </div> |
| 37 | </template> | 37 | </template> |
| 38 | <script> | 38 | <script> |
| 39 | import { mapGetters } from "vuex"; | 39 | import { mapGetters } from "vuex"; |
| 40 | import clxxAddDialog from "./clxxAddDialog.vue"; | 40 | import clxxAddDialog from "./dialog/clxxAddDialog.vue"; |
| 41 | import imagePreview from '@/views/components/imagePreview.vue' | 41 | import imagePreview from '@/views/components/imagePreview.vue' |
| 42 | import {InitClml,saveClml,deleteSjClml,moveClml} from "@/api/clxx.js"; | 42 | import { InitClml, saveClml, deleteSjClml, moveClml } from "@/api/clxx.js"; |
| 43 | export default { | 43 | export default { |
| 44 | components: { clxxAddDialog, imagePreview }, | 44 | components: { clxxAddDialog, imagePreview }, |
| 45 | data () { | 45 | data () { |
| 46 | return { | 46 | return { |
| 47 | isDialog: false, | 47 | isDialog: false, |
| 48 | menuList: [ | 48 | menuList: [ |
| 49 | { | 49 | { |
| 50 | id: "1", | 50 | id: "1", |
| 51 | label: "材料目录明细", | 51 | label: "材料目录明细", |
| 52 | }, | ||
| 53 | { | ||
| 54 | id: "2", | ||
| 55 | label: "材料预览", | ||
| 56 | }, | ||
| 57 | ], | ||
| 58 | iclass: "", | ||
| 59 | // 材料目录选中 | ||
| 60 | treeCheckIndex: 0, | ||
| 61 | treeCheckId: "", | ||
| 62 | checkedId: "1", | ||
| 63 | column: [ | ||
| 64 | { | ||
| 65 | width: "50", | ||
| 66 | renderHeader: (h, scope) => { | ||
| 67 | return ( | ||
| 68 | <div> | ||
| 69 | { | ||
| 70 | this.$route.query.viewtype == 1 ? '序号' : | ||
| 71 | <i | ||
| 72 | class="el-icon-plus pointer" | ||
| 73 | onClick={() => { | ||
| 74 | this.handleAdd() | ||
| 75 | }} | ||
| 76 | ></i> | ||
| 77 | } | ||
| 78 | </div> | ||
| 79 | ) | ||
| 80 | }, | 52 | }, |
| 81 | render: (h, scope) => { | 53 | { |
| 82 | // 新建的材料,可删除 | 54 | id: "2", |
| 83 | // v-show='scope.row.sfxjcl == 1' | 55 | label: "材料预览", |
| 84 | return ( | 56 | }, |
| 85 | <div> | 57 | ], |
| 86 | { | 58 | iclass: "", |
| 87 | this.$route.query.viewtype == 1 ? <span>{scope.$index + 1}</span> : | 59 | // 材料目录选中 |
| 88 | <i | 60 | treeCheckIndex: 0, |
| 89 | class="el-icon-minus pointer" | 61 | treeCheckId: "", |
| 90 | 62 | checkedId: "1", | |
| 91 | onClick={() => { | 63 | column: [ |
| 92 | this.handleDelete(scope.$index, scope.row); | 64 | { |
| 93 | }} | 65 | width: "50", |
| 94 | ></i> | 66 | renderHeader: (h, scope) => { |
| 95 | } | ||
| 96 | </div> | ||
| 97 | ) | ||
| 98 | } | ||
| 99 | }, | ||
| 100 | { | ||
| 101 | prop: "isrequired", | ||
| 102 | label: "是否必选", | ||
| 103 | width: "50", | ||
| 104 | render: (h, scope) => { | ||
| 105 | if (scope.row.sfxjcl === "1") { | ||
| 106 | return ( | 67 | return ( |
| 107 | <div> | 68 | <div> |
| 108 | <span>可选</span> | 69 | { |
| 70 | this.$route.query.viewtype == 1 ? '序号' : | ||
| 71 | <i | ||
| 72 | class="el-icon-plus pointer" | ||
| 73 | onClick={() => { | ||
| 74 | this.handleAdd() | ||
| 75 | }} | ||
| 76 | ></i> | ||
| 77 | } | ||
| 109 | </div> | 78 | </div> |
| 110 | ); | 79 | ) |
| 111 | } | 80 | }, |
| 112 | else { | 81 | render: (h, scope) => { |
| 82 | // 新建的材料,可删除 | ||
| 83 | // v-show='scope.row.sfxjcl == 1' | ||
| 113 | return ( | 84 | return ( |
| 114 | <div> | 85 | <div> |
| 115 | <span>必选</span> | 86 | { |
| 87 | this.$route.query.viewtype == 1 ? <span>{scope.$index + 1}</span> : | ||
| 88 | <i | ||
| 89 | class="el-icon-minus pointer" | ||
| 90 | |||
| 91 | onClick={() => { | ||
| 92 | this.handleDelete(scope.$index, scope.row); | ||
| 93 | }} | ||
| 94 | ></i> | ||
| 95 | } | ||
| 116 | </div> | 96 | </div> |
| 117 | ); | 97 | ) |
| 118 | } | 98 | } |
| 119 | }, | 99 | }, |
| 120 | }, | 100 | { |
| 121 | { | 101 | prop: "isrequired", |
| 122 | prop: "sjmc", | 102 | label: "是否必选", |
| 123 | label: "材料名称", | 103 | width: "50", |
| 124 | }, | 104 | render: (h, scope) => { |
| 125 | { | 105 | if (scope.row.sfxjcl === "1") { |
| 126 | prop: "sjlx", | 106 | return ( |
| 127 | label: "材料类型", | 107 | <div> |
| 128 | width: "80", | 108 | <span>可选</span> |
| 129 | render: (h, scope) => { | 109 | </div> |
| 130 | return ( | 110 | ); |
| 131 | <div> | 111 | } |
| 132 | <span>{this.dicStatus(scope.row.sjlx, "A40")}</span> | 112 | else { |
| 133 | </div> | 113 | return ( |
| 134 | ); | 114 | <div> |
| 115 | <span>必选</span> | ||
| 116 | </div> | ||
| 117 | ); | ||
| 118 | } | ||
| 119 | }, | ||
| 120 | }, | ||
| 121 | { | ||
| 122 | prop: "sjmc", | ||
| 123 | label: "材料名称", | ||
| 135 | }, | 124 | }, |
| 136 | }, | 125 | { |
| 137 | { | 126 | prop: "sjlx", |
| 138 | prop: "sjsl", | 127 | label: "材料类型", |
| 139 | label: "份数", | 128 | width: "80", |
| 140 | width: "50" | 129 | render: (h, scope) => { |
| 141 | }, | ||
| 142 | { | ||
| 143 | prop: "smzt", | ||
| 144 | label: "扫描状态", | ||
| 145 | width: "80", | ||
| 146 | render: (h, scope) => { | ||
| 147 | if (scope.row.children.length > 0) { | ||
| 148 | return ( | 130 | return ( |
| 149 | <div> | 131 | <div> |
| 150 | <span>已扫描</span> | 132 | <span>{this.dicStatus(scope.row.sjlx, "A40")}</span> |
| 151 | </div> | 133 | </div> |
| 152 | ); | 134 | ); |
| 153 | } else { | 135 | }, |
| 136 | }, | ||
| 137 | { | ||
| 138 | prop: "sjsl", | ||
| 139 | label: "份数", | ||
| 140 | width: "50" | ||
| 141 | }, | ||
| 142 | { | ||
| 143 | prop: "smzt", | ||
| 144 | label: "扫描状态", | ||
| 145 | width: "80", | ||
| 146 | render: (h, scope) => { | ||
| 147 | if (scope.row.children.length > 0) { | ||
| 148 | return ( | ||
| 149 | <div> | ||
| 150 | <span>已扫描</span> | ||
| 151 | </div> | ||
| 152 | ); | ||
| 153 | } else { | ||
| 154 | return ( | ||
| 155 | <div> | ||
| 156 | <span>未扫描</span> | ||
| 157 | </div> | ||
| 158 | ); | ||
| 159 | } | ||
| 160 | }, | ||
| 161 | }, | ||
| 162 | { | ||
| 163 | prop: "ys", | ||
| 164 | label: "扫描页数", | ||
| 165 | width: "50" | ||
| 166 | }, | ||
| 167 | { | ||
| 168 | label: "操作", | ||
| 169 | width: "80", | ||
| 170 | render: (h, scope) => { | ||
| 154 | return ( | 171 | return ( |
| 155 | <div> | 172 | <div> |
| 156 | <span>未扫描</span> | 173 | <el-button |
| 174 | type="text" | ||
| 175 | disabled={scope.$index == 0} | ||
| 176 | onClick={() => { | ||
| 177 | this.moveUpward(scope.$index, scope.row); | ||
| 178 | }} | ||
| 179 | > | ||
| 180 | 上移 | ||
| 181 | </el-button> | ||
| 182 | <el-button | ||
| 183 | type="text" | ||
| 184 | disabled={scope.$index + 1 == this.tableData.length} | ||
| 185 | onClick={() => { | ||
| 186 | this.moveDown(scope.$index, scope.row); | ||
| 187 | }} | ||
| 188 | > | ||
| 189 | 下移 | ||
| 190 | </el-button> | ||
| 157 | </div> | 191 | </div> |
| 158 | ); | 192 | ); |
| 159 | } | 193 | }, |
| 160 | }, | 194 | }, |
| 161 | }, | 195 | ], |
| 162 | { | 196 | key: 0, |
| 163 | prop: "ys", | 197 | tableData: [], |
| 164 | label: "扫描页数", | 198 | previewImg: { |
| 165 | width: "50" | 199 | // 收件标识码 |
| 166 | }, | 200 | bsmSj: '', |
| 167 | { | 201 | bsmSlsq: this.$parent.bsmSlsq, |
| 168 | label: "操作", | 202 | index: 0, |
| 169 | width: "80", | 203 | selectedIndex: 0, |
| 170 | render: (h, scope) => { | 204 | imgList: [] |
| 171 | return ( | 205 | } |
| 172 | <div> | ||
| 173 | <el-button | ||
| 174 | type="text" | ||
| 175 | disabled={scope.$index == 0} | ||
| 176 | onClick={() => { | ||
| 177 | this.moveUpward(scope.$index, scope.row); | ||
| 178 | }} | ||
| 179 | > | ||
| 180 | 上移 | ||
| 181 | </el-button> | ||
| 182 | <el-button | ||
| 183 | type="text" | ||
| 184 | disabled={scope.$index + 1 == this.tableData.length} | ||
| 185 | onClick={() => { | ||
| 186 | this.moveDown(scope.$index, scope.row); | ||
| 187 | }} | ||
| 188 | > | ||
| 189 | 下移 | ||
| 190 | </el-button> | ||
| 191 | </div> | ||
| 192 | ); | ||
| 193 | }, | ||
| 194 | }, | ||
| 195 | ], | ||
| 196 | key: 0, | ||
| 197 | tableData: [], | ||
| 198 | previewImg: { | ||
| 199 | // 收件标识码 | ||
| 200 | bsmSj: '', | ||
| 201 | bsmSlsq: this.$parent.bsmSlsq, | ||
| 202 | index: 0, | ||
| 203 | selectedIndex: 0, | ||
| 204 | imgList: [] | ||
| 205 | } | ||
| 206 | } | ||
| 207 | }, | ||
| 208 | computed: { | ||
| 209 | ...mapGetters(["dictData"]) | ||
| 210 | }, | ||
| 211 | created () { | ||
| 212 | this.clmlInitList() | ||
| 213 | }, | ||
| 214 | methods: { | ||
| 215 | // 自动预览 | ||
| 216 | nextPriview () { | ||
| 217 | if (this.treeCheckIndex < this.tableData.length) { | ||
| 218 | this.treeCheckIndex++ | ||
| 219 | this.treeCheckId = this.tableData[this.treeCheckIndex].bsmSj | ||
| 220 | this.previewImg.index = 0 | ||
| 221 | this.previewImg.imgList = this.tableData[this.treeCheckIndex].children | ||
| 222 | this.previewImg.bsmSj = this.tableData[this.treeCheckIndex].bsmSj | ||
| 223 | } | 206 | } |
| 224 | }, | 207 | }, |
| 225 | prevPriview () { | 208 | computed: { |
| 226 | if (this.treeCheckIndex >= 1) { | 209 | ...mapGetters(["dictData"]) |
| 227 | this.treeCheckIndex-- | ||
| 228 | this.treeCheckId = this.tableData[this.treeCheckIndex].bsmSj | ||
| 229 | this.previewImg.index = this.previewImg.imgList.length | ||
| 230 | this.previewImg.imgList = this.tableData[this.treeCheckIndex].children | ||
| 231 | this.previewImg.bsmSj = this.tableData[this.treeCheckIndex].bsmSj | ||
| 232 | } | ||
| 233 | }, | 210 | }, |
| 234 | // 材料目录明细初始化 | 211 | created () { |
| 235 | clmlInitList () { | 212 | this.clmlInitList() |
| 236 | return new Promise(resolve => { | ||
| 237 | this.unitData = this.$parent.unitData; | ||
| 238 | var formdata = new FormData(); | ||
| 239 | formdata.append("bsmSldy", this.unitData[0]?.bsmSldy); | ||
| 240 | formdata.append("bsmSlsq", this.$parent.bsmSlsq); | ||
| 241 | InitClml(formdata).then((res) => { | ||
| 242 | if(res.result.code == 200){ | ||
| 243 | resolve(res.code) | ||
| 244 | if (res.result.result && res.result.result.length > 0) { | ||
| 245 | this.tableData = res.result.result; | ||
| 246 | this.treeCheckId = this.tableData[0].bsmSj; | ||
| 247 | this.title = this.tableData[0].sjmc; | ||
| 248 | this.titleYs = 1; | ||
| 249 | this.titleNum = this.tableData[0].children.length; | ||
| 250 | |||
| 251 | this.previewImg.imgList = this.tableData[0]?.children; | ||
| 252 | this.previewImg.bsmSj = this.tableData[0]?.bsmSj; | ||
| 253 | } | ||
| 254 | }else{ | ||
| 255 | this.$message.error(res.result.message) | ||
| 256 | } | ||
| 257 | }) | ||
| 258 | }) | ||
| 259 | }, | 213 | }, |
| 260 | updateList (val) { | 214 | methods: { |
| 261 | let that = this | 215 | // 自动预览 |
| 262 | if (val != null) { //删除最后一张图片时 val=null | 216 | nextPriview () { |
| 263 | this.tableData.forEach(item => { | 217 | if (this.treeCheckIndex < this.tableData.length) { |
| 264 | if (item.bsmSj === val.bsmSj) { | 218 | this.treeCheckIndex++ |
| 265 | item.children = val.children | 219 | this.treeCheckId = this.tableData[this.treeCheckIndex].bsmSj |
| 266 | } | 220 | this.previewImg.index = 0 |
| 267 | }) | 221 | this.previewImg.imgList = this.tableData[this.treeCheckIndex].children |
| 268 | this.previewImg.imgList = _.cloneDeep(val.children) | 222 | this.previewImg.bsmSj = this.tableData[this.treeCheckIndex].bsmSj |
| 269 | if (this.previewImg.index == this.previewImg.imgList.length) { | ||
| 270 | this.previewImg.index = this.previewImg.index - 1 | ||
| 271 | } | 223 | } |
| 272 | } else { | 224 | }, |
| 273 | this.previewImg.imgList = [] | 225 | prevPriview () { |
| 274 | this.tableData.forEach((item, index) => { | 226 | if (this.treeCheckIndex >= 1) { |
| 275 | if (this.treeCheckId == item.bsmSj) { | 227 | this.treeCheckIndex-- |
| 276 | item.children = [] | 228 | this.treeCheckId = this.tableData[this.treeCheckIndex].bsmSj |
| 277 | that.treeCheckIndex = index | 229 | this.previewImg.index = this.previewImg.imgList.length |
| 278 | } | 230 | this.previewImg.imgList = this.tableData[this.treeCheckIndex].children |
| 279 | }) | 231 | this.previewImg.bsmSj = this.tableData[this.treeCheckIndex].bsmSj |
| 280 | } | 232 | } |
| 233 | }, | ||
| 234 | // 材料目录明细初始化 | ||
| 235 | clmlInitList () { | ||
| 236 | return new Promise(resolve => { | ||
| 237 | this.unitData = this.$parent.unitData; | ||
| 238 | var formdata = new FormData(); | ||
| 239 | formdata.append("bsmSldy", this.unitData[0]?.bsmSldy); | ||
| 240 | formdata.append("bsmSlsq", this.$parent.bsmSlsq); | ||
| 241 | InitClml(formdata).then((res) => { | ||
| 242 | if (res.result.code == 200) { | ||
| 243 | resolve(res.code) | ||
| 244 | if (res.result.result && res.result.result.length > 0) { | ||
| 245 | this.tableData = res.result.result; | ||
| 246 | this.treeCheckId = this.tableData[0].bsmSj; | ||
| 247 | this.title = this.tableData[0].sjmc; | ||
| 248 | this.titleYs = 1; | ||
| 249 | this.titleNum = this.tableData[0].children.length; | ||
| 281 | 250 | ||
| 282 | }, | 251 | this.previewImg.imgList = this.tableData[0]?.children; |
| 283 | // 左侧菜单点击 | 252 | this.previewImg.bsmSj = this.tableData[0]?.bsmSj; |
| 284 | menuClick (item) { | 253 | } |
| 285 | this.checkedId = item.id | 254 | } else { |
| 286 | }, | 255 | this.$message.error(res.result.message) |
| 287 | // 添加材料目录 | 256 | } |
| 288 | handleAdd () { | ||
| 289 | this.isDialog = true; | ||
| 290 | }, | ||
| 291 | // 上移 | ||
| 292 | moveUpward (index, row) { | ||
| 293 | let obj = { | ||
| 294 | xh: row.xh, | ||
| 295 | bsmSlsq: row.bsmSlsq, | ||
| 296 | moveDirection: "UP", | ||
| 297 | }; | ||
| 298 | // 接口待调 | ||
| 299 | moveClml(obj).then(async (res) => { | ||
| 300 | if (res.code == 200) { | ||
| 301 | let res = await this.clmlInitList() | ||
| 302 | if (res == 200) this.$message({ | ||
| 303 | message: '上移成功', | ||
| 304 | type: 'success' | ||
| 305 | }) | 257 | }) |
| 306 | } else { | 258 | }) |
| 307 | this.$message.error(res.message); | 259 | }, |
| 308 | } | 260 | updateList (val) { |
| 309 | }) | 261 | let that = this |
| 310 | }, | 262 | if (val != null) { //删除最后一张图片时 val=null |
| 311 | // 下移 | 263 | this.tableData.forEach(item => { |
| 312 | moveDown (index, row) { | 264 | if (item.bsmSj === val.bsmSj) { |
| 313 | let obj = { | 265 | item.children = val.children |
| 314 | xh: row.xh, | 266 | } |
| 315 | bsmSlsq: row.bsmSlsq, | ||
| 316 | moveDirection: "DOWN", | ||
| 317 | } | ||
| 318 | // 接口待调 | ||
| 319 | moveClml(obj).then(async (res) => { | ||
| 320 | if (res.code == 200) { | ||
| 321 | let res = await this.clmlInitList() | ||
| 322 | if (res == 200) this.$message({ | ||
| 323 | message: '下移成功', | ||
| 324 | type: 'success' | ||
| 325 | }) | 267 | }) |
| 268 | this.previewImg.imgList = _.cloneDeep(val.children) | ||
| 269 | if (this.previewImg.index == this.previewImg.imgList.length) { | ||
| 270 | this.previewImg.index = this.previewImg.index - 1 | ||
| 271 | } | ||
| 326 | } else { | 272 | } else { |
| 327 | this.$message.error(res.message); | 273 | this.previewImg.imgList = [] |
| 328 | } | 274 | this.tableData.forEach((item, index) => { |
| 329 | }) | 275 | if (this.treeCheckId == item.bsmSj) { |
| 330 | }, | 276 | item.children = [] |
| 331 | // 新增弹窗保存 | 277 | that.treeCheckIndex = index |
| 332 | addSave (data) { | 278 | } |
| 333 | let obj = { | ||
| 334 | bsmSlsq: this.$parent.bsmSlsq, | ||
| 335 | isrequired: "1", | ||
| 336 | sjmc: data.clmc, | ||
| 337 | sjsl: 0, | ||
| 338 | smzt: '', | ||
| 339 | ys: 0, | ||
| 340 | sjlx: data.cllx, | ||
| 341 | sfxjcl: "1", // 是否必选 | ||
| 342 | }; | ||
| 343 | saveClml(obj).then(async (res) => { | ||
| 344 | if (res.code == 200) { | ||
| 345 | let res = await this.clmlInitList() | ||
| 346 | if (res == 200) this.$message({ | ||
| 347 | message: "新增成功", | ||
| 348 | type: "success", | ||
| 349 | }) | 279 | }) |
| 350 | } | 280 | } |
| 351 | }); | 281 | |
| 352 | }, | 282 | }, |
| 353 | // 材料目录删除 | 283 | // 左侧菜单点击 |
| 354 | handleDelete (index, row) { | 284 | menuClick (item) { |
| 355 | let that = this | 285 | this.checkedId = item.id |
| 356 | this.$confirm('此操作将永久删除该 是否继续?', '提示', { | 286 | }, |
| 357 | confirmButtonText: '确定', | 287 | // 添加材料目录 |
| 358 | cancelButtonText: '取消', | 288 | handleAdd () { |
| 359 | type: 'warning' | 289 | this.isDialog = true; |
| 360 | }).then(() => { | 290 | }, |
| 361 | deleteSjClml({ sjBsm: row.bsmSj }).then(async (res) => { | 291 | // 上移 |
| 292 | moveUpward (index, row) { | ||
| 293 | let obj = { | ||
| 294 | xh: row.xh, | ||
| 295 | bsmSlsq: row.bsmSlsq, | ||
| 296 | moveDirection: "UP", | ||
| 297 | }; | ||
| 298 | // 接口待调 | ||
| 299 | moveClml(obj).then(async (res) => { | ||
| 362 | if (res.code == 200) { | 300 | if (res.code == 200) { |
| 363 | let res = await that.clmlInitList() | 301 | let res = await this.clmlInitList() |
| 364 | if (res == 200) that.$message({ | 302 | if (res == 200) this.$message({ |
| 365 | message: "删除成功", | 303 | message: '上移成功', |
| 366 | type: "success", | 304 | type: 'success' |
| 367 | }) | 305 | }) |
| 306 | } else { | ||
| 307 | this.$message.error(res.message); | ||
| 368 | } | 308 | } |
| 369 | }) | 309 | }) |
| 370 | }).catch(() => { | 310 | }, |
| 371 | this.$message({ | 311 | // 下移 |
| 372 | type: 'info', | 312 | moveDown (index, row) { |
| 373 | message: '已取消删除' | 313 | let obj = { |
| 314 | xh: row.xh, | ||
| 315 | bsmSlsq: row.bsmSlsq, | ||
| 316 | moveDirection: "DOWN", | ||
| 317 | } | ||
| 318 | // 接口待调 | ||
| 319 | moveClml(obj).then(async (res) => { | ||
| 320 | if (res.code == 200) { | ||
| 321 | let res = await this.clmlInitList() | ||
| 322 | if (res == 200) this.$message({ | ||
| 323 | message: '下移成功', | ||
| 324 | type: 'success' | ||
| 325 | }) | ||
| 326 | } else { | ||
| 327 | this.$message.error(res.message); | ||
| 328 | } | ||
| 374 | }) | 329 | }) |
| 375 | }) | 330 | }, |
| 376 | }, | 331 | // 新增弹窗保存 |
| 377 | // 材料目录点击选中 | 332 | addSave (data) { |
| 378 | treeClick (item, index) { | 333 | let obj = { |
| 379 | this.previewImg.index = 0 | 334 | bsmSlsq: this.$parent.bsmSlsq, |
| 380 | this.treeCheckId = item?.bsmSj | 335 | isrequired: "1", |
| 381 | this.treeCheckIndex = index | 336 | sjmc: data.clmc, |
| 382 | this.previewImg.imgList = item?.children | 337 | sjsl: 0, |
| 383 | this.previewImg.bsmSj = item?.bsmSj | 338 | smzt: '', |
| 384 | }, | 339 | ys: 0, |
| 385 | // 小图片点击 | 340 | sjlx: data.cllx, |
| 386 | imgClick (item, index) { | 341 | sfxjcl: "1", // 是否必选 |
| 387 | this.showImg = item; | 342 | }; |
| 388 | this.titleYs = index + 1; | 343 | saveClml(obj).then(async (res) => { |
| 389 | }, | 344 | if (res.code == 200) { |
| 390 | // 字典 | 345 | let res = await this.clmlInitList() |
| 391 | dicStatus (val, code) { | 346 | if (res == 200) this.$message({ |
| 392 | let data = this.$store.getters.dictData[code], | 347 | message: "新增成功", |
| 393 | name = "暂无"; | 348 | type: "success", |
| 394 | if (data) { | 349 | }) |
| 395 | data.map((item) => { | ||
| 396 | if (item.dcode == val) { | ||
| 397 | name = item.dname; | ||
| 398 | } | 350 | } |
| 399 | }); | 351 | }); |
| 400 | return name; | 352 | }, |
| 401 | } | 353 | // 材料目录删除 |
| 354 | handleDelete (index, row) { | ||
| 355 | let that = this | ||
| 356 | this.$confirm('此操作将永久删除该 是否继续?', '提示', { | ||
| 357 | confirmButtonText: '确定', | ||
| 358 | cancelButtonText: '取消', | ||
| 359 | type: 'warning' | ||
| 360 | }).then(() => { | ||
| 361 | deleteSjClml({ sjBsm: row.bsmSj }).then(async (res) => { | ||
| 362 | if (res.code == 200) { | ||
| 363 | let res = await that.clmlInitList() | ||
| 364 | if (res == 200) that.$message({ | ||
| 365 | message: "删除成功", | ||
| 366 | type: "success", | ||
| 367 | }) | ||
| 368 | } | ||
| 369 | }) | ||
| 370 | }).catch(() => { | ||
| 371 | this.$message({ | ||
| 372 | type: 'info', | ||
| 373 | message: '已取消删除' | ||
| 374 | }) | ||
| 375 | }) | ||
| 376 | }, | ||
| 377 | // 材料目录点击选中 | ||
| 378 | treeClick (item, index) { | ||
| 379 | this.previewImg.index = 0 | ||
| 380 | this.treeCheckId = item?.bsmSj | ||
| 381 | this.treeCheckIndex = index | ||
| 382 | this.previewImg.imgList = item?.children | ||
| 383 | this.previewImg.bsmSj = item?.bsmSj | ||
| 384 | }, | ||
| 385 | // 小图片点击 | ||
| 386 | imgClick (item, index) { | ||
| 387 | this.showImg = item; | ||
| 388 | this.titleYs = index + 1; | ||
| 389 | }, | ||
| 390 | // 字典 | ||
| 391 | dicStatus (val, code) { | ||
| 392 | let data = this.$store.getters.dictData[code], | ||
| 393 | name = "暂无"; | ||
| 394 | if (data) { | ||
| 395 | data.map((item) => { | ||
| 396 | if (item.dcode == val) { | ||
| 397 | name = item.dname; | ||
| 398 | } | ||
| 399 | }); | ||
| 400 | return name; | ||
| 401 | } | ||
| 402 | }, | ||
| 402 | }, | 403 | }, |
| 403 | }, | 404 | }; |
| 404 | }; | ||
| 405 | </script> | 405 | </script> |
| 406 | <style scoped lang='scss'> | 406 | <style scoped lang='scss'> |
| 407 | @import "~@/styles/mixin.scss"; | 407 | @import "~@/styles/mixin.scss"; |
| 408 | |||
| 409 | .active { | ||
| 410 | background: $light-blue !important; | ||
| 411 | color: #fff; | ||
| 412 | } | ||
| 413 | |||
| 414 | .required { | ||
| 415 | font-size: 12px; | ||
| 416 | color: $pink; | ||
| 417 | float: left; | ||
| 418 | } | ||
| 419 | 408 | ||
| 420 | .cl_number { | 409 | .active { |
| 421 | float: right; | 410 | background: $light-blue !important; |
| 422 | } | 411 | color: #fff; |
| 423 | 412 | } | |
| 424 | .clxx { | ||
| 425 | width: 100%; | ||
| 426 | display: flex; | ||
| 427 | padding-left: 5px; | ||
| 428 | height: calc(100vh - 125px); | ||
| 429 | |||
| 430 | .left { | ||
| 431 | display: flex; | ||
| 432 | flex-direction: column; | ||
| 433 | justify-content: space-between; | ||
| 434 | 413 | ||
| 435 | .item { | 414 | .required { |
| 436 | width: 28px; | 415 | font-size: 12px; |
| 437 | height: 49%; | 416 | color: $pink; |
| 438 | @include flex-center; | 417 | float: left; |
| 439 | background-color: #E4E7ED; | 418 | } |
| 440 | border-bottom-right-radius: 10px; | ||
| 441 | padding: 5px; | ||
| 442 | cursor: pointer; | ||
| 443 | transition: all 0.3s; | ||
| 444 | 419 | ||
| 445 | &:hover { | 420 | .cl_number { |
| 446 | @extend .active; | 421 | float: right; |
| 447 | } | ||
| 448 | } | ||
| 449 | } | 422 | } |
| 450 | 423 | ||
| 451 | .right { | 424 | .clxx { |
| 452 | width: 100%; | 425 | width: 100%; |
| 453 | height: 100%; | 426 | display: flex; |
| 427 | padding-left: 5px; | ||
| 428 | height: calc(100vh - 125px); | ||
| 454 | 429 | ||
| 455 | .clmlmx-box { | 430 | .left { |
| 456 | margin: 0 auto; | 431 | display: flex; |
| 432 | flex-direction: column; | ||
| 433 | justify-content: space-between; | ||
| 457 | 434 | ||
| 458 | .title { | 435 | .item { |
| 459 | text-align: center; | 436 | width: 28px; |
| 460 | height: 60px; | 437 | height: 49%; |
| 461 | line-height: 60px; | 438 | @include flex-center; |
| 462 | border: 1px solid #dfe6ec; | 439 | background-color: #e4e7ed; |
| 463 | font-size: 20px; | 440 | border-bottom-right-radius: 10px; |
| 464 | background: #81d3f81a; | 441 | padding: 5px; |
| 465 | margin-bottom: -1px; | 442 | cursor: pointer; |
| 443 | transition: all 0.3s; | ||
| 444 | |||
| 445 | &:hover { | ||
| 446 | @extend .active; | ||
| 447 | } | ||
| 466 | } | 448 | } |
| 467 | } | 449 | } |
| 468 | 450 | ||
| 469 | .clyl-box { | 451 | .right { |
| 470 | width: 100%; | 452 | width: 100%; |
| 471 | height: 100%; | 453 | height: 100%; |
| 472 | display: flex; | ||
| 473 | |||
| 474 | .menu-tree { | ||
| 475 | width: 20%; | ||
| 476 | min-width: 160px; | ||
| 477 | height: 100%; | ||
| 478 | margin-right: 10px; | ||
| 479 | border-right: 1px dotted #d9d9d9; | ||
| 480 | padding: 0 15px; | ||
| 481 | 454 | ||
| 455 | .clmlmx-box { | ||
| 456 | margin: 0 auto; | ||
| 482 | 457 | ||
| 483 | .item { | 458 | .title { |
| 484 | line-height: 30px; | ||
| 485 | padding-top: 5px; | ||
| 486 | border-bottom: 1px solid #e8e8e8; | ||
| 487 | font-size: 16px; | ||
| 488 | text-align: center; | 459 | text-align: center; |
| 489 | color: $light-blue; | 460 | height: 60px; |
| 461 | line-height: 60px; | ||
| 462 | border: 1px solid #dfe6ec; | ||
| 463 | font-size: 20px; | ||
| 464 | background: #81d3f81a; | ||
| 465 | margin-bottom: -1px; | ||
| 466 | } | ||
| 467 | } | ||
| 490 | 468 | ||
| 491 | .itemIcon { | 469 | .clyl-box { |
| 492 | float: right; | 470 | width: 100%; |
| 493 | line-height: 60px; | 471 | height: 100%; |
| 494 | cursor: pointer; | 472 | display: flex; |
| 495 | } | ||
| 496 | 473 | ||
| 497 | .child { | 474 | .menu-tree { |
| 498 | line-height: 32px; | 475 | width: 20%; |
| 499 | border-bottom: 1px solid #e8e8e8; | 476 | min-width: 160px; |
| 500 | padding-left: 10px; | 477 | height: 100%; |
| 501 | color: #6b6b6b; | 478 | margin-right: 10px; |
| 502 | cursor: pointer; | 479 | border-right: 1px dotted #d9d9d9; |
| 503 | box-sizing: border-box; | 480 | padding: 0 15px; |
| 504 | border-radius: 6px; | ||
| 505 | line-height: 20px; | ||
| 506 | transition: all 0.3s; | ||
| 507 | padding: 8px 0; | ||
| 508 | } | ||
| 509 | 481 | ||
| 510 | .child:hover { | 482 | .item { |
| 483 | line-height: 30px; | ||
| 484 | padding-top: 5px; | ||
| 485 | border-bottom: 1px solid #e8e8e8; | ||
| 486 | font-size: 16px; | ||
| 487 | text-align: center; | ||
| 511 | color: $light-blue; | 488 | color: $light-blue; |
| 512 | transform: scale(1.1); | ||
| 513 | } | ||
| 514 | 489 | ||
| 515 | .checked { | 490 | .itemIcon { |
| 516 | border: 1px solid $light-blue; | 491 | float: right; |
| 517 | color: $light-blue; | 492 | line-height: 60px; |
| 493 | cursor: pointer; | ||
| 494 | } | ||
| 495 | |||
| 496 | .child { | ||
| 497 | line-height: 32px; | ||
| 498 | border-bottom: 1px solid #e8e8e8; | ||
| 499 | padding-left: 10px; | ||
| 500 | color: #6b6b6b; | ||
| 501 | cursor: pointer; | ||
| 502 | box-sizing: border-box; | ||
| 503 | border-radius: 6px; | ||
| 504 | line-height: 20px; | ||
| 505 | transition: all 0.3s; | ||
| 506 | padding: 8px 0; | ||
| 507 | } | ||
| 508 | |||
| 509 | .child:hover { | ||
| 510 | color: $light-blue; | ||
| 511 | transform: scale(1.1); | ||
| 512 | } | ||
| 513 | |||
| 514 | .checked { | ||
| 515 | border: 1px solid $light-blue; | ||
| 516 | color: $light-blue; | ||
| 517 | } | ||
| 518 | } | 518 | } |
| 519 | } | 519 | } |
| 520 | } | ||
| 521 | 520 | ||
| 522 | .clyl-img { | 521 | .clyl-img { |
| 523 | width: 75%; | 522 | width: 75%; |
| 524 | height: 100%; | 523 | height: 100%; |
| 525 | background: #f3f4f7; | 524 | background: #f3f4f7; |
| 526 | margin: 0 auto; | 525 | margin: 0 auto; |
| 527 | position: relative; | 526 | position: relative; |
| 527 | } | ||
| 528 | } | 528 | } |
| 529 | } | 529 | } |
| 530 | } | 530 | } |
| 531 | } | ||
| 532 | </style> | 531 | </style> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -4,7 +4,7 @@ | ... | @@ -4,7 +4,7 @@ |
| 4 | <!-- 材料预览 --> | 4 | <!-- 材料预览 --> |
| 5 | <div class="clyl-box"> | 5 | <div class="clyl-box"> |
| 6 | <div class="menu-tree"> | 6 | <div class="menu-tree"> |
| 7 | <el-button type="primary" native-type="submit" @click="viewDetail" style="width:100%;margin-top:10px;">查看明细</el-button> | 7 | <el-button type="primary" native-type="submit" @click="viewDetail" style="width:100%;margin-top:10px;">查看明细</el-button> |
| 8 | <div class="item"> | 8 | <div class="item"> |
| 9 | 材料目录({{tableData.length}}) | 9 | 材料目录({{tableData.length}}) |
| 10 | <div style="margin-top:10px"> | 10 | <div style="margin-top:10px"> |
| ... | @@ -24,310 +24,309 @@ | ... | @@ -24,310 +24,309 @@ |
| 24 | </div> | 24 | </div> |
| 25 | </div> | 25 | </div> |
| 26 | <clxxAddDialog v-model="isDialog" /> | 26 | <clxxAddDialog v-model="isDialog" /> |
| 27 | <clxxDetailDialog v-model="detailDialog" :data="tableData"/> | 27 | <clxxDetailDialog v-model="detailDialog" :data="tableData" /> |
| 28 | </div> | 28 | </div> |
| 29 | </template> | 29 | </template> |
| 30 | <script> | 30 | <script> |
| 31 | import { mapGetters } from "vuex"; | 31 | import { mapGetters } from "vuex"; |
| 32 | import clxxAddDialog from "./clxxAddDialog.vue"; | 32 | import clxxAddDialog from "./dialog/clxxAddDialog.vue"; |
| 33 | import clxxDetailDialog from "./clxxDetailDialog.vue"; | 33 | import clxxDetailDialog from "./clxxDetailDialog.vue"; |
| 34 | import imagePreview from '@/views/components/imagePreview.vue' | 34 | import imagePreview from '@/views/components/imagePreview.vue' |
| 35 | import {InitClml,saveClml,deleteSjClml,moveClml} from "@/api/clxx.js"; | 35 | import { InitClml, saveClml, deleteSjClml, moveClml } from "@/api/clxx.js"; |
| 36 | import { popupDialog } from "@/utils/popup.js"; | 36 | import { popupDialog } from "@/utils/popup.js"; |
| 37 | export default { | 37 | export default { |
| 38 | components: { clxxAddDialog, imagePreview,clxxDetailDialog }, | 38 | components: { clxxAddDialog, imagePreview, clxxDetailDialog }, |
| 39 | data () { | 39 | data () { |
| 40 | return { | 40 | return { |
| 41 | isDialog: false, | 41 | isDialog: false, |
| 42 | detailDialog: false, | 42 | detailDialog: false, |
| 43 | iclass: "", | 43 | iclass: "", |
| 44 | // 材料目录选中 | 44 | // 材料目录选中 |
| 45 | treeCheckIndex: 0, | 45 | treeCheckIndex: 0, |
| 46 | treeCheckId: "", | 46 | treeCheckId: "", |
| 47 | key: 0, | 47 | key: 0, |
| 48 | tableData: [], | 48 | tableData: [], |
| 49 | previewImg: { | 49 | previewImg: { |
| 50 | // 收件标识码 | 50 | // 收件标识码 |
| 51 | bsmSj: '', | 51 | bsmSj: '', |
| 52 | bsmSlsq: this.$parent.bsmSlsq, | 52 | bsmSlsq: this.$parent.bsmSlsq, |
| 53 | index: 0, | 53 | index: 0, |
| 54 | selectedIndex: 0, | 54 | selectedIndex: 0, |
| 55 | imgList: [] | 55 | imgList: [] |
| 56 | } | 56 | } |
| 57 | } | ||
| 58 | }, | ||
| 59 | computed: { | ||
| 60 | ...mapGetters(["dictData"]) | ||
| 61 | }, | ||
| 62 | created () { | ||
| 63 | this.clmlInitList(1) | ||
| 64 | }, | ||
| 65 | methods: { | ||
| 66 | // 自动预览 | ||
| 67 | nextPriview () { | ||
| 68 | if (this.treeCheckIndex < this.tableData.length) { | ||
| 69 | this.treeCheckIndex++ | ||
| 70 | this.treeCheckId = this.tableData[this.treeCheckIndex].bsmSj | ||
| 71 | this.previewImg.index = 0 | ||
| 72 | this.previewImg.imgList = this.tableData[this.treeCheckIndex].children | ||
| 73 | this.previewImg.bsmSj = this.tableData[this.treeCheckIndex].bsmSj | ||
| 74 | } | 57 | } |
| 75 | }, | 58 | }, |
| 76 | prevPriview () { | 59 | computed: { |
| 77 | if (this.treeCheckIndex >= 1) { | 60 | ...mapGetters(["dictData"]) |
| 78 | this.treeCheckIndex-- | ||
| 79 | this.treeCheckId = this.tableData[this.treeCheckIndex].bsmSj | ||
| 80 | this.previewImg.index = this.previewImg.imgList.length | ||
| 81 | this.previewImg.imgList = this.tableData[this.treeCheckIndex].children | ||
| 82 | this.previewImg.bsmSj = this.tableData[this.treeCheckIndex].bsmSj | ||
| 83 | } | ||
| 84 | }, | 61 | }, |
| 85 | // 材料目录明细初始化 | 62 | created () { |
| 86 | clmlInitList (type) { | 63 | this.clmlInitList(1) |
| 87 | //type 1:列表初始化 2:新增材料 | 64 | }, |
| 88 | return new Promise(resolve => { | 65 | methods: { |
| 89 | this.unitData = this.$parent.unitData; | 66 | // 自动预览 |
| 90 | var formdata = new FormData(); | 67 | nextPriview () { |
| 91 | formdata.append("bsmSldy", this.unitData[0]?.bsmSldy); | 68 | if (this.treeCheckIndex < this.tableData.length) { |
| 92 | formdata.append("bsmSlsq", this.$parent.bsmSlsq); | 69 | this.treeCheckIndex++ |
| 93 | InitClml(formdata).then((res) => { | 70 | this.treeCheckId = this.tableData[this.treeCheckIndex].bsmSj |
| 94 | if(res.code == 200){ | 71 | this.previewImg.index = 0 |
| 95 | resolve(res.code) | 72 | this.previewImg.imgList = this.tableData[this.treeCheckIndex].children |
| 96 | if (res.result && res.result.length > 0) { | 73 | this.previewImg.bsmSj = this.tableData[this.treeCheckIndex].bsmSj |
| 97 | this.tableData = res.result; | 74 | } |
| 98 | if(type == 1){ | 75 | }, |
| 99 | this.treeClick(this.tableData[0],0); | 76 | prevPriview () { |
| 100 | }else{ | 77 | if (this.treeCheckIndex >= 1) { |
| 101 | //新增材料后刷新列表焦点置于新增的对象上 | 78 | this.treeCheckIndex-- |
| 102 | this.treeClick(this.tableData[this.tableData.length - 1],this.tableData.length - 1); | 79 | this.treeCheckId = this.tableData[this.treeCheckIndex].bsmSj |
| 80 | this.previewImg.index = this.previewImg.imgList.length | ||
| 81 | this.previewImg.imgList = this.tableData[this.treeCheckIndex].children | ||
| 82 | this.previewImg.bsmSj = this.tableData[this.treeCheckIndex].bsmSj | ||
| 83 | } | ||
| 84 | }, | ||
| 85 | // 材料目录明细初始化 | ||
| 86 | clmlInitList (type) { | ||
| 87 | //type 1:列表初始化 2:新增材料 | ||
| 88 | return new Promise(resolve => { | ||
| 89 | this.unitData = this.$parent.unitData; | ||
| 90 | var formdata = new FormData(); | ||
| 91 | formdata.append("bsmSldy", this.unitData[0]?.bsmSldy); | ||
| 92 | formdata.append("bsmSlsq", this.$parent.bsmSlsq); | ||
| 93 | InitClml(formdata).then((res) => { | ||
| 94 | if (res.code == 200) { | ||
| 95 | resolve(res.code) | ||
| 96 | if (res.result && res.result.length > 0) { | ||
| 97 | this.tableData = res.result; | ||
| 98 | if (type == 1) { | ||
| 99 | this.treeClick(this.tableData[0], 0); | ||
| 100 | } else { | ||
| 101 | //新增材料后刷新列表焦点置于新增的对象上 | ||
| 102 | this.treeClick(this.tableData[this.tableData.length - 1], this.tableData.length - 1); | ||
| 103 | } | ||
| 103 | } | 104 | } |
| 105 | } else { | ||
| 106 | this.$message.error(res.message) | ||
| 104 | } | 107 | } |
| 105 | }else{ | 108 | }) |
| 106 | this.$message.error(res.message) | ||
| 107 | } | ||
| 108 | }) | ||
| 109 | }) | ||
| 110 | }, | ||
| 111 | setChecked(item){ | ||
| 112 | this.treeCheckId = item.bsmSj; | ||
| 113 | this.title = item.sjmc; | ||
| 114 | this.titleYs = 1; | ||
| 115 | this.titleNum = item.children.length; | ||
| 116 | this.previewImg.imgList = item.children; | ||
| 117 | this.previewImg.bsmSj = item.bsmSj; | ||
| 118 | }, | ||
| 119 | updateList (val) { | ||
| 120 | let that = this | ||
| 121 | if (val != null) { //删除最后一张图片时 val=null | ||
| 122 | this.tableData.forEach(item => { | ||
| 123 | if (item.bsmSj === val.bsmSj) { | ||
| 124 | item.children = val.children | ||
| 125 | } | ||
| 126 | }) | 109 | }) |
| 127 | this.previewImg.imgList = _.cloneDeep(val.children) | 110 | }, |
| 128 | if (this.previewImg.index == this.previewImg.imgList.length) { | 111 | setChecked (item) { |
| 129 | this.previewImg.index = this.previewImg.index - 1 | 112 | this.treeCheckId = item.bsmSj; |
| 130 | } | 113 | this.title = item.sjmc; |
| 131 | } else { | 114 | this.titleYs = 1; |
| 132 | this.previewImg.imgList = [] | 115 | this.titleNum = item.children.length; |
| 133 | this.tableData.forEach((item, index) => { | 116 | this.previewImg.imgList = item.children; |
| 134 | if (this.treeCheckId == item.bsmSj) { | 117 | this.previewImg.bsmSj = item.bsmSj; |
| 135 | item.children = [] | 118 | }, |
| 136 | that.treeCheckIndex = index | 119 | updateList (val) { |
| 120 | let that = this | ||
| 121 | if (val != null) { //删除最后一张图片时 val=null | ||
| 122 | this.tableData.forEach(item => { | ||
| 123 | if (item.bsmSj === val.bsmSj) { | ||
| 124 | item.children = val.children | ||
| 125 | } | ||
| 126 | }) | ||
| 127 | this.previewImg.imgList = _.cloneDeep(val.children) | ||
| 128 | if (this.previewImg.index == this.previewImg.imgList.length) { | ||
| 129 | this.previewImg.index = this.previewImg.index - 1 | ||
| 137 | } | 130 | } |
| 138 | }) | 131 | } else { |
| 139 | } | 132 | this.previewImg.imgList = [] |
| 140 | 133 | this.tableData.forEach((item, index) => { | |
| 141 | }, | 134 | if (this.treeCheckId == item.bsmSj) { |
| 142 | // 添加材料目录 | 135 | item.children = [] |
| 143 | handleAdd () { | 136 | that.treeCheckIndex = index |
| 144 | this.isDialog = true; | 137 | } |
| 145 | }, | ||
| 146 | // 新增弹窗保存 | ||
| 147 | addSave (data) { | ||
| 148 | let obj = { | ||
| 149 | bsmSlsq: this.$parent.bsmSlsq, | ||
| 150 | isrequired: "1", | ||
| 151 | sjmc: data.clmc, | ||
| 152 | sjsl: 0, | ||
| 153 | smzt: '', | ||
| 154 | ys: 0, | ||
| 155 | sjlx: data.cllx, | ||
| 156 | sfxjcl: "1", // 是否必选 | ||
| 157 | }; | ||
| 158 | saveClml(obj).then(async (res) => { | ||
| 159 | if (res.code == 200) { | ||
| 160 | let res = await this.clmlInitList(2) | ||
| 161 | if (res == 200) this.$message({ | ||
| 162 | message: "新增成功", | ||
| 163 | type: "success", | ||
| 164 | }) | 138 | }) |
| 165 | } | 139 | } |
| 166 | }); | 140 | |
| 167 | }, | 141 | }, |
| 168 | // 材料目录点击选中 | 142 | // 添加材料目录 |
| 169 | treeClick (item, index) { | 143 | handleAdd () { |
| 170 | this.previewImg.index = 0 | 144 | this.isDialog = true; |
| 171 | this.treeCheckId = item?.bsmSj | 145 | }, |
| 172 | this.treeCheckIndex = index | 146 | // 新增弹窗保存 |
| 173 | this.previewImg.imgList = item?.children | 147 | addSave (data) { |
| 174 | this.previewImg.bsmSj = item?.bsmSj | 148 | let obj = { |
| 175 | }, | 149 | bsmSlsq: this.$parent.bsmSlsq, |
| 176 | // 小图片点击 | 150 | isrequired: "1", |
| 177 | imgClick (item, index) { | 151 | sjmc: data.clmc, |
| 178 | this.showImg = item; | 152 | sjsl: 0, |
| 179 | this.titleYs = index + 1; | 153 | smzt: '', |
| 180 | }, | 154 | ys: 0, |
| 181 | // 字典 | 155 | sjlx: data.cllx, |
| 182 | dicStatus (val, code) { | 156 | sfxjcl: "1", // 是否必选 |
| 183 | let data = this.$store.getters.dictData[code], | 157 | }; |
| 184 | name = "暂无"; | 158 | saveClml(obj).then(async (res) => { |
| 185 | if (data) { | 159 | if (res.code == 200) { |
| 186 | data.map((item) => { | 160 | let res = await this.clmlInitList(2) |
| 187 | if (item.dcode == val) { | 161 | if (res == 200) this.$message({ |
| 188 | name = item.dname; | 162 | message: "新增成功", |
| 163 | type: "success", | ||
| 164 | }) | ||
| 189 | } | 165 | } |
| 190 | }); | 166 | }); |
| 191 | return name; | 167 | }, |
| 192 | } | 168 | // 材料目录点击选中 |
| 193 | }, | 169 | treeClick (item, index) { |
| 194 | //查看明细 | 170 | this.previewImg.index = 0 |
| 195 | viewDetail(){ | 171 | this.treeCheckId = item?.bsmSj |
| 172 | this.treeCheckIndex = index | ||
| 173 | this.previewImg.imgList = item?.children | ||
| 174 | this.previewImg.bsmSj = item?.bsmSj | ||
| 175 | }, | ||
| 176 | // 小图片点击 | ||
| 177 | imgClick (item, index) { | ||
| 178 | this.showImg = item; | ||
| 179 | this.titleYs = index + 1; | ||
| 180 | }, | ||
| 181 | // 字典 | ||
| 182 | dicStatus (val, code) { | ||
| 183 | let data = this.$store.getters.dictData[code], | ||
| 184 | name = "暂无"; | ||
| 185 | if (data) { | ||
| 186 | data.map((item) => { | ||
| 187 | if (item.dcode == val) { | ||
| 188 | name = item.dname; | ||
| 189 | } | ||
| 190 | }); | ||
| 191 | return name; | ||
| 192 | } | ||
| 193 | }, | ||
| 194 | //查看明细 | ||
| 195 | viewDetail () { | ||
| 196 | this.detailDialog = true; | 196 | this.detailDialog = true; |
| 197 | }, | 197 | }, |
| 198 | //设置tableData | 198 | //设置tableData |
| 199 | setTableData(tableData){ | 199 | setTableData (tableData) { |
| 200 | this.$nextTick(res => { | 200 | this.$nextTick(res => { |
| 201 | this.tableData = tableData; | 201 | this.tableData = tableData; |
| 202 | }) | 202 | }) |
| 203 | }, | ||
| 203 | }, | 204 | }, |
| 204 | }, | 205 | }; |
| 205 | }; | ||
| 206 | </script> | 206 | </script> |
| 207 | <style scoped lang='scss'> | 207 | <style scoped lang='scss'> |
| 208 | @import "~@/styles/mixin.scss"; | 208 | @import "~@/styles/mixin.scss"; |
| 209 | |||
| 210 | .active { | ||
| 211 | background: $light-blue !important; | ||
| 212 | color: #fff; | ||
| 213 | } | ||
| 214 | |||
| 215 | .required { | ||
| 216 | font-size: 12px; | ||
| 217 | color: $pink; | ||
| 218 | float: left; | ||
| 219 | } | ||
| 220 | 209 | ||
| 221 | .cl_number { | 210 | .active { |
| 222 | float: right; | 211 | background: $light-blue !important; |
| 223 | } | 212 | color: #fff; |
| 224 | 213 | } | |
| 225 | .clxx { | ||
| 226 | width: 100%; | ||
| 227 | display: flex; | ||
| 228 | padding-left: 5px; | ||
| 229 | height: calc(100vh - 125px); | ||
| 230 | |||
| 231 | .left { | ||
| 232 | display: flex; | ||
| 233 | flex-direction: column; | ||
| 234 | justify-content: space-between; | ||
| 235 | 214 | ||
| 236 | .item { | 215 | .required { |
| 237 | width: 28px; | 216 | font-size: 12px; |
| 238 | height: 49%; | 217 | color: $pink; |
| 239 | @include flex-center; | 218 | float: left; |
| 240 | background-color: #E4E7ED; | 219 | } |
| 241 | border-bottom-right-radius: 10px; | ||
| 242 | padding: 5px; | ||
| 243 | cursor: pointer; | ||
| 244 | transition: all 0.3s; | ||
| 245 | 220 | ||
| 246 | &:hover { | 221 | .cl_number { |
| 247 | @extend .active; | 222 | float: right; |
| 248 | } | ||
| 249 | } | ||
| 250 | } | 223 | } |
| 251 | 224 | ||
| 252 | .right { | 225 | .clxx { |
| 253 | width: 100%; | 226 | width: 100%; |
| 254 | height: 100%; | 227 | display: flex; |
| 228 | padding-left: 5px; | ||
| 229 | height: calc(100vh - 125px); | ||
| 230 | |||
| 231 | .left { | ||
| 232 | display: flex; | ||
| 233 | flex-direction: column; | ||
| 234 | justify-content: space-between; | ||
| 255 | 235 | ||
| 256 | .clmlmx-box { | 236 | .item { |
| 257 | margin: 0 auto; | 237 | width: 28px; |
| 238 | height: 49%; | ||
| 239 | @include flex-center; | ||
| 240 | background-color: #e4e7ed; | ||
| 241 | border-bottom-right-radius: 10px; | ||
| 242 | padding: 5px; | ||
| 243 | cursor: pointer; | ||
| 244 | transition: all 0.3s; | ||
| 258 | 245 | ||
| 259 | .title { | 246 | &:hover { |
| 260 | text-align: center; | 247 | @extend .active; |
| 261 | height: 60px; | 248 | } |
| 262 | line-height: 60px; | ||
| 263 | border: 1px solid #dfe6ec; | ||
| 264 | font-size: 20px; | ||
| 265 | background: #81d3f81a; | ||
| 266 | margin-bottom: -1px; | ||
| 267 | } | 249 | } |
| 268 | } | 250 | } |
| 269 | 251 | ||
| 270 | .clyl-box { | 252 | .right { |
| 271 | width: 100%; | 253 | width: 100%; |
| 272 | height: 100%; | 254 | height: 100%; |
| 273 | display: flex; | ||
| 274 | |||
| 275 | .menu-tree { | ||
| 276 | width: 20%; | ||
| 277 | min-width: 160px; | ||
| 278 | height: 100%; | ||
| 279 | margin-right: 10px; | ||
| 280 | border-right: 1px dotted #d9d9d9; | ||
| 281 | padding: 0 15px; | ||
| 282 | 255 | ||
| 256 | .clmlmx-box { | ||
| 257 | margin: 0 auto; | ||
| 283 | 258 | ||
| 284 | .item { | 259 | .title { |
| 285 | line-height: 30px; | ||
| 286 | padding-top: 5px; | ||
| 287 | border-bottom: 1px solid #e8e8e8; | ||
| 288 | font-size: 16px; | ||
| 289 | text-align: center; | 260 | text-align: center; |
| 290 | color: $light-blue; | 261 | height: 60px; |
| 262 | line-height: 60px; | ||
| 263 | border: 1px solid #dfe6ec; | ||
| 264 | font-size: 20px; | ||
| 265 | background: #81d3f81a; | ||
| 266 | margin-bottom: -1px; | ||
| 267 | } | ||
| 268 | } | ||
| 291 | 269 | ||
| 292 | .itemIcon { | 270 | .clyl-box { |
| 293 | float: right; | 271 | width: 100%; |
| 294 | line-height: 60px; | 272 | height: 100%; |
| 295 | cursor: pointer; | 273 | display: flex; |
| 296 | } | ||
| 297 | 274 | ||
| 298 | .child { | 275 | .menu-tree { |
| 299 | line-height: 32px; | 276 | width: 20%; |
| 300 | border-bottom: 1px solid #e8e8e8; | 277 | min-width: 160px; |
| 301 | padding-left: 10px; | 278 | height: 100%; |
| 302 | color: #6b6b6b; | 279 | margin-right: 10px; |
| 303 | cursor: pointer; | 280 | border-right: 1px dotted #d9d9d9; |
| 304 | box-sizing: border-box; | 281 | padding: 0 15px; |
| 305 | border-radius: 6px; | ||
| 306 | line-height: 20px; | ||
| 307 | transition: all 0.3s; | ||
| 308 | padding: 8px 0; | ||
| 309 | } | ||
| 310 | 282 | ||
| 311 | .child:hover { | 283 | .item { |
| 284 | line-height: 30px; | ||
| 285 | padding-top: 5px; | ||
| 286 | border-bottom: 1px solid #e8e8e8; | ||
| 287 | font-size: 16px; | ||
| 288 | text-align: center; | ||
| 312 | color: $light-blue; | 289 | color: $light-blue; |
| 313 | transform: scale(1.1); | ||
| 314 | } | ||
| 315 | 290 | ||
| 316 | .checked { | 291 | .itemIcon { |
| 317 | border: 1px solid $light-blue; | 292 | float: right; |
| 318 | color: $light-blue; | 293 | line-height: 60px; |
| 294 | cursor: pointer; | ||
| 295 | } | ||
| 296 | |||
| 297 | .child { | ||
| 298 | line-height: 32px; | ||
| 299 | border-bottom: 1px solid #e8e8e8; | ||
| 300 | padding-left: 10px; | ||
| 301 | color: #6b6b6b; | ||
| 302 | cursor: pointer; | ||
| 303 | box-sizing: border-box; | ||
| 304 | border-radius: 6px; | ||
| 305 | line-height: 20px; | ||
| 306 | transition: all 0.3s; | ||
| 307 | padding: 8px 0; | ||
| 308 | } | ||
| 309 | |||
| 310 | .child:hover { | ||
| 311 | color: $light-blue; | ||
| 312 | transform: scale(1.1); | ||
| 313 | } | ||
| 314 | |||
| 315 | .checked { | ||
| 316 | border: 1px solid $light-blue; | ||
| 317 | color: $light-blue; | ||
| 318 | } | ||
| 319 | } | 319 | } |
| 320 | } | 320 | } |
| 321 | } | ||
| 322 | 321 | ||
| 323 | .clyl-img { | 322 | .clyl-img { |
| 324 | width: 75%; | 323 | width: 75%; |
| 325 | height: 100%; | 324 | height: 100%; |
| 326 | background: #f3f4f7; | 325 | background: #f3f4f7; |
| 327 | margin: 0 auto; | 326 | margin: 0 auto; |
| 328 | position: relative; | 327 | position: relative; |
| 328 | } | ||
| 329 | } | 329 | } |
| 330 | } | 330 | } |
| 331 | } | 331 | } |
| 332 | } | ||
| 333 | </style> | 332 | </style> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| 1 | <!-- | ||
| 2 | * @Description: | ||
| 3 | * @Autor: renchao | ||
| 4 | * @LastEditTime: 2023-05-09 09:20:10 | ||
| 5 | --> | ||
| 1 | <template> | 6 | <template> |
| 2 | <dialogBox title="新建材料信息" width="20%" isMain v-model="myValue" @closeDialog="closeDialog" @submitForm="handleSubmit" | 7 | <dialogBox title="新建材料信息" width="20%" isMain v-model="myValue" @closeDialog="closeDialog" @submitForm="handleSubmit" |
| 3 | :isFullscreen="false"> | 8 | :isFullscreen="false"> |
| ... | @@ -24,48 +29,52 @@ | ... | @@ -24,48 +29,52 @@ |
| 24 | </template> | 29 | </template> |
| 25 | 30 | ||
| 26 | <script> | 31 | <script> |
| 27 | import { mapGetters } from "vuex"; | 32 | import { mapGetters } from "vuex"; |
| 28 | export default { | 33 | export default { |
| 29 | props: { | 34 | props: { |
| 30 | value: { type: Boolean, default: false }, | 35 | value: { type: Boolean, default: false }, |
| 31 | }, | 36 | }, |
| 32 | data () { | 37 | data () { |
| 33 | return { | 38 | return { |
| 34 | myValue: this.value, | 39 | myValue: this.value, |
| 35 | ruleForm: { | 40 | ruleForm: { |
| 36 | cllx: "", | 41 | cllx: "", |
| 37 | clmc: "", | 42 | clmc: "", |
| 38 | }, | 43 | }, |
| 39 | }; | 44 | }; |
| 40 | }, | 45 | }, |
| 41 | computed: { | 46 | computed: { |
| 42 | ...mapGetters(["dictData"]), | 47 | ...mapGetters(["dictData"]), |
| 43 | }, | ||
| 44 | watch: { | ||
| 45 | value (val) { | ||
| 46 | this.myValue = val; | ||
| 47 | }, | 48 | }, |
| 48 | }, | 49 | watch: { |
| 49 | methods: { | 50 | value (val) { |
| 50 | closeDialog () { | 51 | this.myValue = val; |
| 51 | this.$emit("input", false); | 52 | }, |
| 52 | this.ruleForm = { | ||
| 53 | cllx: "", | ||
| 54 | clmc: "", | ||
| 55 | } | ||
| 56 | }, | 53 | }, |
| 57 | handleSubmit () { | 54 | methods: { |
| 58 | this.$parent.addSave(this.ruleForm); | 55 | closeDialog () { |
| 59 | this.$emit("input", false); | 56 | this.$emit("input", false); |
| 57 | this.ruleForm = { | ||
| 58 | cllx: "", | ||
| 59 | clmc: "", | ||
| 60 | } | ||
| 61 | }, | ||
| 62 | handleSubmit () { | ||
| 63 | this.$parent.addSave(this.ruleForm); | ||
| 64 | this.ruleForm = { | ||
| 65 | cllx: "", | ||
| 66 | clmc: "", | ||
| 67 | } | ||
| 68 | this.$emit("input", false); | ||
| 69 | }, | ||
| 60 | }, | 70 | }, |
| 61 | }, | 71 | }; |
| 62 | }; | ||
| 63 | </script> | 72 | </script> |
| 64 | <style scoped lang="scss"> | 73 | <style scoped lang="scss"> |
| 65 | .submit-button { | 74 | .submit-button { |
| 66 | text-align: center; | 75 | text-align: center; |
| 67 | height: 52px; | 76 | height: 52px; |
| 68 | padding-top: 10px; | 77 | padding-top: 10px; |
| 69 | background-color: #fff; | 78 | background-color: #fff; |
| 70 | } | 79 | } |
| 71 | </style> | 80 | </style> | ... | ... |
| 1 | <template> | 1 | <template> |
| 2 | <div> | 2 | <div> |
| 3 | <lb-table :column="column" :pagination="false" :key="key" :data="tableDataList"> | 3 | <lb-table :column="column" :pagination="false" :key="key" :heightNumSetting="true" :minHeight="150" |
| 4 | :data="tableDataList"> | ||
| 4 | </lb-table> | 5 | </lb-table> |
| 5 | <addQlr v-model="dialog" :details="details" :showButton="showButton" @updateDetail="handleupdateDetail" /> | 6 | <addQlr v-model="dialog" :details="details" :showButton="showButton" @updateDetail="handleupdateDetail" /> |
| 6 | </div> | 7 | </div> | ... | ... |
| ... | @@ -44,7 +44,7 @@ | ... | @@ -44,7 +44,7 @@ |
| 44 | <el-button class="operation_button" type="text" @click="openRecordPop(item)">缮证记录</el-button> | 44 | <el-button class="operation_button" type="text" @click="openRecordPop(item)">缮证记录</el-button> |
| 45 | </div> | 45 | </div> |
| 46 | <div class="text" v-else> | 46 | <div class="text" v-else> |
| 47 | <el-button class="operation_button" type="text" @click="openZsylDialog(item, 2)">证书打印({{ item.szcs | 47 | <el-button class="operation_button" type="text" @click="openZsylDialog(item, 2)">证书打印1({{ item.szcs |
| 48 | }})</el-button> | 48 | }})</el-button> |
| 49 | <el-button class="operation_button" type="text" @click="openRecordPop(item)">缮证记录</el-button> | 49 | <el-button class="operation_button" type="text" @click="openRecordPop(item)">缮证记录</el-button> |
| 50 | </div> | 50 | </div> | ... | ... |
| ... | @@ -12,7 +12,6 @@ import { | ... | @@ -12,7 +12,6 @@ import { |
| 12 | getNextLinkInfo, | 12 | getNextLinkInfo, |
| 13 | } from "@/api/fqsq.js"; | 13 | } from "@/api/fqsq.js"; |
| 14 | import { mapGetters } from 'vuex' | 14 | import { mapGetters } from 'vuex' |
| 15 | import { log } from "bpmn-js-token-simulation"; | ||
| 16 | export default { | 15 | export default { |
| 17 | data () { | 16 | data () { |
| 18 | return { | 17 | return { |
| ... | @@ -37,7 +36,8 @@ export default { | ... | @@ -37,7 +36,8 @@ export default { |
| 37 | isRefresh: { | 36 | isRefresh: { |
| 38 | handler (newVal, oldVal) { | 37 | handler (newVal, oldVal) { |
| 39 | if (newVal) this.loadBdcdylist() | 38 | if (newVal) this.loadBdcdylist() |
| 40 | } | 39 | }, |
| 40 | immediate: true | ||
| 41 | } | 41 | } |
| 42 | }, | 42 | }, |
| 43 | mounted () { | 43 | mounted () { | ... | ... |
| ... | @@ -79,174 +79,180 @@ | ... | @@ -79,174 +79,180 @@ |
| 79 | </div> | 79 | </div> |
| 80 | </template> | 80 | </template> |
| 81 | <style scoped lang="scss"> | 81 | <style scoped lang="scss"> |
| 82 | @import "~@/styles/mixin.scss"; | 82 | @import "~@/styles/mixin.scss"; |
| 83 | @import "./workFrame.scss"; | 83 | @import "./workFrame.scss"; |
| 84 | </style> | 84 | </style> |
| 85 | <script> | 85 | <script> |
| 86 | import { mapGetters } from 'vuex' | 86 | import { mapGetters } from 'vuex' |
| 87 | import WorkFlow from "./mixin/index"; | 87 | import WorkFlow from "./mixin/index"; |
| 88 | import publicFlow from "./mixin/public.js"; | 88 | import publicFlow from "./mixin/public.js"; |
| 89 | import { getStepFormInfo } from "@/api/fqsq.js"; | 89 | import { getStepFormInfo } from "@/api/fqsq.js"; |
| 90 | import { getForm } from "./flowform"; | 90 | import { getForm } from "./flowform"; |
| 91 | import NoticeBar from "@/components/NoticeBar/index"; | 91 | import NoticeBar from "@/components/NoticeBar/index"; |
| 92 | import { deleteFlow, unClaimTask } from "@/api/ywbl.js"; | 92 | import { deleteFlow, unClaimTask } from "@/api/ywbl.js"; |
| 93 | import ProcessViewer from "./components/processViewer.vue"; | 93 | import ProcessViewer from "./components/processViewer.vue"; |
| 94 | import selectBdc from "@/views/ywbl/ywsq/selectBdc.vue"; | 94 | import selectBdc from "@/views/ywbl/ywsq/selectBdc.vue"; |
| 95 | export default { | 95 | export default { |
| 96 | components: { | 96 | components: { |
| 97 | selectBdc, | 97 | selectBdc, |
| 98 | NoticeBar, | 98 | NoticeBar, |
| 99 | ProcessViewer, | 99 | ProcessViewer, |
| 100 | }, | ||
| 101 | mixins: [WorkFlow, publicFlow], | ||
| 102 | data () { | ||
| 103 | return { | ||
| 104 | isDialog: false, | ||
| 105 | // 折叠 | ||
| 106 | isShowdrawer: true, | ||
| 107 | // 默认选中 | ||
| 108 | activeIndex: "0", | ||
| 109 | //受理申请标识码 | ||
| 110 | bsmSlsq: this.$route.query.bsmSlsq, | ||
| 111 | //当前流程所在环节 | ||
| 112 | bestepid: this.$route.query.bestepid, | ||
| 113 | //设置那个表单选中 | ||
| 114 | tabName: "", | ||
| 115 | //设置那个表单选择 | ||
| 116 | currentSelectTab: {}, | ||
| 117 | //表单集合 | ||
| 118 | tabList: [], | ||
| 119 | //选择加载哪一个组件 | ||
| 120 | componentTag: "", | ||
| 121 | //设置表单传递数据 | ||
| 122 | currentSelectProps: {}, | ||
| 123 | //材料分屏表单 | ||
| 124 | clxxForm: "", | ||
| 125 | //材料信息选择卡索引 | ||
| 126 | clxxIndex: "", | ||
| 127 | //材料信息选项卡对象 | ||
| 128 | clxxTab: {}, | ||
| 129 | //页面监听时间 | ||
| 130 | _beforeUnload_time: "", | ||
| 131 | //批量操作 | ||
| 132 | showBatch: false, | ||
| 133 | //批量操作按钮名称 | ||
| 134 | batchButtonName: "", | ||
| 135 | }; | ||
| 136 | }, | ||
| 137 | computed: { | ||
| 138 | ...mapGetters(['isRefresh']) | ||
| 139 | }, | ||
| 140 | watch: { | ||
| 141 | isRefresh: { | ||
| 142 | handler (newVal, oldVal) { | ||
| 143 | if (newVal) this.updateDialog() | ||
| 144 | } | ||
| 145 | } | ||
| 146 | }, | ||
| 147 | mounted () { | ||
| 148 | //添加页面监听事件 | ||
| 149 | window.addEventListener("beforeunload", (e) => this.beforeunloadHandler(e)); | ||
| 150 | window.addEventListener("unload", (e) => this.unloadHandler(e)); | ||
| 151 | }, | ||
| 152 | destroyed () { | ||
| 153 | window.removeEventListener("beforeunload", (e) => | ||
| 154 | this.beforeunloadHandler(e) | ||
| 155 | ); | ||
| 156 | window.removeEventListener("unload", (e) => this.unloadHandler(e)); | ||
| 157 | }, | ||
| 158 | methods: { | ||
| 159 | beforeunloadHandler () { | ||
| 160 | this._beforeUnload_time = new Date().getTime(); | ||
| 161 | }, | 100 | }, |
| 162 | unloadHandler (e) { | 101 | mixins: [WorkFlow, publicFlow], |
| 163 | this._gap_time = new Date().getTime() - this._beforeUnload_time; | 102 | data () { |
| 164 | //判断是窗口关闭还是刷新 | 103 | return { |
| 165 | if (this._gap_time <= 10) { | 104 | isDialog: false, |
| 166 | //取消认领 | 105 | // 折叠 |
| 167 | unClaimTask(this.bsmSlsq, this.bestepid); | 106 | isShowdrawer: true, |
| 168 | } | 107 | // 默认选中 |
| 108 | activeIndex: "0", | ||
| 109 | //受理申请标识码 | ||
| 110 | bsmSlsq: this.$route.query.bsmSlsq, | ||
| 111 | //当前流程所在环节 | ||
| 112 | bestepid: this.$route.query.bestepid, | ||
| 113 | //设置那个表单选中 | ||
| 114 | tabName: "", | ||
| 115 | //设置那个表单选择 | ||
| 116 | currentSelectTab: {}, | ||
| 117 | //表单集合 | ||
| 118 | tabList: [], | ||
| 119 | //选择加载哪一个组件 | ||
| 120 | componentTag: "", | ||
| 121 | //设置表单传递数据 | ||
| 122 | currentSelectProps: {}, | ||
| 123 | //材料分屏表单 | ||
| 124 | clxxForm: "", | ||
| 125 | //材料信息选择卡索引 | ||
| 126 | clxxIndex: "", | ||
| 127 | //材料信息选项卡对象 | ||
| 128 | clxxTab: {}, | ||
| 129 | //页面监听时间 | ||
| 130 | _beforeUnload_time: "", | ||
| 131 | //批量操作 | ||
| 132 | showBatch: false, | ||
| 133 | //批量操作按钮名称 | ||
| 134 | batchButtonName: "", | ||
| 135 | }; | ||
| 169 | }, | 136 | }, |
| 170 | changeLoadIndex () { | 137 | computed: { |
| 171 | this.loadIndex++; | 138 | ...mapGetters(['isRefresh']) |
| 172 | }, | 139 | }, |
| 173 | closeDialog () { | 140 | watch: { |
| 174 | this.myValue = false; | 141 | isRefresh: { |
| 142 | handler (newVal, oldVal) { | ||
| 143 | if (newVal) this.updateDialog() | ||
| 144 | } | ||
| 145 | } | ||
| 175 | }, | 146 | }, |
| 176 | // 更新列表 | 147 | mounted () { |
| 177 | updateDialog () { | 148 | //添加页面监听事件 |
| 178 | this.loadBdcdylist(); | 149 | window.addEventListener("beforeunload", (e) => this.beforeunloadHandler(e)); |
| 150 | window.addEventListener("unload", (e) => this.unloadHandler(e)); | ||
| 179 | }, | 151 | }, |
| 180 | // 删除左侧列表 | 152 | destroyed () { |
| 181 | handleDel (item) { | 153 | window.removeEventListener("beforeunload", (e) => |
| 182 | this.$confirm("确定要删除吗, 是否继续?", "提示", { | 154 | this.beforeunloadHandler(e) |
| 183 | confirmButtonText: "确定", | 155 | ); |
| 184 | cancelButtonText: "取消", | 156 | window.removeEventListener("unload", (e) => this.unloadHandler(e)); |
| 185 | type: "warning", | ||
| 186 | }) | ||
| 187 | .then(() => { | ||
| 188 | var formdata = new FormData(); | ||
| 189 | formdata.append("bsmSldyList", item.bsmSldy.split(",")); | ||
| 190 | formdata.append("bsmSlsq", this.bsmSlsq); | ||
| 191 | deleteFlow(formdata).then((res) => { | ||
| 192 | if (res.code == 200) { | ||
| 193 | this.$message.success("删除成功"); | ||
| 194 | this.loadBdcdylist(); | ||
| 195 | } else { | ||
| 196 | this.$message.error(res.message); | ||
| 197 | } | ||
| 198 | }); | ||
| 199 | }) | ||
| 200 | .catch(() => { | ||
| 201 | this.$message({ | ||
| 202 | type: "info", | ||
| 203 | message: "已取消删除", | ||
| 204 | }); | ||
| 205 | }); | ||
| 206 | }, | 157 | }, |
| 207 | //申请单元点击事件 | 158 | methods: { |
| 208 | stepForm (index) { | 159 | beforeunloadHandler () { |
| 209 | getStepFormInfo(this.currentSelectProps).then((res) => { | 160 | this._beforeUnload_time = new Date().getTime(); |
| 210 | if (res.code === 200) { | 161 | }, |
| 211 | this.fresh++; | 162 | unloadHandler (e) { |
| 212 | //获取单元对应的所有表单信息 | 163 | this._gap_time = new Date().getTime() - this._beforeUnload_time; |
| 213 | this.tabList = res.result; | 164 | //判断是窗口关闭还是刷新 |
| 214 | //默认加载第一个表单信息 | 165 | if (this._gap_time <= 10) { |
| 215 | this.tabName = res.result[0].value; | 166 | //取消认领 |
| 216 | //批量操作无分屏按钮 | 167 | unClaimTask(this.bsmSlsq, this.bestepid); |
| 217 | if (index != null) { | 168 | } |
| 218 | //处理分屏材料信息 | 169 | }, |
| 219 | let that = this; | 170 | changeLoadIndex () { |
| 220 | this.tabList.forEach(function (item, index) { | 171 | this.loadIndex++; |
| 221 | if (item.value == "clxx") { | 172 | }, |
| 222 | that.clxxIndex = index; | 173 | closeDialog () { |
| 223 | that.clxxForm = getForm(item.value, that.$route.query.sqywbm); | 174 | this.myValue = false; |
| 224 | that.clxxTab = item; | 175 | }, |
| 176 | // 更新列表 | ||
| 177 | updateDialog () { | ||
| 178 | this.loadBdcdylist(); | ||
| 179 | }, | ||
| 180 | // 删除左侧列表 | ||
| 181 | handleDel (item) { | ||
| 182 | this.$confirm("确定要删除吗, 是否继续?", "提示", { | ||
| 183 | confirmButtonText: "确定", | ||
| 184 | cancelButtonText: "取消", | ||
| 185 | type: "warning", | ||
| 186 | }) | ||
| 187 | .then(() => { | ||
| 188 | var formdata = new FormData(); | ||
| 189 | formdata.append("bsmSldyList", item.bsmSldy.split(",")); | ||
| 190 | formdata.append("bsmSlsq", this.bsmSlsq); | ||
| 191 | deleteFlow(formdata).then((res) => { | ||
| 192 | if (res.code == 200) { | ||
| 193 | this.$message.success("删除成功"); | ||
| 194 | this.loadBdcdylist(); | ||
| 195 | } else { | ||
| 196 | this.$message.error(res.message); | ||
| 225 | } | 197 | } |
| 226 | }); | 198 | }); |
| 199 | }) | ||
| 200 | .catch(() => { | ||
| 201 | this.$message({ | ||
| 202 | type: "info", | ||
| 203 | message: "已取消删除", | ||
| 204 | }); | ||
| 205 | }); | ||
| 206 | }, | ||
| 207 | //申请单元点击事件 | ||
| 208 | stepForm (index) { | ||
| 209 | getStepFormInfo(this.currentSelectProps).then((res) => { | ||
| 210 | if (res.code === 200) { | ||
| 211 | this.fresh++; | ||
| 212 | //获取单元对应的所有表单信息 | ||
| 213 | this.tabList = res.result; | ||
| 214 | //默认加载第一个表单信息 | ||
| 215 | this.tabName = res.result[0].value; | ||
| 216 | //批量操作无分屏按钮 | ||
| 217 | if (index != null) { | ||
| 218 | //处理分屏材料信息 | ||
| 219 | let that = this; | ||
| 220 | this.tabList.forEach(function (item, index) { | ||
| 221 | if (item.value == "clxx") { | ||
| 222 | that.clxxIndex = index; | ||
| 223 | that.clxxForm = getForm(item.value, that.$route.query.sqywbm); | ||
| 224 | that.clxxTab = item; | ||
| 225 | } | ||
| 226 | }); | ||
| 227 | } | ||
| 227 | } | 228 | } |
| 229 | }); | ||
| 230 | }, | ||
| 231 | //申请单元点击事件 | ||
| 232 | unitClick (index) { | ||
| 233 | this.currentSelectProps = this.unitData[index]; | ||
| 234 | this.currentSelectProps.batchOperation = false; | ||
| 235 | this.activeIndex = index.toString(); | ||
| 236 | this.stepForm(index); | ||
| 237 | }, | ||
| 238 | //批量按钮点击事件 | ||
| 239 | batchUnitClick () { | ||
| 240 | this.currentSelectProps.batchOperation = true; | ||
| 241 | this.activeIndex = "-1"; | ||
| 242 | this.stepForm(); | ||
| 243 | }, | ||
| 244 | openDialog () { | ||
| 245 | this.$store.dispatch('user/refreshPage', false) | ||
| 246 | let data = JSON.parse(localStorage.getItem('ywbl')) | ||
| 247 | let title | ||
| 248 | if (data?.sqywmc) { | ||
| 249 | title = "申请业务:" + data?.sqywmc | ||
| 250 | } else { | ||
| 251 | title = "申请业务:" + data?.djywmc | ||
| 228 | } | 252 | } |
| 229 | }); | 253 | this.$popupDialog(title, "ywbl/ywsq/selectBdc", { 'djywbm': this.$route.query.sqywbm, 'isJump': true, 'sqywInfo': data }, "80%", true) |
| 230 | }, | 254 | } |
| 231 | //申请单元点击事件 | ||
| 232 | unitClick (index) { | ||
| 233 | this.currentSelectProps = this.unitData[index]; | ||
| 234 | this.currentSelectProps.batchOperation = false; | ||
| 235 | this.activeIndex = index.toString(); | ||
| 236 | this.stepForm(index); | ||
| 237 | }, | ||
| 238 | //批量按钮点击事件 | ||
| 239 | batchUnitClick () { | ||
| 240 | this.currentSelectProps.batchOperation = true; | ||
| 241 | this.activeIndex = "-1"; | ||
| 242 | this.stepForm(); | ||
| 243 | }, | ||
| 244 | openDialog () { | ||
| 245 | let data = JSON.parse(localStorage.getItem('ywbl')) | ||
| 246 | let title = "申请业务:" + data.sqywmc; | ||
| 247 | this.$popupDialog(title, "ywbl/ywsq/selectBdc", { 'djywbm': this.$route.query.sqywbm, 'isJump': true, 'sqywInfo': data }, "80%", true) | ||
| 248 | } | 255 | } |
| 249 | } | 256 | } |
| 250 | } | ||
| 251 | </script> | 257 | </script> |
| 252 | 258 | ... | ... |
| ... | @@ -101,6 +101,7 @@ | ... | @@ -101,6 +101,7 @@ |
| 101 | import { datas, sendThis } from "./dbxdata"; | 101 | import { datas, sendThis } from "./dbxdata"; |
| 102 | import { searchTaskToDo, deleteFlow, claimTask } from "@/api/ywbl"; | 102 | import { searchTaskToDo, deleteFlow, claimTask } from "@/api/ywbl"; |
| 103 | import { judgeUserTaskPermission } from "@/api/fqsq"; | 103 | import { judgeUserTaskPermission } from "@/api/fqsq"; |
| 104 | import { log } from 'bpmn-js-token-simulation'; | ||
| 104 | export default { | 105 | export default { |
| 105 | name: "dbx", | 106 | name: "dbx", |
| 106 | components: { searchBox }, | 107 | components: { searchBox }, | ... | ... |
| ... | @@ -138,8 +138,8 @@ | ... | @@ -138,8 +138,8 @@ |
| 138 | <el-col :span="6" v-show="ruleForm.slywxx.gyfs == '1'"> | 138 | <el-col :span="6" v-show="ruleForm.slywxx.gyfs == '1'"> |
| 139 | <el-form-item label="是否分别持证:"> | 139 | <el-form-item label="是否分别持证:"> |
| 140 | <el-radio-group v-model="ruleForm.slywxx.sqfbcz"> | 140 | <el-radio-group v-model="ruleForm.slywxx.sqfbcz"> |
| 141 | <el-radio :label = 1>是</el-radio> | 141 | <el-radio :label=1>是</el-radio> |
| 142 | <el-radio :label = 0>否</el-radio> | 142 | <el-radio :label=0>否</el-radio> |
| 143 | </el-radio-group> | 143 | </el-radio-group> |
| 144 | </el-form-item> | 144 | </el-form-item> |
| 145 | </el-col> | 145 | </el-col> |
| ... | @@ -152,16 +152,15 @@ | ... | @@ -152,16 +152,15 @@ |
| 152 | </el-form-item> | 152 | </el-form-item> |
| 153 | </el-col> | 153 | </el-col> |
| 154 | </el-row> | 154 | </el-row> |
| 155 | <qlrCommonTable :tableData="ruleForm.qlrList" @upDateQlrxxList="upDateQlrxxList" | 155 | <qlrCommonTable :tableData="ruleForm.qlrList" @upDateQlrxxList="upDateQlrxxList" :key="key" |
| 156 | :viewtype="$route.query.viewtype" :gyfs="ruleForm.slywxx.gyfs" /> | 156 | :viewtype="$route.query.viewtype" :gyfs="ruleForm.slywxx.gyfs" /> |
| 157 | 157 | ||
| 158 | |||
| 159 | <div v-if="ruleForm.ywrList && ruleForm.ywrList.length > 0"> | 158 | <div v-if="ruleForm.ywrList && ruleForm.ywrList.length > 0"> |
| 160 | <div class="slxx_title title-block"> | 159 | <div class="slxx_title title-block"> |
| 161 | 义务人信息 | 160 | 义务人信息 |
| 162 | <div class="triangle"></div> | 161 | <div class="triangle"></div> |
| 163 | </div> | 162 | </div> |
| 164 | <qlrCommonTable v-if="ruleForm.ywrList" :tableData="ruleForm.ywrList" @upDateQlrxxList="upDateYwrxxList" | 163 | <qlrCommonTable v-if="ruleForm.ywrList" :tableData="ruleForm.ywrList" :key="key" @upDateQlrxxList="upDateYwrxxList" |
| 165 | :viewtype="$route.query.viewtype" /> | 164 | :viewtype="$route.query.viewtype" /> |
| 166 | </div> | 165 | </div> |
| 167 | 166 | ||
| ... | @@ -188,53 +187,56 @@ | ... | @@ -188,53 +187,56 @@ |
| 188 | </div> | 187 | </div> |
| 189 | </template> | 188 | </template> |
| 190 | <script> | 189 | <script> |
| 191 | import { mapGetters } from "vuex" | 190 | import { mapGetters } from "vuex" |
| 192 | import { Init, saveData } from "@/api/workflow/jsydsyqFlow.js" | 191 | import { Init, saveData } from "@/api/workflow/jsydsyqFlow.js" |
| 193 | import qlrCommonTable from "@/views/workflow/components/qlrCommonTable" | 192 | import qlrCommonTable from "@/views/workflow/components/qlrCommonTable" |
| 194 | export default { | 193 | export default { |
| 195 | mounted () { | 194 | mounted () { |
| 196 | this.propsParam = this.$attrs; | 195 | this.propsParam = this.$attrs; |
| 197 | var formdata = new FormData(); | 196 | var formdata = new FormData(); |
| 198 | let that = this | 197 | let that = this |
| 199 | this.$startLoading(); | 198 | this.$startLoading(); |
| 200 | formdata.append("bsmSldy", this.propsParam.bsmSldy); | 199 | formdata.append("bsmSldy", this.propsParam.bsmSldy); |
| 201 | formdata.append("djlx", this.propsParam.djlx); | 200 | formdata.append("djlx", this.propsParam.djlx); |
| 202 | Init(formdata).then((res) => { | 201 | Init(formdata).then((res) => { |
| 203 | this.$nextTick(() => { | 202 | this.$nextTick(() => { |
| 204 | that.ruleForm = res.result; | 203 | that.ruleForm = res.result; |
| 205 | that.$endLoading(); | 204 | that.$endLoading(); |
| 206 | that.isShow = true; | 205 | that.isShow = true; |
| 207 | this.czrOptions=this.ruleForm.qlrList; | 206 | this.czrOptions = this.ruleForm.qlrList; |
| 207 | }) | ||
| 208 | }) | 208 | }) |
| 209 | }) | ||
| 210 | }, | ||
| 211 | components: { qlrCommonTable }, | ||
| 212 | computed: { | ||
| 213 | ...mapGetters(["dictData", "flag"]) | ||
| 214 | }, | ||
| 215 | data () { | ||
| 216 | return { | ||
| 217 | isShow: false, | ||
| 218 | disabled: true, | ||
| 219 | czrOptions: [], | ||
| 220 | ruleForm: {}, | ||
| 221 | //传递参数 | ||
| 222 | propsParam: {}, | ||
| 223 | rules: {} | ||
| 224 | } | ||
| 225 | }, | ||
| 226 | methods: { | ||
| 227 | // 更新权利人信息 | ||
| 228 | upDateQlrxxList (val) { | ||
| 229 | this.ruleForm.qlrList && (this.ruleForm.qlrList = _.cloneDeep(val)) | ||
| 230 | this.czrOptions=this.ruleForm.qlrList; | ||
| 231 | }, | 209 | }, |
| 232 | // 更新义务人信息 | 210 | components: { qlrCommonTable }, |
| 233 | upDateYwrxxList (val) { | 211 | computed: { |
| 234 | this.ruleForm.ywrList && (this.ruleForm.ywrList = _.cloneDeep(val)) | 212 | ...mapGetters(["dictData", "flag"]) |
| 213 | }, | ||
| 214 | data () { | ||
| 215 | return { | ||
| 216 | key: 0, | ||
| 217 | isShow: false, | ||
| 218 | disabled: true, | ||
| 219 | czrOptions: [], | ||
| 220 | ruleForm: {}, | ||
| 221 | //传递参数 | ||
| 222 | propsParam: {}, | ||
| 223 | rules: {} | ||
| 224 | } | ||
| 235 | }, | 225 | }, |
| 236 | onSubmit () { | 226 | methods: { |
| 237 | if (this.ruleForm.qlrList.length == 0) { | 227 | // 更新权利人信息 |
| 228 | upDateQlrxxList (val) { | ||
| 229 | this.ruleForm.qlrList && (this.ruleForm.qlrList = _.cloneDeep(val)) | ||
| 230 | this.czrOptions = this.ruleForm.qlrList; | ||
| 231 | this.key++ | ||
| 232 | }, | ||
| 233 | // 更新义务人信息 | ||
| 234 | upDateYwrxxList (val) { | ||
| 235 | this.ruleForm.ywrList && (this.ruleForm.ywrList = _.cloneDeep(val)) | ||
| 236 | this.key++ | ||
| 237 | }, | ||
| 238 | onSubmit () { | ||
| 239 | if (this.ruleForm.qlrList.length == 0) { | ||
| 238 | this.$message({ | 240 | this.$message({ |
| 239 | showClose: true, | 241 | showClose: true, |
| 240 | message: "请确认权利人信息", | 242 | message: "请确认权利人信息", |
| ... | @@ -242,53 +244,53 @@ export default { | ... | @@ -242,53 +244,53 @@ export default { |
| 242 | }); | 244 | }); |
| 243 | return false; | 245 | return false; |
| 244 | } | 246 | } |
| 245 | 247 | ||
| 246 | if (this.ruleForm.slywxx.gyfs == "0") { | 248 | if (this.ruleForm.slywxx.gyfs == "0") { |
| 247 | if (this.ruleForm.qlrList.length > 1) { | 249 | if (this.ruleForm.qlrList.length > 1) { |
| 248 | this.$message({ | 250 | this.$message({ |
| 249 | showClose: true, | 251 | showClose: true, |
| 250 | message: "共有方式:单独所有,权利人只能是一个人", | 252 | message: "共有方式:单独所有,权利人只能是一个人", |
| 251 | type: "error", | 253 | type: "error", |
| 252 | }); | 254 | }); |
| 253 | return false; | 255 | return false; |
| 256 | } | ||
| 257 | this.ruleForm.qlrList[0].sfczr = "1"; | ||
| 254 | } | 258 | } |
| 255 | this.ruleForm.qlrList[0].sfczr="1"; | 259 | if (this.ruleForm.slywxx.gyfs == "1") { |
| 256 | } | 260 | //是否分别持证 |
| 257 | if (this.ruleForm.slywxx.gyfs == "1") { | 261 | if (this.ruleForm.slywxx.sqfbcz == '1') { //是 |
| 258 | //是否分别持证 | 262 | this.ruleForm.qlrList.forEach((item, index) => { |
| 259 | if(this.ruleForm.slywxx.sqfbcz == '1'){ //是 | ||
| 260 | this.ruleForm.qlrList.forEach((item, index) => { | ||
| 261 | item.sfczr = "1"; | ||
| 262 | }); | ||
| 263 | }else{ | ||
| 264 | this.ruleForm.qlrList.forEach((item, index) => { | ||
| 265 | if(item.zjh==this.ruleForm.czr){ | ||
| 266 | item.sfczr = "1"; | 263 | item.sfczr = "1"; |
| 267 | } | 264 | }); |
| 268 | }); | 265 | } else { |
| 269 | } | 266 | this.ruleForm.qlrList.forEach((item, index) => { |
| 270 | } | 267 | if (item.zjh == this.ruleForm.czr) { |
| 271 | 268 | item.sfczr = "1"; | |
| 272 | saveData(this.ruleForm).then((res) => { | 269 | } |
| 273 | if (res.code === 200) { | 270 | }); |
| 274 | this.$message({ | 271 | } |
| 275 | showClose: true, | ||
| 276 | message: "保存成功!", | ||
| 277 | type: "success", | ||
| 278 | }); | ||
| 279 | } else { | ||
| 280 | this.$message({ | ||
| 281 | showClose: true, | ||
| 282 | message: res.message, | ||
| 283 | type: "error", | ||
| 284 | }); | ||
| 285 | } | 272 | } |
| 286 | }); | 273 | |
| 274 | saveData(this.ruleForm).then((res) => { | ||
| 275 | if (res.code === 200) { | ||
| 276 | this.$message({ | ||
| 277 | showClose: true, | ||
| 278 | message: "保存成功!", | ||
| 279 | type: "success", | ||
| 280 | }); | ||
| 281 | } else { | ||
| 282 | this.$message({ | ||
| 283 | showClose: true, | ||
| 284 | message: res.message, | ||
| 285 | type: "error", | ||
| 286 | }); | ||
| 287 | } | ||
| 288 | }); | ||
| 289 | }, | ||
| 287 | }, | 290 | }, |
| 288 | }, | 291 | }; |
| 289 | }; | ||
| 290 | </script> | 292 | </script> |
| 291 | <style scoped lang='scss'> | 293 | <style scoped lang='scss'> |
| 292 | @import "~@/styles/public.scss"; | 294 | @import "~@/styles/public.scss"; |
| 293 | @import "~@/styles/slxx/slxx.scss"; | 295 | @import "~@/styles/slxx/slxx.scss"; |
| 294 | </style> | 296 | </style> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -56,7 +56,7 @@ | ... | @@ -56,7 +56,7 @@ |
| 56 | </el-form> | 56 | </el-form> |
| 57 | </div> | 57 | </div> |
| 58 | <div class="from-clues-content"> | 58 | <div class="from-clues-content"> |
| 59 | <lb-table ref="table" @row-dblclick="handleRowClick" :page-size="pageData.pageSize" :heightNum="400" | 59 | <lb-table ref="table" @row-dblclick="handleRowClick" :page-size="pageData.pageSize" :calcHeight="400" |
| 60 | :current-page.sync="pageData.currentPage" :total="zrztableData.total" @size-change="handleSizeChange" | 60 | :current-page.sync="pageData.currentPage" :total="zrztableData.total" @size-change="handleSizeChange" |
| 61 | @p-current-change="handleCurrentChange" @selection-change="handleSelectionChange" :column="zrztableData.columns" | 61 | @p-current-change="handleCurrentChange" @selection-change="handleSelectionChange" :column="zrztableData.columns" |
| 62 | :data="zrztableData.data"> | 62 | :data="zrztableData.data"> |
| ... | @@ -107,7 +107,7 @@ | ... | @@ -107,7 +107,7 @@ |
| 107 | </el-form> | 107 | </el-form> |
| 108 | </div> | 108 | </div> |
| 109 | <div class="from-clues-content loadingtext"> | 109 | <div class="from-clues-content loadingtext"> |
| 110 | <lb-table ref="table" @row-dblclick="handleRowClick" :page-size="pageData.pageSize" :calcHeight="300" | 110 | <lb-table ref="table" @row-dblclick="handleRowClick" :page-size="pageData.pageSize" :calcHeight="400" |
| 111 | :current-page.sync="pageData.currentPage" :total="dztableData.total" @size-change="handleSizeChange" | 111 | :current-page.sync="pageData.currentPage" :total="dztableData.total" @size-change="handleSizeChange" |
| 112 | @p-current-change="handleCurrentChange" @selection-change="handleSelectionChange" :column="dztableData.columns" | 112 | @p-current-change="handleCurrentChange" @selection-change="handleSelectionChange" :column="dztableData.columns" |
| 113 | :data="dztableData.data"> | 113 | :data="dztableData.data"> | ... | ... |
| ... | @@ -8,7 +8,7 @@ export default { | ... | @@ -8,7 +8,7 @@ export default { |
| 8 | methods: { | 8 | methods: { |
| 9 | //点击行选中或取消复选框 | 9 | //点击行选中或取消复选框 |
| 10 | handleRowClick (row, column, event) { | 10 | handleRowClick (row, column, event) { |
| 11 | (this.$refs.table.toggleRowSelection(row)) | 11 | this.$refs.table.toggleRowSelection(row) |
| 12 | }, | 12 | }, |
| 13 | jump (data, type) { | 13 | jump (data, type) { |
| 14 | const { href } = Router.resolve( | 14 | const { href } = Router.resolve( | ... | ... |
| ... | @@ -106,6 +106,7 @@ | ... | @@ -106,6 +106,7 @@ |
| 106 | if (!this.isJump) { | 106 | if (!this.isJump) { |
| 107 | this.jump(res.result, this.sqywInfo.djywbm); | 107 | this.jump(res.result, this.sqywInfo.djywbm); |
| 108 | } else { | 108 | } else { |
| 109 | this.$popupCacel() | ||
| 109 | store.dispatch('user/refreshPage', true); | 110 | store.dispatch('user/refreshPage', true); |
| 110 | } | 111 | } |
| 111 | } else { | 112 | } else { | ... | ... |
| ... | @@ -19,7 +19,7 @@ | ... | @@ -19,7 +19,7 @@ |
| 19 | <div class="right-title">常办业务列表</div> | 19 | <div class="right-title">常办业务列表</div> |
| 20 | <ul> | 20 | <ul> |
| 21 | <li :class="item.selected ? 'cactive' : ''" v-for="(item, index) in collectList" :key="index" | 21 | <li :class="item.selected ? 'cactive' : ''" v-for="(item, index) in collectList" :key="index" |
| 22 | @dblclick="dblclick(collectList, index)" @click="selectSqywClick(collectList, index)"> | 22 | @dblclick="dblclick(collectList, index, item)" @click="selectSqywClick(collectList, index)"> |
| 23 | <p v-if="item.nodetype == 'djqx'">{{ item.djywmc }}<br>{{ item.nodename }}</p> | 23 | <p v-if="item.nodetype == 'djqx'">{{ item.djywmc }}<br>{{ item.nodename }}</p> |
| 24 | <dt v-else>{{ item.djywmc }}</dt> | 24 | <dt v-else>{{ item.djywmc }}</dt> |
| 25 | <p class="active" @click.stop="handleCollection(item)"> | 25 | <p class="active" @click.stop="handleCollection(item)"> |
| ... | @@ -37,7 +37,7 @@ | ... | @@ -37,7 +37,7 @@ |
| 37 | <div class="right-type el-card box-card is-always-shadow"> | 37 | <div class="right-type el-card box-card is-always-shadow"> |
| 38 | <div class="right-title">登记类型</div> | 38 | <div class="right-title">登记类型</div> |
| 39 | <ul class="type-content"> | 39 | <ul class="type-content"> |
| 40 | <li :class="item.selected ? 'cactive' : ''" @dblclick="item.sffqlc == 1 && dblclick(djlxList, index)" | 40 | <li :class="item.selected ? 'cactive' : ''" @dblclick="item.sffqlc == 1 && dblclick(djlxList, index, item)" |
| 41 | @click="selectSqywClick(djlxList, index)" v-for="(item, index) in djlxList" :key="index"> | 41 | @click="selectSqywClick(djlxList, index)" v-for="(item, index) in djlxList" :key="index"> |
| 42 | <p> | 42 | <p> |
| 43 | {{ item.nodename }} | 43 | {{ item.nodename }} |
| ... | @@ -53,7 +53,7 @@ | ... | @@ -53,7 +53,7 @@ |
| 53 | <div class="right-title">登记情形</div> | 53 | <div class="right-title">登记情形</div> |
| 54 | <ul> | 54 | <ul> |
| 55 | <li :class="item.selected ? 'cactive' : ''" v-for="(item, index) in djqxList" :key="index" | 55 | <li :class="item.selected ? 'cactive' : ''" v-for="(item, index) in djqxList" :key="index" |
| 56 | @dblclick="dblclick(djqxList, index)" @click="selectSqywClick(djqxList, index)"> | 56 | @dblclick="dblclick(djqxList, index, item)" @click="selectSqywClick(djqxList, index)"> |
| 57 | <dt>{{ item.nodename }}</dt> | 57 | <dt>{{ item.nodename }}</dt> |
| 58 | <p :class="item.userCollect == 1 ? 'active' : ''" @click.stop="handleCollection(item)"> | 58 | <p :class="item.userCollect == 1 ? 'active' : ''" @click.stop="handleCollection(item)"> |
| 59 | <i class="el-icon-star-off"></i> | 59 | <i class="el-icon-star-off"></i> |
| ... | @@ -69,206 +69,207 @@ | ... | @@ -69,206 +69,207 @@ |
| 69 | </div> | 69 | </div> |
| 70 | </template> | 70 | </template> |
| 71 | <script> | 71 | <script> |
| 72 | import { getCollectBiz, getleftMenu, getNextNode, addCollectBiz, deleteCollectBiz } from "@/api/ywbl" | 72 | import { getCollectBiz, getleftMenu, getNextNode, addCollectBiz, deleteCollectBiz } from "@/api/ywbl" |
| 73 | export default { | 73 | export default { |
| 74 | data () { | 74 | data () { |
| 75 | return { | 75 | return { |
| 76 | //申请业务类型集合 | 76 | //申请业务类型集合 |
| 77 | sqywlxList: [ | 77 | sqywlxList: [ |
| 78 | { name: "常办业务", type: "collect" }, | 78 | { name: "常办业务", type: "collect" }, |
| 79 | { name: "一并申请", type: "together" }, | 79 | { name: "一并申请", type: "together" }, |
| 80 | { name: "登记簿补录", type: "amend" } | 80 | { name: "登记簿补录", type: "amend" } |
| 81 | ], | 81 | ], |
| 82 | //类型默认选择常办业务 | 82 | //类型默认选择常办业务 |
| 83 | selectType: "collect", | 83 | selectType: "collect", |
| 84 | //堆叠框选中第一个 | 84 | //堆叠框选中第一个 |
| 85 | activeNames: ['1'], | 85 | activeNames: ['1'], |
| 86 | //收藏业务集合 | 86 | //收藏业务集合 |
| 87 | collectList: [], | 87 | collectList: [], |
| 88 | //申请权利类型集合 | 88 | //申请权利类型集合 |
| 89 | sqywQllxList: [], | 89 | sqywQllxList: [], |
| 90 | //登记类型集合 | 90 | //登记类型集合 |
| 91 | djlxList: [], | 91 | djlxList: [], |
| 92 | //申请权利类型集合 | 92 | //申请权利类型集合 |
| 93 | djqxList: [], | 93 | djqxList: [], |
| 94 | //选中业务的参数 | 94 | //选中业务的参数 |
| 95 | selectParam: {}, | 95 | selectParam: {}, |
| 96 | //选择按钮显示或隐藏 | 96 | //选择按钮显示或隐藏 |
| 97 | btnDisabled: true, | 97 | btnDisabled: true, |
| 98 | } | ||
| 99 | }, | ||
| 100 | created () { | ||
| 101 | this.getDataList(); | ||
| 102 | }, | ||
| 103 | methods: { | ||
| 104 | getDataList () { | ||
| 105 | //获取收藏信息集合 | ||
| 106 | getCollectBiz().then(res => { | ||
| 107 | this.collectList = res.result; | ||
| 108 | this.collectList.forEach(item => { | ||
| 109 | this.$set(item, 'selected', false); | ||
| 110 | }); | ||
| 111 | }); | ||
| 112 | //获取申请权利信息集合 | ||
| 113 | getleftMenu().then(res => { | ||
| 114 | this.sqywQllxList = res.result; | ||
| 115 | }) | ||
| 116 | }, | ||
| 117 | //申请业务类型菜单事件 | ||
| 118 | sqywlxClick (item) { | ||
| 119 | this.btnDisabled = true; | ||
| 120 | this.selectType = item.type; | ||
| 121 | this.sqywQllxList.forEach(item => { | ||
| 122 | if (item.check) item.check = false; | ||
| 123 | }) | ||
| 124 | }, | ||
| 125 | //权利类型菜单事件 | ||
| 126 | qllxClick (index) { | ||
| 127 | this.btnDisabled = true; | ||
| 128 | this.sqywQllxList.forEach(item => { | ||
| 129 | if (item.check) item.check = false; | ||
| 130 | }) | ||
| 131 | this.sqywQllxList[index].check = true; | ||
| 132 | this.selectType = "apply"; | ||
| 133 | this.djlxList = []; | ||
| 134 | this.djqxList = []; | ||
| 135 | this.getNextNode(this.sqywQllxList[index].bsmSqyw); | ||
| 136 | }, | ||
| 137 | //选择申请业务事件 | ||
| 138 | selectSqywClick (data, index) { | ||
| 139 | data.forEach(item => { | ||
| 140 | item.selected = false; | ||
| 141 | }); | ||
| 142 | data[index].selected = true; | ||
| 143 | if (data[index].sffqlc == "1") { | ||
| 144 | this.selectParam = data[index]; | ||
| 145 | this.btnDisabled = false; | ||
| 146 | } else { | ||
| 147 | this.btnDisabled = true; | ||
| 148 | this.getNextNode(data[index].bsmSqyw); | ||
| 149 | } | 98 | } |
| 150 | }, | 99 | }, |
| 151 | //获取下个节点类型数据 | 100 | created () { |
| 152 | getNextNode (bsmSqyw) { | 101 | this.getDataList(); |
| 153 | getNextNode(bsmSqyw).then(res => { | 102 | }, |
| 154 | if (res.result.djqx) { | 103 | methods: { |
| 155 | this.djqxList = res.result.djqx; | 104 | getDataList () { |
| 156 | this.djqxList.forEach(item => { | 105 | //获取收藏信息集合 |
| 157 | this.$set(item, 'selected', false); | 106 | getCollectBiz().then(res => { |
| 158 | }); | 107 | this.collectList = res.result; |
| 159 | } | 108 | this.collectList.forEach(item => { |
| 160 | if (res.result.djlx) { | ||
| 161 | this.djlxList = res.result.djlx; | ||
| 162 | this.djlxList.forEach(item => { | ||
| 163 | this.$set(item, 'selected', false); | 109 | this.$set(item, 'selected', false); |
| 164 | }); | 110 | }); |
| 111 | }); | ||
| 112 | //获取申请权利信息集合 | ||
| 113 | getleftMenu().then(res => { | ||
| 114 | this.sqywQllxList = res.result; | ||
| 115 | }) | ||
| 116 | }, | ||
| 117 | //申请业务类型菜单事件 | ||
| 118 | sqywlxClick (item) { | ||
| 119 | this.btnDisabled = true; | ||
| 120 | this.selectType = item.type; | ||
| 121 | this.sqywQllxList.forEach(item => { | ||
| 122 | if (item.check) item.check = false; | ||
| 123 | }) | ||
| 124 | }, | ||
| 125 | //权利类型菜单事件 | ||
| 126 | qllxClick (index) { | ||
| 127 | this.btnDisabled = true; | ||
| 128 | this.sqywQllxList.forEach(item => { | ||
| 129 | if (item.check) item.check = false; | ||
| 130 | }) | ||
| 131 | this.sqywQllxList[index].check = true; | ||
| 132 | this.selectType = "apply"; | ||
| 133 | this.djlxList = []; | ||
| 134 | this.djqxList = []; | ||
| 135 | this.getNextNode(this.sqywQllxList[index].bsmSqyw); | ||
| 136 | }, | ||
| 137 | //选择申请业务事件 | ||
| 138 | selectSqywClick (data, index) { | ||
| 139 | data.forEach(item => { | ||
| 140 | item.selected = false; | ||
| 141 | }); | ||
| 142 | data[index].selected = true; | ||
| 143 | if (data[index].sffqlc == "1") { | ||
| 144 | this.selectParam = data[index]; | ||
| 145 | this.btnDisabled = false; | ||
| 146 | } else { | ||
| 147 | this.btnDisabled = true; | ||
| 148 | this.getNextNode(data[index].bsmSqyw); | ||
| 165 | } | 149 | } |
| 166 | }) | 150 | }, |
| 167 | }, | 151 | //获取下个节点类型数据 |
| 168 | //双击事件 | 152 | getNextNode (bsmSqyw) { |
| 169 | dblclick (data, index) { | 153 | getNextNode(bsmSqyw).then(res => { |
| 170 | this.selectSqywClick(data, index); | 154 | if (res.result.djqx) { |
| 171 | this.dialogClick(); | 155 | this.djqxList = res.result.djqx; |
| 172 | }, | 156 | this.djqxList.forEach(item => { |
| 173 | //打开弹框内容 | 157 | this.$set(item, 'selected', false); |
| 174 | dialogClick () { | 158 | }); |
| 175 | this.openDialog(); | 159 | } |
| 176 | }, | 160 | if (res.result.djlx) { |
| 177 | //收藏操作 | 161 | this.djlxList = res.result.djlx; |
| 178 | handleCollection (item) { | 162 | this.djlxList.forEach(item => { |
| 179 | let that = this | 163 | this.$set(item, 'selected', false); |
| 180 | if (item.userCollect == '2') { | 164 | }); |
| 181 | addCollectBiz(item.bsmSqyw).then(res => { | ||
| 182 | if (res.code == 200) { | ||
| 183 | item.userCollect = '1' | ||
| 184 | that.$message({ | ||
| 185 | message: '收藏成功!', | ||
| 186 | type: 'success' | ||
| 187 | }) | ||
| 188 | that.getDataList() | ||
| 189 | } | 165 | } |
| 190 | }) | 166 | }) |
| 191 | } else { | 167 | }, |
| 192 | this.$confirm('此操作将取消收藏, 是否继续?', '提示', { | 168 | //双击事件 |
| 193 | confirmButtonText: '确定', | 169 | dblclick (data, index, item) { |
| 194 | cancelButtonText: '取消', | 170 | localStorage.setItem('ywbl', JSON.stringify(item)); |
| 195 | type: 'warning' | 171 | this.selectSqywClick(data, index); |
| 196 | }).then(() => { | 172 | this.dialogClick(); |
| 197 | deleteCollectBiz(item.bsmSqyw).then(res => { | 173 | }, |
| 174 | //打开弹框内容 | ||
| 175 | dialogClick () { | ||
| 176 | this.openDialog(); | ||
| 177 | }, | ||
| 178 | //收藏操作 | ||
| 179 | handleCollection (item) { | ||
| 180 | let that = this | ||
| 181 | if (item.userCollect == '2') { | ||
| 182 | addCollectBiz(item.bsmSqyw).then(res => { | ||
| 198 | if (res.code == 200) { | 183 | if (res.code == 200) { |
| 199 | item.userCollect = '2' | 184 | item.userCollect = '1' |
| 200 | that.$message({ | 185 | that.$message({ |
| 201 | message: '取消收藏成功!', | 186 | message: '收藏成功!', |
| 202 | type: 'success' | 187 | type: 'success' |
| 203 | }) | 188 | }) |
| 204 | that.getDataList() | 189 | that.getDataList() |
| 205 | } | 190 | } |
| 206 | }) | 191 | }) |
| 192 | } else { | ||
| 193 | this.$confirm('此操作将取消收藏, 是否继续?', '提示', { | ||
| 194 | confirmButtonText: '确定', | ||
| 195 | cancelButtonText: '取消', | ||
| 196 | type: 'warning' | ||
| 197 | }).then(() => { | ||
| 198 | deleteCollectBiz(item.bsmSqyw).then(res => { | ||
| 199 | if (res.code == 200) { | ||
| 200 | item.userCollect = '2' | ||
| 201 | that.$message({ | ||
| 202 | message: '取消收藏成功!', | ||
| 203 | type: 'success' | ||
| 204 | }) | ||
| 205 | that.getDataList() | ||
| 206 | } | ||
| 207 | }) | ||
| 208 | }) | ||
| 209 | } | ||
| 210 | }, | ||
| 211 | handleSelect (item) { | ||
| 212 | this.busList.forEach(item => { | ||
| 213 | item.cselect = false | ||
| 214 | }) | ||
| 215 | item.cselect = !item.cselect | ||
| 216 | }, | ||
| 217 | // 登记类型 | ||
| 218 | handleDjlxSelect (item) { | ||
| 219 | this.djlxList.forEach(item => { | ||
| 220 | item.cselect = false | ||
| 207 | }) | 221 | }) |
| 208 | } | ||
| 209 | }, | ||
| 210 | handleSelect (item) { | ||
| 211 | this.busList.forEach(item => { | ||
| 212 | item.cselect = false | ||
| 213 | }) | ||
| 214 | item.cselect = !item.cselect | ||
| 215 | }, | ||
| 216 | // 登记类型 | ||
| 217 | handleDjlxSelect (item) { | ||
| 218 | this.djlxList.forEach(item => { | ||
| 219 | item.cselect = false | ||
| 220 | }) | ||
| 221 | this.btnDisabled = true | ||
| 222 | item.cselect = true; | ||
| 223 | this.djqxObj = item; | ||
| 224 | if (item.sffqlc == '1') { | ||
| 225 | this.btnDisabled = false | ||
| 226 | this.bsmSqyw = item.bsmSqyw | ||
| 227 | this.djywbm = item.djywbm; | ||
| 228 | } else { | ||
| 229 | this.getNextNode(item.bsmSqyw, false) | ||
| 230 | } | ||
| 231 | this.djqxList = [] | ||
| 232 | }, | ||
| 233 | handleDjqxItem (item) { | ||
| 234 | this.djlxList.forEach(item => { | ||
| 235 | item.cselect = false | ||
| 236 | }) | ||
| 237 | if (item.sffqlc == 1) { | ||
| 238 | this.djywbm = item.djywbm | ||
| 239 | this.bsmSqyw = item.bsmSqyw | ||
| 240 | item.cselect = true | ||
| 241 | this.openDialog() | ||
| 242 | this.btnDisabled = true | 222 | this.btnDisabled = true |
| 223 | item.cselect = true; | ||
| 224 | this.djqxObj = item; | ||
| 225 | if (item.sffqlc == '1') { | ||
| 226 | this.btnDisabled = false | ||
| 227 | this.bsmSqyw = item.bsmSqyw | ||
| 228 | this.djywbm = item.djywbm; | ||
| 229 | } else { | ||
| 230 | this.getNextNode(item.bsmSqyw, false) | ||
| 231 | } | ||
| 232 | this.djqxList = [] | ||
| 233 | }, | ||
| 234 | handleDjqxItem (item) { | ||
| 235 | this.djlxList.forEach(item => { | ||
| 236 | item.cselect = false | ||
| 237 | }) | ||
| 238 | if (item.sffqlc == 1) { | ||
| 239 | this.djywbm = item.djywbm | ||
| 240 | this.bsmSqyw = item.bsmSqyw | ||
| 241 | item.cselect = true | ||
| 242 | this.openDialog() | ||
| 243 | this.btnDisabled = true | ||
| 244 | } | ||
| 245 | }, | ||
| 246 | handleSelectItem (item, list) { | ||
| 247 | this.handleSelectYw(item, list) | ||
| 248 | this.openDialog() | ||
| 249 | }, | ||
| 250 | // 选择不动产信息 | ||
| 251 | bthSelectClick () { | ||
| 252 | this.openDialog() | ||
| 253 | }, | ||
| 254 | openDialog () { | ||
| 255 | let title = "申请业务:" + this.selectParam?.djywmc ? this.selectParam?.djywmc : ''; | ||
| 256 | this.$popupDialog(title, "ywbl/ywsq/selectBdc", { 'sqywInfo': this.selectParam }, "80%") | ||
| 257 | }, | ||
| 258 | loadView (view) { | ||
| 259 | return r => require.ensure([], () => r(require(`./components/${view}/${view}.vue`))) | ||
| 243 | } | 260 | } |
| 244 | }, | ||
| 245 | handleSelectItem (item, list) { | ||
| 246 | this.handleSelectYw(item, list) | ||
| 247 | this.openDialog() | ||
| 248 | }, | ||
| 249 | // 选择不动产信息 | ||
| 250 | bthSelectClick () { | ||
| 251 | this.openDialog() | ||
| 252 | }, | ||
| 253 | openDialog () { | ||
| 254 | let title = "申请业务:" + this.selectParam?.djywmc ? this.selectParam?.djywmc : ''; | ||
| 255 | this.$popupDialog(title, "ywbl/ywsq/selectBdc", { 'sqywInfo': this.selectParam }, "80%") | ||
| 256 | }, | ||
| 257 | loadView (view) { | ||
| 258 | return r => require.ensure([], () => r(require(`./components/${view}/${view}.vue`))) | ||
| 259 | } | 261 | } |
| 260 | } | 262 | } |
| 261 | } | ||
| 262 | </script> | 263 | </script> |
| 263 | <style scoped lang='scss'> | 264 | <style scoped lang='scss'> |
| 264 | @import "~@/styles/mixin.scss"; | 265 | @import "~@/styles/mixin.scss"; |
| 265 | @import './ywsq.scss'; | 266 | @import "./ywsq.scss"; |
| 266 | 267 | ||
| 267 | /deep/.el-collapse-item__content { | 268 | /deep/.el-collapse-item__content { |
| 268 | padding-bottom: 0; | 269 | padding-bottom: 0; |
| 269 | } | 270 | } |
| 270 | 271 | ||
| 271 | /deep/.el-collapse-item__wrap { | 272 | /deep/.el-collapse-item__wrap { |
| 272 | border-bottom: none; | 273 | border-bottom: none; |
| 273 | } | 274 | } |
| 274 | </style> | 275 | </style> |
| ... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
| ... | @@ -8,49 +8,49 @@ | ... | @@ -8,49 +8,49 @@ |
| 8 | @updateDialog="updateDialog" /> | 8 | @updateDialog="updateDialog" /> |
| 9 | </template> | 9 | </template> |
| 10 | <script> | 10 | <script> |
| 11 | import { queueDjywmc } from "./slectBdcdata.js"; | 11 | import { queueDjywmc } from "./slectBdcdata.js"; |
| 12 | export default { | 12 | export default { |
| 13 | props: { | 13 | props: { |
| 14 | formData: { | 14 | formData: { |
| 15 | type: Object, | 15 | type: Object, |
| 16 | default: () => { } | 16 | default: () => { } |
| 17 | } | 17 | } |
| 18 | }, | ||
| 19 | data () { | ||
| 20 | return { | ||
| 21 | title: "", | ||
| 22 | router: "" | ||
| 23 | } | ||
| 24 | }, | ||
| 25 | mounted () { | ||
| 26 | if (this.formData?.sqywInfo?.djywbm || this.formData?.djywbm) { | ||
| 27 | let view = queueDjywmc(this.formData?.sqywInfo?.djywbm || this.formData?.djywbm); | ||
| 28 | this.router = this.loadView(view); | ||
| 29 | } else { | ||
| 30 | let view = queueDjywmc(this.$route.query?.sqywbm); | ||
| 31 | this.router = this.loadView(view); | ||
| 32 | } | ||
| 33 | }, | ||
| 34 | methods: { | ||
| 35 | loadView (view) { | ||
| 36 | console.log(view, 'view'); | ||
| 37 | return (r) => | ||
| 38 | require.ensure([], () => r(require(`./components/${view}.vue`))); | ||
| 39 | }, | 18 | }, |
| 40 | updateDialog () { | 19 | data () { |
| 41 | this.$popupCacel() | 20 | return { |
| 42 | this.$emit("updateDialog", true); | 21 | title: "", |
| 22 | router: "" | ||
| 23 | } | ||
| 24 | }, | ||
| 25 | mounted () { | ||
| 26 | if (this.formData?.sqywInfo?.djywbm || this.formData?.djywbm) { | ||
| 27 | let view = queueDjywmc(this.formData?.sqywInfo?.djywbm || this.formData?.djywbm); | ||
| 28 | this.router = this.loadView(view); | ||
| 29 | } else { | ||
| 30 | let view = queueDjywmc(this.$route.query?.sqywbm); | ||
| 31 | this.router = this.loadView(view); | ||
| 32 | } | ||
| 33 | }, | ||
| 34 | methods: { | ||
| 35 | loadView (view) { | ||
| 36 | console.log(view, 'view'); | ||
| 37 | return (r) => | ||
| 38 | require.ensure([], () => r(require(`./components/${view}.vue`))); | ||
| 39 | }, | ||
| 40 | updateDialog () { | ||
| 41 | this.$popupCacel() | ||
| 42 | this.$emit("updateDialog", true); | ||
| 43 | } | ||
| 43 | } | 44 | } |
| 44 | } | 45 | } |
| 45 | } | ||
| 46 | </script> | 46 | </script> |
| 47 | <style scoped lang="scss"> | 47 | <style scoped lang="scss"> |
| 48 | @import "~@/styles/mixin.scss"; | 48 | @import "~@/styles/mixin.scss"; |
| 49 | @import "~@/styles/public.scss"; | 49 | @import "~@/styles/public.scss"; |
| 50 | 50 | ||
| 51 | /deep/.submit_button { | 51 | /deep/.submit_button { |
| 52 | text-align: center; | 52 | text-align: center; |
| 53 | padding: 10px; | 53 | padding: 10px; |
| 54 | margin: 10px; | 54 | margin: 10px; |
| 55 | } | 55 | } |
| 56 | </style> | 56 | </style> | ... | ... |
| ... | @@ -61,6 +61,9 @@ module.exports = { | ... | @@ -61,6 +61,9 @@ module.exports = { |
| 61 | // configureWebpack通过操作对象的形式,来修改默认的webpack配置 | 61 | // configureWebpack通过操作对象的形式,来修改默认的webpack配置 |
| 62 | configureWebpack: { | 62 | configureWebpack: { |
| 63 | name: name, | 63 | name: name, |
| 64 | entry: { | ||
| 65 | app: './src/main.js' | ||
| 66 | }, | ||
| 64 | resolve: { | 67 | resolve: { |
| 65 | alias: { | 68 | alias: { |
| 66 | '@': resolve('src') | 69 | '@': resolve('src') |
| ... | @@ -70,7 +73,6 @@ module.exports = { | ... | @@ -70,7 +73,6 @@ module.exports = { |
| 70 | }, | 73 | }, |
| 71 | // chainWebpack通过链式编程的形式,来修改默认的webpack配置 | 74 | // chainWebpack通过链式编程的形式,来修改默认的webpack配置 |
| 72 | chainWebpack (config) { | 75 | chainWebpack (config) { |
| 73 | config.entry.app = ['babel-polyfill', './src/main.js']; | ||
| 74 | // it can improve the speed of the first screen, it is recommended to turn on preload | 76 | // it can improve the speed of the first screen, it is recommended to turn on preload |
| 75 | // it can improve the speed of the first screen, it is recommended to turn on preload | 77 | // it can improve the speed of the first screen, it is recommended to turn on preload |
| 76 | config.plugin('preload').tap(() => [ | 78 | config.plugin('preload').tap(() => [ | ... | ... |
-
Please register or sign in to post a comment