a28d8b97 by renchao@pashanhoo.com

style:申请业务规则

1 parent 3962ee4c
1 import filter from '@/utils/filter.js' 1 import filter from '@/utils/filter.js'
2 import store from '@/store/index.js'
2 let vm = null 3 let vm = null
3 4
4 const sendThis = (_this) => { 5 const sendThis = (_this) => {
...@@ -8,7 +9,7 @@ class data extends filter { ...@@ -8,7 +9,7 @@ class data extends filter {
8 constructor() { 9 constructor() {
9 super() 10 super()
10 } 11 }
11 djqxCol() { 12 djqxCol () {
12 return [ 13 return [
13 { 14 {
14 width: '60', 15 width: '60',
...@@ -104,7 +105,7 @@ class data extends filter { ...@@ -104,7 +105,7 @@ class data extends filter {
104 ] 105 ]
105 } 106 }
106 107
107 clxxCol() { 108 clxxCol () {
108 return [ 109 return [
109 { 110 {
110 width: '60', 111 width: '60',
...@@ -167,7 +168,7 @@ class data extends filter { ...@@ -167,7 +168,7 @@ class data extends filter {
167 <el-select value={scope.row[scope.column.property]} 168 <el-select value={scope.row[scope.column.property]}
168 onChange={(val) => { scope.row[scope.column.property] = val }} clearable> 169 onChange={(val) => { scope.row[scope.column.property] = val }} clearable>
169 { 170 {
170 vm.dictData['A40'].map(option => { 171 store.getters.dictData['A40'].map(option => {
171 return ( 172 return (
172 <el-option label={option.dname} value={option.dcode}></el-option> 173 <el-option label={option.dname} value={option.dcode}></el-option>
173 ) 174 )
......
...@@ -68,8 +68,8 @@ ...@@ -68,8 +68,8 @@
68 </el-col> 68 </el-col>
69 <el-col :span="1"> 69 <el-col :span="1">
70 <el-upload ref="upload" :action="imgUploadUrl" :limit="1" accept=".xls, .xlsx" :show-file-list="false" 70 <el-upload ref="upload" :action="imgUploadUrl" :limit="1" accept=".xls, .xlsx" :show-file-list="false"
71 :disabled="requested" :file-list="fileList" :before-upload="uploadRecord" :on-success="handleSuccess"> 71 :before-upload="uploadRecord" :on-success="handleSuccess">
72 <el-button type="primary" icon="el-icon-upload" :loading="requested">上传材料</el-button> 72 <el-button type="primary" icon="el-icon-upload">上传材料</el-button>
73 </el-upload> 73 </el-upload>
74 </el-col> 74 </el-col>
75 </el-row> 75 </el-row>
...@@ -128,11 +128,11 @@ ...@@ -128,11 +128,11 @@
128 </div> 128 </div>
129 </template> 129 </template>
130 <script> 130 <script>
131 import { mapGetters } from "vuex"; 131 import { uploadUrl } from '@/api/file'
132 import { upward, down } from "@/utils/operation"; 132 import { upward, down } from "@/utils/operation";
133 import { getDjlxInfo, getSqdjywDetail, saveSqdjyw } from "@/api/system.js"; 133 import { getDjlxInfo, getSqdjywDetail, saveSqdjyw } from "@/api/system.js";
134 import { datas, sendThis } from "./sqywDetail"; 134 import { datas, sendThis } from "./sqywDetail";
135 export default { 135 export default {
136 name: "componentDialog", 136 name: "componentDialog",
137 props: { 137 props: {
138 formData: { 138 formData: {
...@@ -145,16 +145,17 @@ export default { ...@@ -145,16 +145,17 @@ export default {
145 tn: 0, 145 tn: 0,
146 n: 0, 146 n: 0,
147 djlxList: [], 147 djlxList: [],
148 options: [],
149 imgUploadUrl: uploadUrl(),
148 title: "", 150 title: "",
149 activeName: "1", 151 activeName: "1",
150 form: {}, 152 form: {
153 ywDetail: {}
154 },
151 djqxCol: datas.djqxCol(), 155 djqxCol: datas.djqxCol(),
152 clxxCol: datas.clxxCol(), 156 clxxCol: datas.clxxCol(),
153 }; 157 };
154 }, 158 },
155 computed: {
156 ...mapGetters(["dictData"]),
157 },
158 mounted () { 159 mounted () {
159 sendThis(this) 160 sendThis(this)
160 this.init() 161 this.init()
...@@ -173,6 +174,23 @@ export default { ...@@ -173,6 +174,23 @@ export default {
173 } 174 }
174 }) 175 })
175 }, 176 },
177 uploadRecord (file) {
178 this.requested = true
179 this.files = file;
180 const extension = file.name.split('.')[1] === 'xls'
181 const extension2 = file.name.split('.')[1] === 'xlsx'
182 const isLt5M = file.size / 1024 / 1024 < 5
183 if (!extension && !extension2) {
184 this.$message.warning('上传模板只能是 xls、xlsx格式!')
185 this.requested = false
186 }
187 if (!isLt5M) {
188 this.$message.warning('上传模板大小不能超过 5MB!')
189 this.requested = false
190 }
191 return (extension || extension2) && isLt5M
192 },
193 handleSuccess () { },
176 //tab选项卡事件 194 //tab选项卡事件
177 handleTitleSelct (obj, index) { 195 handleTitleSelct (obj, index) {
178 this.n = 0; 196 this.n = 0;
...@@ -244,29 +262,29 @@ export default { ...@@ -244,29 +262,29 @@ export default {
244 this.form.clxx.splice(index, 1); 262 this.form.clxx.splice(index, 1);
245 }, 263 },
246 }, 264 },
247 }; 265 };
248 </script> 266 </script>
249 <style lang='scss' scoped> 267 <style lang='scss' scoped>
250 @import "~@/styles/mixin.scss"; 268 @import "~@/styles/mixin.scss";
251 @import "~@/styles/dialogBox.scss"; 269 @import "~@/styles/dialogBox.scss";
252 @import "~@/styles/collapse.scss"; 270 @import "~@/styles/collapse.scss";
253 @import "~@/styles/dialogBoxheader.scss"; 271 @import "~@/styles/dialogBoxheader.scss";
254 272
255 .contentBox { 273 .contentBox {
256 height: 75vh; 274 height: 75vh;
257 overflow-y: scroll; 275 overflow-y: scroll;
258 } 276 }
259 277
260 .el-radio-group { 278 .el-radio-group {
261 white-space: nowrap; 279 white-space: nowrap;
262 } 280 }
263 281
264 .form { 282 .form {
265 background: #eee; 283 background: #eee;
266 padding: 0 10px; 284 padding: 0 10px;
267 } 285 }
268 286
269 .edit-title-list { 287 .edit-title-list {
270 @include flex; 288 @include flex;
271 289
272 li { 290 li {
...@@ -282,21 +300,21 @@ export default { ...@@ -282,21 +300,21 @@ export default {
282 @extend .active; 300 @extend .active;
283 } 301 }
284 } 302 }
285 } 303 }
286 304
287 .active { 305 .active {
288 background: $light-blue !important; 306 background: $light-blue !important;
289 color: #fff; 307 color: #fff;
290 } 308 }
291 309
292 .dyztsd-title { 310 .dyztsd-title {
293 @include flex; 311 @include flex;
294 align-items: center; 312 align-items: center;
295 justify-content: space-between; 313 justify-content: space-between;
296 padding-left: 20px; 314 padding-left: 20px;
297 } 315 }
298 316
299 .qlxx-list { 317 .qlxx-list {
300 @include flex; 318 @include flex;
301 flex-wrap: wrap; 319 flex-wrap: wrap;
302 padding-left: 20px; 320 padding-left: 20px;
...@@ -305,9 +323,9 @@ export default { ...@@ -305,9 +323,9 @@ export default {
305 width: 25%; 323 width: 25%;
306 margin-bottom: 15px; 324 margin-bottom: 15px;
307 } 325 }
308 } 326 }
309 327
310 .screen-list { 328 .screen-list {
311 @include flex; 329 @include flex;
312 align-items: center; 330 align-items: center;
313 flex-wrap: wrap; 331 flex-wrap: wrap;
...@@ -332,5 +350,5 @@ export default { ...@@ -332,5 +350,5 @@ export default {
332 li:nth-child(odd) { 350 li:nth-child(odd) {
333 border-right: 1px solid $borderColor; 351 border-right: 1px solid $borderColor;
334 } 352 }
335 } 353 }
336 </style> 354 </style>
......