390b3816 by xiaomiao

--no commit message

1 parent 49ec079a
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
20 "nprogress": "0.2.0", 20 "nprogress": "0.2.0",
21 "vue": "2.6.10", 21 "vue": "2.6.10",
22 "vue-awesome": "^4.5.0", 22 "vue-awesome": "^4.5.0",
23 "vue-json-editor": "^1.4.3",
23 "vue-router": "3.0.2", 24 "vue-router": "3.0.2",
24 "vuex": "3.1.0", 25 "vuex": "3.1.0",
25 "xe-utils": "^3.5.7" 26 "xe-utils": "^3.5.7"
......
1 <template>
2 <el-dialog
3 :title="title"
4 :visible.sync="visible"
5 :width="width"
6 :append-to-body="appendToBody"
7 :modal="modal"
8 :close-on-click-modal="false"
9 :fullscreen="fullscreen"
10 :destroy-on-close="destroyOnClose"
11 :modal-append-to-body="modalAppendToBody"
12 :class="customClass"
13 @close="close"
14 class="dialog"
15 >
16 <slot name="content" />
17 <span slot="footer" class="dialog-footer">
18 <slot name="footer" />
19 </span>
20 </el-dialog>
21 </template>
22
23 <script>
24 export default {
25 name: '',
26 props: {
27 show: {
28 type: Boolean,
29 default: false
30 },
31 customClass: {
32 type: String,
33 default: ''
34 },
35 title: {
36 type: String,
37 default: '新增'
38 },
39 appendToBody: {
40 // Dialog 自身是否插入至 body 元素上。嵌套的 Dialog 必须指定该属性并赋值为 true
41 type: Boolean,
42 default: true
43 },
44 modalAppendToBody: {
45 // 遮罩层是否插入至 body 元素上,若为 false,则遮罩层会插入至 Dialog 的父元素上
46 type: Boolean,
47 default: true
48 },
49 modal: {
50 // 是否需要遮罩层
51 type: Boolean,
52 default: true
53 },
54 fullscreen: {
55 // 是否全屏
56 type: Boolean,
57 default: false
58 },
59 destroyOnClose: {
60 // 关闭时销毁 Dialog 中的元素
61 type: Boolean,
62 default: false
63 },
64 width: {
65 type: String,
66 default: '30%'
67 }
68 },
69 data() {
70 return {}
71 },
72 computed: {
73 visible: {
74 get() {
75 return this.show
76 },
77 set(val) {
78 this.$emit('update:show', val) // visible 改变的时候通知父组件
79 }
80 }
81 },
82 methods: {
83 close() {
84 this.$emit('close')
85 }
86 }
87 }
88 </script>
89
90 <style lang="scss" scoped>
91
92 .dialog {
93 /deep/.el-dialog{
94 overflow: hidden;
95 background: url("~@/image/dialogBg.png") no-repeat !important;
96 background-size: 100% 100% !important;
97 }
98 .el-dialog__header {
99 padding: 0;
100 height: 56px;
101 line-height: 56px;
102 border-bottom: none;
103 .el-dialog__title {
104 font-weight: 400;
105 }
106 .el-dialog__title:before {
107 display: inline-block;
108 content: '';
109 width: 4px;
110 height: 16px;
111 background: #3aa3f8;
112 margin-left: 12px;
113 margin-right: 8px;
114 position: relative;
115 top: 2px;
116 }
117 .el-dialog__headerbtn {
118 position: absolute;
119 // top: 2%;
120 right: 12px;
121 }
122 }
123 .el-dialog__body {
124 margin: 0px 12px;
125 padding: 48px 24px;
126 background: #fff;
127 border: 1px solid #dfe7f3;
128 .el-button {
129 padding: 8px 16px;
130 border: none;
131 }
132 .el-form {
133 .el-checkbox {
134 line-height: 32px;
135 height: 32px;
136 }
137 .form-item-mb0 {
138 margin-bottom: 0 !important;
139 }
140 .el-form-item {
141 margin-bottom: 24px;
142 .el-form-item__label {
143 height: 32px;
144 line-height: 32px;
145 vertical-align: middle;
146 }
147
148 .el-form-item__content {
149 // height: 32px;
150 line-height: 32px;
151 // date 组件有图标
152 .has-icon.el-date-editor {
153 .el-input__inner {
154 padding-left: 32px;
155 }
156 }
157 .el-input__inner {
158 padding: 0 8px;
159 height: 32px;
160 line-height: 32px;
161 text-align: left;
162 }
163 .el-textarea__inner {
164 padding: 8px 8px;
165 }
166 .el-input .el-input__icon {
167 font-size: 14px;
168 color: #747e8c;
169 }
170 }
171 }
172 }
173 .el-select,
174 .el-cascader,
175 .el-date-editor {
176 width: 100%;
177 line-height: 32px;
178 }
179 }
180
181 .el-dialog__footer {
182 padding: 0 12px;
183 height: 56px;
184 line-height: 56px;
185 border: none;
186 .el-button {
187 padding: 8px 16px;
188 border: none;
189 }
190 .el-button + .el-button {
191 margin-left: 12px;
192 }
193 }
194 }
195 </style>
1 <template>
2 <div class="icon-List">
3 <el-dialog
4 :visible.sync="visible"
5 :append-to-body="true"
6 :show-close="isClose"
7 >
8 <el-tabs v-model="activeName" @tab-click="handleClick">
9 <el-tab-pane label="内置图标" name="first">
10 <ul v-if="iconList" class="clearfix">
11 <li
12 v-for="(item, index) in iconList"
13 :key="index"
14 @click="changeData(item)"
15 >
16 <i :class="item" />
17 </li>
18 </ul>
19 </el-tab-pane>
20 <el-tab-pane label="自定义图标" name="second">
21 <el-upload
22 class="avatar-uploader"
23 action="https://jsonplaceholder.typicode.com/posts/"
24 >
25 <img v-if="imageUrl" :src="imageUrl" class="avatar">
26 <i v-else class="el-icon-plus avatar-uploader-icon">
27 <p>点击上传</p>
28 </i>
29 </el-upload>
30 <div>
31 <el-input v-model="iconName" class="icon-name" placeholder="请输入图标代码"></el-input>
32 </div>
33 <el-button class="confirm" type="primary" @click="changeIconName">确定</el-button>
34 </el-tab-pane>
35 </el-tabs>
36 </el-dialog>
37 </div>
38 </template>
39
40 <script>
41 import icoNameList from '@/utils/elementUI'
42 export default {
43 name: 'IconList',
44 components: {},
45 props: {},
46 data() {
47 return {
48 visible: false,
49 isClose: false,
50 iconList: [],
51 activeName: 'first',
52 iconName: '',
53 imageUrl: ''
54 }
55 },
56 computed: {},
57 watch: {},
58 created() {},
59 mounted() {
60 this.iconList = icoNameList
61 },
62 methods: {
63 show(show) {
64 this.visible = show
65 },
66 handleClick(tab, event) {
67 console.log(tab, event)
68 },
69 changeData(iconName) {
70 this.visible = false
71 // 传递图标名称给父级
72 this.$emit('iconName', iconName)
73 },
74 changeIconName() {
75 this.visible = false
76 // 传递图标名称给父级
77 this.$emit('iconName', this.iconName)
78 }
79 }
80 }
81 </script>
82 <style scoped lang="scss">
83 ::v-deep .el-dialog {
84 box-shadow: 0px 4px 10px 0px #666666;
85 border-radius: 4px;
86 width: 573px;
87 height: 300px;
88 position: relative;
89 top: 4vh;
90 left: 0vw;
91 .el-dialog__header {
92 display: none;
93 }
94 .el-dialog__body {
95 padding: 10px;
96 }
97 .el-tabs {
98 .el-tabs__content {
99 height: 200px;
100 overflow-y: scroll;
101 ul {
102 li {
103 float: left;
104 padding: 1%;
105 margin: 2px;
106 border: 1px solid #e8eaec;
107 cursor: pointer;
108 width: 30px;
109 height: 30px;
110 }
111 }
112 .avatar-uploader-icon {
113 font-size: 12px;
114 color: #8c939d;
115 text-align: center;
116 width: 62px;
117 height: 62px;
118 background: #f6f7f9;
119 border-radius: 4px;
120 border: 1px solid #e5e5e5;
121 padding-top: 32%;
122 }
123 }
124 }
125 .confirm {
126 float: right;
127 margin-top: 30px;
128 }
129
130 .icon-name {
131 width: 70%;
132 margin-top: 10px;
133 }
134 }
135 </style>
1 <template>
2 <div>
3 <i class="icon-tubiao-242 iconfont" :title="title" @click="openDialog" />
4 <el-dialog
5 :key="key"
6 :title="title"
7 :inner-dialog="true"
8 :visible.sync="dialogVisible"
9 width="600px"
10 :close-on-click-modal="false"
11 append-to-body
12 @cancel="cancel"
13 >
14 <vue-json-editor
15 id="minejson"
16 v-model="resultInfo"
17 :mode="'code'"
18 lang="zh"
19 @json-change="onJsonChange"
20 @json-save="onJsonSave"
21 @has-error="onError"
22 />
23 <el-tooltip
24 content="全屏缩放"
25 effect="dark"
26 placement="bottom"
27 fullscreen
28 class="fullScreen"
29 >
30 <i class="el-icon-full-screen" @click="enLarge" />
31 </el-tooltip>
32 <template slot="footer">
33 <div class="dialog-footer flex flex-pack-center">
34 <el-button
35 type="primary"
36 class="confirmBtn"
37 @click="onJsonSave"
38 >保存</el-button>
39 <el-button
40 type="primary"
41 class="cancelBtn"
42 @click="cancel"
43 >关闭</el-button>
44 </div>
45 </template>
46 </el-dialog>
47 </div>
48 </template>
49 <script>
50 import vueJsonEditor from 'vue-json-editor'
51 export default {
52 components: {
53 vueJsonEditor
54 },
55 props: {
56 title: {
57 type: String,
58 default: '配置参数'
59 },
60 resultInfos: {
61 type: String,
62 default: ''
63 }
64 },
65 data() {
66 return {
67 activeNames: [],
68 resultInfo: {},
69 tmpResultInfo: {},
70 dialogVisible: false,
71 hasJsonFlag: true,
72 key: 0,
73 isEnlarge: false
74 }
75 },
76 watch: {
77 resultInfos: {
78 handler: function(val) {
79 ++this.key
80 this.resultInfo =
81 this.resultInfos === '' ? {} : JSON.parse(this.resultInfos)
82 this.tmpResultInfo = this.resultInfo
83 },
84 deep: true,
85 immediate: true
86 }
87 },
88
89 mounted() {
90 this.resultInfo =
91 this.resultInfos === '' ? {} : JSON.parse(this.resultInfos)
92 },
93
94 methods: {
95 onJsonChange(value) {
96 // 只有在格式正确的时候进入此事件
97 this.hasJsonFlag = true
98 },
99 onJsonSave() {
100 const value = this.resultInfo
101 console.log(this.resultInfo, 'resultInfo')
102 if (this.hasJsonFlag === false) {
103 this.$message.error({ message: 'json格式验证失败', showClose: true })
104 // alert("json验证失败")
105 return false
106 } else {
107 this.dialogVisible = false
108 this.$emit('getJsonString', JSON.stringify(value))
109 return true
110 }
111 },
112 onError(value) {
113 this.hasJsonFlag = false
114 },
115 openDialog() {
116 this.dialogVisible = true
117 },
118 cancel() {
119 console.log(this.tmpResultInfo, 'tmpResultInfo')
120 this.resultInfo = this.tmpResultInfo
121 this.dialogVisible = false
122 },
123 // 放大
124 enLarge() {
125 const fullarea = document.getElementById('minejson')
126 if (fullarea.requestFullscreen) {
127 fullarea.requestFullscreen()
128 } else if (fullarea.webkitRequestFullScreen) {
129 fullarea.webkitRequestFullScreen() // webkit内核(chrome、safari、Opera等)
130 } else if (fullarea.mozRequestFullScreen) {
131 fullarea.mozRequestFullScreen() // moz内核(firefox)
132 } else if (fullarea.msRequestFullscreen) {
133 fullarea.msRequestFullscreen() // IE11、edge
134 }
135 this.isEnlarge = true
136 }
137 }
138 }
139 </script>
140
141 <style scoped lang="scss">
142 /* jsoneditor右上角默认有一个链接,加css去掉了 */
143 .iconfont {
144 cursor: pointer;
145 position: relative;
146 top: 1px;
147 color: #349af3;
148 }
149 ::v-deep .jsoneditor-vue {
150 height: 100%;
151 }
152 .fullScreen {
153 position: absolute;
154 right: 5%;
155 top: 22%;
156 cursor: pointer;
157 color: #fff;
158 }
159 ::v-deep .jsoneditor-modes {
160 display: none !important;
161 }
162 .jsoneditor-poweredBy {
163 display: none !important;
164 }
165 .jsoneditor-menu {
166 background-color: #9c9e9f !important;
167 border-bottom: 1px solid #9c9e9f !important;
168 }
169 .jsoneditor {
170 border: 1px solid #9c9e9f !important;
171 }
172 .el-collapse {
173 border: 0;
174 }
175 .el-collapse-item__header {
176 height: 44px;
177 }
178 </style>
...@@ -104,13 +104,6 @@ ...@@ -104,13 +104,6 @@
104 <Xyjg :form-data = 'dataReport'></Xyjg> 104 <Xyjg :form-data = 'dataReport'></Xyjg>
105 </div> 105 </div>
106 <JsonEditor :resultInfo="resultInfo" v-if="titleName == 'xml'" /> 106 <JsonEditor :resultInfo="resultInfo" v-if="titleName == 'xml'" />
107 <!-- <div slot="footer" class="dialog_footer" ref="dialogFooter">
108 <div class="dialog_button">
109 <el-button type="primary" plain @click="submitForm" v-if="!Edit" :loading="saveloding">确定
110 </el-button>
111 <el-button @click="closeDialog()">关闭</el-button>
112 </div>
113 </div> -->
114 </el-dialog> 107 </el-dialog>
115 </template> 108 </template>
116 109
......
...@@ -16,23 +16,7 @@ export default { ...@@ -16,23 +16,7 @@ export default {
16 data () { 16 data () {
17 return { 17 return {
18 cdata: { 18 cdata: {
19 seriesData: [ 19 seriesData: [],
20 { value: 10, name: "土地所有权" },
21 { value: 5, name: "建设用地、宅基地使用权" },
22 { value: 15, name: "房地产权(项目内多幢房屋)" },
23 { value: 25, name: "产地产权(独幢、层、套、间、房屋)" },
24 { value: 20, name: "建筑物区分所有权业主共有部分" },
25 { value: 35, name: "海域(含无居民海岛)使用权" },
26 { value: 10, name: "构(建)筑物所有权" },
27 { value: 5, name: "农用地使用权(非林地)" },
28 { value: 15, name: "林权" },
29 { value: 25, name: "注销登记" },
30 { value: 20, name: "异议登记" },
31 { value: 35, name: "预告登记" },
32 { value: 20, name: "查封登记" },
33 { value: 35, name: "抵押权登记" },
34 { value: 20, name: "地役权登记" },
35 ],
36 }, 20 },
37 }; 21 };
38 }, 22 },
...@@ -41,22 +25,30 @@ export default { ...@@ -41,22 +25,30 @@ export default {
41 }, 25 },
42 mounted () { 26 mounted () {
43 this.getdjywltotal(); 27 this.getdjywltotal();
28
29
44 }, 30 },
45 methods: { 31 methods: {
46 getdjywltotal () { 32 async getdjywltotal () {
47 return new Promise(async (resolve) => {
48 try { 33 try {
49 let p = { 34 let p = {
50 DJLX: "A21", 35 DJLX: "",
51 QLLX: "A8", 36 QLLX: "",
52 XZQDM: "A20", 37 XZQDM: "",
53 }; 38 };
54 let res = await work.getdjywltotal(p); 39 let res = await work.getdjywltotal(p);
55 40 console.log("res",res);
41 res.result.filter((item) => {
42 return (
43 this.cdata.seriesData.push({ "name": item.AREACODE, "value": item.ywtotal })
44 )
45 });
46 console.log("this.cdata.seriesData",this.cdata.seriesData);
56 } catch (error) { 47 } catch (error) {
57 this.$refs.msg.messageShow(); 48 this.$refs.msg.messageShow();
58 } 49 }
59 }); 50
51
60 }, 52 },
61 }, 53 },
62 }; 54 };
......
...@@ -28,8 +28,8 @@ export default { ...@@ -28,8 +28,8 @@ export default {
28 res.filter((item) => { 28 res.filter((item) => {
29 return ( 29 return (
30 this.cdata.category.push(item.areaName), 30 this.cdata.category.push(item.areaName),
31 this.cdata.lineData.push(item.successCount), 31 this.cdata.barData.push(item.successCount),
32 this.cdata.barData.push(item.failureCount) 32 this.cdata.lineData.push(item.failureCount)
33 ); 33 );
34 }); 34 });
35 } catch (error) { 35 } catch (error) {
......
...@@ -17,9 +17,6 @@ export default { ...@@ -17,9 +17,6 @@ export default {
17 components: { 17 components: {
18 Chart, 18 Chart,
19 }, 19 },
20 created () {
21
22 },
23 mounted () { 20 mounted () {
24 this.getDjlxtotal(); 21 this.getDjlxtotal();
25 }, 22 },
...@@ -28,9 +25,9 @@ export default { ...@@ -28,9 +25,9 @@ export default {
28 return new Promise(async (resolve) => { 25 return new Promise(async (resolve) => {
29 try { 26 try {
30 let p = { 27 let p = {
31 DJLX: "A21", 28 DJLX: "",
32 QLLX: "A8", 29 QLLX: "",
33 XZQDM: "A20", 30 XZQDM: "",
34 }; 31 };
35 let res = await work.getDjlxtotal(p); 32 let res = await work.getDjlxtotal(p);
36 res.result.filter((item) => { 33 res.result.filter((item) => {
......
1 const icoNameList = ['platform-eleme', 'eleme', 'delete-solid', 'delete', 's-tools', 'setting', 'user-solid', 'user', 'phone', 'phone-outline', 'more', 'more-outline', 'star-on', 'star-off', 's-goods', 'goods', 'warning', 'warning-outline', 'question', 'info', 'remove', 'circle-plus', 'success', 'error', 'zoom-in', 'zoom-out', 'remove-outline', 'circle-plus-outline', 'circle-check', 'circle-close', 's-help', 'help', 'minus', 'plus', 'check', 'close', 'picture', 'picture-outline', 'picture-outline-round', 'upload', 'upload2', 'download', 'camera-solid', 'camera', 'video-camera-solid', 'video-camera', 'message-solid', 'bell', 's-cooperation', 's-order', 's-platform', 's-fold', 's-unfold', 's-operation', 's-promotion', 's-home', 's-release', 's-ticket', 's-management', 's-open', 's-shop', 's-marketing', 's-flag', 's-comment', 's-finance', 's-claim', 's-custom', 's-opportunity', 's-data', 's-check', 's-grid', 'menu', 'share', 'd-caret', 'caret-left', 'caret-right', 'caret-bottom', 'caret-top', 'bottom-left', 'bottom-right', 'back', 'right', 'bottom', 'top', 'top-left', 'top-right', 'arrow-left', 'arrow-right', 'arrow-down', 'arrow-up', 'd-arrow-left', 'd-arrow-right', 'video-pause', 'video-play', 'refresh', 'refresh-right', 'refresh-left', 'finished', 'sort', 'sort-up', 'sort-down', 'rank', 'loading', 'view', 'c-scale-to-original', 'date', 'edit', 'edit-outline', 'folder', 'folder-opened', 'folder-add', 'folder-remove', 'folder-delete', 'folder-checked', 'tickets', 'document-remove', 'document-delete', 'document-copy', 'document-checked', 'document', 'document-add', 'printer', 'paperclip', 'takeaway-box', 'search', 'monitor', 'attract', 'mobile', 'scissors', 'umbrella', 'headset', 'brush', 'mouse', 'coordinate', 'magic-stick', 'reading', 'data-line', 'data-board', 'pie-chart', 'data-analysis', 'collection-tag', 'film', 'suitcase', 'suitcase-1', 'receiving', 'collection', 'files', 'notebook-1', 'notebook-2', 'toilet-paper', 'office-building', 'school', 'table-lamp', 'house', 'no-smoking', 'smoking', 'shopping-cart-full', 'shopping-cart-1', 'shopping-cart-2', 'shopping-bag-1', 'shopping-bag-2', 'sold-out', 'sell', 'present', 'box', 'bank-card', 'money', 'coin', 'wallet', 'discount', 'price-tag', 'news', 'guide', 'male', 'female', 'thumb', 'cpu', 'link', 'connection', 'open', 'turn-off', 'set-up', 'chat-round', 'chat-line-round', 'chat-square', 'chat-dot-round', 'chat-dot-square', 'chat-line-square', 'message', 'postcard', 'position', 'turn-off-microphone', 'microphone', 'close-notification', 'bangzhu', 'time', 'odometer', 'crop', 'aim', 'switch-button', 'full-screen', 'copy-document', 'mic', 'stopwatch', 'medal-1', 'medal', 'trophy', 'trophy-1', 'first-aid-kit', 'discover', 'place', 'location', 'location-outline', 'location-information', 'add-location', 'delete-location', 'map-location', 'alarm-clock', 'timer', 'watch-1', 'watch', 'lock', 'unlock', 'key', 'service', 'mobile-phone', 'bicycle', 'truck', 'ship', 'basketball', 'football', 'soccer', 'baseball', 'wind-power', 'light-rain', 'lightning', 'heavy-rain', 'sunrise', 'sunrise-1', 'sunset', 'sunny', 'cloudy', 'partly-cloudy', 'cloudy-and-sunny', 'moon', 'moon-night', 'dish', 'dish-1', 'food', 'chicken', 'fork-spoon', 'knife-fork', 'burger', 'tableware', 'sugar', 'dessert', 'ice-cream', 'hot-water', 'water-cup', 'coffee-cup', 'cold-drink', 'goblet', 'goblet-full', 'goblet-square', 'goblet-square-full', 'refrigerator', 'grape', 'watermelon', 'cherry', 'apple', 'pear', 'orange', 'coffee', 'ice-tea', 'ice-drink', 'milk-tea', 'potato-strips', 'lollipop', 'ice-cream-square', 'ice-cream-round']
2 .map(s => 'el-icon-' + s)
3 export default icoNameList
4
...@@ -5,3 +5,26 @@ ...@@ -5,3 +5,26 @@
5 export function isExternal (path) { 5 export function isExternal (path) {
6 return /^(https?:|mailto:|tel:)/.test(path) 6 return /^(https?:|mailto:|tel:)/.test(path)
7 } 7 }
8 // ex: {validator:validateCode,trigger:'blur'}
9 // 验证code
10 export const validateCode = (rule, value, callback) => {
11 const reg = /^[A-Z]{1}[A-Za-z0-9]*$/
12 !reg.test(value) ? callback('字母开头、数字和字母组成') : callback()
13 }
14 // 验证 网址
15 export const validateUrl = (rule, value, callback) => {
16 const reg = /^(((ht|f)tps?):\/\/)?[\w-]+(\.[\w-]+)+([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?$/
17 !reg.test(value) ? callback('URL格式不正确') : callback()
18 }
19 // 验证 电话
20 export const validatePhone = (rule, value, callback) => {
21 const phoneReg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/
22 const rel = /^[0]\d{2,3}-[1-9]\d{7}$/
23 if (!value) {
24 callback()
25 } else {
26 !(phoneReg.test(value) || rel.test(value))
27 ? callback(new Error('请输入正确的联系电话'))
28 : callback()
29 }
30 }
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
18 </p> 18 </p>
19 <p> 19 <p>
20 <span>成功率</span> 20 <span>成功率</span>
21 <span class="cg">99%</span> 21 <span class="cg">{{qxcgl}}</span>
22 </p> 22 </p>
23 </div> 23 </div>
24 </div> 24 </div>
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
41 </p> 41 </p>
42 <p> 42 <p>
43 <span>成功率</span> 43 <span>成功率</span>
44 <span class="cg">99%</span> 44 <span class="cg">{{stcgl}}</span>
45 </p> 45 </p>
46 </div> 46 </div>
47 </div> 47 </div>
...@@ -60,12 +60,14 @@ export default { ...@@ -60,12 +60,14 @@ export default {
60 data () { 60 data () {
61 return { 61 return {
62 // 日均接入量 62 // 日均接入量
63 qxerrer: 0, 63 qxerrer: "",
64 qxsuccess: 0, 64 qxsuccess: "",
65 sterrer: 0, 65 sterrer: "",
66 stsuccess: 0, 66 stsuccess: "",
67 qxjrl: 50300, 67 qxjrl: "",
68 stjrl: 50300, 68 stjrl: "",
69 qxcgl:"",
70 stcgl:""
69 }; 71 };
70 }, 72 },
71 mounted () { 73 mounted () {
...@@ -79,12 +81,6 @@ export default { ...@@ -79,12 +81,6 @@ export default {
79 stjrlList: function () { 81 stjrlList: function () {
80 return this.stjrl.toString().split(""); 82 return this.stjrl.toString().split("");
81 }, 83 },
82 sbqkgsList: function () {
83 const numbers = this.sbqkgs.toString().split("").reverse();
84 const segs = [];
85 while (numbers.length) segs.push(numbers.splice(0, 3).join(""));
86 return segs.join(",").split("").reverse().join("");
87 },
88 }, 84 },
89 methods: { 85 methods: {
90 getsthjqxjrtotal () { 86 getsthjqxjrtotal () {
...@@ -96,6 +92,18 @@ export default { ...@@ -96,6 +92,18 @@ export default {
96 XZQDM: "A20", 92 XZQDM: "A20",
97 }; 93 };
98 let res = await work.getsthjqxjrtotal(p); 94 let res = await work.getsthjqxjrtotal(p);
95 this.stjrl=Number(res.result.sum)
96 this.qxjrl=Number(res.result.sum)
97 this.qxerrer=Number(res.result.qxjrerrer)
98 this.sterrer=Number(res.result.sthjerrer)
99 if(res.result.sum=="0"){
100 this.qxcgl="100%"
101 this.stcgl="100%"
102 }else{
103 this.qxcgl=Number(res.result.qxjrsuccess)/this.qxjrl*100+"%"
104 this.stcgl=Number(res.result.sthjsuccess)/Number(res.result.sum)*100+"%"
105 }
106
99 } catch (error) { 107 } catch (error) {
100 this.$refs.msg.messageShow(); 108 this.$refs.msg.messageShow();
101 } 109 }
......
...@@ -6,37 +6,22 @@ class data extends filter { ...@@ -6,37 +6,22 @@ class data extends filter {
6 columns () { 6 columns () {
7 return [ 7 return [
8 { 8 {
9 prop: "job_name", 9 prop: "name",
10 label: "任务名称", 10 label: "菜单名称",
11 width: 130
12 },
13 {
14 prop: "description",
15 label: "任务描述",
16 width: 300 11 width: 300
17 }, 12 },
18 { 13 {
19 prop: "cron_expression", 14 prop: "code",
20 label: "cron表达式" 15 label: "菜单代码"
21 }, 16 },
22 { 17 {
23 prop: "bean_class", 18 prop: "uri",
24 width: 260, 19 width: 260,
25 label: "任务类" 20 label: "链接路径"
26 }, 21 },
27 { 22 {
28 prop: "job_group", 23 prop: "icon",
29 label: "任务分组" 24 label: "图标"
30 },
31 {
32 label: "状态",
33 render: (h, scope) => {
34 return (
35 <div>
36 { this.stateStatus(scope.row.job_status) }
37 </div>
38 )
39 },
40 } 25 }
41 ] 26 ]
42 } 27 }
......
1 <template>
2 <div>
3 <Dialog
4 :title="title"
5 :show.sync="visible"
6 :width="'767px'"
7 @close="close()"
8 >
9 <template slot="content">
10 <el-form ref="form" :model="form" :rules="rules">
11 <el-row :gutter="24">
12 <el-col :span="12">
13 <el-form-item label="菜单名称:" prop="name" label-width="124px">
14 <el-input v-model="form.name" placeholder="请输入菜单名称" />
15 </el-form-item>
16 </el-col>
17 <el-col :span="12">
18 <el-form-item label="图标:" label-width="54px">
19 <el-input
20 v-model="form.icon"
21 placeholder="请选择图标"
22 :prefix-icon="form.icon"
23 clearable
24 @focus="getIconList"
25 />
26 </el-form-item>
27 </el-col>
28 </el-row>
29 <el-row :gutter="24">
30 <el-col :span="12">
31 <el-form-item label="上级菜单:" label-width="124px">
32 <el-cascader
33 :key="menuKey"
34 v-model="form.parentId"
35 :options="parentMenuList"
36 :props="setProps"
37 placeholder="请选择上级菜单"
38 clearable
39 @change="handleChange"
40 />
41 </el-form-item>
42 </el-col>
43 <el-col :span="12">
44 <el-form-item label="代码:" prop="code" label-width="54px">
45 <el-input
46 v-model="codeComputed"
47 placeholder="请输入菜单代码"
48 :disabled="type === 1"
49 />
50 </el-form-item>
51 </el-col>
52 </el-row>
53 <el-row :gutter="24">
54 <el-col :span="24">
55 <el-form-item label="链接路径:" label-width="124px">
56 <el-input v-model="form.uri" placeholder="请输入链接路径" />
57 </el-form-item>
58 </el-col>
59 </el-row>
60 <el-row :gutter="24">
61 <el-col :span="24">
62 <el-form-item label="浏览器跳转模式:" label-width="124px">
63 <el-select
64 v-model="form.jumpMode"
65 placeholder="请选择浏览器跳转模式"
66 >
67 <el-option
68 v-for="item in jumpModeList"
69 :key="item.value"
70 :label="item.name"
71 :value="item.value"
72 />
73 </el-select>
74 </el-form-item>
75 </el-col>
76 </el-row>
77 <el-row :gutter="24">
78 <el-col :span="24">
79 <el-form-item
80 label="配置参数:"
81 label-width="124px"
82 class="form-item-mb0"
83 >
84 <!-- 配置参数 -->
85 <JsonEditor
86 :result-infos="form.metadata"
87 @getJsonString="getJsonString"
88 />
89 </el-form-item>
90 </el-col>
91 </el-row>
92 </el-form>
93 </template>
94 <template slot="footer">
95 <el-button class="cancel-button" @click="close()">取消</el-button>
96 <el-button type="primary" @click="submitForm()">保存</el-button>
97 </template>
98 </Dialog>
99 <!-- 图标列表 -->
100 <IconList ref="iconList" @iconName="getIconName" />
101 </div>
102 </template>
103
104 <script>
105 import Dialog from "@/components/Dialog/";
106 // import JsonEditor from '@components/JsonEditors'
107 import JsonEditor from '../../../components/JsonEditors'
108 // import IconList from '@components/IconList'
109 import IconList from '../../../components/IconList'
110 import { validateCode } from '../../../utils/validate';
111 export default {
112 name: "EditDialog",
113 components: {
114 Dialog,
115 JsonEditor,
116 IconList,
117 },
118 data() {
119 return {
120 form: {
121 icon: "",
122 code: "",
123 },
124 rules: {
125 name: [{ required: true, message: "请输入菜单名称", trigger: "blur" }],
126 code: [
127 { required: true, message: "必填", trigger: "blur" },
128 { validator: validateCode, trigger: "blur" },
129 ],
130 },
131 title: "",
132 type: "",
133 visible: false,
134 parentMenuList: [],
135 menuKey: 0,
136 jumpModeList: [
137 { name: "在当前页面显示", value: 1 },
138 { name: "跳转到新页面", value: 2 },
139 ],
140 setProps: {
141 value: "id",
142 label: "name",
143 children: "children",
144 expandTrigger: "hover",
145 checkStrictly: true, // 可取消关联,选择任意一级选项
146 emitPath: false,
147 },
148 // dataUrl: api.menus,
149 };
150 },
151 computed: {
152 codeComputed: {
153 get: function() {
154 return this.form.code
155 },
156 set: function(val) {
157 this.form.code = val.toUpperCase()
158 }
159 }
160 },
161 created() {},
162 mounted() {},
163 methods: {
164 getParentMenuList() {
165 // getParentMenuListAction(id).then((res) => {
166 // if (res.status === 1) {
167 // const list = this.$dealArrChildren(res.content)
168 // if (id) {
169 // this.parentMenuList = this.$dealArrDisabled(
170 // this.$deepCopy(list),
171 // id
172 // )
173 // this.menuKey++
174 // } else {
175 // this.parentMenuList = list
176 // }
177 // } else {
178 // this.$message.error({ message: res.message, showClose: true })
179 // }
180 // })
181 },
182 getIconList() {
183 this.$refs.iconList.show(true);
184 },
185 // 选择图标
186 getIconName(data) {
187 this.form.icon = data;
188 },
189 getJsonString(data) {
190 this.form.metadata = data;
191 },
192 add() {
193 // console.log(this.productId)
194 // if (!this.productId) {
195 // this.$message.info({
196 // message: '请先选择子系统才能添加菜单,如果没有,请先添加子系统!',
197 // showClose: true
198 // })
199 // return
200 // }
201 // this.getParentMenuList(this.productId)
202 this.visible = true;
203 // this.type = 0
204 // this.form.jumpMode = 1
205 },
206 edit(record) {
207 // this.type = 1
208 // // 若有id为编辑
209 // if (record.id) {
210 // this.$nextTick(() => {
211 // this.form = Object.assign({}, record)
212 // this.getParentMenuList(this.productId)
213 // })
214 // }
215 this.visible = true;
216 },
217 addChild(record) {
218 // this.getParentMenuList(this.productId)
219 this.visible = true;
220 // this.type = 2
221 // this.form.jumpMode = 1
222 // this.form.parentId = record.id
223 },
224 handleChange(value) {
225 // this.form.parentId = value
226 },
227 submitForm(submitType) {
228 // this.$refs.form.validate((valid) => {
229 // if (valid) {
230 // let method = "";
231 // let url = "";
232 // const formData = this.form;
233 // formData.productId = this.productId;
234 // if (!formData.id) {
235 // method = "post";
236 // url = this.dataUrl;
237 // } else {
238 // method = "put";
239 // url = `${this.dataUrl}/${formData.id}`;
240 // }
241 // httpAction(url, formData, method)
242 // .then((res) => {
243 // if (res.status === 1) {
244 // this.$message.success({
245 // message: res.message,
246 // showClose: true,
247 // });
248 // // this.$emit("ok");
249 // // this.type 0新增 1编辑 2添加子
250 // if (this.type === 0) {
251 // if (submitType === 1) {
252 // this.close();
253 // } else {
254 // this.resetForm();
255 // }
256 // } else if (this.type === 1) {
257 // this.close();
258 // } else if (this.type === 2) {
259 // if (submitType === 1) {
260 // this.close();
261 // } else {
262 // this.resetForm();
263 // this.form.parentId = formData.parentId;
264 // }
265 // }
266 // this.$emit("ok");
267 // } else {
268 // this.$message.error({ message: res.message, showClose: true });
269 // }
270 // })
271 // .catch((err) => {
272 // console.log(err);
273 // });
274 // }
275 // });
276 },
277 resetForm() {
278 this.$refs.form.resetFields();
279 this.form = {
280 icon: "",
281 code: "",
282 };
283 },
284 close() {
285 this.resetForm();
286 this.visible = false;
287 },
288 },
289 };
290 </script>
291 <style scoped lang="scss">
292 .el-form {
293 .el-input {
294 .el-input__icon {
295 font-size: 14px;
296 // color: #3AA3F8 !important;
297 }
298 }
299 }
300 </style>
1 <template> 1 <template>
2 <div class="timedTask from-clues"> 2 <div class="timedTask from-clues">
3 <div class="from-clues-header"> 3 <div class="from-clues-header">
4 <el-form ref="form" :model="form" label-width="80px"> 4 <el-form ref="ruleForm" :model="form" label-width="100px">
5 <el-row> 5 <el-row class="mb-5">
6 <el-col :span="6"> 6 <el-col :span="2" class="btnColRight">
7 <el-form-item label="搜索标题"> 7 <btn nativeType="cx" @click="handleAdd()">新增菜单</btn>
8 <el-input v-model="form.job_name" placeholder="请输入标题"></el-input>
9 </el-form-item>
10 </el-col>
11 <el-col :span="18" class="btnColRight">
12 <btn nativeType="cx" @click="handleSubmit">搜索</btn>
13 <btn nativeType="sb" @click="handleAdd">新增</btn>
14 </el-col> 8 </el-col>
15 </el-row> 9 </el-row>
16 </el-form> 10 </el-form>
17 </div> 11 </div>
18 <div class="from-clues-content"> 12 <div class="from-clues-content">
19 <lb-table :page-size="pageData.size" :current-page.sync="pageData.current" :total="pageData.total" 13 <lb-table
20 @size-change="handleSizeChange" @p-current-change="handleCurrentChange" :column="tableData.columns" 14 :column="tableData.columns"
21 :data="tableData.data"> 15 :data="tabledata11"
16 row-key="id"
17 default-expand-all
18 :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
19 >
22 </lb-table> 20 </lb-table>
23 <add-task ref="task" :taskData="taskData" />
24 <message-tips ref="msg" :message="message" />
25 </div> 21 </div>
22 <edit-dialog ref="dialogForm" />
26 </div> 23 </div>
27 </template> 24 </template>
28 <script> 25 <script>
29 // 定时任务 26 // 定时任务
30 import data from "./data" 27 import data from "./data";
31 import sjsbTask from '@/api/sjsbTask.js' 28 import EditDialog from "./edit-dialog.vue";
32 import tableMixin from '@/mixins/tableMixin.js'
33 import addTask from '../components/addTask.vue'
34 export default { 29 export default {
35 name: "menus", 30 name: "menus",
36 mixins: [tableMixin],
37 components: { 31 components: {
38 addTask 32 EditDialog,
39 }, 33 },
40 data () { 34 data() {
41 return { 35 return {
36 tabledata11: [
37 {
38 id: "c6221838-187b-4a7a-b173-b0543022f560",
39 createdAt: "2021-08-26T07:00:07.101+0000",
40 updatedAt: "2021-08-26T07:00:07.101+0000",
41 createdBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
42 updatedBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
43 sort: 135,
44 name: "概览",
45 code: "GL",
46 description: null,
47 uri: null,
48 parentId: null,
49 state: null,
50 style: null,
51 icon: "",
52 jumpMode: 1,
53 productId: "d798323e-8834-4417-bbb8-837b8d13e7d5",
54 resourceCategoryId: "d798323e-8834-4417-bbb8-837b8d585656",
55 metadata: null,
56 children: [
57 {
58 id: "abf28772-a719-44bd-b461-f63ab9e0a53d",
59 createdAt: "2022-03-04T08:08:25.703+0000",
60 updatedAt: "2022-03-04T09:21:19.578+0000",
61 createdBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
62 updatedBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
63 sort: 197,
64 name: "资源概览",
65 code: "ZYGL2",
66 description: null,
67 uri: "/admin/#/resource-overview",
68 parentId: "c6221838-187b-4a7a-b173-b0543022f560",
69 state: null,
70 style: null,
71 icon: "",
72 jumpMode: 1,
73 productId: "d798323e-8834-4417-bbb8-837b8d13e7d5",
74 resourceCategoryId: "d798323e-8834-4417-bbb8-837b8d585656",
75 metadata:
76 '{"icon":"resource-overview","iconActive":"resource-overview-active"}',
77 children: null,
78 },
79 {
80 id: "06a0807e-11f5-4046-b245-3bb7b835b1c5",
81 createdAt: "2022-03-04T08:09:18.106+0000",
82 updatedAt: "2022-03-04T09:21:24.292+0000",
83 createdBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
84 updatedBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
85 sort: 196,
86 name: "访问概览",
87 code: "FWGL",
88 description: null,
89 uri: "/admin/#/access-overview",
90 parentId: "c6221838-187b-4a7a-b173-b0543022f560",
91 state: null,
92 style: null,
93 icon: "",
94 jumpMode: 1,
95 productId: "d798323e-8834-4417-bbb8-837b8d13e7d5",
96 resourceCategoryId: "d798323e-8834-4417-bbb8-837b8d585656",
97 metadata:
98 '{"icon":"access-overview","iconActive":"access-overview-active"}',
99 children: null,
100 },
101 ],
102 },
103 {
104 id: "f94c92cb-a032-4b89-8722-79dbcc331894",
105 createdAt: null,
106 updatedAt: null,
107 createdBy: null,
108 updatedBy: null,
109 sort: 59,
110 name: "资源管理",
111 code: "ZYGL",
112 description: null,
113 uri: null,
114 parentId: null,
115 state: null,
116 style: null,
117 icon: "",
118 jumpMode: 1,
119 productId: "d798323e-8834-4417-bbb8-837b8d13e7d5",
120 resourceCategoryId: "d798323e-8834-4417-bbb8-837b8d585656",
121 metadata: null,
122 children: [
123 {
124 id: "065fe2d7-d59a-442c-92d0-c91aa19d7fae",
125 createdAt: null,
126 updatedAt: "2021-11-11T09:40:08.951+0000",
127 createdBy: null,
128 updatedBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
129 sort: 35,
130 name: "目录管理",
131 code: "MLGL",
132 description: null,
133 uri: "/admin/#/catalog-manage",
134 parentId: "f94c92cb-a032-4b89-8722-79dbcc331894",
135 state: null,
136 style: null,
137 icon: "",
138 jumpMode: 1,
139 productId: "d798323e-8834-4417-bbb8-837b8d13e7d5",
140 resourceCategoryId: "d798323e-8834-4417-bbb8-837b8d585656",
141 metadata:
142 '{"icon":"tubiao_huaban","iconActive":"tubiao_huaban-active"}',
143 children: [
144 {
145 id: "0b5952bc-dc7f-4d4e-8fcc-af9d33908c2a",
146 createdAt: null,
147 updatedAt: "2022-03-04T01:46:25.515+0000",
148 createdBy: null,
149 updatedBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
150 sort: 137,
151 name: "服务目录",
152 code: "FWML",
153 description: null,
154 uri: "/admin/#/catalog-manage/catalog-service",
155 parentId: "065fe2d7-d59a-442c-92d0-c91aa19d7fae",
156 state: null,
157 style: null,
158 icon: "",
159 jumpMode: 1,
160 productId: "d798323e-8834-4417-bbb8-837b8d13e7d5",
161 resourceCategoryId: "d798323e-8834-4417-bbb8-837b8d585656",
162 metadata: null,
163 children: null,
164 },
165 {
166 id: "2377caf7-22e5-4261-b88a-0fbbbace1452",
167 createdAt: null,
168 updatedAt: "2022-03-04T01:47:00.774+0000",
169 createdBy: null,
170 updatedBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
171 sort: -3,
172 name: "应用目录",
173 code: "YYML",
174 description: null,
175 uri: "/admin/#/catalog-manage/catalog-application",
176 parentId: "065fe2d7-d59a-442c-92d0-c91aa19d7fae",
177 state: null,
178 style: null,
179 icon: "",
180 jumpMode: 1,
181 productId: "d798323e-8834-4417-bbb8-837b8d13e7d5",
182 resourceCategoryId: "d798323e-8834-4417-bbb8-837b8d585656",
183 metadata: null,
184 children: null,
185 },
186 ],
187 },
188 ],
189 },
190 ],
42 taskData: null, 191 taskData: null,
43 form: { 192 form: {
44 job_name: '', 193 job_name: "",
45 currentPage: 1 194 currentPage: 1,
195 },
196 title: "",
197 queryParam: {},
198 selectType: "0",
199 queryName: "",
200 organizationId: "", // 组织机构ID
201 departmentId: "", // 部门ID
202 departmentList: [], // 部门列表
203 levelList: [], // 职务级别
204 tableData: [],
205 sexList: [],
206 typeOptions: [
207 {
208 value: "0",
209 label: "姓名",
210 },
211 {
212 value: "1",
213 label: "工号",
214 },
215 {
216 value: "2",
217 label: "部门",
46 }, 218 },
219 {
220 value: "3",
221 label: "机构",
222 },
223 ],
224
47 selectionList: [], 225 selectionList: [],
48 tableData: { 226 tableData: {
49 columns: [{ 227 columns: [].concat(data.columns()).concat([
50 label: '序号', 228 {
51 type: 'index', 229 label: "排序",
52 width: '50', 230 width: 380,
53 index: this.indexMethod, 231 render: (h, scope) => {
54 }].concat(data.columns()).concat([ 232 return <div></div>;
233 },
234 },
55 { 235 {
56 label: "操作", 236 label: "操作",
57 width: 380, 237 width: 380,
58 render: (h, scope) => { 238 render: (h, scope) => {
59 return ( 239 return (
60 <div> 240 <div>
61 <el-button type="text" size="mini" style="color: #67C23A" 241 <el-button
62 v-show={scope.row.job_status !== '1' && scope.row.job_status !== '2'} 242 type="text"
63 icon="el-icon-magic-stick" 243 size="mini"
64 onClick={() => { this.handleRecovery(scope.row) }}>激活 244 icon="el-icon-edit"
65 </el-button> 245 onClick={() => {
66 246 this.handleEdit(scope.row);
67 <el-button type="text" size="mini" 247 }}
68 style="color: #67C23A;margin-left:0" 248 >
69 icon="el-icon-refresh-right" 249 修改
70 v-show={scope.row.job_status === '2'}
71 onClick={() => { this.handleActivation(scope.row) }}>恢复
72 </el-button>
73
74 <el-button type="text" size="mini"
75 v-show={scope.row.job_status !== '1'}
76 icon="el-icon-stopwatch"
77 onClick={() => { this.handletest(scope.row) }}>手动测试
78 </el-button> 250 </el-button>
79 <el-button type="text" size="mini" 251 <el-button
80 v-show={scope.row.job_status === '1'} 252 type="text"
253 size="mini"
81 icon="el-icon-video-pause" 254 icon="el-icon-video-pause"
82 onClick={() => { this.handleSuspend(scope.row) }}>暂停 255 onClick={() => {
83 </el-button> 256 this.authorizationQuery(scope.row);
84 <el-button type="text" size="mini" 257 }}
85 icon="el-icon-edit" 258 >
86 v-show={scope.row.job_status === '2' || scope.row.job_status === '-1' || scope.row.job_status === '0'} 259 授权
87 onClick={() => { this.handleEdit(scope.row) }}>编辑
88 </el-button> 260 </el-button>
89 <el-button type="text" size="mini" 261 <el-button
90 icon="el-icon-delete" style="color:#F56C6C" 262 type="text"
91 v-show={scope.row.job_status !== '1'} 263 size="mini"
92 onClick={() => { this.handleDel(scope.row) }}>删除 264 icon="el-icon-delete"
265 style="color:#F56C6C"
266 onClick={() => {
267 this.handleDelete(scope.row.id, scope.row.name);
268 }}
269 >
270 删除
93 </el-button> 271 </el-button>
94 </div> 272 </div>
95 ); 273 );
96 }, 274 },
97 }, 275 },
98 ]), 276 ]),
99 data: [] 277 data: [],
100 }, 278 },
101 pageData: { 279 pageData: {
102 total: 0, 280 total: 5,
103 pageSize: 15, 281 pageSize: 15,
104 current: 1, 282 current: 1,
105 }, 283 },
106 } 284 };
107 }, 285 },
108 methods: { 286 methods: {
109 handleAdd () { 287 // 新增菜单
110 this.taskData = null 288 handleAdd() {
111 this.$refs.task.isShow() 289 this.taskData = null;
290 this.$refs.dialogForm.add();
291 this.$refs.dialogForm.title = "添加";
112 }, 292 },
113 async featchData () { 293
114 try { 294 // 修改
115 this.form = Object.assign(this.form, this.formData) 295 handleEdit(record) {
116 let { result: { list, total, pages: pageSize, pageNum: current } 296 localStorage.setItem("record", JSON.stringify(record));
117 } = await sjsbTask.getTaskListByName(this.form) 297 this.$refs.dialogForm.edit(record);
118 this.tableData.data = list 298 this.$refs.dialogForm.title = "修改";
119 this.pageData = {
120 pageSize,
121 current,
122 total
123 }
124 } catch (error) {
125 this.message = error
126 this.$refs.msg.messageShow()
127 }
128 },
129 // 暂停
130 handleSuspend (row) {
131 this.$confirm('此操将进行暂停操作, 是否继续?', '提示', {
132 confirmButtonText: '确定',
133 cancelButtonText: '取消',
134 type: 'warning',
135 })
136 .then(() => {
137 sjsbTask.pauseJob(row.id)
138 .then((res) => {
139 if ((res.code = 200)) {
140 this.$message({
141 type: 'success',
142 message: res.message,
143 })
144 this.featchData()
145 }
146 })
147 .catch((error) => {
148 this.$alert(error, '提示', {
149 confirmButtonText: '确定',
150 type: 'error'
151 })
152 })
153 })
154 .catch(() => {
155 this.$message({
156 type: 'info',
157 message: '已取消',
158 })
159 })
160 }, 299 },
161 // 激活 300 // 授权
162 handleRecovery (row) { 301 authorizationQuery(record) {
163 this.$confirm('此操将进行激活操作, 是否继续?', '提示', { 302 this.$refs.authorizationList.open(record, 'menu')
164 confirmButtonText: '确定', 303 this.$refs.authorizationList.emptyJudge = true
165 cancelButtonText: '取消',
166 type: 'warning',
167 })
168 .then(() => {
169 sjsbTask.activateJob(row.id)
170 .then((res) => {
171 if ((res.code = 200)) {
172 this.$message({
173 type: 'success',
174 message: res.message,
175 })
176 this.featchData()
177 }
178 })
179 .catch((error) => {
180 this.$alert(error, '提示', {
181 confirmButtonText: '确定',
182 type: 'error'
183 })
184 })
185 })
186 .catch(() => {
187 this.$message({
188 type: 'info',
189 message: '已取消',
190 })
191 })
192 }, 304 },
193 // 恢复 305 // 删除
194 handleActivation (row) { 306 handleDelete(row, id) {
195 this.$confirm('此操将进行恢复操作, 是否继续?', '提示', { 307 this.$confirm("此操将进行删除操作, 是否继续?", "提示", {
196 confirmButtonText: '确定', 308 confirmButtonText: "确定",
197 cancelButtonText: '取消', 309 cancelButtonText: "取消",
198 type: 'warning', 310 type: "warning",
199 }) 311 })
200 .then(() => { 312 .then(() => {
201 sjsbTask.resumeJob(row.id) 313 // sjsbTask.sjsbTaskRemove(row.id)
202 .then((res) => { 314 // .then((res) => {
203 if ((res.code = 200)) { 315 // if ((res.code = 200)) {
204 this.$message({ 316 // this.$message({
205 type: 'success', 317 // type: 'success',
206 message: res.message, 318 // message: res.message,
207 }) 319 // })
208 this.featchData() 320 // this.featchData()
209 } 321 // }
210 }) 322 // })
211 .catch((error) => { 323 // .catch((error) => {
212 this.$alert(error, '提示', { 324 // this.$alert(error, '提示', {
213 confirmButtonText: '确定', 325 // confirmButtonText: '确定',
214 type: 'error' 326 // type: 'error'
215 }) 327 // })
216 }) 328 // })
217 }) 329 })
218 .catch(() => { 330 .catch(() => {
219 this.$message({ 331 this.$message({
220 type: 'info', 332 type: "info",
221 message: '已取消', 333 message: "已取消",
222 }) 334 });
223 })
224 },
225 // 手动测试
226 handletest (row) {
227 this.$confirm('此操将进行手动测试, 是否继续?', '提示', {
228 confirmButtonText: '确定',
229 cancelButtonText: '取消',
230 type: 'warning',
231 })
232 .then(() => {
233 sjsbTask.sjsbTaskRun(row.id)
234 .then((res) => {
235 if ((res.code = 200)) {
236 this.$alert(res.message, '提示', {
237 confirmButtonText: '确定',
238 type: 'success'
239 }); 335 });
240 this.featchData()
241 }
242 })
243 .catch((error) => {
244 this.$alert(error, '提示', {
245 confirmButtonText: '确定',
246 type: 'error'
247 })
248 })
249 })
250 .catch(() => {
251 this.$message({
252 type: 'info',
253 message: '已取消',
254 })
255 })
256 }, 336 },
257 handleEdit (row) {
258 this.taskData = row
259 this.$refs.task.isShow()
260 }, 337 },
261 handleDel (row) { 338 };
262 this.$confirm('此操将进行删除操作, 是否继续?', '提示', {
263 confirmButtonText: '确定',
264 cancelButtonText: '取消',
265 type: 'warning',
266 })
267 .then(() => {
268 sjsbTask.sjsbTaskRemove(row.id)
269 .then((res) => {
270 if ((res.code = 200)) {
271 this.$message({
272 type: 'success',
273 message: res.message,
274 })
275 this.featchData()
276 }
277 })
278 .catch((error) => {
279 this.$alert(error, '提示', {
280 confirmButtonText: '确定',
281 type: 'error'
282 })
283 })
284 })
285 .catch(() => {
286 this.$message({
287 type: 'info',
288 message: '已取消',
289 })
290 })
291 }
292 }
293 }
294 </script> 339 </script>
295 <style scoped lang="scss"> 340 <style scoped lang="scss">
296 @import "~@/styles/mixin.scss"; 341 @import "~@/styles/mixin.scss";
......
...@@ -7,36 +7,17 @@ class data extends filter { ...@@ -7,36 +7,17 @@ class data extends filter {
7 return [ 7 return [
8 { 8 {
9 prop: "job_name", 9 prop: "job_name",
10 label: "任务名称", 10 label: "角色名称",
11 width: 130 11 width: 330
12 }, 12 },
13 { 13 {
14 prop: "description", 14 prop: "description",
15 label: "任务描述", 15 label: "类别",
16 width: 300 16 width: 400
17 }, 17 },
18 { 18 {
19 prop: "cron_expression", 19 prop: "cron_expression",
20 label: "cron表达式" 20 label: "备注"
21 },
22 {
23 prop: "bean_class",
24 width: 260,
25 label: "任务类"
26 },
27 {
28 prop: "job_group",
29 label: "任务分组"
30 },
31 {
32 label: "状态",
33 render: (h, scope) => {
34 return (
35 <div>
36 { this.stateStatus(scope.row.job_status) }
37 </div>
38 )
39 },
40 } 21 }
41 ] 22 ]
42 } 23 }
......
1 <!-- 新增 & 修改角色 -->
2 <template>
3 <Dialog
4 :title="dialogTitle"
5 :show.sync="showAddEditDialog"
6 :width="'767px'"
7 @close="handleCloseDialog()"
8 >
9 <template slot="content">
10 <el-form ref="form" :model="dialogForm" :rules="rules" label-width="82px">
11 <el-row :gutter="24">
12 <el-col :span="12">
13 <el-form-item label="角色名称:" prop="roleName">
14 <el-input
15 v-model="dialogForm.roleName"
16 clearable
17 placeholder="请输入角色名称"
18 />
19 </el-form-item>
20 </el-col>
21 <el-col :span="12">
22 <el-form-item label="角色类型:" prop="roleType">
23 <!-- <el-select v-model="dialogForm.roleType.value" placeholder="请输入角色类型">
24 <el-option
25 v-for="item in roleTypeOptions"
26 :key="item.value"
27 :label="item.name"
28 :value="item.value">
29 </el-option>
30 </el-select> -->
31 <el-input
32 v-model="dialogForm.roleType"
33 clearable
34 placeholder="请输入角色类型"
35 />
36 </el-form-item>
37 </el-col>
38 </el-row>
39 <br>
40 <el-row>
41 <el-col :span="24">
42 <el-form-item label="备注:" class="form-item-mb0">
43 <el-input
44 v-model="dialogForm.roleTextArea"
45 type="textarea"
46 placeholder="请输入内容"
47 />
48 </el-form-item>
49 </el-col>
50 </el-row>
51 </el-form>
52 </template>
53 <template slot="footer">
54 <el-button
55 class="cancel-button"
56 @click="handleCloseDialog"
57 >取消</el-button>
58
59 <el-button
60 type="primary"
61 @click="handleSaveRole()"
62 >保存</el-button>
63 </template>
64 </Dialog>
65 </template>
66
67 <script>
68 import Dialog from "@/components/Dialog/";
69
70 export default {
71 components: {
72 Dialog
73 },
74 data() {
75 return {
76 dialogTitle: '',
77 showAddEditDialog: false,
78 menuType: '',
79 roleId: '',
80 sort: 0,
81 dialogForm: {
82 roleName: '',
83 roleType: '',
84 roleTextArea: ''
85 },
86 rules: {
87 roleName: [
88 { required: true, message: '请输入角色名称', trigger: 'blur' }
89 ],
90 roleType: [
91 { required: true, message: '请输入角色类型', trigger: 'blur' }
92 ]
93 },
94 roleTypeOptions: [
95 { name: '定制', value: '定制' },
96 { name: '其他', value: '其他' }
97 ]
98 }
99 },
100 methods: {
101 // 保存新增或关闭事件
102 handleSaveRole(val) {
103 this.$refs.form.validate((valid) => {
104 if (valid) {
105 try {
106 const params = {
107 category: this.menuType,
108 description: this.dialogForm.roleTextArea,
109 name: this.dialogForm.roleName,
110 sort: this.sort,
111 type: this.dialogForm.roleType
112 }
113 if (this.roleId) {
114 // params.id = this.roleId
115 // httpAction(`${api.roles}/${params.id}`, params, 'post').then(
116 // (res) => {
117 // if (res.status === 1) {
118 // this.$message.success({
119 // message: '修改成功',
120 // showClose: true
121 // })
122 // this.dialogForm = {
123 // roleName: '',
124 // roleType: ''
125 // }
126 // this.showAddEditDialog = val
127 // this.$emit('ok', this.menuType)
128 // } else {
129 // this.$message.error({
130 // message: res.message,
131 // showClose: true
132 // })
133 // }
134 // }
135 // )
136 } else {
137 // httpAction(api.roles, params, 'post').then((res) => {
138 // if (res.status === 1) {
139 // this.$message.success({
140 // message: '新增成功',
141 // showClose: true
142 // })
143 // this.dialogForm = {
144 // roleName: '',
145 // roleType: ''
146 // }
147 // this.showAddEditDialog = val
148 // this.$emit('ok', this.menuType)
149 // } else {
150 // this.$message.error({
151 // message: res.message,
152 // showClose: true
153 // })
154 // }
155 // })
156 }
157 } catch (e) {
158 console.error(e)
159 }
160 }
161 })
162 },
163 // 取消事件
164 handleCloseDialog() {
165 this.dialogForm = {
166 roleName: '',
167 roleType: ''
168 }
169 this.showAddEditDialog = false
170 }
171 }
172 }
173 </script>
174 <style scoped lang="scss"></style>
1 <template> 1 <template>
2 <div class="timedTask from-clues"> 2 <div class="timedTask from-clues">
3 <div class="from-clues-header"> 3 <div class="from-clues-header">
4 <el-form ref="form" :model="form" label-width="80px"> 4 <el-form ref="ruleForm" :model="form" label-width="100px">
5 <el-row> 5 <el-row class="mb-5">
6 <el-col :span="6"> 6 <el-col :span="2" class="btnColRight">
7 <el-form-item label="搜索标题"> 7 <btn nativeType="cx" @click="handleAdd">增加角色</btn>
8 <el-input v-model="form.job_name" placeholder="请输入标题"></el-input>
9 </el-form-item>
10 </el-col>
11 <el-col :span="18" class="btnColRight">
12 <btn nativeType="cx" @click="handleSubmit">搜索</btn>
13 <btn nativeType="sb" @click="handleAdd">新增</btn>
14 </el-col> 8 </el-col>
9
15 </el-row> 10 </el-row>
16 </el-form> 11 </el-form>
17 </div> 12 </div>
...@@ -20,22 +15,24 @@ ...@@ -20,22 +15,24 @@
20 @size-change="handleSizeChange" @p-current-change="handleCurrentChange" :column="tableData.columns" 15 @size-change="handleSizeChange" @p-current-change="handleCurrentChange" :column="tableData.columns"
21 :data="tableData.data"> 16 :data="tableData.data">
22 </lb-table> 17 </lb-table>
23 <add-task ref="task" :taskData="taskData" />
24 <message-tips ref="msg" :message="message" />
25 </div> 18 </div>
19 <EditDialog ref="dialogForm" />
20 <Roleslistdiglog ref="rolesForm" />
26 </div> 21 </div>
22
27 </template> 23 </template>
28 <script> 24 <script>
29 // 定时任务 25 // 定时任务
30 import data from "./data" 26 import data from "./data"
31 import sjsbTask from '@/api/sjsbTask.js' 27 import sjsbTask from '@/api/sjsbTask.js'
32 import tableMixin from '@/mixins/tableMixin.js' 28 import tableMixin from '@/mixins/tableMixin.js'
33 import addTask from '../components/addTask.vue' 29 import EditDialog from "./edit-dialog.vue";
30 import Roleslistdiglog from "./roleslistdiglog.vue";
34 export default { 31 export default {
35 name: "roles", 32 name: "menus",
36 mixins: [tableMixin], 33 mixins: [tableMixin],
37 components: { 34 components: {
38 addTask 35 EditDialog,Roleslistdiglog
39 }, 36 },
40 data () { 37 data () {
41 return { 38 return {
...@@ -44,6 +41,35 @@ export default { ...@@ -44,6 +41,35 @@ export default {
44 job_name: '', 41 job_name: '',
45 currentPage: 1 42 currentPage: 1
46 }, 43 },
44 title: '',
45 queryParam: {},
46 selectType: '0',
47 queryName: '',
48 organizationId: '', // 组织机构ID
49 departmentId: '', // 部门ID
50 departmentList: [], // 部门列表
51 levelList: [], // 职务级别
52 tableData: [],
53 sexList: [],
54 typeOptions: [
55 {
56 value: '0',
57 label: '姓名'
58 },
59 {
60 value: '1',
61 label: '工号'
62 },
63 {
64 value: '2',
65 label: '部门'
66 },
67 {
68 value: '3',
69 label: '机构'
70 }
71 ],
72
47 selectionList: [], 73 selectionList: [],
48 tableData: { 74 tableData: {
49 columns: [{ 75 columns: [{
...@@ -51,44 +77,23 @@ export default { ...@@ -51,44 +77,23 @@ export default {
51 type: 'index', 77 type: 'index',
52 width: '50', 78 width: '50',
53 index: this.indexMethod, 79 index: this.indexMethod,
54 }].concat(data.columns()).concat([ 80 }].concat(data.columns()).concat([ {
55 {
56 label: "操作", 81 label: "操作",
57 width: 380, 82 width: 380,
58 render: (h, scope) => { 83 render: (h, scope) => {
59 return ( 84 return (
60 <div> 85 <div>
61 <el-button type="text" size="mini" style="color: #67C23A"
62 v-show={scope.row.job_status !== '1' && scope.row.job_status !== '2'}
63 icon="el-icon-magic-stick"
64 onClick={() => { this.handleRecovery(scope.row) }}>激活
65 </el-button>
66
67 <el-button type="text" size="mini"
68 style="color: #67C23A;margin-left:0"
69 icon="el-icon-refresh-right"
70 v-show={scope.row.job_status === '2'}
71 onClick={() => { this.handleActivation(scope.row) }}>恢复
72 </el-button>
73
74 <el-button type="text" size="mini"
75 v-show={scope.row.job_status !== '1'}
76 icon="el-icon-stopwatch"
77 onClick={() => { this.handletest(scope.row) }}>手动测试
78 </el-button>
79 <el-button type="text" size="mini" 86 <el-button type="text" size="mini"
80 v-show={scope.row.job_status === '1'}
81 icon="el-icon-video-pause" 87 icon="el-icon-video-pause"
82 onClick={() => { this.handleSuspend(scope.row) }}>暂停 88 onClick={() => { this.personnel(scope.row) }}>人员
83 </el-button> 89 </el-button>
84 <el-button type="text" size="mini" 90 <el-button type="text" size="mini"
85 icon="el-icon-edit" 91 icon="el-icon-edit"
86 v-show={scope.row.job_status === '2' || scope.row.job_status === '-1' || scope.row.job_status === '0'} 92
87 onClick={() => { this.handleEdit(scope.row) }}>编辑 93 onClick={() => { this.handleEdit(scope.row) }}>修改
88 </el-button> 94 </el-button>
89 <el-button type="text" size="mini" 95 <el-button type="text" size="mini"
90 icon="el-icon-delete" style="color:#F56C6C" 96 icon="el-icon-delete" style="color:#F56C6C"
91 v-show={scope.row.job_status !== '1'}
92 onClick={() => { this.handleDel(scope.row) }}>删除 97 onClick={() => { this.handleDel(scope.row) }}>删除
93 </el-button> 98 </el-button>
94 </div> 99 </div>
...@@ -99,164 +104,53 @@ export default { ...@@ -99,164 +104,53 @@ export default {
99 data: [] 104 data: []
100 }, 105 },
101 pageData: { 106 pageData: {
102 total: 0, 107 total: 5,
103 pageSize: 15, 108 pageSize: 15,
104 current: 1, 109 current: 1,
105 }, 110 },
106 } 111 }
107 }, 112 },
108 methods: { 113 methods: {
109 handleAdd () { 114 // 新增角色
110 this.taskData = null 115 handleAdd() {
111 this.$refs.task.isShow() 116 // this.$refs.addEditDialog.menuType = this.menuType
117 // this.$refs.addEditDialog.roleId = value.id
118 // this.roleSort = value.sort ? value.sort : 0
119 // if (value.id) {
120 // this.$refs.addEditDialog.dialogForm.roleName = value.name
121 // this.$refs.addEditDialog.dialogForm.roleType = value.type
122 // this.$refs.addEditDialog.dialogForm.roleTextArea = value.description
123 // }
124 this.$refs.dialogForm.showAddEditDialog = true
125 // this.$refs.addEditDialog.dialogTitle = value.id ? '修改' : '新增'
112 }, 126 },
113 async featchData () { 127 // 修改角色
114 try { 128 handleEdit(row) {
115 this.form = Object.assign(this.form, this.formData) 129 // this.$refs.addEditDialog.menuType = this.menuType
116 let { result: { list, total, pages: pageSize, pageNum: current } 130 // this.$refs.addEditDialog.roleId = row.id
117 } = await sjsbTask.getTaskListByName(this.form) 131 // this.roleSort = row.sort ? row.sort : 0
118 this.tableData.data = list 132 // if (row.id) {
119 this.pageData = { 133 // this.$refs.addEditDialog.dialogForm.roleName = row.name
120 pageSize, 134 // this.$refs.addEditDialog.dialogForm.roleType = row.type
121 current, 135 // this.$refs.addEditDialog.dialogForm.roleTextArea = row.description
122 total 136 // }
123 } 137 this.$refs.dialogForm.showAddEditDialog = true
124 } catch (error) { 138 // this.$refs.addEditDialog.dialogTitle = row.id ? '修改' : '新增'
125 this.message = error
126 this.$refs.msg.messageShow()
127 }
128 }, 139 },
129 // 暂停 140 featchData () {
130 handleSuspend (row) { 141
131 this.$confirm('此操将进行暂停操作, 是否继续?', '提示', { 142 this.tableData.data = [
132 confirmButtonText: '确定', 143 {
133 cancelButtonText: '取消', 144 job_name: "人事部材料管理员",
134 type: 'warning', 145 description: "材料管理员",
135 }) 146 cron_expression: "管理内部材料",
136 .then(() => {
137 sjsbTask.pauseJob(row.id)
138 .then((res) => {
139 if ((res.code = 200)) {
140 this.$message({
141 type: 'success',
142 message: res.message,
143 })
144 this.featchData()
145 }
146 })
147 .catch((error) => {
148 this.$alert(error, '提示', {
149 confirmButtonText: '确定',
150 type: 'error'
151 })
152 })
153 })
154 .catch(() => {
155 this.$message({
156 type: 'info',
157 message: '已取消',
158 })
159 })
160 },
161 // 激活
162 handleRecovery (row) {
163 this.$confirm('此操将进行激活操作, 是否继续?', '提示', {
164 confirmButtonText: '确定',
165 cancelButtonText: '取消',
166 type: 'warning',
167 })
168 .then(() => {
169 sjsbTask.activateJob(row.id)
170 .then((res) => {
171 if ((res.code = 200)) {
172 this.$message({
173 type: 'success',
174 message: res.message,
175 })
176 this.featchData()
177 }
178 })
179 .catch((error) => {
180 this.$alert(error, '提示', {
181 confirmButtonText: '确定',
182 type: 'error'
183 })
184 })
185 })
186 .catch(() => {
187 this.$message({
188 type: 'info',
189 message: '已取消',
190 })
191 })
192 },
193 // 恢复
194 handleActivation (row) {
195 this.$confirm('此操将进行恢复操作, 是否继续?', '提示', {
196 confirmButtonText: '确定',
197 cancelButtonText: '取消',
198 type: 'warning',
199 })
200 .then(() => {
201 sjsbTask.resumeJob(row.id)
202 .then((res) => {
203 if ((res.code = 200)) {
204 this.$message({
205 type: 'success',
206 message: res.message,
207 })
208 this.featchData()
209 }
210 })
211 .catch((error) => {
212 this.$alert(error, '提示', {
213 confirmButtonText: '确定',
214 type: 'error'
215 })
216 })
217 })
218 .catch(() => {
219 this.$message({
220 type: 'info',
221 message: '已取消',
222 })
223 })
224 }, 147 },
225 // 手动测试 148 ]
226 handletest (row) {
227 this.$confirm('此操将进行手动测试, 是否继续?', '提示', {
228 confirmButtonText: '确定',
229 cancelButtonText: '取消',
230 type: 'warning',
231 })
232 .then(() => {
233 sjsbTask.sjsbTaskRun(row.id)
234 .then((res) => {
235 if ((res.code = 200)) {
236 this.$alert(res.message, '提示', {
237 confirmButtonText: '确定',
238 type: 'success'
239 });
240 this.featchData()
241 }
242 })
243 .catch((error) => {
244 this.$alert(error, '提示', {
245 confirmButtonText: '确定',
246 type: 'error'
247 })
248 })
249 })
250 .catch(() => {
251 this.$message({
252 type: 'info',
253 message: '已取消',
254 })
255 })
256 }, 149 },
257 handleEdit (row) { 150
258 this.taskData = row 151 personnel(){
259 this.$refs.task.isShow() 152 this.$refs.rolesForm.adds();
153 // this.$refs.rolesForm.title = "人员配置";
260 }, 154 },
261 handleDel (row) { 155 handleDel (row) {
262 this.$confirm('此操将进行删除操作, 是否继续?', '提示', { 156 this.$confirm('此操将进行删除操作, 是否继续?', '提示', {
......
1 <template>
2 <Dialog :title="title" :show.sync="visible" :width="'715px'" @close="close()">
3 <template slot="content">
4 <vxe-table
5 show-overflow
6 :data="memberList"
7 border
8 class="header-bg-type1"
9 auto-resize
10 :checkbox-config="{ highlight: true, range: true }"
11 highlight-hover-row
12 max-height="500px"
13 :empty-render="{ name: 'NotData' }"
14 >
15 <template #empty>
16 <table-empty />
17 </template>
18 <vxe-table-column
19 type="checkbox"
20 width="60"
21 align="left"
22 fixed="left"
23 />
24 <vxe-table-column
25 field="code"
26 title="工号"
27 fixed="left"
28 min-width="100"
29 show-header-overflow="tooltip"
30 show-overflow="tooltip"
31 align="left"
32 />
33 <vxe-table-column
34 title="姓名"
35 fixed="left"
36 show-header-overflow="tooltip"
37 show-overflow="tooltip"
38 >
39 <template slot-scope="scope">
40 <svg-icon
41 :icon-class="
42 scope.row.sex === '0'
43 ? 'male'
44 : scope.row.sex === '1'
45 ? 'female'
46 : 'secrecy'
47 "
48 />
49 {{ scope.row.name }}
50 </template>
51 </vxe-table-column>
52 <vxe-table-column
53 field="loginName"
54 title="用户名"
55 fixed="left"
56 show-header-overflow="tooltip"
57 show-overflow="tooltip"
58 />
59 <vxe-table-column
60 field="departmentName"
61 title="部门"
62 show-header-overflow="tooltip"
63 show-overflow="tooltip"
64 />
65 </vxe-table>
66 </template>
67 <template slot="footer">
68 <el-button type="primary" class="save" @click="submitForm(1)"
69 >保存</el-button
70 >
71 <el-button class="cancel-button" @click="close()">取消</el-button>
72 </template>
73 </Dialog>
74 </template>
75
76 <script>
77 import Dialog from "@/components/Dialog/";
78 export default {
79 name: "",
80 components: { Dialog },
81 props: {},
82 data() {
83 return {
84 form: {
85 sex: "0",
86 },
87 memberList: [
88 {
89 id: "3127e455-43ba-45ff-9326-0e02ef89485e",
90 createdAt: null,
91 updatedAt: "2022-08-04T03:38:27.626+0000",
92 createdBy: null,
93 updatedBy: "3127e455-43ba-45ff-9326-0e02ef89485e",
94 sort: 1,
95 name: "超级管理员",
96 loginName: "admin",
97 password: "05eb15777e8fd1d61c840472e7267f61d432f63340d86b59",
98 passwordSalt: "5178114777136485",
99 email: null,
100 lastLoginTime: null,
101 mobilePhone: "18291003568",
102 status: "ACTIVE",
103 passwordChangeTime: "2021-12-10T08:01:01.569+0000",
104 idCard: "612725202111021521",
105 departmentId: "2eae5304-544f-4f5b-b354-8f5d47433c9b",
106 organizationId: "0bca67ae-1d9e-4b41-b057-f165586d24aa",
107 sex: "0",
108 isDuty: true,
109 code: "123324",
110 jobLevel: null,
111 telephone: "028-87720898",
112 address: "办公地点修改测试",
113 isLocked: false,
114 departmentName: "研发部",
115 _X_ROW_KEY: "row_276",
116 },
117 ],
118 title: "",
119 type: "",
120 visible: false,
121 showLoginName: false,
122 options: [],
123 setProps: {
124 value: "id",
125 label: "name",
126 children: "children",
127 expandTrigger: "hover",
128 checkStrictly: true, // 可取消关联,选择任意一级选项
129 emitPath: false,
130 },
131 sexList: [],
132 levelList: [],
133 organizationId: "", // 组织机构ID
134 departmentId: "", // 部门ID
135 };
136 },
137 computed: {},
138 watch: {},
139 created() {},
140 mounted() {},
141 methods: {
142 adds() {
143 this.visible = true;
144 },
145 edit(record) {
146 this.visible = true;
147 },
148 handleChange(value) {
149 this.form.departmentId = value;
150 },
151
152 close() {
153 // this.resetForm()
154 this.visible = false;
155 },
156 },
157 };
158 </script>
159 <style scoped lang="scss">
160 .el-form {
161 .el-form-item__content {
162 .el-radio {
163 margin-right: 6px;
164 }
165 }
166 .el-checkbox {
167 line-height: 40px;
168 }
169 .col-pd0 {
170 padding: 0 !important;
171 }
172 }
173 </style>
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
21 :data="tableData.data"> 21 :data="tableData.data">
22 </lb-table> 22 </lb-table>
23 <add-task ref="task" :taskData="taskData" /> 23 <add-task ref="task" :taskData="taskData" />
24 <message-tips ref="msg" :message="message" />
25 </div> 24 </div>
26 </div> 25 </div>
27 </template> 26 </template>
...@@ -123,7 +122,6 @@ export default { ...@@ -123,7 +122,6 @@ export default {
123 } 122 }
124 } catch (error) { 123 } catch (error) {
125 this.message = error 124 this.message = error
126 this.$refs.msg.messageShow()
127 } 125 }
128 }, 126 },
129 // 暂停 127 // 暂停
......
...@@ -6,37 +6,35 @@ class data extends filter { ...@@ -6,37 +6,35 @@ class data extends filter {
6 columns () { 6 columns () {
7 return [ 7 return [
8 { 8 {
9 prop: "job_name", 9 prop: "code",
10 label: "任务名称", 10 label: "工号",
11 width: 130 11 width: 130
12 }, 12 },
13 { 13 {
14 prop: "description", 14 prop: "name",
15 label: "任务描述", 15 label: "姓名",
16 width: 300 16 width: 300
17 }, 17 },
18 { 18 {
19 prop: "cron_expression", 19 prop: "loginName",
20 label: "cron表达式" 20 label: "用户名"
21 }, 21 },
22 { 22 {
23 prop: "bean_class", 23 prop: "isDuty",
24 width: 260, 24 width: 260,
25 label: "任务类" 25 label: "负责人"
26 }, 26 },
27 { 27 {
28 prop: "job_group", 28 prop: "departmentName",
29 label: "任务分组" 29 label: "所属部门"
30 }, 30 },
31 { 31 {
32 label: "状态", 32 prop: "job_group",
33 render: (h, scope) => { 33 label: "职位"
34 return (
35 <div>
36 { this.stateStatus(scope.row.job_status) }
37 </div>
38 )
39 }, 34 },
35 {
36 prop: "telephone",
37 label: "电话"
40 } 38 }
41 ] 39 ]
42 } 40 }
......
1 <template>
2 <Dialog :title="title" :show.sync="visible" :width="'715px'" @close="close()">
3 <template slot="content">
4 <el-form ref="form" :model="form" :rules="rules">
5 <el-row :gutter="24">
6 <el-col :span="11">
7 <el-form-item label="姓名:" prop="name" label-width="100px">
8 <el-input v-model="form.name" placeholder="请输入姓名" />
9 </el-form-item>
10 </el-col>
11 <el-col :span="13">
12 <el-col :span="18" class="col-pd0">
13 <el-form-item label="性别:" label-width="72px">
14 <el-radio
15 v-for="(item, index) in sexList"
16 :key="index"
17 v-model="form.sex"
18 :label="item.value"
19 >{{ item.name }}</el-radio
20 >
21 </el-form-item>
22 </el-col>
23 <el-col :span="6">
24 <el-checkbox v-model="form.isDuty">负责人</el-checkbox>
25 </el-col>
26 </el-col>
27 </el-row>
28 <el-row :gutter="24">
29 <el-col :span="11">
30 <el-form-item label="工号:" prop="code" label-width="100px">
31 <el-input v-model="form.code" placeholder="请输入工号" />
32 </el-form-item>
33 </el-col>
34 <el-col :span="13">
35 <el-form-item label="用户名:" prop="loginName" label-width="72px">
36 <el-input
37 v-model="form.loginName"
38 :disabled="showLoginName"
39 placeholder="请输入用户名"
40 />
41 </el-form-item>
42 </el-col>
43 </el-row>
44 <el-row :gutter="24">
45 <el-col :span="11">
46 <el-form-item label="身份证号码:" label-width="100px">
47 <el-input v-model="form.idCard" placeholder="请输入身份证号码" />
48 </el-form-item>
49 </el-col>
50 <el-col :span="13">
51 <el-form-item
52 label="手机号码:"
53 prop="mobilePhone"
54 label-width="72px"
55 >
56 <el-input
57 v-model="form.mobilePhone"
58 placeholder="请输入手机号码"
59 />
60 </el-form-item>
61 </el-col>
62 </el-row>
63 <el-row :gutter="24">
64 <el-col :span="11">
65 <el-form-item label="最高职务级别:" label-width="100px">
66 <el-select
67 v-model="form.jobLevel"
68 placeholder="请选择最高职务级别"
69 >
70 <el-option
71 v-for="item in levelList"
72 :key="item.value"
73 :label="item.name"
74 :value="item.value"
75 />
76 </el-select>
77 </el-form-item>
78 </el-col>
79 <el-col :span="13">
80 <el-form-item label="办公电话:" prop="telephone" label-width="72px">
81 <el-input v-model="form.telephone" placeholder="请输入办公电话" />
82 </el-form-item>
83 </el-col>
84 </el-row>
85 <el-row :gutter="24">
86 <el-col :span="24">
87 <el-form-item
88 label="办公地点:"
89 label-width="100px"
90 class="form-item-mb0"
91 >
92 <el-input v-model="form.address" placeholder="请输入办公地点" />
93 </el-form-item>
94 </el-col>
95 </el-row>
96 </el-form>
97 </template>
98 <template slot="footer">
99 <el-button type="primary" class="save" @click="submitForm(1)">保存</el-button>
100 <el-button class="cancel-button" @click="close()">取消</el-button>
101 </template>
102 </Dialog>
103 </template>
104
105 <script>
106 import Dialog from "@/components/Dialog/";
107 export default {
108 name: "",
109 components: { Dialog },
110 props: {},
111 data() {
112 return {
113 form: {
114 sex: "0",
115 },
116 rules: {
117 name: [{ required: true, message: "请输入姓名", trigger: "blur" }],
118 code: [{ required: true, message: "请输入工号", trigger: "blur" }],
119 mobilePhone: [{ validator: "sddd", trigger: "blur" }],
120 loginName: [
121 { required: true, message: "请输入用户名", trigger: "blur" },
122 ],
123 },
124 title: "",
125 visible: false,
126 showLoginName: false,
127 sexList: [{lable:"0",value:"0",name:"男"},{lable:"1",value:"1",name:"女"}],
128 levelList: [{lable:"0",value:"0",name:"干事"},{lable:"1",value:"1",name:"经理"}],
129 organizationId: "", // 组织机构ID
130 departmentId: "", // 部门ID
131 };
132 },
133 computed: {},
134 watch: {},
135 created() {},
136 mounted() {},
137 methods: {
138 // initDictConfig() {
139 // getDictItems('XB').then((res) => {
140 // if (res.status === 1) {
141 // this.sexList = res.content
142 // } else {
143 // this.$message.error({ message: res.message, showClose: true })
144 // }
145 // })
146 // getDictItems('ZWJB').then((res) => {
147 // if (res.status === 1) {
148 // this.levelList = res.content
149 // } else {
150 // this.$message.error({ message: res.message, showClose: true })
151 // }
152 // })
153 // },
154 add() {
155 this.visible = true;
156 // this.type = 0
157 this.showLoginName = false
158 },
159 edit(record) {
160 // this.initDictConfig()
161 this.showLoginName = true
162 // 若有id为编辑
163 if (record) {
164 this.$nextTick(() => {
165 this.form = Object.assign({}, record)
166 })
167 }
168 this.visible = true
169 },
170 handleChange(value) {
171 this.form.departmentId = value;
172 },
173 submitForm(submitType) {
174 this.$refs.form.validate((valid) => {
175 if (valid) {
176 let method = ''
177 let url = ''
178 const formData = this.form
179 if (!formData.id) {
180 method = 'post'
181 url = this.dataUrl
182 } else {
183 method = 'put'
184 url = `${this.dataUrl}/${formData.id}`
185 }
186 httpAction(url, formData, method).then((res) => {
187 if (res.status === 1) {
188 this.$message.success({ message: res.message, showClose: true })
189 // this.type 0新增 1编辑
190 if (this.type === 0) {
191 // submitType 1需要关闭页面 0保存&新增暂不关闭页面
192 if (submitType === 1) {
193 this.close()
194 } else {
195 this.resetForm()
196 }
197 } else if (this.type === 1) {
198 this.close()
199 }
200 this.$emit('ok')
201 } else {
202 this.$message.error({ message: res.message, showClose: true })
203 }
204 })
205 } else {
206 console.log('提交错误!!!')
207 return false
208 }
209 })
210 },
211 resetForm() {
212 this.form = {
213 sex: '0'
214 }
215 this.$refs.form.resetFields()
216 },
217 close() {
218 // this.resetForm()
219 this.visible = false;
220 },
221 },
222 };
223 </script>
224 <style scoped lang="scss">
225 .el-form {
226 .el-form-item__content {
227 .el-radio {
228 margin-right: 6px;
229 }
230 }
231 .el-checkbox {
232 line-height: 40px;
233 }
234 .col-pd0 {
235 padding: 0 !important;
236 }
237 }
238 </style>
...@@ -3,450 +3,229 @@ ...@@ -3,450 +3,229 @@
3 <div class="from-clues-header"> 3 <div class="from-clues-header">
4 <el-form ref="ruleForm" :model="form" label-width="100px"> 4 <el-form ref="ruleForm" :model="form" label-width="100px">
5 <el-row class="mb-5"> 5 <el-row class="mb-5">
6
7 <el-col :span="3">
8 <el-select v-model="selectType" placeholder="请选择" class="select">
9 <el-option
10 v-for="item in typeOptions"
11 :key="item.value"
12 :label="item.label"
13 :value="item.value"
14 />
15 </el-select>
16 </el-col>
17 <el-col :span="3">
18 <el-input
19 v-model="queryName"
20 class="selectName"
21 clearable
22 placeholder="请输入"
23 >
24 <el-button
25 slot="append"
26 icon="el-icon-search"
27 @click="searchQuery()"
28 />
29 </el-input>
30 </el-col>
31 <!-- 按钮操作 --> 6 <!-- 按钮操作 -->
32 <el-col :span="6" class="btnColRight"> 7 <el-col :span="2" class="btnColRight">
33 <el-form-item> 8 <el-form-item>
34 <btn nativeType="cz" @click="handleAdd" >添加人员</btn> 9 <btn nativeType="cx" @click="handleAdd">添加人员</btn>
35 <btn nativeType="cx" @click="resetPassword(selectionRows)">重置密码</btn> 10 <!-- <btn nativeType="cx" @click="resetPassword(selectionRows)"
36 <btn nativeType="sb" @click="resetSearch()">重置</btn> 11 >重置密码</btn
12 >
13 <btn nativeType="cx" @click="resetSearch()">重置</btn> -->
37 </el-form-item> 14 </el-form-item>
38 </el-col> 15 </el-col>
39
40 </el-row> 16 </el-row>
41 </el-form> 17 </el-form>
42 </div> 18 </div>
43 <div class="from-clues-content"> 19 <div class="from-clues-content">
44 <vxe-table 20 <lb-table
45 ref="xTree" 21 :page-size="pageData.size"
46 v-loading="loading" 22 :current-page.sync="pageData.current"
47 class="header-bg-type1" 23 :total="pageData.total"
48 :data="tableData" 24 @size-change="handleSizeChange"
49 show-overflow 25 @p-current-change="handleCurrentChange"
50 border 26 :column="tableData.columns"
51 :checkbox-config="{ highlight: true }" 27 :data="tableData.data"
52 :empty-render="{ name: 'NotData' }"
53 highlight-hover-row
54 max-height="90%"
55 @checkbox-all="selectAllEvent"
56 @checkbox-change="selectChangeEvent"
57 >
58 <template #empty>
59 <table-empty />
60 </template>
61 <vxe-table-column
62 type="checkbox"
63 width="36"
64 align="center"
65 fixed="left"
66 />
67 <vxe-table-column
68 field="code"
69 title="工号"
70 width="80"
71 align="left"
72 show-header-overflow="tooltip"
73 show-overflow="tooltip"
74 fixed="left"
75 />
76 <vxe-table-column
77 title="姓名"
78 width="140"
79 align="left"
80 show-header-overflow="tooltip"
81 show-overflow="tooltip"
82 fixed="left"
83 >
84 <template slot-scope="scope">
85 <svg-icon
86 :icon-class="
87 scope.row.sex === '0'
88 ? 'male'
89 : scope.row.sex === '1'
90 ? 'female'
91 : 'secrecy'
92 "
93 />
94 {{ scope.row.name }}
95 </template>
96 </vxe-table-column>
97 <vxe-table-column
98 field="loginName"
99 title="用户名"
100 width="110"
101 align="left"
102 show-header-overflow="tooltip"
103 show-overflow="tooltip"
104 fixed="left"
105 />
106 <vxe-table-column
107 title="负责人"
108 align="left"
109 show-header-overflow="tooltip"
110 show-overflow="tooltip"
111 > 28 >
112 <template slot-scope="scope"> 29 </lb-table>
113 <i v-if="scope.row.isDuty" class="el-icon-check" />
114 </template>
115 </vxe-table-column>
116 <vxe-table-column
117 field="departmentName"
118 title="所属部门"
119 align="left"
120 width="140"
121 min-width="140"
122 show-header-overflow="tooltip"
123 show-overflow="tooltip"
124 />
125 <vxe-table-column
126 field="jobLevel"
127 :formatter="formatterjobLevel"
128 title="职位"
129 align="left"
130 width="140"
131 min-width="140"
132 show-header-overflow="tooltip"
133 show-overflow="tooltip"
134 />
135 <vxe-table-column
136 field="mobilePhone"
137 title="电话"
138 width="140"
139 show-header-overflow="tooltip"
140 show-overflow="tooltip"
141 align="left"
142 />
143 <vxe-table-column title="状态" width="50">
144 <template scope="scope">
145 <el-switch
146 v-model="scope.row.switch"
147 class="switch"
148 active-color="#32BAD4"
149 inactive-color="#B1B9C5"
150 active-text="启"
151 inactive-text="禁"
152 @change="changeStatus(scope.row)"
153 />
154 </template>
155 </vxe-table-column>
156 <vxe-table-column
157 title="排序"
158 width="148"
159 min-width="148"
160 align="left"
161 fixed="right"
162 >
163 <template #header>
164 <p class="ml8">排序</p>
165 </template>
166 <template slot-scope="scope">
167 <sort-table
168 :scope-data="scope"
169 :sort-url="tableUrl"
170 @sortOk="getTableList"
171 />
172 </template>
173 </vxe-table-column>
174 <vxe-table-column
175 title="操作"
176 width="148"
177 min-width="148"
178 align="left"
179 fixed="right"
180 >
181 <template #header>
182 <p class="ml8">操作</p>
183 </template>
184 <template slot-scope="scope">
185 <el-button type="text" size="small">
186 <el-tooltip
187 class="item"
188 effect="dark"
189 content="解锁"
190 placement="top"
191 >
192 <i
193 class="icon-platform-unlock iconfont"
194 @click="updateLock(scope.row.id, scope.row.name)"
195 />
196 </el-tooltip>
197 <el-tooltip
198 class="item"
199 effect="dark"
200 content="重置"
201 placement="top"
202 >
203 <i
204 class="icon-platform-reset iconfont"
205 @click="resetPassword(scope.row.id)"
206 />
207 </el-tooltip>
208 <el-tooltip
209 class="item"
210 effect="dark"
211 content="修改"
212 placement="top"
213 >
214 <i
215 class="icon-platform-edit iconfont"
216 @click="handleEdit(scope.row)"
217 />
218 </el-tooltip>
219 <el-tooltip
220 class="item"
221 effect="dark"
222 content="删除"
223 placement="top"
224 >
225 <i
226 class="icon-platform-delete iconfont"
227 @click="handleDelete(scope.row.id, scope.row.name)"
228 />
229 </el-tooltip>
230 </el-button>
231 </template>
232 </vxe-table-column>
233 </vxe-table>
234 </div> 30 </div>
31 <edit-dialog ref="dialogForm" />
235 </div> 32 </div>
236 </template> 33 </template>
237 <script> 34 <script>
238 // 定时任务 35 // 定时任务
239 36 import data from "./data";
37 import sjsbTask from "@/api/sjsbTask.js";
38 import tableMixin from "@/mixins/tableMixin.js";
39 import EditDialog from "./edit-dialog.vue";
240 export default { 40 export default {
241 name: "users", 41 name: "menus",
242 components: {}, 42 mixins: [tableMixin],
43 components: {
44 EditDialog,
45 },
243 data() { 46 data() {
244 return { 47 return {
245 title: '', 48 taskData: null,
49 form: {
50 job_name: "",
51 currentPage: 1,
52 },
246 queryParam: {}, 53 queryParam: {},
247 selectType: '0', 54 selectType: "0",
248 queryName: '', 55 queryName: "",
249 organizationId: '', // 组织机构ID 56 organizationId: "", // 组织机构ID
250 departmentId: '', // 部门ID 57 departmentId: "", // 部门ID
251 departmentList: [], // 部门列表 58 departmentList: [], // 部门列表
252 levelList: [], // 职务级别 59 levelList: [], // 职务级别
253 tableData: [], 60 tableData: [],
254 sexList: [], 61 sexList: [],
255 typeOptions: [ 62 typeOptions: [
256 { 63 {
257 value: '0', 64 value: "0",
258 label: '姓名' 65 label: "姓名",
259 }, 66 },
260 { 67 {
261 value: '1', 68 value: "1",
262 label: '工号' 69 label: "工号",
263 }, 70 },
264 { 71 {
265 value: '2', 72 value: "2",
266 label: '部门' 73 label: "部门",
267 }, 74 },
268 { 75 {
269 value: '3', 76 value: "3",
270 label: '机构' 77 label: "机构",
271 } 78 },
272 ], 79 ],
273 // tableUrl: api.users, // 接口地址,
274 80
275 pageData: { 81 selectionList: [],
276 total: 0, 82 tableData: {
277 pageSize: 15, 83 columns: [
278 current: 1, 84 {
279 }, 85 label: "序号",
280 }; 86 type: "index",
87 width: "50",
88 index: this.indexMethod,
281 }, 89 },
282 created() { 90 ]
283 // 获取区域和组织机构id 91 .concat(data.columns())
284 eventBus.$on('getSelectedId', (res) => { 92 .concat([
285 if (!res.organizationId) { 93 {
286 this.tableData = [] 94 label: "排序",
287 this.organizationId = '' 95 width: 380,
288 this.departmentId = '' 96 render: (h, scope) => {
289 } else { 97 return <div></div>;
290 this.organizationId = res.organizationId
291 this.departmentId = res.departmentId
292 this.getTableList()
293 this.getDepartData()
294 }
295 this.initDictConfig()
296 })
297 }, 98 },
298 updated() {
299 this.tableData.forEach((element) => {
300 element.switch = element.status === 'ACTIVE'
301 })
302 }, 99 },
303 methods: { 100 {
304 initDictConfig() { 101 label: "操作",
305 getDictItems('XB').then((res) => { 102 width: 380,
306 if (res.status === 1) { 103 render: (h, scope) => {
307 this.sexList = res.content 104 return (
308 } else { 105 <div>
309 this.$message.error({ message: res.message, showClose: true }) 106 <el-button
310 } 107 type="text"
311 }) 108 size="mini"
312 getDictItems('ZWJB').then((res) => { 109 icon="el-icon-edit"
313 if (res.status === 1) { 110 onClick={() => {
314 this.levelList = res.content 111 this.updateLock(scope.row, scope.row.name);
315 } else { 112 }}
316 this.$message.error({ message: res.message, showClose: true }) 113 >
317 } 114 解锁
318 }) 115 </el-button>
319 }, 116 <el-button
320 getDepartData() { 117 type="text"
321 getDeptsByIdAction(this.organizationId).then((res) => { 118 size="mini"
322 if (res.status === 1) { 119 icon="el-icon-video-pause"
323 this.departmentList = res.content 120 onClick={() => {
324 } else { 121 this.resetPassword(scope.row.id);
325 this.$message.error({ message: res.message, showClose: true }) 122 }}
326 } 123 >
327 }) 124 重置
125 </el-button>
126 <el-button
127 type="text"
128 size="mini"
129 icon="el-icon-edit"
130 onClick={() => {
131 this.handleEdit(scope.row);
132 }}
133 >
134 修改
135 </el-button>
136 <el-button
137 type="text"
138 size="mini"
139 icon="el-icon-delete"
140 style="color:#F56C6C"
141 onClick={() => {
142 this.handleDelete(scope.row.id, scope.row.name);
143 }}
144 >
145 删除
146 </el-button>
147 </div>
148 );
328 }, 149 },
329 getTableList() {
330 this.loading = true
331 this.queryParam = {
332 organizationId: this.organizationId,
333 departmentId: this.departmentId
334 }
335 getUserList(this.queryParam).then((res) => {
336 if (res.status === 1) {
337 this.loading = false
338 this.tableData = res.content
339 } else {
340 this.$message.error({ message: res.message, showClose: true })
341 }
342 })
343 }, 150 },
344 // 查询 151 ]),
345 searchQuery() { 152 data: [],
346 switch (this.selectType) {
347 case '0':
348 this.queryParam.type = 'NAME'
349 break
350 case '1':
351 this.queryParam.type = 'CODE'
352 break
353 case '2':
354 this.queryParam.type = 'DEPARTMENT'
355 break
356 case '3':
357 this.queryParam.type = 'ORGANIZATION'
358 break
359 default:
360 break
361 }
362 this.queryParam.typeValue = this.queryName
363 getUserList(this.queryParam).then((res) => {
364 if (res.status === 1) {
365 this.tableData = res.content
366 } else {
367 this.$message.error({ message: res.message, showClose: true })
368 }
369 })
370 }, 153 },
371 // 重置搜索 154 pageData: {
372 resetSearch() { 155 total: 5,
373 this.selectType = '0' 156 pageSize: 15,
374 this.queryName = '' 157 current: 1,
375 this.queryParam = {
376 organizationId: this.organizationId,
377 departmentId: this.departmentId
378 }
379 this.getTableList()
380 }, 158 },
381 // 性别 159 };
382 formatterSex({ cellValue }) {
383 if (this.sexList.length !== 0) {
384 if (cellValue !== null) {
385 const sex = this.sexList.find((item) => item.value === cellValue).name
386 return sex
387 } else {
388 return cellValue
389 }
390 }
391 }, 160 },
392 // 职务级别 161 methods: {
393 formatterjobLevel({ cellValue }) { 162 handleAdd() {
394 if (this.levelList.length !== 0) { 163 this.taskData = null;
395 if (cellValue) { 164 this.$refs.dialogForm.add();
396 const jobLevel = this.levelList.find( 165 this.$refs.dialogForm.title = "添加";
397 (item) => item.value === cellValue
398 ).name
399 return jobLevel
400 } else {
401 return cellValue
402 }
403 }
404 }, 166 },
405 // 删除 167 featchData() {
406 handleDelete(id, content) { 168 this.tableData.data = [
407 this.$confirm(deleteDomStr(content), '执行确认', { 169 {
408 dangerouslyUseHTMLString: true, 170 id: "6a269fa4-49ee-40ed-be72-302ebdf7b9d6",
409 customClass: 'customer-delete', 171 name: "组件开发模板测试用户",
410 confirmButtonText: '确定', 172 sort: 67,
411 cancelButtonText: '取消', 173 loginName: "wgs-template-test",
412 type: 'warning' 174 email: null,
413 }) 175 lastLoginTime: null,
414 .then(() => { 176 mobilePhone: null,
415 deleteAction(`${api.users}/${id}`).then((res) => { 177 isLocked: false,
416 if (res.status === 1) { 178 status: "ACTIVE",
417 this.$message.success({ message: res.message, showClose: true }) 179 passwordChangeTime: "2022-06-29T01:59:18.123+0000",
418 } else { 180 idCard: null,
419 this.$message.error({ message: res.message, showClose: true }) 181 departmentId: "dcce05ff-7747-4c19-b31f-c018ec8d8f0c",
420 } 182 departmentName: "科室一",
421 this.getTableList() 183 organizationId: "e9e830f0-38f4-4fb2-90ad-496c4e1314aa",
422 }) 184 sex: "0",
423 }) 185 isDuty: null,
424 .catch(() => {}) 186 code: "adfasfd",
187 jobLevel: null,
188 telephone: null,
189 address: null,
190 _X_ROW_KEY: "row_42",
191 switch: true,
425 }, 192 },
426 // 修改状态 193 {
427 changeStatus(row) { 194 id: "acebbaf3-81d0-4b0f-a426-feafa7ea1bed",
428 this.$confirm('确定要修改状态吗?', '提示', { 195 name: "饿肚肚",
429 customClass: 'customer-update', 196 sort: 36,
430 confirmButtonText: '确定', 197 loginName: "吃饭",
431 cancelButtonText: '取消', 198 email: null,
432 type: 'warning' 199 lastLoginTime: null,
433 }) 200 mobilePhone: null,
434 .then(() => { 201 isLocked: false,
435 const status = row.status === 'ACTIVE' ? 'INACTIVE' : 'ACTIVE' 202 status: "ACTIVE",
436 const id = row.id 203 passwordChangeTime: "2021-08-24T02:04:39.132+0000",
437 updateStatus(id, status).then((res) => { 204 idCard: "43423441242134 ",
438 if (res.status === 1) { 205 departmentId: "dcce05ff-7747-4c19-b31f-c018ec8d8f0c",
439 this.$message.success({ message: res.message, showClose: true }) 206 departmentName: "科室一",
440 this.getTableList() 207 organizationId: "e9e830f0-38f4-4fb2-90ad-496c4e1314aa",
441 } else { 208 sex: null,
442 this.$message.error({ message: res.message, showClose: true }) 209 isDuty: null,
443 } 210 code: "2323",
444 }) 211 jobLevel: null,
445 }) 212 telephone: null,
446 .catch((err) => { 213 address: null,
447 console.log({ err }) 214 _X_ROW_KEY: "row_43",
448 }) 215 switch: true,
216 }
217 ];
449 }, 218 },
219 // 重置搜索
220 // resetSearch() {
221 // this.selectType = "0";
222 // this.queryName = "";
223 // this.queryParam = {
224 // organizationId: this.organizationId,
225 // departmentId: this.departmentId
226 // }
227 // },
228
450 // 更新用户解锁状态 229 // 更新用户解锁状态
451 updateLock(id, name) { 230 updateLock(id, name) {
452 this.$confirm( 231 this.$confirm(
...@@ -456,44 +235,44 @@ export default { ...@@ -456,44 +235,44 @@ export default {
456 <span >无法恢复</span> 235 <span >无法恢复</span>
457 </p> 236 </p>
458 </div>`, 237 </div>`,
459 '执行确认', 238 "执行确认",
460 { 239 {
461 dangerouslyUseHTMLString: true, 240 dangerouslyUseHTMLString: true,
462 customClass: 'customer-delete', 241 customClass: "customer-delete",
463 confirmButtonText: '确定', 242 confirmButtonText: "确定",
464 cancelButtonText: '取消', 243 cancelButtonText: "取消",
465 type: 'warning' 244 type: "warning",
466 } 245 }
467 ) 246 )
468 .then(() => { 247 .then(() => {
469 updateLock(id).then((res) => { 248 // updateLock(id).then((res) => {
470 if (res.status === 1) { 249 // if (res.status === 1) {
471 this.$message.success({ message: res.message, showClose: true }) 250 // this.$message.success({ message: res.message, showClose: true })
472 this.getTableList() 251 // this.getTableList()
473 } else { 252 // } else {
474 this.$message.error({ message: res.message, showClose: true }) 253 // this.$message.error({ message: res.message, showClose: true })
475 } 254 // }
476 }) 255 // })
477 }) 256 })
478 .catch(() => {}) 257 .catch(() => {});
479 }, 258 },
480 // 重置用户密码 259 // 重置用户密码
481 resetPassword(data) { 260 resetPassword(data) {
482 const ids = [] 261 const ids = [];
483 if (data instanceof Array) { 262 if (data instanceof Array) {
484 data.forEach((item) => { 263 data.forEach((item) => {
485 ids.push(item.id) 264 ids.push(item.id);
486 }) 265 });
487 } else { 266 } else {
488 ids.push(data) 267 ids.push(data);
489 } 268 }
490 console.log(ids, 'ids') 269 console.log(ids, "ids");
491 if (ids.length === 0) { 270 if (ids.length === 0) {
492 this.$message({ 271 this.$message({
493 message: '请选择需要重置密码的用户!', 272 message: "请选择需要重置密码的用户!",
494 showClose: true 273 showClose: true,
495 }) 274 });
496 return 275 return;
497 } 276 }
498 this.$confirm( 277 this.$confirm(
499 `<div class="customer-message-wrapper"> 278 `<div class="customer-message-wrapper">
...@@ -502,85 +281,55 @@ export default { ...@@ -502,85 +281,55 @@ export default {
502 <span >无法恢复</span> 281 <span >无法恢复</span>
503 </p> 282 </p>
504 </div>`, 283 </div>`,
505 '执行确认', 284 "执行确认",
506 { 285 {
507 dangerouslyUseHTMLString: true, 286 dangerouslyUseHTMLString: true,
508 customClass: 'customer-delete', 287 customClass: "customer-delete",
509 confirmButtonText: '确定', 288 confirmButtonText: "确定",
510 cancelButtonText: '取消', 289 cancelButtonText: "取消",
511 type: 'warning' 290 type: "warning",
512 } 291 }
513 ) 292 )
514 .then(() => { 293 .then(() => {
515 resetPassword(ids).then((res) => { 294 // resetPassword(ids).then((res) => {
516 if (res.status === 1) { 295 // if (res.status === 1) {
517 this.$message.success({ message: res.message, showClose: true }) 296 // this.$message.success({ message: res.message, showClose: true })
518 this.getTableList() 297 // this.getTableList()
519 } else { 298 // } else {
520 this.$message.error({ message: res.message, showClose: true }) 299 // this.$message.error({ message: res.message, showClose: true })
521 } 300 // }
301 // })
522 }) 302 })
303 .catch(() => {});
304 },
305 // 修改人员信息
306 handleEdit(row) {
307 this.$refs.dialogForm.edit(row);
308 this.$refs.dialogForm.title = "修改";
309 },
310 // 删除
311 handleDelete(id, content) {
312 this.$confirm("此操将进行删除操作, 是否继续?", "提示", {
313 confirmButtonText: "确定",
314 cancelButtonText: "取消",
315 type: "warning",
523 }) 316 })
524 .catch(() => {}) 317 .then(() => {
318 // deleteAction(`${api.users}/${id}`).then((res) => {
319 // if (res.status === 1) {
320 // this.$message.success({ message: res.message, showClose: true })
321 // } else {
322 // this.$message.error({ message: res.message, showClose: true })
323 // }
324 // this.getTableList()
325 // })
326 })
327 .catch(() => {});
525 }, 328 },
526 // 新增回显
527 reloadTableData() {
528 this.getTableList()
529 }, 329 },
530 showimport() { 330 };
531 this.$refs.leadingIn.import(this.tableUrl, '人员')
532 }
533 }
534 }
535 </script> 331 </script>
536 332 <style scoped lang="scss">
537 <style scoped lang="less"> 333 @import "~@/styles/mixin.scss";
538 .content { 334 @import "~@/styles/public.scss";
539 .top-wrapper { 335 </style>
540 .el-button + .el-button {
541 margin-left: 16px;
542 }
543 .top-wrapper-search {
544 display: inline-block;
545 margin-left: 16px;
546 ::v-deep .el-input,
547 ::v-deep .el-input__inner {
548 height: 32px;
549 }
550 .select {
551 width: 120px;
552 vertical-align: middle;
553 }
554 .selectName {
555 width: 178px;
556 margin: 0 16px;
557 vertical-align: middle;
558 ::v-deep .el-input-group__append {
559 background: #e0eeff;
560 color: #3aa3f8 !important;
561 padding-right: 12px;
562 border-radius: 0;
563 .el-button {
564 padding: 8px 8px;
565 }
566 }
567 }
568 }
569 }
570 .vxe-table {
571 ::v-deep .vxe-body--row {
572 .vxe-body--column:nth-child(3) {
573 text-align: left;
574 }
575 .svg-icon {
576 width: 1.5em;
577 height: 1.5em;
578 vertical-align: middle;
579 margin-left: 5px;
580 }
581 }
582 }
583
584 }
585
586
......