14d28100 by 任超

style:样式修改

1 parent e3eaf360
...@@ -221,7 +221,7 @@ table td { ...@@ -221,7 +221,7 @@ table td {
221 cursor: pointer; 221 cursor: pointer;
222 } 222 }
223 223
224 .el-table__body tr:hover { 224 .el-table__body-wrapper .el-table__body tr:hover {
225 background: #063160 !important; 225 background: #063160 !important;
226 box-shadow: inset 0px 0px 20px 0px #03DBFF !important; 226 box-shadow: inset 0px 0px 20px 0px #03DBFF !important;
227 } 227 }
...@@ -233,9 +233,9 @@ table td { ...@@ -233,9 +233,9 @@ table td {
233 233
234 // table 固定列样式 234 // table 固定列样式
235 // tr:hover { 235 // tr:hover {
236 // background: #063160 !important; 236 // background: #063160 !important;
237 // box-shadow: inset 0px 0px 20px 0px #03DBFF !important; 237 // box-shadow: inset 0px 0px 20px 0px #03DBFF !important;
238 // } 238 // }
239 // .el-table__fixed-right-patch { 239 // .el-table__fixed-right-patch {
240 // background-color: #073781 240 // background-color: #073781
241 // } 241 // }
......
...@@ -338,12 +338,45 @@ aside { ...@@ -338,12 +338,45 @@ aside {
338 338
339 // 操作按钮样式 339 // 操作按钮样式
340 .btnColor { 340 .btnColor {
341 color: #8DEAF9; 341 color: #02D9FD;
342 width: 64px;
343 height: 28px;
344 background: rgba(255, 255, 255, 0.1);
345 border-radius: 16px;
342 } 346 }
347
348 .btnColor:hover {
349 color: #02D9FD;
350 width: 64px;
351 height: 28px;
352 background: rgba(255, 255, 255, 0.1);
353 border-radius: 16px;
354 }
355
343 .successColor { 356 .successColor {
344 color:#67C23A 357 width: 64px;
358 height: 28px;
359 background: rgba(255, 255, 255, 0.1);
360 border-radius: 16px;
361 color: #B06974;
345 } 362 }
346 363
364 .successColor:hover {
365 width: 64px;
366 height: 28px;
367 background: rgba(255, 255, 255, 0.1);
368 border-radius: 16px;
369 color: #B06974;
370 }
371
372 // 弹框中间区域样式
373 .dialogCon {
374 background: #031A46;
375 box-shadow: inset 0px 0px 12px 0px #02D9FD;
376 border-radius: 0px 2px 2px 2px;
377 border: 1px solid #6BC1FC;
378 padding: 15px;
379 }
347 380
348 // 通过 入库 样式 381 // 通过 入库 样式
349 .adopt, 382 .adopt,
......
...@@ -125,7 +125,6 @@ export default { ...@@ -125,7 +125,6 @@ export default {
125 onClick={() => { this.handleEdit(scope.row) }} 125 onClick={() => { this.handleEdit(scope.row) }}
126 > 126 >
127 详情 127 详情
128 <i class="el-icon-d-arrow-right"></i>
129 </el-button> 128 </el-button>
130 </div> 129 </div>
131 ) 130 )
......
...@@ -115,11 +115,9 @@ export default { ...@@ -115,11 +115,9 @@ export default {
115 <el-button 115 <el-button
116 type="text" 116 type="text"
117 class='btnColor' 117 class='btnColor'
118 size="mini"
119 onClick={() => { this.handleEdit(scope.row) }} 118 onClick={() => { this.handleEdit(scope.row) }}
120 > 119 >
121 详情 120 详情
122 <i class="el-icon-d-arrow-right"></i>
123 </el-button> 121 </el-button>
124 </div> 122 </div>
125 ) 123 )
......
...@@ -126,7 +126,6 @@ export default { ...@@ -126,7 +126,6 @@ export default {
126 onClick={() => { this.handleEdit(scope.row) }} 126 onClick={() => { this.handleEdit(scope.row) }}
127 > 127 >
128 详情 128 详情
129 <i class="el-icon-d-arrow-right"></i>
130 </el-button> 129 </el-button>
131 </div> 130 </div>
132 ) 131 )
......
...@@ -116,7 +116,6 @@ export default { ...@@ -116,7 +116,6 @@ export default {
116 }} 116 }}
117 > 117 >
118 详情 118 详情
119 <i class="el-icon-d-arrow-right"></i>
120 </el-button> 119 </el-button>
121 </div> 120 </div>
122 ); 121 );
......
...@@ -84,7 +84,6 @@ export default { ...@@ -84,7 +84,6 @@ export default {
84 }} 84 }}
85 > 85 >
86 详情 86 详情
87 <i class="el-icon-d-arrow-right"></i>
88 </el-button> 87 </el-button>
89 </div> 88 </div>
90 ); 89 );
......
...@@ -116,7 +116,6 @@ export default { ...@@ -116,7 +116,6 @@ export default {
116 }} 116 }}
117 > 117 >
118 详情 118 详情
119 <i class="el-icon-d-arrow-right"></i>
120 </el-button> 119 </el-button>
121 </div> 120 </div>
122 ); 121 );
......
...@@ -112,7 +112,6 @@ export default { ...@@ -112,7 +112,6 @@ export default {
112 }} 112 }}
113 > 113 >
114 详情 114 详情
115 <i class="el-icon-d-arrow-right"></i>
116 </el-button> 115 </el-button>
117 </div> 116 </div>
118 ); 117 );
......
...@@ -113,7 +113,6 @@ export default { ...@@ -113,7 +113,6 @@ export default {
113 }} 113 }}
114 > 114 >
115 详情 115 详情
116 <i class="el-icon-d-arrow-right"></i>
117 </el-button> 116 </el-button>
118 </div> 117 </div>
119 ); 118 );
......
...@@ -110,7 +110,6 @@ export default { ...@@ -110,7 +110,6 @@ export default {
110 }} 110 }}
111 > 111 >
112 详情 112 详情
113 <i class="el-icon-d-arrow-right"></i>
114 </el-button> 113 </el-button>
115 </div> 114 </div>
116 ); 115 );
......
...@@ -107,7 +107,6 @@ export default { ...@@ -107,7 +107,6 @@ export default {
107 }} 107 }}
108 > 108 >
109 详情 109 详情
110 <i class="el-icon-d-arrow-right"></i>
111 </el-button> 110 </el-button>
112 </div> 111 </div>
113 ); 112 );
......
...@@ -112,7 +112,6 @@ export default { ...@@ -112,7 +112,6 @@ export default {
112 }} 112 }}
113 > 113 >
114 详情 114 详情
115 <i class="el-icon-d-arrow-right"></i>
116 </el-button> 115 </el-button>
117 </div> 116 </div>
118 ); 117 );
......
...@@ -108,7 +108,6 @@ export default { ...@@ -108,7 +108,6 @@ export default {
108 }} 108 }}
109 > 109 >
110 详情 110 详情
111 <i class="el-icon-d-arrow-right"></i>
112 </el-button> 111 </el-button>
113 </div> 112 </div>
114 ); 113 );
......
...@@ -118,7 +118,6 @@ export default { ...@@ -118,7 +118,6 @@ export default {
118 onClick={() => { this.handleEdit(scope.row) }} 118 onClick={() => { this.handleEdit(scope.row) }}
119 > 119 >
120 详情 120 详情
121 <i class="el-icon-d-arrow-right"></i>
122 </el-button> 121 </el-button>
123 </div> 122 </div>
124 ) 123 )
......
...@@ -106,7 +106,6 @@ export default { ...@@ -106,7 +106,6 @@ export default {
106 onClick={() => { this.handleEdit(scope.row) }} 106 onClick={() => { this.handleEdit(scope.row) }}
107 > 107 >
108 详情 108 详情
109 <i class="el-icon-d-arrow-right"></i>
110 </el-button> 109 </el-button>
111 </div> 110 </div>
112 ) 111 )
......
...@@ -109,7 +109,6 @@ export default { ...@@ -109,7 +109,6 @@ export default {
109 }} 109 }}
110 > 110 >
111 详情 111 详情
112 <i class="el-icon-d-arrow-right"></i>
113 </el-button> 112 </el-button>
114 </div> 113 </div>
115 ); 114 );
......
...@@ -199,7 +199,6 @@ export default { ...@@ -199,7 +199,6 @@ export default {
199 }} 199 }}
200 > 200 >
201 修改 201 修改
202 <i class="el-icon-d-arrow-right"></i>
203 </el-button> : 202 </el-button> :
204 <el-button 203 <el-button
205 type="text" 204 type="text"
...@@ -209,7 +208,6 @@ export default { ...@@ -209,7 +208,6 @@ export default {
209 }} 208 }}
210 > 209 >
211 详情 210 详情
212 <i class="el-icon-d-arrow-right"></i>
213 </el-button> 211 </el-button>
214 } 212 }
215 </div> 213 </div>
......
...@@ -193,13 +193,12 @@ class data { ...@@ -193,13 +193,12 @@ class data {
193 <div> 193 <div>
194 <el-button 194 <el-button
195 type="text" 195 type="text"
196 style="color:#67C23A" 196 class='successColor'
197 onClick={() => { 197 onClick={() => {
198 vm.handleEdit(scope.row); 198 vm.handleEdit(scope.row);
199 }} 199 }}
200 > 200 >
201 修改 201 修改
202 <i class="el-icon-d-arrow-right"></i>
203 </el-button> 202 </el-button>
204 </div> 203 </div>
205 ); 204 );
......
...@@ -159,25 +159,22 @@ export default { ...@@ -159,25 +159,22 @@ export default {
159 { 159 {
160 scope.row.exchangeState == 2 ? 160 scope.row.exchangeState == 2 ?
161 <el-button 161 <el-button
162 size="mini"
163 type="text" 162 type="text"
164 style="color:#67C23A" 163 class='successColor'
165 onClick={() => { 164 onClick={() => {
166 this.handleDetail(scope.row); 165 this.handleDetail(scope.row);
167 }} 166 }}
168 > 167 >
169 修改 168 修改
170 <i class="el-icon-d-arrow-right"></i>
171 </el-button> : 169 </el-button> :
172 <el-button 170 <el-button
173 size="mini" 171 class='btnColor'
174 type="text" 172 type="text"
175 onClick={() => { 173 onClick={() => {
176 this.handleDetail(scope.row); 174 this.handleDetail(scope.row);
177 }} 175 }}
178 > 176 >
179 详情 177 详情
180 <i class="el-icon-d-arrow-right"></i>
181 </el-button> 178 </el-button>
182 } 179 }
183 180
......
1 <template> 1 <template>
2 <!-- 编辑 --> 2 <!-- 编辑 -->
3 <dialogBox ref="addTask" width="60%" @submitForm="handleSubmit" @closeDialog="handleClose" v-model="myValue" 3 <dialogBox ref="addTask" width="50%" :isMain="true" @submitForm="handleSubmit" @closeDialog="handleClose"
4 customClass="editValidRule" title="新增定时任务"> 4 v-model="myValue" customClass="editValidRule" title="新增定时任务">
5 <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px"> 5 <div class="dialogCon" style="height:360px">
6 <el-row :gutter="20"> 6 <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px">
7 <el-col :span="12"> 7 <el-row :gutter="20">
8 <el-form-item label="任务名" prop="jobName"> 8 <el-col :span="12">
9 <el-input v-model="ruleForm.jobName" placeholder="任务名"></el-input> 9 <el-form-item label="任务名" prop="jobName">
10 </el-form-item> 10 <el-input v-model="ruleForm.jobName" placeholder="任务名"></el-input>
11 </el-col> 11 </el-form-item>
12 <el-col :span="12"> 12 </el-col>
13 <el-form-item label="类名" prop="beanName"> 13 <el-col :span="12">
14 <el-input v-model="ruleForm.beanName" placeholder="类名"></el-input> 14 <el-form-item label="类名" prop="beanName">
15 </el-form-item> 15 <el-input v-model="ruleForm.beanName" placeholder="类名"></el-input>
16 </el-col> 16 </el-form-item>
17 </el-row> 17 </el-col>
18 <el-row :gutter="20"> 18 </el-row>
19 <el-col :span="12"> 19 <el-row :gutter="20">
20 <el-form-item label="cron表达式" prop="cronExpression"> 20 <el-col :span="12">
21 <el-input v-model="ruleForm.cronExpression" placeholder="cron表达式"></el-input> 21 <el-form-item label="cron表达式" prop="cronExpression">
22 </el-form-item> 22 <el-input v-model="ruleForm.cronExpression" placeholder="cron表达式"></el-input>
23 </el-col> 23 </el-form-item>
24 <el-col :span="12"> 24 </el-col>
25 <el-form-item label="方法名" prop="methodName"> 25 <el-col :span="12">
26 <el-input v-model="ruleForm.methodName" placeholder="方法名"></el-input> 26 <el-form-item label="方法名" prop="methodName">
27 </el-form-item> 27 <el-input v-model="ruleForm.methodName" placeholder="方法名"></el-input>
28 </el-col> 28 </el-form-item>
29 </el-row> 29 </el-col>
30 <el-row :gutter="20"> 30 </el-row>
31 <el-col :span="24"> 31 <el-row :gutter="20">
32 <el-form-item label="任务描述" prop="remark"> 32 <el-col :span="24">
33 <el-input v-model="ruleForm.remark" placeholder="任务描述"></el-input> 33 <el-form-item label="任务描述" prop="remark">
34 </el-form-item> 34 <el-input v-model="ruleForm.remark" placeholder="任务描述"></el-input>
35 </el-col> 35 </el-form-item>
36 </el-row> 36 </el-col>
37 </el-form> 37 </el-row>
38 </el-form>
39 </div>
38 <message-tips :message="message" ref="msg" /> 40 <message-tips :message="message" ref="msg" />
39 </dialogBox> 41 </dialogBox>
40 </template> 42 </template>
...@@ -125,10 +127,10 @@ export default { ...@@ -125,10 +127,10 @@ export default {
125 } 127 }
126 }, 128 },
127 watch: { 129 watch: {
128 value(val) { 130 value (val) {
129 this.myValue = val 131 this.myValue = val
130 }, 132 },
131 taskData(val) { 133 taskData (val) {
132 if (val != null) { 134 if (val != null) {
133 this.ruleForm = val 135 this.ruleForm = val
134 } else { 136 } else {
...@@ -146,23 +148,30 @@ export default { ...@@ -146,23 +148,30 @@ export default {
146 } 148 }
147 </script> 149 </script>
148 <style rel="stylesheet/scss" lang="scss" scoped> 150 <style rel="stylesheet/scss" lang="scss" scoped>
149 // @import "~@/styles/public.scss"; 151 /deep/.dialogBox .dialog_title {
150 .editDialogBox-box { 152 margin-left: 5px !important;
151 margin: 14px 18px 30px 18px !important 153 }
152 }
153 154
154 /deep/.el-form-item__label { 155 /deep/.el-dialog__headerbtn {
155 color: #fff; 156 margin-top: -12px;
156 } 157 }
157 158
158 /deep/.el-form-item { 159 .editDialogBox-box {
159 color: #fff; 160 margin: 14px 18px 30px 18px !important
160 margin-bottom: 10px; 161 }
161 }
162 162
163 /deep/ .el-input__inner { 163 /deep/.el-form-item__label {
164 background-color: transparent; 164 color: #fff;
165 border: 1px solid #458ACF; 165 }
166 } 166
167 /deep/.el-form-item {
168 color: #fff;
169 margin-bottom: 10px;
170 }
171
172 /deep/ .el-input__inner {
173 background-color: transparent;
174 border: 1px solid #458ACF;
175 }
167 </style> 176 </style>
168 177
......
1 <template>
2 <!-- 编辑 -->
3 <dialogBox ref="edit" width="60%" :closed="true" @closeDialog="handleClose" @submitForm="handleSubmit"
4 customClass="editDictionary" multiple title="字典信息">
5 <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="120px">
6 <el-row :gutter="20">
7 <el-col :span="12">
8 <el-form-item label="字典类型编码" prop="DCODE">
9 <el-input v-model.trim="ruleForm.DCODE" placeholder="字典类型编码"></el-input>
10 </el-form-item>
11 </el-col>
12 <el-col :span="12">
13 <el-form-item label="字典类型名称" prop="DNAME">
14 <el-input v-model.trim="ruleForm.DNAME" placeholder="字典类型名称"></el-input>
15 </el-form-item>
16 </el-col>
17 </el-row>
18 <el-row :gutter="20">
19 <el-col :span="12">
20 <el-form-item label="字典结构" prop="ISTREE">
21 <el-radio-group v-model="ruleForm.ISTREE">
22 <el-radio label="1">树形</el-radio>
23 <el-radio label="0">列表</el-radio>
24 </el-radio-group>
25 </el-form-item>
26 </el-col>
27 </el-row>
28 </el-form>
29 <lb-table :column="column" :heightNum="550" :key="key" :expand-row-keys="keyList" row-key="DICTID"
30 :tree-props="{ children: 'children' }" :pagination="false" :data="tableData">
31 </lb-table>
32 </dialogBox>
33 </template>
34
35 <script>
36 import dictionaries from '@/api/dictionaries'
37 import { getUuid } from '@/utils/tools'
38 export default {
39 props: {
40 dictList: Array,
41 dicData: Object
42 },
43 data () {
44 return {
45 key: 0,
46 message: '',
47 keyList: [],
48 ruleForm: {
49 DCODE: '',
50 DNAME: '',
51 ISTREE: '1'
52 },
53 column: [
54 {
55 width: '60',
56 renderHeader: (h, scope) => {
57 return <i class="el-icon-plus" onClick={() => { this.handleAdd() }} style="cursor:pointer;color:#409EFF">增加</i>
58 },
59 render: (h, scope) => {
60 return (
61 <span>{scope.row.index}</span>
62 )
63 }
64 },
65 {
66 prop: 'DCODE',
67 label: '字典项编码',
68 render: (h, scope) => {
69 return (
70 <div>
71 <el-input placeholder="字典项编码" v-show={scope.row.codeShow} v-fo value={scope.row[scope.column.property]}
72 onFocus={() => { this.itemShowFalse(); scope.row.codeShow = true; }}
73 onInput={(val) => { scope.row[scope.column.property] = val }}></el-input>
74
75
76 <el-input placeholder="字典项编码" v-show={!scope.row.codeShow} value={scope.row[scope.column.property]}
77 onFocus={() => { this.itemShowFalse(); scope.row.codeShow = true; }}
78 onInput={(val) => { scope.row[scope.column.property] = val }}></el-input>
79 </div>
80 )
81 }
82 },
83 {
84 prop: 'DNAME',
85 label: '字典项名称',
86 render: (h, scope) => {
87 return (
88 <div>
89 <el-input placeholder="字典项编码" v-show={scope.row.nameShow} v-fo value={scope.row[scope.column.property]}
90 onFocus={() => { this.itemShowFalse(); scope.row.nameShow = true; }}
91 onInput={(val) => { scope.row[scope.column.property] = val }}></el-input>
92
93 <el-input placeholder="字典项名称" v-show={!scope.row.nameShow} value={scope.row[scope.column.property]}
94 onFocus={() => { this.itemShowFalse(); scope.row.nameShow = true; }}
95 onInput={(val) => { scope.row[scope.column.property] = val }}></el-input>
96 </div>
97 )
98 }
99 },
100 {
101 width: '130px',
102 label: '移动',
103 render: (h, scope) => {
104 return (
105 <div>
106 <el-button type='text' disabled={scope.$index == 0} onClick={() => { this.moveUpward(scope.$index, scope.row) }}>上移</el-button>
107 <el-button type='text' disabled={(scope.$index + 1) == this.tableData.length} onClick={() => { this.moveDown(scope.$index, scope.row) }}>下移</el-button >
108 </div >
109 )
110 }
111 },
112 {
113 width: '150px',
114 label: '操作',
115 render: (h, scope) => {
116 return (
117 <div>
118 <el-button type="text" style="margin-right:10px" v-show={this.ruleForm.ISTREE == '1'} onClick={() => { this.handleAddSubordinate(scope.row) }}>增加下级</el-button>
119 <el-button type="text" style="margin-left:0" onClick={() => { this.handleMinus(scope.$index, scope.row) }}>删除</el-button>
120 </div>
121 )
122 }
123 }
124 ],
125 tableData: [],
126 rules: {
127 DCODE: [
128 { required: true, message: '字典类型编码', trigger: 'blur' }
129 ],
130 }
131 }
132 },
133 methods: {
134 isShow () {
135 this.$refs.edit.isShow()
136 setTimeout(() => {
137 this.tableData = _.cloneDeep(this.dictList)
138 this.addIndexes()
139 let { DCODE, DNAME, ISTREE } = this.dicData
140 this.ruleForm = {
141 DCODE,
142 DNAME,
143 ISTREE
144 }
145 }, 0)
146 },
147 // 添加索引
148 addIndexes () {
149 this.tableData.forEach((item, index) => {
150 if (index == 0) {
151 item.codeShow = true
152 } else {
153 item.codeShow = false
154 item.nameShow = false
155 }
156 item.index = index + 1
157 })
158 },
159 itemShowFalse () {
160 this.tableData.forEach((item, index) => {
161 item.codeShow = false
162 item.nameShow = false
163 })
164 },
165 handleMinus (index, row) {
166 this.removeTreeListItem(this.tableData, row.DICTID)
167 },
168 removeTreeListItem (treeList, DICTID) {
169 if (!treeList || !treeList.length) {
170 return
171 }
172 for (let i = 0; i < treeList.length; i++) {
173 if (treeList[i].DICTID === DICTID) {
174 treeList.splice(i, 1);
175 break;
176 }
177 this.removeTreeListItem(treeList[i].children, DICTID)
178 }
179 },
180 async handleSubmit () {
181 let submitData = _.cloneDeep(this.tableData)
182 this.ruleForm.DICTID = this.dicData.DICTID
183 this.ruleForm.PARENTID = null
184 this.ruleForm.TYPEID = this.dicData.TYPEID
185 submitData.forEach((item) => {
186 item.ISTREE = this.ruleForm.ISTREE
187 })
188 submitData.unshift(this.ruleForm)
189 try {
190 let res = await dictionaries.editSysDict({ 'editDicts': submitData })
191 if (res.code == 200) {
192 this.$message({
193 message: res.message,
194 type: 'success'
195 })
196 this.handleClose()
197 this.$parent.featchData()
198 }
199 } catch (error) {
200 this.message = error
201 this.$refs.msg.messageShow()
202 }
203 },
204 handleClose () {
205 this.$refs['ruleForm'].resetFields();
206 this.$refs.edit.isHide()
207 },
208 // 增加下级
209 handleAddSubordinate (row) {
210 if (!row.children) {
211 row.children = []
212 }
213 row.children.push(
214 {
215 DCODE: '',
216 DNAME: '',
217 DICTID: getUuid(32),
218 TYPEID: row.TYPEID,
219 PARENTID: row.DICTID,
220 children: null,
221 ISTREE: this.ruleForm.ISTREE
222 }
223 )
224 this.keyList = [];
225 this.keyList.push(row.DICTID)
226 },
227 // 增加
228 handleAdd () {
229 this.$nextTick(() => {
230 let container = this.$el.querySelector('.el-table__body-wrapper');
231 container.scrollTop = container.scrollHeight;
232 })
233 this.tableData.push(
234 {
235 DCODE: '',
236 DNAME: '',
237 DICTID: getUuid(32),
238 TYPEID: this.dicData.TYPEID,
239 PARENTID: this.dicData.DICTID,
240 children: null,
241 ISTREE: this.ruleForm.ISTREE
242 }
243 )
244 this.addIndexes()
245 },
246 // 上移下移
247 moveUpward (index, row) {
248 if (index > 0) {
249 let upData = this.tableData[index - 1];
250 this.tableData.splice(index - 1, 1);
251 this.tableData.splice(index, 0, upData);
252 } else {
253 this.$message({
254 message: '已经是第一条,上移失败',
255 type: 'warning'
256 });
257 }
258 this.key++
259 },
260 moveDown (index, row) {
261 if ((index + 1) == this.tableData.length) {
262 this.$message({
263 message: '已经是最后一条,下移失败',
264 type: 'warning'
265 });
266 } else {
267 let downData = this.tableData[index + 1];
268 this.tableData.splice(index + 1, 1);
269 this.tableData.splice(index, 0, downData);
270 }
271 this.key++
272 }
273 }
274 }
275 </script>
276 <style rel="stylesheet/less" lang="less" scoped>
277
278 </style>
279
...@@ -69,7 +69,9 @@ export default { ...@@ -69,7 +69,9 @@ export default {
69 label: "操作", 69 label: "操作",
70 render: (h, scope) => { 70 render: (h, scope) => {
71 return ( 71 return (
72 <el-button type="text" icon="el-icon-edit-outline" onClick={() => { this.editClick(scope.row, 1) }}>修改</el-button> 72 <el-button type="text"
73 class='successColor'
74 onClick={() => { this.editClick(scope.row, 1) }}>修改</el-button>
73 ) 75 )
74 } 76 }
75 } 77 }
...@@ -128,4 +130,8 @@ export default { ...@@ -128,4 +130,8 @@ export default {
128 </script> 130 </script>
129 <style scoped lang="scss"> 131 <style scoped lang="scss">
130 // @import "~@/styles/public.scss"; 132 // @import "~@/styles/public.scss";
133 /deep/.dialogBox .dialog_title {
134 top: 0;
135 margin-left: 5px;
136 }
131 </style> 137 </style>
......
...@@ -74,8 +74,6 @@ export default { ...@@ -74,8 +74,6 @@ export default {
74 <div> 74 <div>
75 <el-button 75 <el-button
76 type="text" 76 type="text"
77 size="mini"
78 icon="el-icon-edit"
79 onClick={() => { 77 onClick={() => {
80 this.handleEdit(scope.row); 78 this.handleEdit(scope.row);
81 }} 79 }}
...@@ -86,8 +84,6 @@ export default { ...@@ -86,8 +84,6 @@ export default {
86 <el-button 84 <el-button
87 type="text" 85 type="text"
88 size="mini" 86 size="mini"
89 icon="el-icon-delete"
90 style="color:#F56C6C"
91 onClick={() => { 87 onClick={() => {
92 this.handleDelete(scope.row.id, scope.row.name); 88 this.handleDelete(scope.row.id, scope.row.name);
93 }} 89 }}
...@@ -148,7 +144,7 @@ export default { ...@@ -148,7 +144,7 @@ export default {
148 this.productId = res.content[0].id; 144 this.productId = res.content[0].id;
149 this.getAuthorityList(res.content[0].id, res.content[0].code) 145 this.getAuthorityList(res.content[0].id, res.content[0].code)
150 this.selectedSubsystemCode = res.content[0].code 146 this.selectedSubsystemCode = res.content[0].code
151 147
152 }) 148 })
153 .catch((error) => { 149 .catch((error) => {
154 console.log("er", error); 150 console.log("er", error);
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
24 @size-change="handleSizeChange" @p-current-change="handleCurrentChange" :column="tableData.columns" 24 @size-change="handleSizeChange" @p-current-change="handleCurrentChange" :column="tableData.columns"
25 :data="tableData.data"> 25 :data="tableData.data">
26 </lb-table> 26 </lb-table>
27 <add-task ref="task" :taskData="taskData" v-model="isDialog"/> 27 <add-task ref="task" :taskData="taskData" v-model="isDialog" />
28 </div> 28 </div>
29 </div> 29 </div>
30 </template> 30 </template>
...@@ -62,22 +62,26 @@ export default { ...@@ -62,22 +62,26 @@ export default {
62 render: (h, scope) => { 62 render: (h, scope) => {
63 return ( 63 return (
64 <div> 64 <div>
65 <el-button type="text" size="mini" 65 <el-button type="text"
66 v-show={scope.row.jobStatus === 0} 66 v-show={scope.row.jobStatus === 0}
67 class='btnColor'
67 icon="el-icon-video-pause" 68 icon="el-icon-video-pause"
68 onClick={() => { this.handleActive(scope.row) }}>激活 69 onClick={() => { this.handleActive(scope.row) }}>激活
69 </el-button> 70 </el-button>
70 <el-button type="text" size="mini" 71 <el-button type="text"
71 v-show={scope.row.jobStatus === -1} 72 v-show={scope.row.jobStatus === -1}
72 icon="el-icon-video-pause" 73 class='btnColor'
73 onClick={() => { this.recover(scope.row) }}>恢复 74 icon="el-icon-video-pause"
75 onClick={() => { this.recover(scope.row) }}>恢复
74 </el-button> 76 </el-button>
75 <el-button type="text" size="mini" 77 <el-button type="text"
76 icon="el-icon-edit" 78 icon="el-icon-edit"
79 class='btnColor'
77 onClick={() => { this.handleEdit(scope.row) }}>编辑 80 onClick={() => { this.handleEdit(scope.row) }}>编辑
78 </el-button> 81 </el-button>
79 <el-button type="text" size="mini" 82 <el-button type="text"
80 icon="el-icon-delete" style="color:#F56C6C" 83 icon="el-icon-delete"
84 class='successColor'
81 v-show={scope.row.jobStatus !== -1} 85 v-show={scope.row.jobStatus !== -1}
82 onClick={() => { this.handleDel(scope.row) }}>删除 86 onClick={() => { this.handleDel(scope.row) }}>删除
83 </el-button> 87 </el-button>
...@@ -100,7 +104,7 @@ export default { ...@@ -100,7 +104,7 @@ export default {
100 this.taskData = null 104 this.taskData = null
101 this.isDialog = true 105 this.isDialog = true
102 }, 106 },
103 resetSe() { 107 resetSe () {
104 this.form.jobName = '' 108 this.form.jobName = ''
105 this.featchData() 109 this.featchData()
106 }, 110 },
...@@ -114,7 +118,7 @@ export default { ...@@ -114,7 +118,7 @@ export default {
114 this.message = error 118 this.message = error
115 } 119 }
116 }, 120 },
117 recover(row) { 121 recover (row) {
118 this.$confirm('此操将进行恢复操作, 是否继续?', '提示', { 122 this.$confirm('此操将进行恢复操作, 是否继续?', '提示', {
119 confirmButtonText: '确定', 123 confirmButtonText: '确定',
120 cancelButtonText: '取消', 124 cancelButtonText: '取消',
...@@ -146,7 +150,7 @@ export default { ...@@ -146,7 +150,7 @@ export default {
146 }) 150 })
147 }, 151 },
148 152
149 handleActive(row) { 153 handleActive (row) {
150 this.$confirm('此操将进行激活操作, 是否继续?', '提示', { 154 this.$confirm('此操将进行激活操作, 是否继续?', '提示', {
151 confirmButtonText: '确定', 155 confirmButtonText: '确定',
152 cancelButtonText: '取消', 156 cancelButtonText: '取消',
......
1 <template> 1 <template>
2 <Dialog :title="title" class="modifydialog" :show.sync="visible" :width="'715px'" @close="close()"> 2 <dialogBox :title="title" class="modifydialog" @closeDialog="close" @submitForm="submitForm" v-model="myValue">
3 <template slot="content"> 3 <div class="dialogCon">
4 <el-form ref="form" :model="form" :rules="rules"> 4 <el-form ref="form" :model="form" :rules="rules">
5 <el-row :gutter="24"> 5 <el-row :gutter="24">
6 <el-col :span="11"> 6 <el-col :span="11">
...@@ -11,11 +11,8 @@ ...@@ -11,11 +11,8 @@
11 <el-col :span="13"> 11 <el-col :span="13">
12 <el-col :span="18" class="col-pd0"> 12 <el-col :span="18" class="col-pd0">
13 <el-form-item label="性别:" label-width="72px"> 13 <el-form-item label="性别:" label-width="72px">
14 <el-radio 14 <el-radio v-for="(item, index) in sexList" :key="index" v-model="form.sex" :label="item.value">{{
15 v-for="(item, index) in sexList" 15 item.name }}</el-radio>
16 :key="index"
17 v-model="form.sex"
18 :label="item.value">{{ item.name }}</el-radio>
19 </el-form-item> 16 </el-form-item>
20 </el-col> 17 </el-col>
21 <el-col :span="6"> 18 <el-col :span="6">
...@@ -31,10 +28,7 @@ ...@@ -31,10 +28,7 @@
31 </el-col> 28 </el-col>
32 <el-col :span="13"> 29 <el-col :span="13">
33 <el-form-item label="用户名:" prop="loginName" label-width="72px"> 30 <el-form-item label="用户名:" prop="loginName" label-width="72px">
34 <el-input 31 <el-input v-model="form.loginName" :disabled="showLoginName" placeholder="用户名" />
35 v-model="form.loginName"
36 :disabled="showLoginName"
37 placeholder="用户名" />
38 </el-form-item> 32 </el-form-item>
39 </el-col> 33 </el-col>
40 </el-row> 34 </el-row>
...@@ -45,27 +39,16 @@ ...@@ -45,27 +39,16 @@
45 </el-form-item> 39 </el-form-item>
46 </el-col> 40 </el-col>
47 <el-col :span="13"> 41 <el-col :span="13">
48 <el-form-item 42 <el-form-item label="手机号码:" prop="mobilePhone" label-width="72px">
49 label="手机号码:" 43 <el-input v-model="form.mobilePhone" placeholder="手机号码" />
50 prop="mobilePhone"
51 label-width="72px">
52 <el-input
53 v-model="form.mobilePhone"
54 placeholder="手机号码" />
55 </el-form-item> 44 </el-form-item>
56 </el-col> 45 </el-col>
57 </el-row> 46 </el-row>
58 <el-row :gutter="24"> 47 <el-row :gutter="24">
59 <el-col :span="11"> 48 <el-col :span="11">
60 <el-form-item label="最高职务级别:" label-width="100px"> 49 <el-form-item label="最高职务级别:" label-width="100px">
61 <el-select 50 <el-select v-model="form.jobLevel" placeholder="最高职务级别">
62 v-model="form.jobLevel" 51 <el-option v-for="item in levelList" :key="item.value" :label="item.name" :value="item.value" />
63 placeholder="最高职务级别">
64 <el-option
65 v-for="item in levelList"
66 :key="item.value"
67 :label="item.name"
68 :value="item.value" />
69 </el-select> 52 </el-select>
70 </el-form-item> 53 </el-form-item>
71 </el-col> 54 </el-col>
...@@ -77,145 +60,118 @@ ...@@ -77,145 +60,118 @@
77 </el-row> 60 </el-row>
78 <el-row :gutter="24"> 61 <el-row :gutter="24">
79 <el-col :span="24"> 62 <el-col :span="24">
80 <el-form-item 63 <el-form-item label="办公地点:" label-width="100px" class="form-item-mb0">
81 label="办公地点:"
82 label-width="100px"
83 class="form-item-mb0">
84 <el-input v-model="form.address" placeholder="办公地点" /> 64 <el-input v-model="form.address" placeholder="办公地点" />
85 </el-form-item> 65 </el-form-item>
86 </el-col> 66 </el-col>
87 </el-row> 67 </el-row>
88 </el-form> 68 </el-form>
89 </template> 69 </div>
90 <template slot="footer"> 70 </dialogBox>
91 <el-button type="primary" class="save" @click="submitForm(1)">保存</el-button>
92 <el-button class="cancel-button" @click="close()">取消</el-button>
93 </template>
94 </Dialog>
95 </template> 71 </template>
96 72
97 <script> 73 <script>
98 import { api, httpAction } from '@/api/manageApi' 74 import { api, httpAction } from '@/api/manageApi'
99 import Dialog from "@/components/Dialog/"; 75 export default {
100 export default { 76 name: "",
101 name: "", 77 props: {
102 components: { Dialog }, 78 value: { type: Boolean, default: false },
103 props: {}, 79 },
104 data () { 80 data () {
105 return { 81 return {
106 form: { 82 myValue: false,
107 sex: "0", 83 form: {
108 }, 84 sex: "0",
109 rules: {
110 name: [{ required: true, message: "请输入姓名", trigger: "blur" }],
111 code: [{ required: true, message: "请输入工号", trigger: "blur" }],
112 mobilePhone: [{ validator: "sddd", trigger: "blur" }],
113 loginName: [
114 { required: true, message: "请输入用户名", trigger: "blur" },
115 ],
116 },
117 title: "修改",
118 visible: false,
119 showLoginName: false,
120 sexList: [{ lable: "0", value: "0", name: "男" }, { lable: "1", value: "1", name: "女" }],
121 levelList: [{ lable: "0", value: "0", name: "干事" }, { lable: "1", value: "1", name: "经理" }],
122 dataUrl: api.users
123 };
124 },
125 computed: {
126 departmentid () {
127 return this.$store.state.user.userInfo;
128 }, 85 },
129 }, 86 rules: {
130 watch: {}, 87 name: [{ required: true, message: "请输入姓名", trigger: "blur" }],
131 created () { }, 88 code: [{ required: true, message: "请输入工号", trigger: "blur" }],
132 mounted () { }, 89 mobilePhone: [{ validator: "sddd", trigger: "blur" }],
133 methods: { 90 loginName: [
134 // initDictConfig() { 91 { required: true, message: "请输入用户名", trigger: "blur" },
135 // getDictItems('XB').then((res) => { 92 ],
136 // if (res.status === 1) {
137 // this.sexList = res.content
138 // } else {
139 // this.$message.error({ message: res.message, showClose: true })
140 // }
141 // })
142 // getDictItems('ZWJB').then((res) => {
143 // if (res.status === 1) {
144 // this.levelList = res.content
145 // } else {
146 // this.$message.error({ message: res.message, showClose: true })
147 // }
148 // })
149 // },
150 // 添加人员
151 adds () {
152 this.visible = true;
153 // this.type = 0
154 this.showLoginName = false
155 }, 93 },
156 // 编辑 94 title: "修改",
157 edit (record) { 95 showLoginName: false,
158 // this.initDictConfig() 96 sexList: [{ lable: "0", value: "0", name: "男" }, { lable: "1", value: "1", name: "女" }],
159 this.showLoginName = true 97 levelList: [{ lable: "0", value: "0", name: "干事" }, { lable: "1", value: "1", name: "经理" }],
160 // 若有id为编辑 98 dataUrl: api.users
161 if (record) { 99 };
162 this.$nextTick(() => { 100 },
163 this.form = Object.assign({}, record) 101 computed: {
164 }) 102 departmentid () {
165 } 103 return this.$store.state.user.userInfo;
166 this.visible = true 104 },
167 }, 105 },
168 handleChange (value) { 106 watch: {
169 this.form.departmentId = value; 107 value (val) {
170 }, 108 this.myValue = val
171 // 保存 109 }
172 submitForm (submitType) { 110 },
173 this.$refs.form.validate((valid) => { 111 methods: {
174 if (valid) { 112 // 添加人员
175 let method = '' 113 adds () {
176 let url = '' 114 this.showLoginName = false
177 this.form.organizationId = this.departmentid.organizationId; 115 },
178 this.form.departmentId = this.departmentid.departmentId; 116 // 编辑
179 const formData = this.form 117 edit (record) {
180 if (!formData.id) { 118 this.showLoginName = true
181 method = 'post' 119 // 若有id为编辑
182 url = this.dataUrl 120 if (record) {
183 } else { 121 this.$nextTick(() => {
184 method = 'put' 122 this.form = Object.assign({}, record)
185 url = `${this.dataUrl}/${formData.id}` 123 })
186 } 124 }
125 },
126 handleChange (value) {
127 this.form.departmentId = value;
128 },
129 // 保存
130 submitForm (submitType) {
131 this.$refs.form.validate((valid) => {
132 if (valid) {
133 let method = ''
134 let url = ''
135 this.form.organizationId = this.departmentid.organizationId;
136 this.form.departmentId = this.departmentid.departmentId;
137 const formData = this.form
138 if (!formData.id) {
139 method = 'post'
140 url = this.dataUrl
141 } else {
142 method = 'put'
143 url = `${this.dataUrl}/${formData.id}`
144 }
187 145
188 httpAction(url, formData, method).then((res) => { 146 httpAction(url, formData, method).then((res) => {
189 if (res.status === 1) { 147 if (res.status === 1) {
190 this.$message.success({ message: res.message, showClose: true }) 148 this.$message.success({ message: res.message, showClose: true })
191 149
192 this.resetForm() 150 this.resetForm()
193 151
194 this.close() 152 this.close()
195 153
196 this.$emit('ok') 154 this.$emit('ok')
197 } else { 155 } else {
198 this.$message.error({ message: res.message, showClose: true }) 156 this.$message.error({ message: res.message, showClose: true })
199 } 157 }
200 }) 158 })
201 } else { 159 } else {
202 console.log('提交错误!!!') 160 return false
203 return false
204 }
205 })
206 },
207 resetForm () {
208 this.form = {
209 sex: '0'
210 } 161 }
211 this.$refs.form.resetFields() 162 })
212 }, 163 },
213 close () { 164 resetForm () {
214 this.resetForm() 165 this.form = {
215 this.visible = false 166 sex: '0'
216 } 167 }
168 this.$refs.form.resetFields()
217 }, 169 },
218 }; 170 close () {
171 this.resetForm()
172 this.visible = false
173 }
174 }
175 }
219 </script> 176 </script>
220 <style scoped lang="scss"> 177 <style scoped lang="scss"></style>
221 </style>
......