d85cf35a by xiaomiao

运维中心菜单样式调整

1 parent 94ebb381
...@@ -360,7 +360,27 @@ aside { ...@@ -360,7 +360,27 @@ aside {
360 border-radius: 16px; 360 border-radius: 16px;
361 color: #0097FF; 361 color: #0097FF;
362 } 362 }
363 363 .configurationbtnColor {
364 width: 64px;
365 height: 28px;
366 background: rgba(255, 255, 255, 0.1);
367 border-radius: 16px;
368 color: #04c0a7;
369 }
370 .resetbtnColor {
371 width: 64px;
372 height: 28px;
373 background: rgba(255, 255, 255, 0.1);
374 border-radius: 16px;
375 color: #04c0a7;
376 }
377 .movebtnColor {
378 width: 64px;
379 height: 28px;
380 background: rgba(255, 255, 255, 0.1);
381 border-radius: 16px;
382 color: #0097FF;
383 }
364 .successColor:hover { 384 .successColor:hover {
365 width: 64px; 385 width: 64px;
366 height: 28px; 386 height: 28px;
...@@ -472,4 +492,4 @@ aside { ...@@ -472,4 +492,4 @@ aside {
472 @font-face { 492 @font-face {
473 font-family: AliBold; 493 font-family: AliBold;
474 src: url('../image/font/Alibaba_PuHuiTi_2.0_55_Regular_85_Bold.ttf') 494 src: url('../image/font/Alibaba_PuHuiTi_2.0_55_Regular_85_Bold.ttf')
475 }
...\ No newline at end of file ...\ No newline at end of file
495 }
......
...@@ -444,4 +444,4 @@ ...@@ -444,4 +444,4 @@
444 } 444 }
445 } 445 }
446 } 446 }
447 }
...\ No newline at end of file ...\ No newline at end of file
447 }
......
...@@ -40,7 +40,6 @@ ...@@ -40,7 +40,6 @@
40 mounted () { 40 mounted () {
41 this.getdjywltotal(); 41 this.getdjywltotal();
42 window.addEventListener("resize", () => { 42 window.addEventListener("resize", () => {
43 this.cdata.seriesData = [];
44 this.getdjywltotal(); 43 this.getdjywltotal();
45 }); 44 });
46 // scroll(tableref.value.$refs.bodyWrapper);//设置滚动 45 // scroll(tableref.value.$refs.bodyWrapper);//设置滚动
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
35 </el-form-item> 35 </el-form-item>
36 </el-form> 36 </el-form>
37 <div class="bottom-wrapper"> 37 <div class="bottom-wrapper">
38 <el-button type="primary" @click="updateInfo">更新信息</el-button> 38 <btn nativeType="cx" type="primary" @click="updateInfo">更新信息</btn>
39 </div> 39 </div>
40 </div> 40 </div>
41 </div> 41 </div>
......
1 <!-- 1 <!--
2 * @Author: xiaomiao 1158771342@qq.com 2 * @Author: xiaomiao 1158771342@qq.com
3 * @Date: 2023-03-08 15:30:43 3 * @Date: 2023-03-09 20:54:28
4 * @LastEditors: yangwei 4 * @LastEditors: xiaomiao 1158771342@qq.com
5 * @LastEditTime: 2023-03-13 17:19:46 5 * @LastEditTime: 2023-03-15 15:45:01
6 * @FilePath: \bdcjg-web\src\views\system\information\index.vue 6 * @FilePath: \上报\bdcjg-web\src\views\system\information\index.vue
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 -->
9 <template> 9 <template>
...@@ -14,19 +14,13 @@ ...@@ -14,19 +14,13 @@
14 <Breadcrumb /> 14 <Breadcrumb />
15 </el-form-item> 15 </el-form-item>
16 <el-row class="mb-5"> 16 <el-row class="mb-5">
17 <el-col :span="3" class="btnColRight"> 17 <el-col :span="4" class="btnColRight">
18 <!-- <btn nativeType="cx" @click="information" 18 <btn nativeType="cx" type="primary" @click="information">
19 >基本信息</btn
20 >
21 <btn nativeType="cx" :class="isshow ? '' : ''" @click="password"
22 >修改密码</btn
23 > -->
24 <button @click="information" :class="isshow ? 'button choosed' : 'button'">
25 基本信息 19 基本信息
26 </button> 20 </btn>
27 <button @click="password" :class="isshow ? 'button' : 'button choosed'"> 21 <btn nativeType="cz" @click="password">
28 修改密码 22 修改密码
29 </button> 23 </btn>
30 </el-col> 24 </el-col>
31 </el-row> 25 </el-row>
32 </el-form> 26 </el-form>
...@@ -40,69 +34,68 @@ ...@@ -40,69 +34,68 @@
40 </div> 34 </div>
41 </template> 35 </template>
42 <script> 36 <script>
43 import "@/utils/flexible.js"; 37 import "@/utils/flexible.js";
44 import BaseSet from "./base-set.vue"; 38 import BaseSet from "./base-set.vue";
45 import PasswordEdit from "./password-edit.vue"; 39 import PasswordEdit from "./password-edit.vue";
46 export default { 40 export default {
47 components: { 41 components: {
48 BaseSet, 42 BaseSet,
49 PasswordEdit, 43 PasswordEdit,
50 },
51 data() {
52 return {
53 isshow: true,
54 };
55 },
56 computed: {
57 userData() {
58 return this.$store.state.user.userInfo;
59 }, 44 },
60 }, 45 data () {
61 watch: {}, 46 return {
62 created() {}, 47 isshow: true,
63 mounted() {}, 48 };
64 methods: {
65 information() {
66 this.isshow = true;
67 }, 49 },
68 password() { 50 computed: {
69 this.isshow = false; 51 userData () {
52 return this.$store.state.user.userInfo;
53 },
70 }, 54 },
71 }, 55 watch: {},
72 }; 56 created () { },
57 mounted () { },
58 methods: {
59 information () {
60 this.isshow = true;
61 },
62 password () {
63 this.isshow = false;
64 },
65 },
66 };
73 </script> 67 </script>
74 68
75 <style scoped lang="scss"> 69 <style scoped lang="scss">
76 @import "~@/styles/mixin.scss"; 70 @import "~@/styles/mixin.scss";
77 @import "~@/styles/public.scss"; 71 @import "~@/styles/public.scss";
78 .information { 72 .information {
79 display: flex; 73 display: flex;
80 flex-direction: column; 74 flex-direction: column;
81 .btnColRight { 75 .btnColRight {
82 .button { 76 // background-color: cadetblue;
83 width: 76px; 77 height: 60px;
84 height: 32px; 78 .button:nth-child(1) {
85 color: #ffffff; 79 position: absolute;
86 margin: 0 5px; 80 left: 30px;
87 cursor: pointer; 81 top: 20px;
88 border: 0; 82 }
89 background: url('../../../image/btn.png') no-repeat 0 0; 83 .button:nth-child(2) {
90 background-size: cover; 84 position: absolute;
91 } 85 top: 20px;
92 .choosed{ 86 left: 120px;
93 background: url('../../../image/btn.png') no-repeat 0 -34px; 87 }
94 } 88 }
95 } 89 /deep/.content {
96 /deep/.content { 90 .el-input__inner {
97 .el-input__inner { 91 background: none;
98 background: none; 92 }
93 .user-info {
94 background: none;
95 }
99 } 96 }
100 .user-info { 97 .boxin {
101 background: none; 98 flex: 1;
102 } 99 }
103 } 100 }
104 .boxin {
105 flex: 1;
106 }
107 }
108 </style> 101 </style>
......
...@@ -6,135 +6,131 @@ ...@@ -6,135 +6,131 @@
6 label-width="100px" 6 label-width="100px"
7 :model="form" 7 :model="form"
8 class="form-wrapper" 8 class="form-wrapper"
9 :rules="rules" 9 :rules="rules">
10 >
11 <el-form-item label="旧密码:" prop="oldPassword"> 10 <el-form-item label="旧密码:" prop="oldPassword">
12 <el-input 11 <el-input
13 v-model="form.oldPassword" 12 v-model="form.oldPassword"
14 clearable 13 clearable
15 type="password" 14 type="password"
16 show-password 15 show-password />
17 />
18 </el-form-item> 16 </el-form-item>
19 <el-form-item label="新密码:" prop="newPassword"> 17 <el-form-item label="新密码:" prop="newPassword">
20 <el-input 18 <el-input
21 v-model="form.newPassword" 19 v-model="form.newPassword"
22 clearable 20 clearable
23 type="password" 21 type="password"
24 show-password 22 show-password />
25 />
26 </el-form-item> 23 </el-form-item>
27 <el-form-item label="确认密码:" prop="confirmPassword"> 24 <el-form-item label="确认密码:" prop="confirmPassword">
28 <el-input 25 <el-input
29 v-model="form.confirmPassword" 26 v-model="form.confirmPassword"
30 clearable 27 clearable
31 type="password" 28 type="password"
32 show-password 29 show-password />
33 />
34 </el-form-item> 30 </el-form-item>
35 </el-form> 31 </el-form>
36 <div class="bottom-wrapper"> 32 <div class="bottom-wrapper">
37 <el-button type="primary" @click="updatePassword">确认修改</el-button> 33 <btn nativeType="cx" type="primary" @click="updatePassword">确认修改</btn>
38 </div> 34 </div>
39 </div> 35 </div>
40 </div> 36 </div>
41 </template> 37 </template>
42 38
43 <script> 39 <script>
44 import { updateUserPassword } from "@/api/personnelManage"; 40 import { updateUserPassword } from "@/api/personnelManage";
45 export default { 41 export default {
46 props: { 42 props: {
47 userInfo: { 43 userInfo: {
48 type: Object, 44 type: Object,
49 default: null, 45 default: null,
50 },
51 },
52 data() {
53 return {
54 form: {},
55 sexList: [],
56 userId: "",
57 rules: {
58 oldPassword: [
59 { required: true, message: "旧密码不能为空", trigger: "blur" },
60 ],
61 newPassword: [
62 { required: true, message: "新密码不能为空", trigger: "blur" },
63 ],
64 confirmPassword: [
65 { required: true, message: "确认密码不能为空", trigger: "blur" },
66 { validator: this.validatorConfirmPassword, trigger: "blur" },
67 ],
68 },
69 };
70 },
71 computed: {},
72 watch: {
73 userInfo: {
74 handler: function (val) {
75 if (val) {
76 this.getid(val);
77 }
78 }, 46 },
79 }, 47 },
80 }, 48 data () {
81 mounted() { 49 return {
82 if (this.userInfo) { 50 form: {},
83 this.getid(this.userInfo); 51 sexList: [],
84 } 52 userId: "",
85 }, 53 rules: {
86 methods: { 54 oldPassword: [
87 getid(val) { 55 { required: true, message: "旧密码不能为空", trigger: "blur" },
88 this.userId = val.id; 56 ],
57 newPassword: [
58 { required: true, message: "新密码不能为空", trigger: "blur" },
59 ],
60 confirmPassword: [
61 { required: true, message: "确认密码不能为空", trigger: "blur" },
62 { validator: this.validatorConfirmPassword, trigger: "blur" },
63 ],
64 },
65 };
89 }, 66 },
90 validatorConfirmPassword(rule, value, callback) { 67 computed: {},
91 const { newPassword } = this.form; 68 watch: {
92 if (value !== newPassword) { 69 userInfo: {
93 callback("两次输入密码不一致"); 70 handler: function (val) {
94 } else { 71 if (val) {
95 callback(); 72 this.getid(val);
73 }
74 },
75 },
76 },
77 mounted () {
78 if (this.userInfo) {
79 this.getid(this.userInfo);
96 } 80 }
97 }, 81 },
98 updatePassword() { 82 methods: {
99 this.$refs.form.validate((valid) => { 83 getid (val) {
100 if (valid) { 84 this.userId = val.id;
101 const params = Object.assign({}, this.form, { id: this.userId }); 85 },
102 updateUserPassword(params).then((res) => { 86 validatorConfirmPassword (rule, value, callback) {
103 if (res.status === 1) { 87 const { newPassword } = this.form;
104 this.$message.success({ message: res.message, showClose: true }); 88 if (value !== newPassword) {
105 } else { 89 callback("两次输入密码不一致");
106 this.$message.error({ message: res.message, showClose: true }); 90 } else {
107 } 91 callback();
108 });
109 } 92 }
110 }); 93 },
94 updatePassword () {
95 this.$refs.form.validate((valid) => {
96 if (valid) {
97 const params = Object.assign({}, this.form, { id: this.userId });
98 updateUserPassword(params).then((res) => {
99 if (res.status === 1) {
100 this.$message.success({ message: res.message, showClose: true });
101 } else {
102 this.$message.error({ message: res.message, showClose: true });
103 }
104 });
105 }
106 });
107 },
111 }, 108 },
112 }, 109 };
113 };
114 </script> 110 </script>
115 111
116 <style scoped lang="scss"> 112 <style scoped lang="scss">
117 .user-info { 113 .user-info {
118 margin: 36px 200px; 114 margin: 36px 200px;
119 overflow-y: auto; 115 overflow-y: auto;
120 .form-wrapper { 116 .form-wrapper {
121 padding: 24px 120px 0px; 117 padding: 24px 120px 0px;
122 /deep/.el-form-item { 118 /deep/.el-form-item {
123 margin-bottom: 24px; 119 margin-bottom: 24px;
124 .el-form-item__label { 120 .el-form-item__label {
125 color: #ffffff; 121 color: #ffffff;
126 } 122 }
127 .el-input .el-input__inner { 123 .el-input .el-input__inner {
128 padding: 0 8px; 124 padding: 0 8px;
129 height: 40px; 125 height: 40px;
130 line-height: 40px; 126 line-height: 40px;
131 border: 1px solid #6bc1fc; 127 border: 1px solid #6bc1fc;
128 }
132 } 129 }
133 } 130 }
131 .bottom-wrapper {
132 padding: 32px 120px 24px;
133 text-align: center;
134 }
134 } 135 }
135 .bottom-wrapper {
136 padding: 32px 120px 24px;
137 text-align: center;
138 }
139 }
140 </style> 136 </style>
......
1 <template> 1 <template>
2 <dialogBox class="modifydialog" :isMain="true" :title="2222" @closeDialog="close" @submitForm="submitForm" 2 <dialogBox class="modifydialog" :isMain="true" width="40%" :title="title" @closeDialog="close" @submitForm="submitForm"
3 v-model="myValue"> 3 v-model="myValue">
4 <div class="modifydialog-con"> 4 <div class="modifydialog-con">
5 <el-form ref="form" :model="form" :rules="rules"> 5 <el-form ref="form" :model="form" :rules="rules">
...@@ -19,15 +19,15 @@ ...@@ -19,15 +19,15 @@
19 </el-col> 19 </el-col>
20 20
21 </el-row> 21 </el-row>
22 <el-row :gutter="24"> 22 <el-row :gutter="23">
23 <el-col :span="24"> 23 <el-col :span="23">
24 <el-form-item label="代码:" prop="code" label-width="124px"> 24 <el-form-item label="代码:" prop="code" label-width="124px">
25 <el-input v-model="codeComputed" placeholder="请输入菜单代码" :disabled="type === 1" /> 25 <el-input v-model="codeComputed" placeholder="请输入菜单代码" :disabled="type === 1" />
26 </el-form-item> 26 </el-form-item>
27 </el-col> 27 </el-col>
28 </el-row> 28 </el-row>
29 <el-row :gutter="24"> 29 <el-row :gutter="23">
30 <el-col :span="24"> 30 <el-col :span="23">
31 <el-form-item label="链接路径:" label-width="124px"> 31 <el-form-item label="链接路径:" label-width="124px">
32 <el-input v-model="form.uri" placeholder="请输入链接路径" /> 32 <el-input v-model="form.uri" placeholder="请输入链接路径" />
33 </el-form-item> 33 </el-form-item>
...@@ -56,177 +56,197 @@ ...@@ -56,177 +56,197 @@
56 </template> 56 </template>
57 57
58 <script> 58 <script>
59 import { getParentMenuListAction } from '@/api/authorityManage' 59 import { getParentMenuListAction } from '@/api/authorityManage'
60 import JsonEditor from '@/components/JsonEditors' 60 import JsonEditor from '@/components/JsonEditors'
61 import { validateCode } from '@/utils/validate'; 61 import { validateCode } from '@/utils/validate';
62 import { api, httpAction } from '@/api/manageApi' 62 import { api, httpAction } from '@/api/manageApi'
63 export default { 63 export default {
64 name: 'MenuModal', 64 name: 'MenuModal',
65 components: { 65 components: {
66 JsonEditor, 66 JsonEditor,
67 },
68 props: {
69 value: { type: Boolean, default: false },
70 productId: {
71 type: String,
72 default: ''
73 }
74 },
75 data () {
76 return {
77 myValue: this.value,
78 form: {
79 icon: '',
80 code: ''
81 },
82 rules: {
83 name: [{ required: true, message: '请输入菜单名称', trigger: 'blur' }],
84 code: [
85 { required: true, message: '必填', trigger: 'blur' },
86 { validator: validateCode, trigger: 'blur' }
87 ]
88 },
89 title: '',
90 type: '',
91 visible: false,
92 parentMenuList: [],
93 menuKey: 0,
94 jumpModeList: [
95 { name: '在当前页面显示', value: 1 },
96 { name: '跳转到新页面', value: 2 }
97 ],
98 setProps: {
99 value: 'id',
100 label: 'name',
101 children: 'children',
102 expandTrigger: 'hover',
103 checkStrictly: true, // 可取消关联,选择任意一级选项
104 emitPath: false
105 },
106 dataUrl: api.menus
107 }
108 },
109 computed: {
110 codeComputed: {
111 get: function () {
112 return this.form.code
113 },
114 set: function (val) {
115 this.form.code = val.toUpperCase()
116 }
117 }
118 },
119 watch: {
120 value (val) {
121 this.myValue = val
122 }
123 },
124 methods: {
125 // 获取父级菜单
126 getParentMenuList (id) {
127
128 getParentMenuListAction(id).then((res) => {
129 if (res.status === 1) {
130 const list = this.$dealArrChildren(res.content)
131 if (id) {
132 this.parentMenuList = this.$dealArrDisabled(
133 this.$deepCopy(list),
134 id
135 )
136 this.menuKey++
137 } else {
138 this.parentMenuList = list
139 }
140 } else {
141 this.$message.error({ message: res.message, showClose: true })
142 }
143 })
144 }, 67 },
145 getIconList () { 68 props: {
146 this.$refs.iconList.show(true) 69 value: { type: Boolean, default: false },
147 }, 70 productId: {
148 getIconName (data) { 71 type: String,
149 this.form.icon = data 72 default: ''
150 }, 73 }
151 // 配置参数
152 getJsonString (data) {
153 this.form.metadata = data
154 }, 74 },
155 // 新增菜单 75 data () {
156 add () { 76 return {
157 this.getParentMenuList(this.productId) 77 myValue: this.value,
158 this.type = 0 78 form: {
159 this.form.jumpMode = 1 79 icon: '',
80 code: ''
81 },
82 rules: {
83 name: [{ required: true, message: '请输入菜单名称', trigger: 'blur' }],
84 code: [
85 { required: true, message: '必填', trigger: 'blur' },
86 { validator: validateCode, trigger: 'blur' }
87 ]
88 },
89 title: '',
90 type: '',
91 visible: false,
92 parentMenuList: [],
93 menuKey: 0,
94 jumpModeList: [
95 { name: '在当前页面显示', value: 1 },
96 { name: '跳转到新页面', value: 2 }
97 ],
98 setProps: {
99 value: 'id',
100 label: 'name',
101 children: 'children',
102 expandTrigger: 'hover',
103 checkStrictly: true, // 可取消关联,选择任意一级选项
104 emitPath: false
105 },
106 dataUrl: api.menus
107 }
160 }, 108 },
161 // 编辑菜单 109 computed: {
162 edit (record) { 110 codeComputed: {
163 this.type = 1 111 get: function () {
164 // 若有id为编辑 112 return this.form.code
165 if (record.id) { 113 },
166 this.$nextTick(() => { 114 set: function (val) {
167 this.form = Object.assign({}, record) 115 this.form.code = val.toUpperCase()
168 this.getParentMenuList(this.productId) 116 }
169 })
170 } 117 }
171 }, 118 },
172 // 选择上级菜单 119 watch: {
173 handleChange (value) { 120 value (val) {
174 this.form.parentId = value 121 this.myValue = val
122 }
175 }, 123 },
176 // 保存 124 methods: {
177 submitForm (submitType) { 125 // 获取父级菜单
178 this.$refs.form.validate((valid) => { 126 getParentMenuList (id) {
179 if (valid) { 127
180 let method = '' 128 getParentMenuListAction(id).then((res) => {
181 let url = '' 129 if (res.status === 1) {
182 const formData = this.form 130 const list = this.$dealArrChildren(res.content)
183 formData.productId = this.productId 131 if (id) {
184 if (!formData.id) { 132 this.parentMenuList = this.$dealArrDisabled(
185 method = 'post' 133 this.$deepCopy(list),
186 url = this.dataUrl 134 id
135 )
136 this.menuKey++
137 } else {
138 this.parentMenuList = list
139 }
187 } else { 140 } else {
188 method = 'put' 141 this.$message.error({ message: res.message, showClose: true })
189 url = `${this.dataUrl}/${formData.id}`
190 } 142 }
191 debugger 143 })
192 httpAction(url, formData, method) 144 },
193 .then((res) => { 145 getIconList () {
194 if (res.status === 1) { 146 this.$refs.iconList.show(true)
195 this.$message.success({ 147 },
196 message: res.message, 148 getIconName (data) {
197 showClose: true 149 this.form.icon = data
198 }) 150 },
151 // 配置参数
152 getJsonString (data) {
153 this.form.metadata = data
154 },
155 // 新增菜单
156 add () {
157 this.getParentMenuList(this.productId)
158 this.type = 0
159 this.form.jumpMode = 1
160 },
161 // 编辑菜单
162 edit (record) {
163 this.type = 1
164 // 若有id为编辑
165 if (record.id) {
166 this.$nextTick(() => {
167 this.form = Object.assign({}, record)
168 this.getParentMenuList(this.productId)
169 })
170 }
171 },
172 // 选择上级菜单
173 handleChange (value) {
174 this.form.parentId = value
175 },
176 // 保存
177 submitForm (submitType) {
178 this.$refs.form.validate((valid) => {
179 if (valid) {
180 let method = ''
181 let url = ''
182 const formData = this.form
183 formData.productId = this.productId
184 if (!formData.id) {
185 method = 'post'
186 url = this.dataUrl
187 } else {
188 method = 'put'
189 url = `${this.dataUrl}/${formData.id}`
190 }
191 debugger
192 httpAction(url, formData, method)
193 .then((res) => {
194 if (res.status === 1) {
195 this.$message.success({
196 message: res.message,
197 showClose: true
198 })
199 199
200 this.resetForm() 200 this.resetForm()
201 this.$emit('ok') 201 this.$emit('ok')
202 } else { 202 } else {
203 this.$message.error({ message: res.message, showClose: true }) 203 this.$message.error({ message: res.message, showClose: true })
204 } 204 }
205 }) 205 })
206 .catch((err) => { 206 .catch((err) => {
207 console.log(err) 207 console.log(err)
208 }) 208 })
209 }
210 })
211 },
212 resetForm () {
213 this.$refs.form.resetFields()
214 this.form = {
215 icon: '',
216 code: ''
209 } 217 }
210 }) 218 },
211 }, 219 close () {
212 resetForm () { 220 this.resetForm()
213 this.$refs.form.resetFields() 221 this.$emit('input', false)
214 this.form = {
215 icon: '',
216 code: ''
217 } 222 }
218 },
219 close () {
220 this.resetForm()
221 this.$emit('input', false)
222 } 223 }
223 } 224 }
224 }
225 </script> 225 </script>
226 <style scoped lang="scss"> 226 <style scoped lang="scss">
227 .modifydialog { 227 .modifydialog {
228 &-con { 228 &-con {
229 background: #031A46; 229 background: #031a46;
230 }
231 /deep/.el-dialog__header {
232 .dialog_title {
233 display: -webkit-box;
234 display: -ms-flexbox;
235 display: flex;
236 position: relative;
237 top: -8px;
238 width: 28%;
239 height: 40px;
240 margin-left: 28px;
241 -webkit-box-pack: center;
242 -ms-flex-pack: center;
243 justify-content: center;
244 white-space: nowrap;
245 b {
246 font-size: 16px;
247 font-weight: 600;
248 }
249 }
250 }
230 } 251 }
231 }
232 </style>
...\ No newline at end of file ...\ No newline at end of file
252 </style>
......
...@@ -13,159 +13,160 @@ ...@@ -13,159 +13,160 @@
13 </el-form> 13 </el-form>
14 </div> 14 </div>
15 <div class="from-clues-content"> 15 <div class="from-clues-content">
16 <lb-table :pagination="false" :column="tableData.columns" :data="tablelistData" row-key="id" default-expand-all 16 <lb-table :pagination="false" :column="tableData.
17 columns" :calcHeight="200"
18 :data="tablelistData" row-key="id" default-expand-all
17 :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"> 19 :tree-props="{ children: 'children', hasChildren: 'hasChildren' }">
18 </lb-table> 20 </lb-table>
19 </div> 21 </div>
20 <edit-dialog ref="dialogForm" v-model="isDialog" :product-id="productId" :resource-category-id="resourceCategoryId" 22 <edit-dialog ref="dialogForm" v-model="isDialog" :product-id="productId" :resource-category-id="resourceCategoryId"
21 @ok="reloadTableData" /> 23 @ok="reloadTableData" />
22 <!-- <authorizationdiglog ref="rolesForm" /> -->
23 </div> 24 </div>
24 </template> 25 </template>
25 <script> 26 <script>
26 // 定时任务 27 // 定时任务
27 import data from "./data"; 28 import data from "./data";
28 import { deleteAction, getAction, api } from "@/api/manageApi"; 29 import { deleteAction, getAction, api } from "@/api/manageApi";
29 import EditDialog from "./edit-dialog.vue"; 30 import EditDialog from "./edit-dialog.vue";
30 import { mapGetters } from "vuex"; 31 import { mapGetters } from "vuex";
31 import { getMenuInfo } from "@/api/user"; 32 import { getMenuInfo } from "@/api/user";
32 import { 33 import {
33 getUuid, 34 getUuid,
34 judgeSort, 35 judgeSort,
35 realMove, 36 realMove,
36 findParents, 37 findParents,
37 removeTreeListItem, 38 removeTreeListItem,
38 } from "@/utils/operation"; 39 } from "@/utils/operation";
39 export default { 40 export default {
40 name: "menus", 41 name: "menus",
41 components: { 42 components: {
42 EditDialog, 43 EditDialog,
43 }, 44 },
44 data () { 45 data () {
45 return { 46 return {
46 isDialog: false, 47 isDialog: false,
47 tablelistData: [], 48 tablelistData: [],
48 resourceCategoryId: "", 49 resourceCategoryId: "",
49 taskData: null, 50 taskData: null,
50 form: { 51 form: {
51 job_name: "", 52 job_name: "",
52 currentPage: 1, 53 currentPage: 1,
53 }, 54 },
54 title: "", 55 title: "",
55 queryParam: {}, 56 queryParam: {},
56 selectType: "0", 57 selectType: "0",
57 queryName: "", 58 queryName: "",
58 organizationId: "", // 组织机构ID 59 organizationId: "", // 组织机构ID
59 departmentId: "", // 部门ID 60 departmentId: "", // 部门ID
60 departmentList: [], // 部门列表 61 departmentList: [], // 部门列表
61 levelList: [], // 职务级别 62 levelList: [], // 职务级别
62 sexList: [], 63 sexList: [],
63
64 selectionList: [],
65 tableData: {
66 columns: [].concat(data.columns()).concat([
67 {
68 label: "操作",
69 width: 380,
70 render: (h, scope) => {
71 return (
72 <div>
73 <el-button
74 type="text"
75 class='successColor'
76 onClick={() => {
77 this.handleEdit(scope.row);
78 }}
79 >
80 修改
81 </el-button>
82 64
83 <el-button 65 selectionList: [],
84 type="text" 66 tableData: {
85 class='delColor' 67 columns: [].concat(data.columns()).concat([
86 onClick={() => {
87 this.handleDelete(scope.row.id, scope.row.name);
88 }}
89 >
90 删除
91 </el-button>
92 </div>
93 );
94 },
95 },
96 ]),
97 data: [],
98 },
99 pageData: {
100 total: 5,
101 pageSize: 15,
102 current: 1,
103 },
104 tableUrl: api.menus, // 菜单接口地址
105 meumurlid: api.subsystem,// 项目id接口地址
106 productId: ""//项目id
107 };
108 },
109 created () {
110 this.getTableList();
111 },
112 computed: {
113 ...mapGetters(["products"])
114 },
115 methods: {
116 // 加载表格数据
117 getTableList () {
118 getMenuInfo(sessionStorage.getItem("products")).then((res) => {
119 if (res.code === 200) {
120 this.tablelistData = judgeSort(res.result)
121 } else {
122 this.$message.error({ message: res.message, showClose: true })
123 }
124 })
125 const queryOptionsid = {
126 conditionGroup: {
127 queryRelation: "AND",
128 conditions: [
129 { 68 {
130 property: "code", 69 label: "操作",
131 value: this.products, 70 width: 380,
132 operator: "EQ", 71 render: (h, scope) => {
72 return (
73 <div>
74 <el-button
75 type="text"
76 class='successColor'
77 onClick={() => {
78 this.handleEdit(scope.row);
79 }}
80 >
81 修改
82 </el-button>
83
84 <el-button
85 type="text"
86 class='delColor'
87 onClick={() => {
88 this.handleDelete(scope.row.id, scope.row.name);
89 }}
90 >
91 删除
92 </el-button>
93 </div>
94 );
95 },
133 }, 96 },
134 ], 97 ]),
98 data: [],
135 }, 99 },
100 pageData: {
101 total: 5,
102 pageSize: 15,
103 current: 1,
104 },
105 tableUrl: api.menus, // 菜单接口地址
106 meumurlid: api.subsystem,// 项目id接口地址
107 productId: ""//项目id
136 }; 108 };
137 const params = {
138 queryOptions: queryOptionsid,
139 };
140 // 获取系统id
141 getAction(this.meumurlid, params)
142 .then((res) => {
143 this.productId = res.content[0].id;
144 this.getAuthorityList(res.content[0].id, res.content[0].code)
145 this.selectedSubsystemCode = res.content[0].code
146
147 })
148 .catch((error) => {
149 console.log("er", error);
150 })
151 }, 109 },
152 // 新增菜单 110 created () {
153 handleAdd () { 111 this.getTableList();
154 this.isDialog = true
155 this.$refs.dialogForm.add();
156 this.$refs.dialogForm.title = "添加";
157 }, 112 },
158 113 computed: {
159 // 修改 114 ...mapGetters(["products"])
160 handleEdit (record) {
161 this.isDialog = true
162 this.$refs.dialogForm.edit(record);
163 this.$refs.dialogForm.title = "修改";
164 }, 115 },
165 // 删除 116 methods: {
166 handleDelete (id, content) { 117 // 加载表格数据
167 this.$confirm( 118 getTableList () {
168 `<div class="customer-message-wrapper"> 119 getMenuInfo(sessionStorage.getItem("products")).then((res) => {
120 if (res.code === 200) {
121 this.tablelistData = judgeSort(res.result)
122 } else {
123 this.$message.error({ message: res.message, showClose: true })
124 }
125 })
126 const queryOptionsid = {
127 conditionGroup: {
128 queryRelation: "AND",
129 conditions: [
130 {
131 property: "code",
132 value: sessionStorage.getItem("products"),
133 operator: "EQ",
134 },
135 ],
136 },
137 };
138 const params = {
139 queryOptions: queryOptionsid,
140 };
141 // 获取系统id
142 getAction(this.meumurlid, params)
143 .then((res) => {
144 this.productId = res.content[0].id;
145 this.getAuthorityList(res.content[0].id, res.content[0].code)
146 this.selectedSubsystemCode = res.content[0].code
147
148 })
149 .catch((error) => {
150 console.log("er", error);
151 })
152 },
153 // 新增菜单
154 handleAdd () {
155 this.isDialog = true
156 this.$refs.dialogForm.add();
157 this.$refs.dialogForm.title = "新增";
158 },
159
160 // 修改
161 handleEdit (record) {
162 this.isDialog = true
163 this.$refs.dialogForm.edit(record);
164 this.$refs.dialogForm.title = "修改";
165 },
166 // 删除
167 handleDelete (id, content) {
168 this.$confirm(
169 `<div class="customer-message-wrapper">
169 <h5 class="title">您确认要执行该操作用于以下信息:</h5> 170 <h5 class="title">您确认要执行该操作用于以下信息:</h5>
170 <p class="content" aria-controls="${content}">${content} 171 <p class="content" aria-controls="${content}">${content}
171 </p> 172 </p>
...@@ -173,51 +174,55 @@ export default { ...@@ -173,51 +174,55 @@ export default {
173 <span >无法恢复</span> 174 <span >无法恢复</span>
174 </p> 175 </p>
175 </div>`, 176 </div>`,
176 '执行确认', 177 '执行确认',
177 { 178 {
178 dangerouslyUseHTMLString: true, 179 dangerouslyUseHTMLString: true,
179 customClass: 'customer-delete', 180 customClass: 'customer-delete',
180 confirmButtonText: '确定', 181 confirmButtonText: '确定',
181 cancelButtonText: '取消', 182 cancelButtonText: '取消',
182 type: 'warning' 183 type: 'warning'
183 }
184 )
185 .then(() => {
186 if (!this.tableUrl) {
187 this.$message.error({
188 message: '请设置tableUrl属性为接口地址!',
189 showClose: true
190 })
191 return
192 } 184 }
193 const url = this.tableUrl + '/' + id 185 )
194 deleteAction(url).then(res => { 186 .then(() => {
195 if (res.status === 1) { 187 if (!this.tableUrl) {
196 this.$message.success({ message: res.message, showClose: true }) 188 this.$message.error({
197 this.reloadTableData() 189 message: '请设置tableUrl属性为接口地址!',
198 } else { 190 showClose: true
199 this.$message.error({ message: res.message, showClose: true }) 191 })
192 return
200 } 193 }
194 const url = this.tableUrl + '/' + id
195 deleteAction(url).then(res => {
196 if (res.status === 1) {
197 this.$message.success({ message: res.message, showClose: true })
198 this.reloadTableData()
199 } else {
200 this.$message.error({ message: res.message, showClose: true })
201 }
202 })
201 }) 203 })
202 }) 204 .catch(() => { })
203 .catch(() => { }) 205 },
204 }, 206 // 新增、编辑回显
205 // 新增、编辑回显 207 reloadTableData () {
206 reloadTableData () { 208 this.getTableList()
207 this.getTableList() 209 },
208 }, 210 },
209 }, 211 };
210 };
211 </script> 212 </script>
212 <style scoped lang="scss"> 213 <style scoped lang="scss">
213 @import "~@/styles/mixin.scss"; 214 @import "~@/styles/mixin.scss";
214
215 // @import "~@/styles/public.scss";
216 .btnColRight {
217 margin-top: 20px;
218 }
219 215
220 /deep/.el-table__expand-icon { 216 // @import "~@/styles/public.scss";
221 color: #fff; 217 .btnColRight {
222 } 218 height: 60px;
219 .button {
220 position: absolute;
221 left: 30px;
222 top: 20px;
223 }
224 }
225 /deep/.el-table__expand-icon {
226 color: #fff;
227 }
223 </style> 228 </style>
......
1 <!-- 新增 & 修改角色 --> 1 <!-- 新增 & 修改角色 -->
2 <template> 2 <template>
3 <Dialog 3 <dialogBox
4 class="modifydialog" 4 class="modifydialog"
5 :title="dialogTitle" 5 :title="title"
6 :show.sync="showAddEditDialog" 6 :width="'567px'"
7 :width="'767px'" 7 :isMain="true"
8 @close="handleCloseDialog()"> 8 @closeDialog="close"
9 <template slot="content"> 9 @submitForm="submitForm"
10 v-model="myValue">
11 <div class="dialogCon">
10 <el-form ref="form" :model="dialogForm" :rules="rules" label-width="82px"> 12 <el-form ref="form" :model="dialogForm" :rules="rules" label-width="82px">
11 <el-row :gutter="24"> 13 <el-row :gutter="24">
12 <el-col :span="15"> 14 <el-col :span="23">
13 <el-form-item label="角色名称:" prop="roleName"> 15 <el-form-item label="角色名称:" prop="roleName">
14 <el-input 16 <el-input
15 v-model="dialogForm.roleName" 17 v-model="dialogForm.roleName"
...@@ -19,18 +21,20 @@ ...@@ -19,18 +21,20 @@
19 </el-col> 21 </el-col>
20 </el-row> 22 </el-row>
21 <el-row> 23 <el-row>
22 <el-col :span="24"> 24 <el-col :span="23">
23 <el-form-item label="备注:" class="form-item-mb0"> 25 <el-form-item label="备注:" class="form-item-mb0">
24 <el-input 26 <el-input
25 v-model="dialogForm.roleTextArea" 27 v-model="dialogForm.roleTextArea"
28 clearable
29 :rows="10"
26 type="textarea" 30 type="textarea"
27 placeholder="备注" /> 31 placeholder="备注" />
28 </el-form-item> 32 </el-form-item>
29 </el-col> 33 </el-col>
30 </el-row> 34 </el-row>
31 </el-form> 35 </el-form>
32 </template> 36 </div>
33 <template slot="footer"> 37 <!-- <template slot="footer">
34 <el-button 38 <el-button
35 class="cancel-button" 39 class="cancel-button"
36 @click="handleCloseDialog">取消</el-button> 40 @click="handleCloseDialog">取消</el-button>
...@@ -38,8 +42,8 @@ ...@@ -38,8 +42,8 @@
38 <el-button 42 <el-button
39 type="primary" 43 type="primary"
40 @click="handleSaveRole()">保存</el-button> 44 @click="handleSaveRole()">保存</el-button>
41 </template> 45 </template> -->
42 </Dialog> 46 </dialogBox>
43 </template> 47 </template>
44 48
45 <script> 49 <script>
...@@ -49,9 +53,13 @@ ...@@ -49,9 +53,13 @@
49 components: { 53 components: {
50 Dialog 54 Dialog
51 }, 55 },
56 props: {
57 value: { type: Boolean, default: false },
58 },
52 data () { 59 data () {
53 return { 60 return {
54 dialogTitle: '', 61 myValue: this.value,
62 title: '',
55 showAddEditDialog: false, 63 showAddEditDialog: false,
56 menuType: '', 64 menuType: '',
57 roleId: '', 65 roleId: '',
...@@ -72,9 +80,14 @@ ...@@ -72,9 +80,14 @@
72 ] 80 ]
73 } 81 }
74 }, 82 },
83 watch: {
84 value (val) {
85 this.myValue = val
86 }
87 },
75 methods: { 88 methods: {
76 // 保存新增或关闭事件 89 // 保存新增或关闭事件
77 handleSaveRole (val) { 90 submitForm () {
78 this.$refs.form.validate((valid) => { 91 this.$refs.form.validate((valid) => {
79 if (valid) { 92 if (valid) {
80 try { 93 try {
...@@ -97,8 +110,8 @@ ...@@ -97,8 +110,8 @@
97 this.dialogForm = { 110 this.dialogForm = {
98 roleName: '', 111 roleName: '',
99 } 112 }
100 this.showAddEditDialog = val 113 // this.showAddEditDialog = val
101 this.$emit('ok', this.menuType) 114 this.$emit('ok')
102 } else { 115 } else {
103 this.$message.error({ 116 this.$message.error({
104 message: res.message, 117 message: res.message,
...@@ -114,10 +127,10 @@ ...@@ -114,10 +127,10 @@
114 message: '新增成功', 127 message: '新增成功',
115 showClose: true 128 showClose: true
116 }) 129 })
117 this.dialogForm = { 130 this.close()
118 roleName: '', 131
119 } 132 this.$emit('ok')
120 this.showAddEditDialog = val 133 // this.showAddEditDialog = val
121 this.$emit('ok', this.menuType) 134 this.$emit('ok', this.menuType)
122 } else { 135 } else {
123 this.$message.error({ 136 this.$message.error({
...@@ -133,16 +146,40 @@ ...@@ -133,16 +146,40 @@
133 } 146 }
134 }) 147 })
135 }, 148 },
136 // 取消事件 149 resetForm () {
137 handleCloseDialog () {
138 this.$refs.form.resetFields()
139 this.dialogForm = { 150 this.dialogForm = {
140 roleName: '', 151 roleName: '',
141 } 152 }
142 this.showAddEditDialog = false 153 this.$refs.form.resetFields()
154 },
155 close () {
156 this.resetForm()
157 this.$emit('input', false)
143 } 158 }
144 } 159 }
145 } 160 }
146 </script> 161 </script>
147 <style scoped lang="scss"> 162 <style scoped lang="scss">
163 .modifydialog {
164 /deep/.el-dialog__header {
165 .dialog_title {
166 display: -webkit-box;
167 display: -ms-flexbox;
168 display: flex;
169 position: relative;
170 top: -8px;
171 width: 24%;
172 height: 40px;
173 margin-left: 28px;
174 -webkit-box-pack: center;
175 -ms-flex-pack: center;
176 justify-content: center;
177 white-space: nowrap;
178 b {
179 font-size: 16px;
180 font-weight: 600;
181 }
182 }
183 }
184 }
148 </style> 185 </style>
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
17 :column="tableData.columns" :data="listdata" :expand-row-keys="keyList" row-key="dictid"> 17 :column="tableData.columns" :data="listdata" :expand-row-keys="keyList" row-key="dictid">
18 </lb-table> 18 </lb-table>
19 </div> 19 </div>
20 <EditDialog ref="addEditDialog" @ok="reloadTableData" /> 20 <EditDialog ref="addEditDialog" v-model="isDialog" @ok="reloadTableData" />
21 <Roleslistdiglog ref="rolesForm" /> 21 <Roleslistdiglog ref="rolesForm" />
22 </div> 22 </div>
23 </template> 23 </template>
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
38 import EditDialog from "./edit-dialog.vue"; 38 import EditDialog from "./edit-dialog.vue";
39 import Roleslistdiglog from "./roleslistdiglog.vue"; 39 import Roleslistdiglog from "./roleslistdiglog.vue";
40 import { mapGetters } from "vuex"; 40 import { mapGetters } from "vuex";
41 import {updateOrder} from "@/api/orders" 41 import { updateOrder } from "@/api/orders"
42 export default { 42 export default {
43 name: "menus", 43 name: "menus",
44 mixins: [tableMixin], 44 mixins: [tableMixin],
...@@ -48,6 +48,7 @@ ...@@ -48,6 +48,7 @@
48 }, 48 },
49 data () { 49 data () {
50 return { 50 return {
51 isDialog: false,
51 personlist: null, 52 personlist: null,
52 waitMemberList: [], 53 waitMemberList: [],
53 keyList: [], 54 keyList: [],
...@@ -108,42 +109,46 @@ ...@@ -108,42 +109,46 @@
108 .concat([ 109 .concat([
109 { 110 {
110 label: "排序", 111 label: "排序",
111 width: 200, 112 width: 300,
112 render: (h, scope) => { 113 render: (h, scope) => {
113 return ( 114 return (
114 <div> 115 <div>
115 <el-button 116 <el-button
116 type="text" 117 type="text"
118 class='movebtnColor'
117 disabled={scope.row.isTop} 119 disabled={scope.row.isTop}
118 onClick={() => { 120 onClick={() => {
119 this.updateOrder(scope.row,'TOP'); 121 this.updateOrder(scope.row, 'TOP');
120 }} 122 }}
121 > 123 >
122 置顶 124 置顶
123 </el-button> 125 </el-button>
124 <el-button 126 <el-button
125 type="text" 127 type="text"
128 class='movebtnColor'
126 disabled={scope.row.isTop} 129 disabled={scope.row.isTop}
127 onClick={() => { 130 onClick={() => {
128 this.updateOrder(scope.row,'UP'); 131 this.updateOrder(scope.row, 'UP');
129 }} 132 }}
130 > 133 >
131 上移 134 上移
132 </el-button> 135 </el-button>
133 <el-button 136 <el-button
134 type="text" 137 type="text"
138 class='movebtnColor'
135 disabled={scope.row.isBottom} 139 disabled={scope.row.isBottom}
136 onClick={() => { 140 onClick={() => {
137 this.updateOrder(scope.row,'DOWN'); 141 this.updateOrder(scope.row, 'DOWN');
138 }} 142 }}
139 > 143 >
140 下移 144 下移
141 </el-button> 145 </el-button>
142 <el-button 146 <el-button
143 type="text" 147 type="text"
148 class='movebtnColor'
144 disabled={scope.row.isBottom} 149 disabled={scope.row.isBottom}
145 onClick={() => { 150 onClick={() => {
146 this.updateOrder(scope.row,'BOTTOM'); 151 this.updateOrder(scope.row, 'BOTTOM');
147 }} 152 }}
148 > 153 >
149 置底 154 置底
...@@ -172,6 +177,7 @@ ...@@ -172,6 +177,7 @@
172 disabled={scope.row.type === "Everyone"} 177 disabled={scope.row.type === "Everyone"}
173 type="text" 178 type="text"
174 size="mini" 179 size="mini"
180 class="configurationbtnColor"
175 icon="el-icon-video-pause" 181 icon="el-icon-video-pause"
176 onClick={() => { 182 onClick={() => {
177 this.getUserList(scope.row); 183 this.getUserList(scope.row);
...@@ -193,6 +199,7 @@ ...@@ -193,6 +199,7 @@
193 disabled={scope.row.category === 1} 199 disabled={scope.row.category === 1}
194 type="text" 200 type="text"
195 size="mini" 201 size="mini"
202 class='successColor'
196 icon="el-icon-edit" 203 icon="el-icon-edit"
197 onClick={() => { 204 onClick={() => {
198 this.handleAddEdit(scope.row); 205 this.handleAddEdit(scope.row);
...@@ -214,6 +221,7 @@ ...@@ -214,6 +221,7 @@
214 type="text" 221 type="text"
215 disabled={scope.row.category === 1} 222 disabled={scope.row.category === 1}
216 size="mini" 223 size="mini"
224 class='delColor'
217 icon="el-icon-delete" 225 icon="el-icon-delete"
218 // style="color:#F56C6C" 226 // style="color:#F56C6C"
219 onClick={() => { 227 onClick={() => {
...@@ -244,7 +252,7 @@ ...@@ -244,7 +252,7 @@
244 methods: { 252 methods: {
245 // 获取角色列表 253 // 获取角色列表
246 getTableData () { 254 getTableData () {
247 getRolesById([1,2]) 255 getRolesById([1, 2])
248 .then((res) => { 256 .then((res) => {
249 this.listdata = res.content; 257 this.listdata = res.content;
250 this.listdata = judgeSort(this.listdata); 258 this.listdata = judgeSort(this.listdata);
...@@ -394,6 +402,7 @@ ...@@ -394,6 +402,7 @@
394 }, 402 },
395 // 新增、修改角色 403 // 新增、修改角色
396 handleAddEdit (value) { 404 handleAddEdit (value) {
405 this.isDialog = true
397 this.$refs.addEditDialog.menuType = this.menuType; 406 this.$refs.addEditDialog.menuType = this.menuType;
398 this.$refs.addEditDialog.roleId = value.id; 407 this.$refs.addEditDialog.roleId = value.id;
399 this.roleSort = value.sort ? value.sort : 0; 408 this.roleSort = value.sort ? value.sort : 0;
...@@ -404,10 +413,10 @@ ...@@ -404,10 +413,10 @@
404 this.$refs.addEditDialog.dialogForm.roleTextArea = value.description; 413 this.$refs.addEditDialog.dialogForm.roleTextArea = value.description;
405 } 414 }
406 this.$refs.addEditDialog.showAddEditDialog = true; 415 this.$refs.addEditDialog.showAddEditDialog = true;
407 this.$refs.addEditDialog.dialogTitle = value.id ? "修改" : "新增"; 416 this.$refs.addEditDialog.title = value.id ? "修改" : "新增";
408 }, 417 },
409 //排序 418 //排序
410 updateOrder(record, operate){ 419 updateOrder (record, operate) {
411 const findIndex = this.listdata.findIndex(item => item.id === record.id) 420 const findIndex = this.listdata.findIndex(item => item.id === record.id)
412 let swapId = '' 421 let swapId = ''
413 if (operate === 'UP') { 422 if (operate === 'UP') {
...@@ -476,7 +485,17 @@ ...@@ -476,7 +485,17 @@
476 485
477 // @import "~@/styles/public.scss"; 486 // @import "~@/styles/public.scss";
478 .btnColRight { 487 .btnColRight {
479 margin-left: -30px; 488 height: 60px;
480 margin-top: 20px; 489 .button {
490 position: absolute;
491 left: 30px;
492 top: 20px;
493 }
494 }
495 /deep/.el-button.is-disabled.el-button--text {
496 width: 64px;
497 height: 28px;
498 background: rgba(255, 255, 255, 0.1);
499 border-radius: 16px;
481 } 500 }
482 </style> 501 </style>
......
...@@ -37,8 +37,8 @@ ...@@ -37,8 +37,8 @@
37 </lb-table> 37 </lb-table>
38 </div> 38 </div>
39 <template slot="footer"> 39 <template slot="footer">
40 <el-button type="primary" class="save" @click="handleSaveMember()">保存</el-button> 40 <btn nativeType="cx" type="primary" @click="handleSaveMember()">保存</btn>
41 <el-button class="cancel-button" @click="close()">取消</el-button> 41 <btn nativeType="cz" @click="close()">取消</btn>
42 </template> 42 </template>
43 </el-dialog> 43 </el-dialog>
44 </template> 44 </template>
......
1 <template> 1 <template>
2 <dialogBox :title="title" class="modifydialog" @closeDialog="close" :isMain="true" @submitForm="submitForm" 2 <dialogBox :title="title" :width="'867px'" class="modifydialog" @closeDialog="close" :isMain="true" @submitForm="submitForm"
3 v-model="myValue"> 3 v-model="myValue">
4 <div class="dialogCon"> 4 <div class="dialogCon">
5 <el-form ref="form" :model="form" :rules="rules"> 5 <el-form ref="form" :model="form" :rules="rules">
6 <el-row :gutter="24"> 6 <el-row :gutter="24">
7 <el-col :span="11"> 7 <el-col :span="12">
8 <el-form-item label="姓名:" prop="name" label-width="100px"> 8 <el-form-item label="姓名:" prop="name" label-width="100px">
9 <el-input v-model="form.name" placeholder="姓名" /> 9 <el-input v-model="form.name" placeholder="姓名" />
10 </el-form-item> 10 </el-form-item>
11 </el-col> 11 </el-col>
12 <el-col :span="13"> 12 <el-col :span="23">
13 <el-col :span="18" class="col-pd0"> 13 <el-col :span="18" class="col-pd0">
14 <el-form-item label="性别:" label-width="72px"> 14 <el-form-item label="性别:" label-width="88px">
15 <el-radio v-for="(item, index) in sexList" :key="index" v-model="form.sex" :label="item.value">{{ 15 <el-radio v-for="(item, index) in sexList" :key="index" v-model="form.sex" :label="item.value">{{
16 item.name }}</el-radio> 16 item.name }}</el-radio>
17 </el-form-item> 17 </el-form-item>
...@@ -22,38 +22,38 @@ ...@@ -22,38 +22,38 @@
22 </el-col> 22 </el-col>
23 </el-row> 23 </el-row>
24 <el-row :gutter="24"> 24 <el-row :gutter="24">
25 <el-col :span="11"> 25 <el-col :span="12">
26 <el-form-item label="工号:" prop="code" label-width="100px"> 26 <el-form-item label="工号:" prop="code" label-width="100px">
27 <el-input v-model="form.code" placeholder="工号" /> 27 <el-input v-model="form.code" placeholder="工号" />
28 </el-form-item> 28 </el-form-item>
29 </el-col> 29 </el-col>
30 <el-col :span="13"> 30 <el-col :span="12">
31 <el-form-item label="用户名:" prop="loginName" label-width="72px"> 31 <el-form-item label="用户名:" prop="loginName" label-width="72px">
32 <el-input v-model="form.loginName" :disabled="showLoginName" placeholder="用户名" /> 32 <el-input v-model="form.loginName" :disabled="showLoginName" placeholder="用户名" />
33 </el-form-item> 33 </el-form-item>
34 </el-col> 34 </el-col>
35 </el-row> 35 </el-row>
36 <el-row :gutter="24"> 36 <el-row :gutter="24">
37 <el-col :span="11"> 37 <el-col :span="12">
38 <el-form-item label="身份证号码:" label-width="100px"> 38 <el-form-item label="身份证号码:" label-width="100px">
39 <el-input v-model="form.idCard" placeholder="身份证号码" /> 39 <el-input v-model="form.idCard" placeholder="身份证号码" />
40 </el-form-item> 40 </el-form-item>
41 </el-col> 41 </el-col>
42 <el-col :span="13"> 42 <el-col :span="12">
43 <el-form-item label="手机号码:" prop="mobilePhone" label-width="72px"> 43 <el-form-item label="手机号码:" prop="mobilePhone" label-width="72px">
44 <el-input v-model="form.mobilePhone" placeholder="手机号码" /> 44 <el-input v-model="form.mobilePhone" placeholder="手机号码" />
45 </el-form-item> 45 </el-form-item>
46 </el-col> 46 </el-col>
47 </el-row> 47 </el-row>
48 <el-row :gutter="24"> 48 <el-row :gutter="24">
49 <el-col :span="11"> 49 <el-col :span="12">
50 <el-form-item label="最高职务级别:" label-width="100px"> 50 <el-form-item label="最高职务级别:" label-width="100px">
51 <el-select v-model="form.jobLevel" placeholder="最高职务级别"> 51 <el-select v-model="form.jobLevel" placeholder="最高职务级别">
52 <el-option v-for="item in levelList" :key="item.value" :label="item.name" :value="item.value" /> 52 <el-option v-for="item in levelList" :key="item.value" :label="item.name" :value="item.value" />
53 </el-select> 53 </el-select>
54 </el-form-item> 54 </el-form-item>
55 </el-col> 55 </el-col>
56 <el-col :span="13"> 56 <el-col :span="12">
57 <el-form-item label="办公电话:" prop="telephone" label-width="72px"> 57 <el-form-item label="办公电话:" prop="telephone" label-width="72px">
58 <el-input v-model="form.telephone" placeholder="办公电话" /> 58 <el-input v-model="form.telephone" placeholder="办公电话" />
59 </el-form-item> 59 </el-form-item>
...@@ -72,107 +72,128 @@ ...@@ -72,107 +72,128 @@
72 </template> 72 </template>
73 73
74 <script> 74 <script>
75 import { api, httpAction } from '@/api/manageApi' 75 import { api, httpAction } from '@/api/manageApi'
76 export default { 76 export default {
77 name: "", 77 name: "",
78 props: { 78 props: {
79 value: { type: Boolean, default: false }, 79 value: { type: Boolean, default: false },
80 },
81 data () {
82 return {
83 myValue: this.value,
84 form: {
85 sex: "0",
86 },
87 rules: {
88 name: [{ required: true, message: "请输入姓名", trigger: "blur" }],
89 code: [{ required: true, message: "请输入工号", trigger: "blur" }],
90 mobilePhone: [{ validator: "sddd", trigger: "blur" }],
91 loginName: [
92 { required: true, message: "请输入用户名", trigger: "blur" },
93 ],
94 },
95 title: "修改",
96 showLoginName: false,
97 sexList: [{ lable: "0", value: "0", name: "男" }, { lable: "1", value: "1", name: "女" }],
98 levelList: [{ lable: "0", value: "0", name: "干事" }, { lable: "1", value: "1", name: "经理" }],
99 dataUrl: api.users
100 };
101 },
102 computed: {
103 departmentid () {
104 return this.$store.state.user.userInfo;
105 }, 80 },
106 }, 81 data () {
107 watch: { 82 return {
108 value (val) { 83 myValue: this.value,
109 this.myValue = val 84 form: {
110 } 85 sex: "0",
111 }, 86 },
112 methods: { 87 rules: {
113 // 添加人员 88 name: [{ required: true, message: "请输入姓名", trigger: "blur" }],
114 adds () { 89 code: [{ required: true, message: "请输入工号", trigger: "blur" }],
115 this.showLoginName = false 90 mobilePhone: [{ validator: "sddd", trigger: "blur" }],
91 loginName: [
92 { required: true, message: "请输入用户名", trigger: "blur" },
93 ],
94 },
95 title: "",
96 showLoginName: false,
97 sexList: [{ lable: "0", value: "0", name: "男" }, { lable: "1", value: "1", name: "女" }],
98 levelList: [{ lable: "0", value: "0", name: "干事" }, { lable: "1", value: "1", name: "经理" }],
99 dataUrl: api.users
100 };
116 }, 101 },
117 // 编辑 102 computed: {
118 edit (record) { 103 departmentid () {
119 this.showLoginName = true 104 return this.$store.state.user.userInfo;
120 // 若有id为编辑 105 },
121 if (record) {
122 this.$nextTick(() => {
123 this.form = Object.assign({}, record)
124 })
125 }
126 }, 106 },
127 handleChange (value) { 107 watch: {
128 this.form.departmentId = value; 108 value (val) {
109 this.myValue = val
110 }
129 }, 111 },
130 // 保存 112 methods: {
131 submitForm (submitType) { 113 // 添加人员
132 this.$refs.form.validate((valid) => { 114 adds () {
133 if (valid) { 115 this.showLoginName = false
134 let method = '' 116 },
135 let url = '' 117 // 编辑
136 this.form.organizationId = this.departmentid.organizationId; 118 edit (record) {
137 this.form.departmentId = this.departmentid.departmentId; 119 this.showLoginName = true
138 const formData = this.form 120 // 若有id为编辑
139 if (!formData.id) { 121 if (record) {
140 method = 'post' 122 this.$nextTick(() => {
141 url = this.dataUrl 123 this.form = Object.assign({}, record)
142 } else { 124 })
143 method = 'put' 125 }
144 url = `${this.dataUrl}/${formData.id}` 126 },
145 } 127 handleChange (value) {
146 128 this.form.departmentId = value;
147 httpAction(url, formData, method).then((res) => { 129 },
148 if (res.status === 1) { 130 // 保存
149 this.$message.success({ message: res.message, showClose: true }) 131 submitForm () {
132 this.$refs.form.validate((valid) => {
133 if (valid) {
134 let method = ''
135 let url = ''
136 this.form.organizationId = this.departmentid.organizationId;
137 this.form.departmentId = this.departmentid.departmentId;
138 const formData = this.form
139 if (!formData.id) {
140 method = 'post'
141 url = this.dataUrl
142 } else {
143 method = 'put'
144 url = `${this.dataUrl}/${formData.id}`
145 }
150 146
151 this.resetForm() 147 httpAction(url, formData, method).then((res) => {
148 if (res.status === 1) {
149 this.$message.success({ message: res.message, showClose: true })
152 150
153 this.close() 151 this.close()
154 152
155 this.$emit('ok') 153 this.$emit('ok')
156 } else { 154 } else {
157 this.$message.error({ message: res.message, showClose: true }) 155 this.$message.error({ message: res.message, showClose: true })
158 } 156 }
159 }) 157 })
160 } else { 158 } else {
161 return false 159 return false
160 }
161 })
162 },
163 resetForm () {
164 this.form = {
165 sex: '0'
162 } 166 }
163 }) 167 this.$refs.form.resetFields()
164 }, 168 },
165 resetForm () { 169 close () {
166 this.form = { 170 this.resetForm()
167 sex: '0' 171 this.$emit('input', false)
168 } 172 }
169 this.$refs.form.resetFields()
170 },
171 close () {
172 this.resetForm()
173 this.$emit('input', false)
174 } 173 }
175 } 174 }
176 }
177 </script> 175 </script>
178 <style scoped lang="scss"></style> 176 <style scoped lang="scss">
177 .modifydialog {
178 /deep/.el-dialog__header {
179 .dialog_title {
180 display: -webkit-box;
181 display: -ms-flexbox;
182 display: flex;
183 position: relative;
184 top: -7px;
185 width: 29%;
186 height: 40px;
187 margin-left: 28px;
188 -webkit-box-pack: center;
189 -ms-flex-pack: center;
190 justify-content: center;
191 white-space: nowrap;
192 b {
193 font-size: 16px;
194 font-weight: 600;
195 }
196 }
197 }
198 }
199 </style>
......
...@@ -17,314 +17,332 @@ ...@@ -17,314 +17,332 @@
17 </div> 17 </div>
18 <div class="from-clues-content"> 18 <div class="from-clues-content">
19 <lb-table :pagination="false" @size-change="handleSizeChange" @p-current-change="handleCurrentChange" 19 <lb-table :pagination="false" @size-change="handleSizeChange" @p-current-change="handleCurrentChange"
20 :column="tableData.columns" :data="tableData.data" :expand-row-keys="keyList" row-key="dictid"> 20 :column="tableData.columns" :calcHeight="200" :data="tableData.data" :expand-row-keys="keyList" row-key="dictid">
21 </lb-table> 21 </lb-table>
22 </div> 22 </div>
23 <EditDialog ref="dialogForm" v-model="isDialog" @ok="reloadTableData" /> 23 <EditDialog ref="dialogForm" v-model="isDialog" @ok="reloadTableData" />
24 </div> 24 </div>
25 </template> 25 </template>
26 <script> 26 <script>
27 import { 27 import {
28 getUuid, 28 getUuid,
29 judgeSort, 29 judgeSort,
30 realMove, 30 realMove,
31 findParents, 31 findParents,
32 removeTreeListItem, 32 removeTreeListItem,
33 } from "@/utils/operation"; 33 } from "@/utils/operation";
34 import { 34 import {
35 resetPassword, 35 resetPassword,
36 getUserList, 36 getUserList,
37 } from "@/api/personnelManage"; 37 } from "@/api/personnelManage";
38 import { api, deleteAction } from '@/api/manageApi' 38 import { api, deleteAction } from '@/api/manageApi'
39 import data from "./data"; 39 import data from "./data";
40 import { deleteDomStr } from '@/utils/proDomStr' 40 import { deleteDomStr } from '@/utils/proDomStr'
41 import tableMixin from "@/mixins/tableMixin.js"; 41 import tableMixin from "@/mixins/tableMixin.js";
42 import EditDialog from "./edit-dialog.vue"; 42 import EditDialog from "./edit-dialog.vue";
43 import { updateOrder } from "@/api/orders" 43 import { updateOrder } from "@/api/orders"
44 export default { 44 export default {
45 name: "menus", 45 name: "menus",
46 mixins: [tableMixin], 46 mixins: [tableMixin],
47 components: { 47 components: {
48 EditDialog, 48 EditDialog,
49 }, 49 },
50 data () { 50 data () {
51 return { 51 return {
52 isDialog: false, 52 isDialog: false,
53 taskData: null, 53 taskData: null,
54 keyList: [], 54 keyList: [],
55 form: { 55 form: {
56 job_name: "", 56 job_name: "",
57 currentPage: 1, 57 currentPage: 1,
58 },
59 queryParam: {},
60 selectType: "0",
61 queryName: "",
62 organizationId: "", // 组织机构ID
63 departmentId: "", // 部门ID
64 departmentList: [], // 部门列表
65 levelList: [], // 职务级别
66 sexList: [],
67 typeOptions: [
68 {
69 value: "0",
70 label: "姓名",
71 },
72 {
73 value: "1",
74 label: "工号",
75 },
76 {
77 value: "2",
78 label: "部门",
79 },
80 {
81 value: "3",
82 label: "机构",
83 }, 58 },
84 ], 59 queryParam: {},
85 60 selectType: "0",
86 selectionList: [], 61 queryName: "",
87 tableData: { 62 organizationId: "", // 组织机构ID
88 columns: [ 63 departmentId: "", // 部门ID
64 departmentList: [], // 部门列表
65 levelList: [], // 职务级别
66 sexList: [],
67 typeOptions: [
68 {
69 value: "0",
70 label: "姓名",
71 },
89 { 72 {
90 label: "序号", 73 value: "1",
91 type: "index", 74 label: "工号",
92 width: "50",
93 index: this.indexMethod,
94 }, 75 },
95 ] 76 {
96 .concat(data.columns()) 77 value: "2",
97 .concat([ 78 label: "部门",
79 },
80 {
81 value: "3",
82 label: "机构",
83 },
84 ],
85
86 selectionList: [],
87 tableData: {
88 columns: [
98 { 89 {
99 label: "负责人", 90 label: "序号",
100 render: (h, scope) => { 91 type: "index",
101 return ( 92 width: "50",
102 <i v-show={scope.row.isDuty !== null} class="el-icon-check" /> 93 index: this.indexMethod,
103 )
104 }
105 }, 94 },
106 { 95 ]
107 label: "排序", 96 .concat(data.columns())
108 width: 200, 97 .concat([
109 render: (h, scope) => { 98 {
110 return ( 99 label: "负责人",
111 <div> 100 render: (h, scope) => {
112 <el-button 101 return (
113 type="text" 102 <i v-show={scope.row.isDuty !== null} class="el-icon-check" />
114 disabled={scope.row.isTop} 103 )
115 onClick={() => { 104 }
116 this.updateOrder(scope.row, 'TOP');
117 }}
118 >
119 置顶
120 </el-button>
121 <el-button
122 type="text"
123 disabled={scope.row.isTop}
124 onClick={() => {
125 this.updateOrder(scope.row, 'UP');
126 }}
127 >
128 上移
129 </el-button>
130 <el-button
131 type="text"
132 disabled={scope.row.isBottom}
133 onClick={() => {
134 this.updateOrder(scope.row, 'DOWN');
135 }}
136 >
137 下移
138 </el-button>
139 <el-button
140 type="text"
141 disabled={scope.row.isBottom}
142 onClick={() => {
143 this.updateOrder(scope.row, 'BOTTOM');
144 }}
145 >
146 置底
147 </el-button>
148 </div>
149 );
150 }, 105 },
151 }, 106 {
152 { 107 label: "排序",
153 label: "操作", 108 width: 300,
154 width: 380, 109 render: (h, scope) => {
155 render: (h, scope) => { 110 return (
156 return ( 111 <div>
157 <div> 112 <el-button
158 <el-button 113 type="text"
159 type="text" 114 class='movebtnColor'
160 size="mini" 115 disabled={scope.row.isTop}
161 icon="el-icon-video-pause" 116 onClick={() => {
162 onClick={() => { 117 this.updateOrder(scope.row, 'TOP');
163 this.resetPassword(scope.row.id); 118 }}
164 }} 119 >
165 > 120 置顶
166 重置 121 </el-button>
167 </el-button> 122 <el-button
168 <el-button 123 type="text"
169 type="text" 124 class='movebtnColor'
170 size="mini" 125 disabled={scope.row.isTop}
171 icon="el-icon-edit" 126 onClick={() => {
172 onClick={() => { 127 this.updateOrder(scope.row, 'UP');
173 this.handleEdit(scope.row); 128 }}
174 }} 129 >
175 > 130 上移
176 修改 131 </el-button>
177 </el-button> 132 <el-button
178 <el-button 133 type="text"
179 type="text" 134 class='movebtnColor'
180 size="mini" 135 disabled={scope.row.isBottom}
181 icon="el-icon-delete" 136 onClick={() => {
182 style="color:#F56C6C" 137 this.updateOrder(scope.row, 'DOWN');
183 onClick={() => { 138 }}
184 this.handleDelete(scope.row.id, scope.row.name); 139 >
185 }} 140 下移
186 > 141 </el-button>
187 删除 142 <el-button
188 </el-button> 143 type="text"
189 </div> 144 class='movebtnColor'
190 ); 145 disabled={scope.row.isBottom}
146 onClick={() => {
147 this.updateOrder(scope.row, 'BOTTOM');
148 }}
149 >
150 置底
151 </el-button>
152 </div>
153 );
154 },
191 }, 155 },
192 }, 156 {
193 ]), 157 label: "操作",
194 data: [], 158 width: 380,
195 }, 159 render: (h, scope) => {
196 }; 160 return (
197 }, 161 <div>
198 created () { 162 <el-button
199 this.getTableList(); 163 type="text"
200 }, 164 size="mini"
201 computed: { 165 class='resetbtnColor'
202 departmentid () { 166 icon="el-icon-video-pause"
203 return this.$store.state.user.userInfo; 167 onClick={() => {
168 this.resetPassword(scope.row.id);
169 }}
170 >
171 重置
172 </el-button>
173 <el-button
174 type="text"
175 size="mini"
176 class='successColor'
177 icon="el-icon-edit"
178 onClick={() => {
179 this.handleEdit(scope.row);
180 }}
181 >
182 修改
183 </el-button>
184 <el-button
185 type="text"
186 size="mini"
187 class='delColor'
188 icon="el-icon-delete"
189 onClick={() => {
190 this.handleDelete(scope.row.id, scope.row.name);
191 }}
192 >
193 删除
194 </el-button>
195 </div>
196 );
197 },
198 },
199 ]),
200 data: [],
201 },
202 };
204 }, 203 },
205 }, 204 created () {
206 methods: { 205 this.getTableList();
207 handleAdd () {
208 this.isDialog = true
209 this.$refs.dialogForm.adds();
210 this.$refs.dialogForm.title = "添加";
211 }, 206 },
212 getTableList () { 207 computed: {
213 this.loading = true; 208 departmentid () {
214 this.queryParam = { 209 return this.$store.state.user.userInfo;
215 organizationId: this.departmentid.organizationId, 210 },
216 departmentId: this.departmentid.departmentId,
217 };
218 getUserList(this.queryParam).then((res) => {
219 if (res.status === 1) {
220 this.loading = false;
221 this.tableData.data = res.content;
222 this.tableData.data = judgeSort(this.tableData.data);
223 } else {
224 this.$message.error({ message: res.message, showClose: true });
225 }
226 });
227 }, 211 },
212 methods: {
213 handleAdd () {
214 this.isDialog = true
215 this.$refs.dialogForm.adds();
216 this.$refs.dialogForm.title = "添加";
217 },
218 getTableList () {
219 this.loading = true;
220 this.queryParam = {
221 organizationId: this.departmentid.organizationId,
222 departmentId: this.departmentid.departmentId,
223 };
224 getUserList(this.queryParam).then((res) => {
225 if (res.status === 1) {
226 this.loading = false;
227 this.tableData.data = res.content;
228 this.tableData.data = judgeSort(this.tableData.data);
229 } else {
230 this.$message.error({ message: res.message, showClose: true });
231 }
232 });
233 },
228 234
229 // 重置用户密码 235 // 重置用户密码
230 resetPassword (data) { 236 resetPassword (data) {
231 const ids = [] 237 const ids = []
232 if (data instanceof Array) { 238 if (data instanceof Array) {
233 data.forEach((item) => { 239 data.forEach((item) => {
234 ids.push(item.id) 240 ids.push(item.id)
235 }) 241 })
236 } else { 242 } else {
237 ids.push(data) 243 ids.push(data)
238 } 244 }
239 if (ids.length === 0) { 245 if (ids.length === 0) {
240 this.$message({ 246 this.$message({
241 message: '请选择需要重置密码的用户!', 247 message: '请选择需要重置密码的用户!',
242 showClose: true 248 showClose: true
243 }) 249 })
244 return 250 return
245 } 251 }
246 this.$confirm( 252 this.$confirm(
247 `<div class="customer-message-wrapper"> 253 `<div class="customer-message-wrapper">
248 <h5 class="title">确定要重置密码吗</h5> 254 <h5 class="title">确定要重置密码吗</h5>
249 <p class="result">执行后,数据将 255 <p class="result">执行后,数据将
250 <span >无法恢复</span> 256 <span >无法恢复</span>
251 </p> 257 </p>
252 </div>`, 258 </div>`,
253 '执行确认', 259 '执行确认',
254 { 260 {
261 dangerouslyUseHTMLString: true,
262 customClass: 'customer-delete',
263 confirmButtonText: '确定',
264 cancelButtonText: '取消',
265 type: 'warning'
266 }
267 )
268 .then(() => {
269 resetPassword(ids).then((res) => {
270 if (res.status === 1) {
271 this.$message.success({ message: res.message, showClose: true })
272 this.getTableList()
273 } else {
274 this.$message.error({ message: res.message, showClose: true })
275 }
276 })
277 })
278 .catch(() => { })
279 },
280 //排序
281 updateOrder (record, operate) {
282 const findIndex = this.tableData.data.findIndex(item => item.id === record.id)
283 let swapId = ''
284 if (operate === 'UP') {
285 swapId = this.tableData.data[findIndex - 1].id
286 } else if (operate === 'DOWN') {
287 swapId = this.tableData.data[findIndex + 1].id
288 }
289 updateOrder('/rest/users', record, operate, swapId).then(res => {
290 if (res.status === 1) {
291 this.$message.success({ message: res.message, showClose: true })
292 this.getTableList();
293 } else {
294 this.$message.error({ message: res.message, showClose: true })
295 }
296 })
297 },
298 // 修改人员信息
299 handleEdit (row) {
300 this.isDialog = true
301 this.$refs.dialogForm.edit(row);
302 this.$refs.dialogForm.title = "修改";
303 },
304 // 删除
305 handleDelete (id, content) {
306 this.$confirm(deleteDomStr(content), '执行确认', {
255 dangerouslyUseHTMLString: true, 307 dangerouslyUseHTMLString: true,
256 customClass: 'customer-delete', 308 customClass: 'customer-delete',
257 confirmButtonText: '确定', 309 confirmButtonText: '确定',
258 cancelButtonText: '取消', 310 cancelButtonText: '取消',
259 type: 'warning' 311 type: 'warning'
260 }
261 )
262 .then(() => {
263 resetPassword(ids).then((res) => {
264 if (res.status === 1) {
265 this.$message.success({ message: res.message, showClose: true })
266 this.getTableList()
267 } else {
268 this.$message.error({ message: res.message, showClose: true })
269 }
270 })
271 }) 312 })
272 .catch(() => { }) 313 .then(() => {
273 }, 314 deleteAction(`${api.users}/${id}`).then((res) => {
274 //排序 315 if (res.status === 1) {
275 updateOrder (record, operate) { 316 this.$message.success({ message: res.message, showClose: true })
276 const findIndex = this.tableData.data.findIndex(item => item.id === record.id) 317 } else {
277 let swapId = '' 318 this.$message.error({ message: res.message, showClose: true })
278 if (operate === 'UP') { 319 }
279 swapId = this.tableData.data[findIndex - 1].id 320 this.getTableList()
280 } else if (operate === 'DOWN') { 321 })
281 swapId = this.tableData.data[findIndex + 1].id
282 }
283 updateOrder('/rest/users', record, operate, swapId).then(res => {
284 if (res.status === 1) {
285 this.$message.success({ message: res.message, showClose: true })
286 this.getTableList();
287 } else {
288 this.$message.error({ message: res.message, showClose: true })
289 }
290 })
291 },
292 // 修改人员信息
293 handleEdit (row) {
294 this.isDialog = true
295 this.$refs.dialogForm.edit(row);
296 this.$refs.dialogForm.title = "修改";
297 },
298 // 删除
299 handleDelete (id, content) {
300 this.$confirm(deleteDomStr(content), '执行确认', {
301 dangerouslyUseHTMLString: true,
302 customClass: 'customer-delete',
303 confirmButtonText: '确定',
304 cancelButtonText: '取消',
305 type: 'warning'
306 })
307 .then(() => {
308 deleteAction(`${api.users}/${id}`).then((res) => {
309 if (res.status === 1) {
310 this.$message.success({ message: res.message, showClose: true })
311 } else {
312 this.$message.error({ message: res.message, showClose: true })
313 }
314 this.getTableList()
315 }) 322 })
316 }) 323 .catch(() => { })
317 .catch(() => { }) 324 },
318 }, 325 // 新增回显
319 // 新增回显 326 reloadTableData () {
320 reloadTableData () { 327 this.getTableList()
321 this.getTableList() 328 },
322 }, 329 },
323 }, 330 };
324 };
325 </script> 331 </script>
326 <style scoped lang="scss"> 332 <style scoped lang="scss">
327 @import "~@/styles/mixin.scss"; 333 @import "~@/styles/mixin.scss";
328 @import "~@/styles/public.scss"; 334 .btnColRight {
329 @import "./index.scss"; 335 height: 60px;
336 .button {
337 position: absolute;
338 left: 30px;
339 top: 20px;
340 }
341 }
342 /deep/.el-button.is-disabled.el-button--text {
343 width: 64px;
344 height: 28px;
345 background: rgba(255, 255, 255, 0.1);
346 border-radius: 16px;
347 }
330 </style> 348 </style>
......