Merge branch 'master' of http://yun.pashanhoo.com:9090/bdc/bdcdj-web
Showing
15 changed files
with
256 additions
and
170 deletions
... | @@ -73,6 +73,7 @@ export function bdcqzPreview (data) { | ... | @@ -73,6 +73,7 @@ export function bdcqzPreview (data) { |
73 | return request({ | 73 | return request({ |
74 | url: SERVER.SERVERAPI + '/rest/ywbl/bdcqz/bdcqzPreview', | 74 | url: SERVER.SERVERAPI + '/rest/ywbl/bdcqz/bdcqzPreview', |
75 | method: 'post', | 75 | method: 'post', |
76 | data | 76 | data, |
77 | responseType: 'blob' | ||
77 | }) | 78 | }) |
78 | } | 79 | } |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
... | @@ -119,6 +119,25 @@ export function saveSpyjBySlsq (data) { | ... | @@ -119,6 +119,25 @@ export function saveSpyjBySlsq (data) { |
119 | data | 119 | data |
120 | }) | 120 | }) |
121 | } | 121 | } |
122 | |||
123 | // 获取用户常用意见 | ||
124 | export function getUserCommonOpinion (data) { | ||
125 | return request({ | ||
126 | url: SERVER.SERVERAPI + '/rest/ywbl/opinion/getUserCommonOpinion', | ||
127 | method: 'post', | ||
128 | data | ||
129 | }) | ||
130 | } | ||
131 | |||
132 | // 新增用户常用意见 | ||
133 | export function addUserCommonOpinion (params) { | ||
134 | return request({ | ||
135 | url: SERVER.SERVERAPI + '/rest/ywbl/opinion/addUserCommonOpinion', | ||
136 | method: 'get', | ||
137 | params | ||
138 | }) | ||
139 | } | ||
140 | |||
122 | // 登簿接口 | 141 | // 登簿接口 |
123 | export function record (data) { | 142 | export function record (data) { |
124 | return request({ | 143 | return request({ | ... | ... |
... | @@ -41,7 +41,6 @@ | ... | @@ -41,7 +41,6 @@ |
41 | <script> | 41 | <script> |
42 | import LbRender from './lb-render' | 42 | import LbRender from './lb-render' |
43 | import forced from './forced.js' | 43 | import forced from './forced.js' |
44 | import radio from './radio.js' | ||
45 | export default { | 44 | export default { |
46 | name: 'LbColumn', | 45 | name: 'LbColumn', |
47 | props: { | 46 | props: { |
... | @@ -54,13 +53,10 @@ export default { | ... | @@ -54,13 +53,10 @@ export default { |
54 | }, | 53 | }, |
55 | methods: { | 54 | methods: { |
56 | setColumn () { | 55 | setColumn () { |
57 | if (this.column.type && this.column.type != 'radio') { | 56 | if (this.column.type) { |
58 | this.column.renderHeader = forced[this.column.type].renderHeader | 57 | this.column.renderHeader = forced[this.column.type].renderHeader |
59 | this.column.render = this.column.render || forced[this.column.type].renderCell | 58 | this.column.render = this.column.render || forced[this.column.type].renderCell |
60 | } | 59 | } |
61 | if (this.column.type == 'radio') { | ||
62 | this.column.render = this.column.render || radio[this.column.type].renderCell | ||
63 | } | ||
64 | if (this.column.formatter) { | 60 | if (this.column.formatter) { |
65 | this.column.render = (h, scope) => { | 61 | this.column.render = (h, scope) => { |
66 | return <span>{scope.column.formatter(scope.row, scope.column, scope.row, scope.$index)}</span> | 62 | return <span>{scope.column.formatter(scope.row, scope.column, scope.row, scope.$index)}</span> | ... | ... |
... | @@ -11,9 +11,15 @@ | ... | @@ -11,9 +11,15 @@ |
11 | <template> | 11 | <template> |
12 | <div :class="['lb-table', customClass]"> | 12 | <div :class="['lb-table', customClass]"> |
13 | <el-table v-if="!heightNumSetting" class="table-fixed" :row-style="{ height: '50px' }" ref="elTable" | 13 | <el-table v-if="!heightNumSetting" class="table-fixed" :row-style="{ height: '50px' }" ref="elTable" |
14 | :border='border' :row-class-name="tableRowClassName" :show-header='showHeader' | 14 | :border='border' :row-class-name="tableRowClassName" :show-header='showHeader' @row-click="singleElection" |
15 | :header-cell-style="{ background: 'rgb(236, 245, 255)' }" v-bind="$attrs" :height="tableHeight" v-on="$listeners" | 15 | :header-cell-style="{ background: 'rgb(236, 245, 255)' }" v-bind="$attrs" :height="tableHeight" v-on="$listeners" |
16 | :data="data" style="width: 100%" :span-method="this.merge ? this.mergeMethod : this.spanMethod"> | 16 | :data="data" style="width: 100%" :span-method="this.merge ? this.mergeMethod : this.spanMethod"> |
17 | <el-table-column width="45" align="center" v-if="isRadio"> | ||
18 | <template slot-scope="scope"> | ||
19 | <el-radio v-model="selected" :label="scope.$index"></el-radio> | ||
20 | </template> | ||
21 | </el-table-column> | ||
22 | |||
17 | <lb-column v-bind="$attrs" v-for="(item, index) in column" :key="index" :column="item"> | 23 | <lb-column v-bind="$attrs" v-for="(item, index) in column" :key="index" :column="item"> |
18 | </lb-column> | 24 | </lb-column> |
19 | </el-table> | 25 | </el-table> |
... | @@ -22,6 +28,12 @@ | ... | @@ -22,6 +28,12 @@ |
22 | :row-class-name="tableRowClassName" :show-header='showHeader' | 28 | :row-class-name="tableRowClassName" :show-header='showHeader' |
23 | :header-cell-style="{ background: 'rgb(236, 245, 255)' }" v-bind="$attrs" :max-height="maxHeight" | 29 | :header-cell-style="{ background: 'rgb(236, 245, 255)' }" v-bind="$attrs" :max-height="maxHeight" |
24 | v-on="$listeners" :data="data" style="width: 100%" :span-method="this.merge ? this.mergeMethod : this.spanMethod"> | 30 | v-on="$listeners" :data="data" style="width: 100%" :span-method="this.merge ? this.mergeMethod : this.spanMethod"> |
31 | |||
32 | <el-table-column width="45" align="center" v-if="isRadio"> | ||
33 | <template slot-scope="scope"> | ||
34 | <el-radio v-model="selected" :label="scope.$index"></el-radio> | ||
35 | </template> | ||
36 | </el-table-column> | ||
25 | <lb-column v-bind="$attrs" v-for="(item, index) in column" :key="index" :column="item"> | 37 | <lb-column v-bind="$attrs" v-for="(item, index) in column" :key="index" :column="item"> |
26 | </lb-column> | 38 | </lb-column> |
27 | </el-table> | 39 | </el-table> |
... | @@ -45,6 +57,10 @@ export default { | ... | @@ -45,6 +57,10 @@ export default { |
45 | type: Boolean, | 57 | type: Boolean, |
46 | default: true, | 58 | default: true, |
47 | }, | 59 | }, |
60 | isRadio: { | ||
61 | type: Boolean, | ||
62 | default: false, | ||
63 | }, | ||
48 | border: { | 64 | border: { |
49 | type: Boolean, | 65 | type: Boolean, |
50 | default: true, | 66 | default: true, |
... | @@ -87,6 +103,7 @@ export default { | ... | @@ -87,6 +103,7 @@ export default { |
87 | tableHeight: '', | 103 | tableHeight: '', |
88 | mergeLine: {}, | 104 | mergeLine: {}, |
89 | mergeIndex: {}, | 105 | mergeIndex: {}, |
106 | selected: '' | ||
90 | } | 107 | } |
91 | }, | 108 | }, |
92 | created () { | 109 | created () { |
... | @@ -99,6 +116,13 @@ export default { | ... | @@ -99,6 +116,13 @@ export default { |
99 | }, | 116 | }, |
100 | }, | 117 | }, |
101 | methods: { | 118 | methods: { |
119 | |||
120 | // 单选 | ||
121 | singleElection (row) { | ||
122 | this.selected = this.data.indexOf(row); | ||
123 | console.log(this.selected); | ||
124 | }, | ||
125 | |||
102 | tableRowClassName ({ row, rowIndex }) { | 126 | tableRowClassName ({ row, rowIndex }) { |
103 | if (rowIndex % 2 === 1) { | 127 | if (rowIndex % 2 === 1) { |
104 | return 'interlaced'; | 128 | return 'interlaced'; |
... | @@ -197,4 +221,8 @@ export default { | ... | @@ -197,4 +221,8 @@ export default { |
197 | padding-left: 3px; | 221 | padding-left: 3px; |
198 | padding-right: 3px; | 222 | padding-right: 3px; |
199 | } | 223 | } |
224 | |||
225 | /deep/.el-radio__label { | ||
226 | display: none; | ||
227 | } | ||
200 | </style> | 228 | </style> | ... | ... |
src/components/LbTable/radio.js
deleted
100644 → 0
1 | export default { | ||
2 | radio: { | ||
3 | renderHeader: (h, { store }) => { | ||
4 | return '单选' | ||
5 | }, | ||
6 | renderCell: (h, { row, column, store, $index }) => { | ||
7 | return ( | ||
8 | <el-radio | ||
9 | nativeOn-click={event => event.stopPropagation()} | ||
10 | value={store.isSelected(row)} | ||
11 | disabled={ | ||
12 | column.selectable | ||
13 | ? !column.selectable.call(null, row, $index) | ||
14 | : false | ||
15 | } | ||
16 | on-input={() => { | ||
17 | store.commit('rowSelectedChanged', row) | ||
18 | }} | ||
19 | /> | ||
20 | ) | ||
21 | }, | ||
22 | sortable: false, | ||
23 | resizable: false | ||
24 | }, | ||
25 | index: { | ||
26 | renderHeader: (h, scope) => { | ||
27 | return <span>{scope.column.label || '#'}</span> | ||
28 | }, | ||
29 | renderCell: (h, { $index, column }) => { | ||
30 | let i = $index + 1 | ||
31 | const index = column.index | ||
32 | |||
33 | if (typeof index === 'number') { | ||
34 | i = $index + index | ||
35 | } else if (typeof index === 'function') { | ||
36 | i = index($index) | ||
37 | } | ||
38 | |||
39 | return <div>{i}</div> | ||
40 | }, | ||
41 | sortable: false | ||
42 | }, | ||
43 | expand: { | ||
44 | renderHeader: (h, scope) => { | ||
45 | return <span>{scope.column.label || ''}</span> | ||
46 | }, | ||
47 | renderCell: (h, { row, store }, proxy) => { | ||
48 | const expanded = store.states.expandRows.indexOf(row) > -1 | ||
49 | return ( | ||
50 | <div | ||
51 | class={ | ||
52 | 'el-table__expand-icon ' + | ||
53 | (expanded ? 'el-table__expand-icon--expanded' : '') | ||
54 | } | ||
55 | on-click={e => proxy.handleExpandClick(row, e)} | ||
56 | > | ||
57 | <i class='el-icon el-icon-arrow-right' /> | ||
58 | </div> | ||
59 | ) | ||
60 | }, | ||
61 | sortable: false, | ||
62 | resizable: false, | ||
63 | className: 'el-table__expand-column' | ||
64 | } | ||
65 | } |
... | @@ -41,7 +41,6 @@ | ... | @@ -41,7 +41,6 @@ |
41 | <script> | 41 | <script> |
42 | import LbRender from './lb-render' | 42 | import LbRender from './lb-render' |
43 | import forced from './forced.js' | 43 | import forced from './forced.js' |
44 | import radio from './radio.js' | ||
45 | export default { | 44 | export default { |
46 | name: 'LbColumn', | 45 | name: 'LbColumn', |
47 | props: { | 46 | props: { |
... | @@ -54,13 +53,10 @@ export default { | ... | @@ -54,13 +53,10 @@ export default { |
54 | }, | 53 | }, |
55 | methods: { | 54 | methods: { |
56 | setColumn () { | 55 | setColumn () { |
57 | if (this.column.type && this.column.type != 'radio') { | 56 | if (this.column.type) { |
58 | this.column.renderHeader = forced[this.column.type].renderHeader | 57 | this.column.renderHeader = forced[this.column.type].renderHeader |
59 | this.column.render = this.column.render || forced[this.column.type].renderCell | 58 | this.column.render = this.column.render || forced[this.column.type].renderCell |
60 | } | 59 | } |
61 | if (this.column.type == 'radio') { | ||
62 | this.column.render = this.column.render || radio[this.column.type].renderCell | ||
63 | } | ||
64 | if (this.column.formatter) { | 60 | if (this.column.formatter) { |
65 | this.column.render = (h, scope) => { | 61 | this.column.render = (h, scope) => { |
66 | return <span>{scope.column.formatter(scope.row, scope.column, scope.row, scope.$index)}</span> | 62 | return <span>{scope.column.formatter(scope.row, scope.column, scope.row, scope.$index)}</span> | ... | ... |
... | @@ -11,9 +11,15 @@ | ... | @@ -11,9 +11,15 @@ |
11 | <template> | 11 | <template> |
12 | <div :class="['lb-table', customClass]"> | 12 | <div :class="['lb-table', customClass]"> |
13 | <el-table v-if="!heightNumSetting" class="table-fixed" :row-style="{ height: '50px' }" ref="elTable" | 13 | <el-table v-if="!heightNumSetting" class="table-fixed" :row-style="{ height: '50px' }" ref="elTable" |
14 | :border='border' :row-class-name="tableRowClassName" :show-header='showHeader' | 14 | :border='border' :row-class-name="tableRowClassName" :show-header='showHeader' @row-click="singleElection" |
15 | :header-cell-style="{ background: 'rgb(236, 245, 255)' }" v-bind="$attrs" :height="tableHeight" v-on="$listeners" | 15 | :header-cell-style="{ background: 'rgb(236, 245, 255)' }" v-bind="$attrs" :height="tableHeight" v-on="$listeners" |
16 | :data="data" style="width: 100%" :span-method="this.merge ? this.mergeMethod : this.spanMethod"> | 16 | :data="data" style="width: 100%" :span-method="this.merge ? this.mergeMethod : this.spanMethod"> |
17 | <el-table-column width="45" align="center" v-if="isRadio"> | ||
18 | <template slot-scope="scope"> | ||
19 | <el-radio v-model="selected" :label="scope.$index"></el-radio> | ||
20 | </template> | ||
21 | </el-table-column> | ||
22 | |||
17 | <lb-column v-bind="$attrs" v-for="(item, index) in column" :key="index" :column="item"> | 23 | <lb-column v-bind="$attrs" v-for="(item, index) in column" :key="index" :column="item"> |
18 | </lb-column> | 24 | </lb-column> |
19 | </el-table> | 25 | </el-table> |
... | @@ -22,6 +28,12 @@ | ... | @@ -22,6 +28,12 @@ |
22 | :row-class-name="tableRowClassName" :show-header='showHeader' | 28 | :row-class-name="tableRowClassName" :show-header='showHeader' |
23 | :header-cell-style="{ background: 'rgb(236, 245, 255)' }" v-bind="$attrs" :max-height="maxHeight" | 29 | :header-cell-style="{ background: 'rgb(236, 245, 255)' }" v-bind="$attrs" :max-height="maxHeight" |
24 | v-on="$listeners" :data="data" style="width: 100%" :span-method="this.merge ? this.mergeMethod : this.spanMethod"> | 30 | v-on="$listeners" :data="data" style="width: 100%" :span-method="this.merge ? this.mergeMethod : this.spanMethod"> |
31 | |||
32 | <el-table-column width="45" align="center" v-if="isRadio"> | ||
33 | <template slot-scope="scope"> | ||
34 | <el-radio v-model="selected" :label="scope.$index"></el-radio> | ||
35 | </template> | ||
36 | </el-table-column> | ||
25 | <lb-column v-bind="$attrs" v-for="(item, index) in column" :key="index" :column="item"> | 37 | <lb-column v-bind="$attrs" v-for="(item, index) in column" :key="index" :column="item"> |
26 | </lb-column> | 38 | </lb-column> |
27 | </el-table> | 39 | </el-table> |
... | @@ -45,6 +57,10 @@ export default { | ... | @@ -45,6 +57,10 @@ export default { |
45 | type: Boolean, | 57 | type: Boolean, |
46 | default: true, | 58 | default: true, |
47 | }, | 59 | }, |
60 | isRadio: { | ||
61 | type: Boolean, | ||
62 | default: false, | ||
63 | }, | ||
48 | border: { | 64 | border: { |
49 | type: Boolean, | 65 | type: Boolean, |
50 | default: true, | 66 | default: true, |
... | @@ -87,6 +103,7 @@ export default { | ... | @@ -87,6 +103,7 @@ export default { |
87 | tableHeight: '', | 103 | tableHeight: '', |
88 | mergeLine: {}, | 104 | mergeLine: {}, |
89 | mergeIndex: {}, | 105 | mergeIndex: {}, |
106 | selected: '' | ||
90 | } | 107 | } |
91 | }, | 108 | }, |
92 | created () { | 109 | created () { |
... | @@ -99,6 +116,13 @@ export default { | ... | @@ -99,6 +116,13 @@ export default { |
99 | }, | 116 | }, |
100 | }, | 117 | }, |
101 | methods: { | 118 | methods: { |
119 | |||
120 | // 单选 | ||
121 | singleElection (row) { | ||
122 | this.selected = this.data.indexOf(row); | ||
123 | console.log(this.selected); | ||
124 | }, | ||
125 | |||
102 | tableRowClassName ({ row, rowIndex }) { | 126 | tableRowClassName ({ row, rowIndex }) { |
103 | if (rowIndex % 2 === 1) { | 127 | if (rowIndex % 2 === 1) { |
104 | return 'interlaced'; | 128 | return 'interlaced'; |
... | @@ -197,4 +221,8 @@ export default { | ... | @@ -197,4 +221,8 @@ export default { |
197 | padding-left: 3px; | 221 | padding-left: 3px; |
198 | padding-right: 3px; | 222 | padding-right: 3px; |
199 | } | 223 | } |
224 | |||
225 | /deep/.el-radio__label { | ||
226 | display: none; | ||
227 | } | ||
200 | </style> | 228 | </style> | ... | ... |
... | @@ -7,6 +7,7 @@ const getters = { | ... | @@ -7,6 +7,7 @@ const getters = { |
7 | token: state => state.user.token, | 7 | token: state => state.user.token, |
8 | avatar: state => state.user.avatar, | 8 | avatar: state => state.user.avatar, |
9 | name: state => state.user.name, | 9 | name: state => state.user.name, |
10 | userData: state => state.user.userData, | ||
10 | permission_routes: state => state.permission.routes, | 11 | permission_routes: state => state.permission.routes, |
11 | addRoutes: state => state.permission.addRoutes, | 12 | addRoutes: state => state.permission.addRoutes, |
12 | addDict: state => state.dict.addDict, | 13 | addDict: state => state.dict.addDict, | ... | ... |
... | @@ -2,10 +2,12 @@ import { getUserInfo } from '@/api/user' | ... | @@ -2,10 +2,12 @@ import { getUserInfo } from '@/api/user' |
2 | const state = { | 2 | const state = { |
3 | name: '', | 3 | name: '', |
4 | avatar: 'https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png', | 4 | avatar: 'https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png', |
5 | userData: {} | ||
5 | } | 6 | } |
6 | const mutations = { | 7 | const mutations = { |
7 | SET_NAME: (state, name) => { | 8 | SET_NAME: (state, data) => { |
8 | state.name = name | 9 | state.name = data.loginName |
10 | state.userData = data | ||
9 | } | 11 | } |
10 | } | 12 | } |
11 | 13 | ||
... | @@ -13,7 +15,7 @@ const actions = { | ... | @@ -13,7 +15,7 @@ const actions = { |
13 | getUserInfo ({ commit }) { | 15 | getUserInfo ({ commit }) { |
14 | return new Promise(async (resolve) => { | 16 | return new Promise(async (resolve) => { |
15 | let { result: res } = await getUserInfo() | 17 | let { result: res } = await getUserInfo() |
16 | commit('SET_NAME', res.loginName) | 18 | commit('SET_NAME', res) |
17 | resolve(true) | 19 | resolve(true) |
18 | }) | 20 | }) |
19 | }, | 21 | }, | ... | ... |
1 | <template> | ||
2 | <dialogBox title="常用意见" width="60%" isMain v-model="value" @closeDialog="closeDialog" :isButton="false"> | ||
3 | <div> | ||
4 | <el-button type="primary" native-type="submit" @click="openDialog()">新增常用</el-button> | ||
5 | <lb-table :page-size="pageData.size" border :current-page.sync="pageData.current" :total="tableData.total" | ||
6 | @size-change="handleSizeChange" @p-current-change="handleCurrentChange" :column="columns" | ||
7 | :data="tableData.data"> | ||
8 | </lb-table> | ||
9 | <el-dialog title="新增意见" :visible.sync="addDialog" width="50%" :modal="false" top="30vh"> | ||
10 | <div class="invalid-reson">常用意见:</div> | ||
11 | <el-input v-model="commonOpinion" placeholder="请输入常用意见" type="textarea" :rows="4"></el-input> | ||
12 | <div class="dialog-footer"> | ||
13 | <el-button @click="closeaddDiglog()">取 消</el-button> | ||
14 | <el-button type="primary" @click="addOpinion()">确 定</el-button> | ||
15 | </div> | ||
16 | </el-dialog> | ||
17 | </div> | ||
18 | </dialogBox> | ||
19 | </template> | ||
20 | <script> | ||
21 | import table from "@/utils/mixin/table"; | ||
22 | import { getUserCommonOpinion,addUserCommonOpinion } from "@/api/fqsq.js" | ||
23 | export default { | ||
24 | components: {}, | ||
25 | mixins: [table], | ||
26 | props: { | ||
27 | value: { type: Boolean, default: false }, | ||
28 | }, | ||
29 | data () { | ||
30 | return { | ||
31 | columns: [ | ||
32 | { | ||
33 | label: '序号', | ||
34 | type: 'index', | ||
35 | width: '50', | ||
36 | }, | ||
37 | { | ||
38 | prop: "opinion", | ||
39 | label: "意见描述", | ||
40 | }, | ||
41 | { | ||
42 | label: '操作', | ||
43 | width: '100', | ||
44 | render: (h, scope) => { | ||
45 | return ( | ||
46 | <div> | ||
47 | <el-button type="text" onClick={() => { this.useCommonOpinion(scope.row) }}>使用</el-button> | ||
48 | </div> | ||
49 | ) | ||
50 | } | ||
51 | } | ||
52 | ], | ||
53 | tableData: { | ||
54 | total: 0, | ||
55 | data: [], | ||
56 | }, | ||
57 | addDialog: false, | ||
58 | commonOpinion: '' | ||
59 | } | ||
60 | }, | ||
61 | mounted() { | ||
62 | this.queryList() | ||
63 | }, | ||
64 | methods: { | ||
65 | queryList(){ | ||
66 | getUserCommonOpinion(this.pageData).then(res => { | ||
67 | let { total, records } = res.result | ||
68 | this.tableData.total = total; | ||
69 | this.tableData.data = records ? records : [] | ||
70 | }) | ||
71 | }, | ||
72 | //新增常用意见 | ||
73 | addOpinion(){ | ||
74 | addUserCommonOpinion({commonOpinion: this.commonOpinion}).then(res => { | ||
75 | if(res.code == 200){ | ||
76 | this.closeaddDiglog(); | ||
77 | this.queryList() | ||
78 | }else{ | ||
79 | this.$message.error(res.message) | ||
80 | } | ||
81 | }) | ||
82 | }, | ||
83 | //打开新增弹窗 | ||
84 | openDialog() { | ||
85 | this.addDialog = true | ||
86 | }, | ||
87 | //关闭新增弹窗 | ||
88 | closeaddDiglog() { | ||
89 | this.addDialog = false; | ||
90 | this.commonOpinion = ""; | ||
91 | }, | ||
92 | //使用常用意见 | ||
93 | useCommonOpinion(item){ | ||
94 | this.$parent.useOpinion(item.opinion); | ||
95 | this.$emit("input", false); | ||
96 | }, | ||
97 | //关闭列表弹窗 | ||
98 | closeDialog () { | ||
99 | this.$emit("input", false); | ||
100 | this.commonOpinion = ""; | ||
101 | } | ||
102 | } | ||
103 | } | ||
104 | </script> | ||
105 | <style scoped lang='scss'> | ||
106 | .invalid-reson { | ||
107 | margin-bottom: 10px; | ||
108 | } | ||
109 | .dialog-footer { | ||
110 | margin-top: 10px; | ||
111 | display: flex; | ||
112 | justify-content: flex-end; | ||
113 | } | ||
114 | </style> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -14,17 +14,11 @@ | ... | @@ -14,17 +14,11 @@ |
14 | <el-row> | 14 | <el-row> |
15 | <el-col :span="24"> | 15 | <el-col :span="24"> |
16 | <el-form-item label-width="0" class="opinion_item" prop="shyj"> | 16 | <el-form-item label-width="0" class="opinion_item" prop="shyj"> |
17 | <el-input type="textarea" :rows="4" class="opinion" placeholder="请输入审批意见" v-if="item.stepShjy == '1'" | 17 | <el-input type="textarea" :rows="4" class="opinion" placeholder="请输入审批意见" v-if="item.stepShjy == '1' && ableOperation" |
18 | v-model="ruleForm.shyj"></el-input> | 18 | v-model="ruleForm.shyj"></el-input> |
19 | <el-input type="textarea" :rows="4" class="opinion" v-model="item.shyj" v-else :disabled="true"> | 19 | <el-input type="textarea" :rows="4" class="opinion" v-model="item.shyj" v-else :disabled="true"> |
20 | </el-input> | 20 | </el-input> |
21 | <el-popover placement="right" width="50" trigger="hover" v-if="item.stepShjy == '1'"> | 21 | <el-button class="opinion_btn" @click="commonOpinion" v-if="item.stepShjy == '1' && ableOperation">常用意见</el-button> |
22 | <ul class="pointer"> | ||
23 | <li @click="handleClick">复审</li> | ||
24 | <li>初审意见</li> | ||
25 | </ul> | ||
26 | <el-button class="opinion_btn" slot="reference">常用意见</el-button> | ||
27 | </el-popover> | ||
28 | </el-form-item> | 22 | </el-form-item> |
29 | </el-col> | 23 | </el-col> |
30 | </el-row> | 24 | </el-row> |
... | @@ -42,32 +36,35 @@ | ... | @@ -42,32 +36,35 @@ |
42 | </el-row> | 36 | </el-row> |
43 | </div> | 37 | </div> |
44 | </div> | 38 | </div> |
45 | <div class="submit_button" v-if="!$route.query.viewtype"> | 39 | <div class="submit_button" v-if="ableOperation"> |
46 | <el-button type="primary" v-if="tableData.length>0" @click="onSubmit">保存</el-button> | 40 | <el-button type="primary" @click="onSubmit">保存</el-button> |
47 | </div> | 41 | </div> |
48 | </el-form> | 42 | </el-form> |
49 | <el-empty v-if="tableData.length==0" description="暂无数据"></el-empty> | 43 | <el-empty v-if="tableData.length==0" description="暂无数据"></el-empty> |
44 | <commonDialog v-model="commonDialog" /> | ||
50 | </div> | 45 | </div> |
51 | </template> | 46 | </template> |
52 | <script> | 47 | <script> |
53 | import { getSpyjList, saveSpyj, saveSpyjBySlsq } from "@/api/fqsq.js"; | 48 | import { getSpyjList, saveSpyj, saveSpyjBySlsq } from "@/api/fqsq.js"; |
49 | import { popupDialog } from "@/utils/popup.js"; | ||
50 | import commonDialog from "./commonOpinion.vue"; | ||
51 | import { mapGetters } from 'vuex' | ||
54 | export default { | 52 | export default { |
55 | components: {}, | 53 | components: {commonDialog}, |
56 | props: { | 54 | props: { |
57 | }, | 55 | }, |
56 | computed: { | ||
57 | ...mapGetters([ 'userData']) | ||
58 | }, | ||
58 | data () { | 59 | data () { |
59 | return { | 60 | return { |
60 | bsmSlsq: '', | 61 | bsmSlsq: '', |
61 | //刷新值 | 62 | //刷新值 |
62 | refresh : 10, | 63 | refresh : 10, |
63 | bestepid: '', | 64 | ableOperation: true, |
64 | ruleForm: { | ||
65 | shyj: '', | ||
66 | bsmSlsq: this.$route.query.bsmSlsq, | 65 | bsmSlsq: this.$route.query.bsmSlsq, |
67 | stepid: this.$route.query.bestepid, | 66 | bestepid: this.$route.query.bestepid, |
68 | shryxm: '', | 67 | ruleForm: {}, |
69 | shjssj: '', | ||
70 | }, | ||
71 | rules: { | 68 | rules: { |
72 | shyj: [ | 69 | shyj: [ |
73 | { required: true, message: '请输入审批意见', trigger: 'blur' } | 70 | { required: true, message: '请输入审批意见', trigger: 'blur' } |
... | @@ -75,10 +72,14 @@ export default { | ... | @@ -75,10 +72,14 @@ export default { |
75 | }, | 72 | }, |
76 | tableData: [], | 73 | tableData: [], |
77 | propsParam: {}, | 74 | propsParam: {}, |
75 | commonDialog: false | ||
78 | } | 76 | } |
79 | }, | 77 | }, |
80 | created () { | 78 | created () { |
81 | this.propsParam = this.$attrs; | 79 | this.propsParam = this.$attrs; |
80 | if(this.$route.query.viewtype){ | ||
81 | this.ableOperation = false | ||
82 | } | ||
82 | this.list(); | 83 | this.list(); |
83 | }, | 84 | }, |
84 | methods: { | 85 | methods: { |
... | @@ -90,24 +91,33 @@ export default { | ... | @@ -90,24 +91,33 @@ export default { |
90 | var formdata = new FormData(); | 91 | var formdata = new FormData(); |
91 | formdata.append("bsmBusiness", this.propsParam.bsmBusiness); | 92 | formdata.append("bsmBusiness", this.propsParam.bsmBusiness); |
92 | formdata.append("bestepid", this.$route.query.bestepid); | 93 | formdata.append("bestepid", this.$route.query.bestepid); |
94 | formdata.append("ableOperation",this.ableOperation) | ||
93 | getSpyjList(formdata).then((res) => { | 95 | getSpyjList(formdata).then((res) => { |
94 | if (res.code === 200 && res.result) { | 96 | if (res.code === 200 && res.result) { |
95 | this.tableData = res.result | 97 | this.tableData = res.result |
96 | this.ruleForm.shyj = res.result[res.result.length - 1].shyj | 98 | this.ruleForm = res.result[res.result.length - 1] |
97 | } | 99 | } |
98 | }) | 100 | }) |
99 | }, | 101 | }, |
100 | onSubmit () { | 102 | onSubmit () { |
103 | this.ruleForm.bsmSlsq = this.bsmSlsq | ||
104 | this.ruleForm.bestepid = this.bestepid | ||
101 | saveSpyjBySlsq(this.ruleForm).then(res => { | 105 | saveSpyjBySlsq(this.ruleForm).then(res => { |
102 | if (res.code === 200) { | 106 | if (res.code === 200) { |
103 | this.$message.success("保存成功") | 107 | this.$message.success("保存成功") |
104 | this.refresh += 1 | 108 | this.refresh += 1 |
105 | this.tableData[this.tableData.length - 1].shryxm = res.result.shryxm | ||
106 | this.tableData[this.tableData.length - 1].shjssj = res.result.shjssj | ||
107 | } else { | 109 | } else { |
108 | this.$message.error(res.message) | 110 | this.$message.error(res.message) |
109 | } | 111 | } |
110 | }) | 112 | }) |
113 | }, | ||
114 | //打开常用意见列表弹窗 | ||
115 | commonOpinion(){ | ||
116 | this.commonDialog = true | ||
117 | }, | ||
118 | //使用常用意见 | ||
119 | useOpinion(opinion){ | ||
120 | this.ruleForm.shyj = opinion | ||
111 | } | 121 | } |
112 | } | 122 | } |
113 | } | 123 | } | ... | ... |
... | @@ -4,37 +4,14 @@ | ... | @@ -4,37 +4,14 @@ |
4 | <el-tabs v-model="activeName" @tab-click="handleClick" v-if="headTabBdcqz.length > 1"> | 4 | <el-tabs v-model="activeName" @tab-click="handleClick" v-if="headTabBdcqz.length > 1"> |
5 | <el-tab-pane :label="item.qlr + '(' + item.bdcqzh + ')'" :name="item.bsmBdcqz" v-for="(item,index) in headTabBdcqz" :key="index"></el-tab-pane> | 5 | <el-tab-pane :label="item.qlr + '(' + item.bdcqzh + ')'" :name="item.bsmBdcqz" v-for="(item,index) in headTabBdcqz" :key="index"></el-tab-pane> |
6 | </el-tabs> | 6 | </el-tabs> |
7 | <div class="aaaa">{{bdcqz.bdcqzlx == '1' ? '不动产权证书' : '不动产权证明'}}</div> | 7 | <div class="zsyl-title">{{bdcqz.bdcqzlx == '1' ? '不动产权证书' : '不动产权证明'}}</div> |
8 | <div class="zsyl-box"> | 8 | <img :src="previewImage"> |
9 | <div class="zsyl-left"> | ||
10 | <div class="zsyl-title"> | ||
11 | <span v-if="bdcqz.bdcqzh">{{bdcqz.bdcqzh}}</span> | ||
12 | <span v-else>____( )________不动产权第 号</span> | ||
13 | </div> | ||
14 | <table class="table-column"> | ||
15 | <tr v-for="(item, colindex) in columns" :key="colindex"> | ||
16 | <td> | ||
17 | <span>{{ item.label }}</span> | ||
18 | </td> | ||
19 | <td> | ||
20 | <span> | ||
21 | {{ getRowValue(item.prop) }} | ||
22 | </span> | ||
23 | </td> | ||
24 | </tr> | ||
25 | </table> | ||
26 | </div> | ||
27 | <div class="zsyl-right"> | ||
28 | <div class="zsyl-title">附记</div> | ||
29 | <div class="zsyl-text">{{bdcqz.fj}}</div> | ||
30 | </div> | ||
31 | </div> | ||
32 | </div> | 9 | </div> |
33 | </template> | 10 | </template> |
34 | 11 | ||
35 | <script> | 12 | <script> |
36 | import { datas } from "../javascript/zsyl.js"; | 13 | import { datas } from "../javascript/zsyl.js"; |
37 | import { getSlsqBdcqzList} from "@/api/bdcqz.js" | 14 | import { getSlsqBdcqzList,bdcqzPreview} from "@/api/bdcqz.js" |
38 | export default { | 15 | export default { |
39 | components: { | 16 | components: { |
40 | }, | 17 | }, |
... | @@ -58,6 +35,8 @@ export default { | ... | @@ -58,6 +35,8 @@ export default { |
58 | headTabBdcqz: [], | 35 | headTabBdcqz: [], |
59 | //tab选择绑定值 | 36 | //tab选择绑定值 |
60 | activeName: '', | 37 | activeName: '', |
38 | //证书图片预览 | ||
39 | previewImage: '', | ||
61 | ruleForm: { | 40 | ruleForm: { |
62 | bsmBdcqz: '', | 41 | bsmBdcqz: '', |
63 | szmc: '不动产权证书', | 42 | szmc: '不动产权证书', |
... | @@ -89,11 +68,12 @@ export default { | ... | @@ -89,11 +68,12 @@ export default { |
89 | getHeadTabBdcqz(){ | 68 | getHeadTabBdcqz(){ |
90 | getSlsqBdcqzList({bsmSlsq: this.formData.bsmSlsq}).then(res => { | 69 | getSlsqBdcqzList({bsmSlsq: this.formData.bsmSlsq}).then(res => { |
91 | if(res.code == 200){ | 70 | if(res.code == 200){ |
92 | if(res.result){ | 71 | if(res.result && res.result.length > 0){ |
93 | this.activeName = res.result[0].bsmBdcqz | 72 | this.activeName = res.result[0].bsmBdcqz |
94 | this.bdcqz = res.result[0] | 73 | this.bdcqz = res.result[0] |
95 | } | ||
96 | this.headTabBdcqz = res.result | 74 | this.headTabBdcqz = res.result |
75 | this.getBdcqzPreview(); | ||
76 | } | ||
97 | } | 77 | } |
98 | 78 | ||
99 | }) | 79 | }) |
... | @@ -102,43 +82,20 @@ export default { | ... | @@ -102,43 +82,20 @@ export default { |
102 | handleClick(e){ | 82 | handleClick(e){ |
103 | this.bdcqz = this.headTabBdcqz[e.index - 0] | 83 | this.bdcqz = this.headTabBdcqz[e.index - 0] |
104 | this.activeName = this.headTabBdcqz.bsmBdcqz | 84 | this.activeName = this.headTabBdcqz.bsmBdcqz |
105 | } | 85 | this.getBdcqzPreview(); |
86 | }, | ||
87 | getBdcqzPreview(){ | ||
88 | bdcqzPreview(this.bdcqz).then(res => { | ||
89 | let blob = new Blob([res]); | ||
90 | let url = window.URL.createObjectURL(blob); | ||
91 | this.previewImage = url; | ||
92 | }) | ||
93 | }, | ||
106 | } | 94 | } |
107 | } | 95 | } |
108 | </script> | 96 | </script> |
109 | <style scoped lang="scss"> | 97 | <style scoped lang="scss"> |
110 | @import "~@/styles/mixin.scss"; | 98 | @import "~@/styles/mixin.scss"; |
111 | .zsyl-box{ | ||
112 | display: flex; | ||
113 | justify-content: space-between; | ||
114 | padding: 20px; | ||
115 | background: #FAFBE5; | ||
116 | .zsyl-left{ | ||
117 | width: 330px; | ||
118 | .zsyl-title{ | ||
119 | font-size: 18px; | ||
120 | text-align: center; | ||
121 | } | ||
122 | } | ||
123 | .zsyl-right{ | ||
124 | width: 330px; | ||
125 | .zsyl-title{ | ||
126 | letter-spacing: 50px; | ||
127 | text-align: center; | ||
128 | text-indent: 50px; | ||
129 | } | ||
130 | .zsyl-text{ | ||
131 | border: 1px solid #ccc; | ||
132 | height: 90%; | ||
133 | } | ||
134 | } | ||
135 | .zsyl-title{ | ||
136 | margin-bottom: 12px; | ||
137 | } | ||
138 | /deep/.el-table__row{ | ||
139 | background: #FAFBE5!important; | ||
140 | } | ||
141 | } | ||
142 | .middle_padding { | 99 | .middle_padding { |
143 | padding-bottom: 10px; | 100 | padding-bottom: 10px; |
144 | } | 101 | } |
... | @@ -166,10 +123,10 @@ export default { | ... | @@ -166,10 +123,10 @@ export default { |
166 | background: rgb(251,249,229); | 123 | background: rgb(251,249,229); |
167 | } | 124 | } |
168 | } | 125 | } |
169 | .aaaa{ | 126 | .zsyl-title{ |
170 | background: #FAFBE5; | 127 | background: #FAFBE5; |
171 | text-align: center; | 128 | text-align: center; |
172 | padding-top: 10px; | 129 | padding: 5px 0px; |
173 | font-size: 20px; | 130 | font-size: 20px; |
174 | } | 131 | } |
175 | </style> | 132 | </style> | ... | ... |
... | @@ -127,7 +127,7 @@ export default { | ... | @@ -127,7 +127,7 @@ export default { |
127 | popupDialog("证书预览", "workflow/components/zsyl", { | 127 | popupDialog("证书预览", "workflow/components/zsyl", { |
128 | bsmSlsq: this.bsmSlsq, | 128 | bsmSlsq: this.bsmSlsq, |
129 | entryType: '1' | 129 | entryType: '1' |
130 | }, '800px') | 130 | }, '1070px') |
131 | break; | 131 | break; |
132 | case "B7": | 132 | case "B7": |
133 | this.$popup("证书领取", "workflow/components/zslq", { | 133 | this.$popup("证书领取", "workflow/components/zslq", { | ... | ... |
... | @@ -289,8 +289,8 @@ export default { | ... | @@ -289,8 +289,8 @@ export default { |
289 | break; | 289 | break; |
290 | case "B5": | 290 | case "B5": |
291 | this.$popup("证书预览", "workflow/components/zsyl", { | 291 | this.$popup("证书预览", "workflow/components/zsyl", { |
292 | height: "600px", | 292 | height: "850px", |
293 | width: "800px", | 293 | width: "1070px", |
294 | formData: { | 294 | formData: { |
295 | bsmSlsq: this.bsmSlsq, | 295 | bsmSlsq: this.bsmSlsq, |
296 | entryType: '1' | 296 | entryType: '1' | ... | ... |
... | @@ -11,9 +11,8 @@ class data extends filter { | ... | @@ -11,9 +11,8 @@ class data extends filter { |
11 | columns () { | 11 | columns () { |
12 | return [ | 12 | return [ |
13 | { | 13 | { |
14 | type: 'radio', | 14 | type: 'selection', |
15 | label: '单选', | 15 | label: '全选' |
16 | width: '50' | ||
17 | }, | 16 | }, |
18 | { | 17 | { |
19 | label: '序号', | 18 | label: '序号', | ... | ... |
-
Please register or sign in to post a comment