Merge branch 'master' of http://yun.pashanhoo.com:9090/bdc/bdcjg-web
Showing
5 changed files
with
101 additions
and
27 deletions
| ... | @@ -25,7 +25,7 @@ const mutations = { | ... | @@ -25,7 +25,7 @@ const mutations = { |
| 25 | } | 25 | } |
| 26 | const actions = { | 26 | const actions = { |
| 27 | // 添加全部菜单 | 27 | // 添加全部菜单 |
| 28 | generateRoutes ({ commit }, getMenuInfo) { | 28 | generateRoutes ({ commit }, getMenuInfo) { |
| 29 | let Layout; | 29 | let Layout; |
| 30 | if (Vue.prototype.BASE_API.THEME == 'sb') { | 30 | if (Vue.prototype.BASE_API.THEME == 'sb') { |
| 31 | Layout = r => require.ensure([], () => r(require(`@/layout1`))) | 31 | Layout = r => require.ensure([], () => r(require(`@/layout1`))) | ... | ... |
| ... | @@ -16,8 +16,14 @@ | ... | @@ -16,8 +16,14 @@ |
| 16 | placeholder="请输入密码" show-password></el-input> | 16 | placeholder="请输入密码" show-password></el-input> |
| 17 | </el-form-item> | 17 | </el-form-item> |
| 18 | <el-form-item prop="yz"> | 18 | <el-form-item prop="yz"> |
| 19 | <el-input class="yz" @keyup.native="login('user')" v-model="user.yz" | 19 | <div class="flex-container"> |
| 20 | placeholder="请输入验证码"></el-input> | 20 | <div class="flex-input"> |
| 21 | <el-input class="yz" @keyup.native="login('user')" v-model="user.yz" placeholder="请输入验证码"></el-input> | ||
| 22 | </div> | ||
| 23 | <div class="flex-line"></div> | ||
| 24 | <div class="flex-img"><canvas id="s-canvas" ref="s-canvas"></canvas></div> | ||
| 25 | <div class="flex-renovate"><font id="renovate" @click="verification">换一批</font></div> | ||
| 26 | </div> | ||
| 21 | </el-form-item> | 27 | </el-form-item> |
| 22 | <el-form-item class="login-btn"> | 28 | <el-form-item class="login-btn"> |
| 23 | <el-button type="primary" style="width: 100%" @click="login('user')">登录</el-button> | 29 | <el-button type="primary" style="width: 100%" @click="login('user')">登录</el-button> |
| ... | @@ -48,7 +54,8 @@ | ... | @@ -48,7 +54,8 @@ |
| 48 | }, | 54 | }, |
| 49 | }; | 55 | }; |
| 50 | }, | 56 | }, |
| 51 | created () { | 57 | created () { |
| 58 | this.verification(); | ||
| 52 | const params = {}; | 59 | const params = {}; |
| 53 | const queryOptions = { | 60 | const queryOptions = { |
| 54 | conditionGroup: { | 61 | conditionGroup: { |
| ... | @@ -78,7 +85,37 @@ | ... | @@ -78,7 +85,37 @@ |
| 78 | mounted () { | 85 | mounted () { |
| 79 | // this.checkUserName(); | 86 | // this.checkUserName(); |
| 80 | }, | 87 | }, |
| 81 | methods: { | 88 | methods: { |
| 89 | verification() { | ||
| 90 | let str = '1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ', code = '', i = 0; | ||
| 91 | for( ; i++ < 4 ; ) code += str[ Math.floor( Math.random() * ( str.length - 0 ) + 0 ) ]; | ||
| 92 | setTimeout( () => { | ||
| 93 | let canvas = document.getElementById("s-canvas"), ctx = canvas.getContext("2d"); | ||
| 94 | canvas.width = 80; | ||
| 95 | canvas.height = 28; | ||
| 96 | ctx.fillStyle = '#ffffff'; | ||
| 97 | ctx.fillRect( 0, 0, 80, 28 ); | ||
| 98 | for ( i = 0; i < code.length; i++ ) { this.drawText( ctx, code[i], i ); } | ||
| 99 | }, 0 ); | ||
| 100 | }, | ||
| 101 | drawText(ctx, txt, i) { | ||
| 102 | ctx.fillStyle = this.randomColor(50, 160); | ||
| 103 | ctx.font = "18px SimHei"; | ||
| 104 | let x = (i + 1) * (80 / (4 + 1)), y = this.randomNum( 18, 28 - 5 ); | ||
| 105 | ctx.translate(x, y); | ||
| 106 | ctx.fillText(txt, 0, 0); | ||
| 107 | ctx.rotate((-0 * Math.PI) / 180); | ||
| 108 | ctx.translate(-x, -y); | ||
| 109 | }, | ||
| 110 | randomColor(min, max) { | ||
| 111 | let r = this.randomNum(min, max); | ||
| 112 | let g = this.randomNum(min, max); | ||
| 113 | let b = this.randomNum(min, max); | ||
| 114 | return "rgb(" + r + "," + g + "," + b + ")"; | ||
| 115 | }, | ||
| 116 | randomNum(min, max) { | ||
| 117 | return Math.floor(Math.random() * (max - min) + min); | ||
| 118 | }, | ||
| 82 | //记住用户名 | 119 | //记住用户名 |
| 83 | checkUserName: function (flag) { | 120 | checkUserName: function (flag) { |
| 84 | this.user.checkStatus = flag; | 121 | this.user.checkStatus = flag; |
| ... | @@ -128,7 +165,6 @@ | ... | @@ -128,7 +165,6 @@ |
| 128 | .password, | 165 | .password, |
| 129 | .yz { | 166 | .yz { |
| 130 | position: relative; | 167 | position: relative; |
| 131 | |||
| 132 | &:before { | 168 | &:before { |
| 133 | content: ""; | 169 | content: ""; |
| 134 | display: block; | 170 | display: block; |
| ... | @@ -148,6 +184,40 @@ | ... | @@ -148,6 +184,40 @@ |
| 148 | } | 184 | } |
| 149 | } | 185 | } |
| 150 | 186 | ||
| 187 | .flex-container { | ||
| 188 | position: relative; | ||
| 189 | display: -webkit-flex; | ||
| 190 | display: flex; | ||
| 191 | } | ||
| 192 | |||
| 193 | .flex-input { | ||
| 194 | width: 100%; | ||
| 195 | } | ||
| 196 | .flex-line { | ||
| 197 | position: absolute; | ||
| 198 | width: 1px; | ||
| 199 | height: 64%; | ||
| 200 | margin: 5px; | ||
| 201 | right: 36%; | ||
| 202 | background-color: #CCCCCC; | ||
| 203 | } | ||
| 204 | .flex-img { | ||
| 205 | position: absolute; | ||
| 206 | margin: 2px; | ||
| 207 | right: 16%; | ||
| 208 | } | ||
| 209 | .flex-renovate { | ||
| 210 | position: absolute; | ||
| 211 | margin: 1px; | ||
| 212 | right: 3%; | ||
| 213 | } | ||
| 214 | #renovate { | ||
| 215 | color: #3F8FEA; | ||
| 216 | font-size: 16px; | ||
| 217 | font-weight: 700; | ||
| 218 | cursor: pointer; | ||
| 219 | } | ||
| 220 | |||
| 151 | .username::before { | 221 | .username::before { |
| 152 | background-image: url(../../image/userlogo.png); | 222 | background-image: url(../../image/userlogo.png); |
| 153 | } | 223 | } | ... | ... |
| ... | @@ -2,7 +2,7 @@ | ... | @@ -2,7 +2,7 @@ |
| 2 | * @Author: xiaomiao 1158771342@qq.com | 2 | * @Author: xiaomiao 1158771342@qq.com |
| 3 | * @Date: 2023-01-30 17:59:51 | 3 | * @Date: 2023-01-30 17:59:51 |
| 4 | * @LastEditors: xiaomiao 1158771342@qq.com | 4 | * @LastEditors: xiaomiao 1158771342@qq.com |
| 5 | * @LastEditTime: 2023-03-21 15:00:39 | 5 | * @LastEditTime: 2023-03-21 18:34:17 |
| 6 | * @FilePath: \监管系统\js-web-jianguan\src\views\system\users\data\index.js | 6 | * @FilePath: \监管系统\js-web-jianguan\src\views\system\users\data\index.js |
| 7 | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE | 7 | * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE |
| 8 | */ | 8 | */ |
| ... | @@ -32,13 +32,13 @@ class data extends filter { | ... | @@ -32,13 +32,13 @@ class data extends filter { |
| 32 | label: "组织机构" | 32 | label: "组织机构" |
| 33 | }, | 33 | }, |
| 34 | { | 34 | { |
| 35 | prop: "job_group", | ||
| 36 | label: "职位" | ||
| 37 | }, | ||
| 38 | { | ||
| 39 | prop: "telephone", | 35 | prop: "telephone", |
| 40 | label: "电话" | 36 | label: "电话" |
| 41 | } | 37 | }, |
| 38 | { | ||
| 39 | prop: "jobLevel", | ||
| 40 | label: "职位" | ||
| 41 | }, | ||
| 42 | ] | 42 | ] |
| 43 | } | 43 | } |
| 44 | } | 44 | } | ... | ... |
| ... | @@ -61,8 +61,8 @@ | ... | @@ -61,8 +61,8 @@ |
| 61 | </el-row> | 61 | </el-row> |
| 62 | <el-row :gutter="24"> | 62 | <el-row :gutter="24"> |
| 63 | <el-col :span="24"> | 63 | <el-col :span="24"> |
| 64 | <el-form-item label="组织机构:" label-width="100px"> | 64 | <el-form-item label="组织机构:" label-width="100px" prop="departmentId"> |
| 65 | <el-select class="selbig" v-model="form.departmentName" placeholder="组织机构"> | 65 | <el-select class="selbig" v-model="form.departmentId" placeholder="组织机构"> |
| 66 | <el-option v-for="item in districtAreaList" :key="item.id" :label="item.name" :value="item.id" /> | 66 | <el-option v-for="item in districtAreaList" :key="item.id" :label="item.name" :value="item.id" /> |
| 67 | </el-select> | 67 | </el-select> |
| 68 | </el-form-item> | 68 | </el-form-item> |
| ... | @@ -93,10 +93,12 @@ | ... | @@ -93,10 +93,12 @@ |
| 93 | districtAreaList: [], | 93 | districtAreaList: [], |
| 94 | form: { | 94 | form: { |
| 95 | sex: "0", | 95 | sex: "0", |
| 96 | departmentId: '', | ||
| 96 | }, | 97 | }, |
| 97 | rules: { | 98 | rules: { |
| 98 | name: [{ required: true, message: "请输入姓名", trigger: "blur" }], | 99 | name: [{ required: true, message: "请输入姓名", trigger: "blur" }], |
| 99 | code: [{ required: true, message: "请输入工号", trigger: "blur" }], | 100 | code: [{ required: true, message: "请输入工号", trigger: "blur" }], |
| 101 | departmentId: [{ required: true, message: "请选择组织机构", trigger: 'change' }], | ||
| 100 | mobilePhone: [{ validator: "sddd", trigger: "blur" }], | 102 | mobilePhone: [{ validator: "sddd", trigger: "blur" }], |
| 101 | loginName: [ | 103 | loginName: [ |
| 102 | { required: true, message: "请输入用户名", trigger: "blur" }, | 104 | { required: true, message: "请输入用户名", trigger: "blur" }, |
| ... | @@ -109,11 +111,6 @@ | ... | @@ -109,11 +111,6 @@ |
| 109 | dataUrl: api.users | 111 | dataUrl: api.users |
| 110 | }; | 112 | }; |
| 111 | }, | 113 | }, |
| 112 | computed: { | ||
| 113 | departmentid () { | ||
| 114 | return this.$store.state.user.userInfo; | ||
| 115 | }, | ||
| 116 | }, | ||
| 117 | watch: { | 114 | watch: { |
| 118 | value (val) { | 115 | value (val) { |
| 119 | this.myValue = val | 116 | this.myValue = val |
| ... | @@ -147,17 +144,17 @@ | ... | @@ -147,17 +144,17 @@ |
| 147 | }) | 144 | }) |
| 148 | } | 145 | } |
| 149 | }, | 146 | }, |
| 150 | handleChange (value) { | ||
| 151 | this.form.departmentId = value; | ||
| 152 | }, | ||
| 153 | // 保存 | 147 | // 保存 |
| 154 | submitForm () { | 148 | submitForm () { |
| 149 | this.districtAreaList.forEach((item) => { | ||
| 150 | if (this.form.departmentId == item.id) { | ||
| 151 | this.form.organizationId = item.organizationId | ||
| 152 | } | ||
| 153 | }) | ||
| 155 | this.$refs.form.validate((valid) => { | 154 | this.$refs.form.validate((valid) => { |
| 156 | if (valid) { | 155 | if (valid) { |
| 157 | let method = '' | 156 | let method = '' |
| 158 | let url = '' | 157 | let url = '' |
| 159 | this.form.organizationId = this.departmentid.organizationId; | ||
| 160 | this.form.departmentId = this.departmentid.departmentId; | ||
| 161 | const formData = this.form | 158 | const formData = this.form |
| 162 | if (!formData.id) { | 159 | if (!formData.id) { |
| 163 | method = 'post' | 160 | method = 'post' |
| ... | @@ -166,7 +163,6 @@ | ... | @@ -166,7 +163,6 @@ |
| 166 | method = 'put' | 163 | method = 'put' |
| 167 | url = `${this.dataUrl}/${formData.id}` | 164 | url = `${this.dataUrl}/${formData.id}` |
| 168 | } | 165 | } |
| 169 | |||
| 170 | httpAction(url, formData, method).then((res) => { | 166 | httpAction(url, formData, method).then((res) => { |
| 171 | if (res.status === 1) { | 167 | if (res.status === 1) { |
| 172 | this.$message.success({ message: res.message, showClose: true }) | 168 | this.$message.success({ message: res.message, showClose: true }) | ... | ... |
| ... | @@ -111,6 +111,15 @@ | ... | @@ -111,6 +111,15 @@ |
| 111 | .concat(data.columns()) | 111 | .concat(data.columns()) |
| 112 | .concat([ | 112 | .concat([ |
| 113 | { | 113 | { |
| 114 | label: "职位", | ||
| 115 | render: (h, scope) => { | ||
| 116 | return ( | ||
| 117 | <div v-show={scope.row.jobLevel !== null}>{scope.row.jobLevel ? "干事" : "经理"}</div> | ||
| 118 | ) | ||
| 119 | |||
| 120 | } | ||
| 121 | }, | ||
| 122 | { | ||
| 114 | label: "负责人", | 123 | label: "负责人", |
| 115 | render: (h, scope) => { | 124 | render: (h, scope) => { |
| 116 | return ( | 125 | return ( |
| ... | @@ -235,7 +244,6 @@ | ... | @@ -235,7 +244,6 @@ |
| 235 | code: this.form.code, | 244 | code: this.form.code, |
| 236 | loginName: this.form.loginName, | 245 | loginName: this.form.loginName, |
| 237 | }; | 246 | }; |
| 238 | console.log("this.queryParam", this.queryParam); | ||
| 239 | getUserLists(this.queryParam).then((res) => { | 247 | getUserLists(this.queryParam).then((res) => { |
| 240 | if (res.status === 1) { | 248 | if (res.status === 1) { |
| 241 | this.loading = false; | 249 | this.loading = false; |
| ... | @@ -271,7 +279,6 @@ | ... | @@ -271,7 +279,6 @@ |
| 271 | getAction(api.departments, params).then( | 279 | getAction(api.departments, params).then( |
| 272 | (res) => { | 280 | (res) => { |
| 273 | let deptsList = res.content; | 281 | let deptsList = res.content; |
| 274 | console.log(deptsList); | ||
| 275 | deptsList.forEach((ele) => { | 282 | deptsList.forEach((ele) => { |
| 276 | this.tableData.data.forEach((item) => { | 283 | this.tableData.data.forEach((item) => { |
| 277 | if (ele.id == item.departmentId) { | 284 | if (ele.id == item.departmentId) { |
| ... | @@ -367,6 +374,7 @@ | ... | @@ -367,6 +374,7 @@ |
| 367 | 374 | ||
| 368 | // 修改人员信息 | 375 | // 修改人员信息 |
| 369 | handleEdit (row) { | 376 | handleEdit (row) { |
| 377 | console.log("rowwwww", row); | ||
| 370 | this.isDialog = true | 378 | this.isDialog = true |
| 371 | this.$refs.dialogForm.edit(row); | 379 | this.$refs.dialogForm.edit(row); |
| 372 | this.$refs.dialogForm.title = "修改"; | 380 | this.$refs.dialogForm.title = "修改"; | ... | ... |
-
Please register or sign in to post a comment