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 },
...@@ -40,23 +24,31 @@ export default { ...@@ -40,23 +24,31 @@ export default {
40 Chart, 24 Chart,
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,20 +17,17 @@ export default { ...@@ -17,20 +17,17 @@ 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 },
26 methods: { 23 methods: {
27 getDjlxtotal () { 24 getDjlxtotal () {
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
...@@ -4,4 +4,27 @@ ...@@ -4,4 +4,27 @@
4 */ 4 */
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 }
...\ No newline at end of file ...\ No newline at end of file
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 },
27 {
28 prop: "job_group",
29 label: "任务分组"
30 }, 21 },
31 { 22 {
32 label: "状态", 23 prop: "icon",
33 render: (h, scope) => { 24 label: "图标"
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>
...@@ -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>
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 },
27 {
28 prop: "departmentName",
29 label: "所属部门"
26 }, 30 },
27 { 31 {
28 prop: "job_group", 32 prop: "job_group",
29 label: "任务分组" 33 label: "职位"
30 }, 34 },
31 { 35 {
32 label: "状态", 36 prop: "telephone",
33 render: (h, scope) => { 37 label: "电话"
34 return (
35 <div>
36 { this.stateStatus(scope.row.job_status) }
37 </div>
38 )
39 },
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>