cloud-web-corejs 1.0.54-dev.232 → 1.0.54-dev.233

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cloud-web-corejs",
3
3
  "private": false,
4
- "version": "1.0.54-dev.232",
4
+ "version": "1.0.54-dev.233",
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
7
7
  "lint": "eslint --ext .js,.vue src",
@@ -75,7 +75,15 @@
75
75
  },
76
76
  optionItems(){
77
77
  return this.getOptionItems();
78
- }
78
+ },
79
+ fieldModelLabel() {
80
+ let fieldModel = this.fieldModel;
81
+ let optionItems = this.field.options.optionItems;
82
+ let valueField = this.valueField;
83
+ let labelField = this.labelField;
84
+ let optionItem = optionItems.find(item => item[valueField] === fieldModel)
85
+ return optionItem && optionItem[labelField] ? optionItem[labelField] : null;
86
+ },
79
87
  },
80
88
  beforeCreate() {
81
89
  /* 这里不能访问方法和属性!! */
@@ -74,10 +74,10 @@ export default {
74
74
  }
75
75
  },
76
76
  computed: {
77
- labelField(){
77
+ labelField() {
78
78
  return this.field.options.labelKey || "label";
79
79
  },
80
- valueField(){
80
+ valueField() {
81
81
  return this.field.options.valueKey || "value";
82
82
  },
83
83
  allowDefaultFirstOption() {
@@ -86,10 +86,12 @@ export default {
86
86
  fieldModelLabel() {
87
87
  let fieldModel = this.fieldModel;
88
88
  let optionItems = this.field.options.optionItems;
89
- let optionItem = optionItems.find(item => item.value === fieldModel)
90
- return optionItem && optionItem.label ? optionItem.label : null;
89
+ let valueField = this.valueField;
90
+ let labelField = this.labelField;
91
+ let optionItem = optionItems.find(item => item[valueField] === fieldModel)
92
+ return optionItem && optionItem[labelField] ? optionItem[labelField] : null;
91
93
  },
92
- optionItems(){
94
+ optionItems() {
93
95
  return this.getOptionItems();
94
96
  }
95
97
 
@@ -1,4 +1,4 @@
1
- import userDialog from "@base/views/user/user/dialog.vue";
1
+ import userDialog from "@base/views/user/user/form_dialog.vue";
2
2
  import {getJsxBtn} from "@base/views/bd/setting/utils/index";
3
3
  import {getBdEnv} from "@base/api/user";
4
4
 
@@ -77,7 +77,15 @@ modules = {
77
77
  width: 250
78
78
  },
79
79
  {
80
- width: 100,
80
+ title: this.$t1('编辑'),
81
+ field: 'editAuth',
82
+ width: 150,
83
+ slots: {
84
+ default: "switch"
85
+ }
86
+ },
87
+ {
88
+ width: 47,
81
89
  fixed: 'right',
82
90
  title: '',
83
91
  sortable: false,
@@ -8,7 +8,7 @@
8
8
  :visible.sync="showDialog"
9
9
  :modal="false"
10
10
  custom-class="dialog-style list-dialog dialog-checkbox pd_0"
11
- width="500px"
11
+ width="650px"
12
12
  @close="dialogClose"
13
13
  v-el-drag-dialog
14
14
  v-el-dialog-center
@@ -49,7 +49,7 @@
49
49
  </template>
50
50
  <template #switch="{row,column,rowIndex}">
51
51
  <el-switch v-model="row[column.field]" :key="column.field+rowIndex" :active-value="1"
52
- :inactive-value="0" :disabled="column.params.disabled"></el-switch>
52
+ :inactive-value="0"></el-switch>
53
53
  </template>
54
54
  </vxe-grid>
55
55
  </div>
@@ -1,4 +1,4 @@
1
- import userDialog from "@base/views/user/user/dialog.vue";
1
+ import userDialog from "@base/views/user/user/form_dialog.vue";
2
2
  import {getJsxBtn} from "@base/views/bd/setting/utils/index";
3
3
  import {getBdEnv} from "@base/api/user";
4
4
 
@@ -77,7 +77,15 @@ modules = {
77
77
  width: 250
78
78
  },
79
79
  {
80
- width: 100,
80
+ title: this.$t1('编辑'),
81
+ field: 'editAuth',
82
+ width: 150,
83
+ slots: {
84
+ default: "switch"
85
+ }
86
+ },
87
+ {
88
+ width: 47,
81
89
  fixed: 'right',
82
90
  title: '',
83
91
  sortable: false,
@@ -8,7 +8,7 @@
8
8
  :visible.sync="showDialog"
9
9
  :modal="false"
10
10
  custom-class="dialog-style list-dialog dialog-checkbox pd_0"
11
- width="500px"
11
+ width="650px"
12
12
  @close="dialogClose"
13
13
  v-el-drag-dialog
14
14
  v-el-dialog-center
@@ -49,7 +49,7 @@
49
49
  </template>
50
50
  <template #switch="{row,column,rowIndex}">
51
51
  <el-switch v-model="row[column.field]" :key="column.field+rowIndex" :active-value="1"
52
- :inactive-value="0" :disabled="column.params.disabled"></el-switch>
52
+ :inactive-value="0"></el-switch>
53
53
  </template>
54
54
  </vxe-grid>
55
55
  </div>
@@ -1,4 +1,4 @@
1
- import userDialog from "@base/views/user/user/dialog.vue";
1
+ import userDialog from "@base/views/user/user/form_dialog.vue";
2
2
  import {getJsxBtn} from "@base/views/bd/setting/utils/index";
3
3
  import {getBdEnv} from "@base/api/user";
4
4
 
@@ -80,7 +80,15 @@ modules = {
80
80
  width: 250
81
81
  },
82
82
  {
83
- width: 100,
83
+ title: this.$t1('编辑'),
84
+ field: 'editAuth',
85
+ width: 150,
86
+ slots: {
87
+ default: "switch"
88
+ }
89
+ },
90
+ {
91
+ width: 47,
84
92
  fixed: 'right',
85
93
  title: '',
86
94
  sortable: false,
@@ -8,7 +8,7 @@
8
8
  :visible.sync="showDialog"
9
9
  :modal="false"
10
10
  custom-class="dialog-style list-dialog dialog-checkbox pd_0"
11
- width="500px"
11
+ width="650px"
12
12
  @close="dialogClose"
13
13
  v-el-drag-dialog
14
14
  v-el-dialog-center
@@ -49,7 +49,7 @@
49
49
  </template>
50
50
  <template #switch="{row,column,rowIndex}">
51
51
  <el-switch v-model="row[column.field]" :key="column.field+rowIndex" :active-value="1"
52
- :inactive-value="0" :disabled="column.params.disabled"></el-switch>
52
+ :inactive-value="0"></el-switch>
53
53
  </template>
54
54
  </vxe-grid>
55
55
  </div>
@@ -0,0 +1,158 @@
1
+ <template>
2
+ <el-dialog
3
+ :title="$t1('用户列表')"
4
+ :append-to-body="true"
5
+ :modal-append-to-body="true"
6
+ :close-on-click-modal="falseValue"
7
+ :visible.sync="showDialog"
8
+ :modal="falseValue"
9
+ custom-class="dialog-style list-dialog dialog-checkbox pd_0"
10
+ width="1200px"
11
+ @close="dialogClose"
12
+ v-el-drag-dialog
13
+ v-el-dialog-center
14
+ >
15
+ <div class="cont" style="height:65vh">
16
+ <vxe-grid
17
+ class="is-pointer"
18
+ ref="table-m1"
19
+ v-bind="vxeOption"
20
+ @resizable-change="$vxeTableUtil.onColumnWitchChange"
21
+ @custom="$vxeTableUtil.customHandle"
22
+ @checkbox-change="addDataTable"
23
+ @checkbox-all="checkAll"
24
+ @cell-dblclick="checkWithSubmit"
25
+ >
26
+ <template #form>
27
+ <div class="clearfix screen-btns">
28
+ <div class="fr">
29
+ <vxe-button icon="el-icon-brush" class="button-sty" @click="resetEvent" type="text" status="primary"
30
+ plain>{{ $t1('重置') }}
31
+ </vxe-button>
32
+ <vxe-button status="warning" icon="el-icon-search" class="button-sty" @click="searchEvent">
33
+ {{ $t1('搜索') }}
34
+ </vxe-button>
35
+ </div>
36
+ </div>
37
+ <vxe-form class="screen-box" title-width="92px" title-align="right" :data="formData" @submit="searchEvent"
38
+ @reset="resetEvent">
39
+ <vxe-form-item :title="$t1('登录名')+':'" field="loginAccount">
40
+ <template v-slot>
41
+ <el-input v-model="formData.loginAccount" size="small" clearable/>
42
+ </template>
43
+ </vxe-form-item>
44
+ <vxe-form-item :title="$t1('姓名')+':'" field="nickName">
45
+ <template v-slot>
46
+ <el-input v-model="formData.nickName" size="small" clearable/>
47
+ </template>
48
+ </vxe-form-item>
49
+ <vxe-button type="submit" @click="searchEvent" v-show="false"></vxe-button>
50
+ </vxe-form>
51
+ </template>
52
+ </vxe-grid>
53
+ </div>
54
+ <label id="labBtn" class="transverse">
55
+ <div class="icon">
56
+ <i class="el-icon-more"></i>
57
+ <i class="el-icon-more"></i>
58
+ </div>
59
+ </label>
60
+ <div class="multipleChoice">
61
+ <el-tooltip :enterable="false" effect="dark" :content="$t1('全部删除')" placement="top"><a
62
+ class="allDel icon-quanbushanchu" @click="clearChecked()"></a></el-tooltip>
63
+ <div class="list">
64
+ <div class="item" v-for="(checkRow, index) in checkRows" :key="index">
65
+ <p>{{ getCheckLabel(checkRow,'nickName') }}</p>
66
+ <a class="el-icon-close" @click="clearTable1Select(index)"></a>
67
+ </div>
68
+ </div>
69
+ </div>
70
+ <span slot="footer" class="dialog-footer">
71
+ <span class="fl tips" v-if="!selectMulti">{{ $t1('注:双击确认选择(单选)') }}</span>
72
+ <el-button type="primary" plain class="button-sty" @click="dialogClose">
73
+ <i class="el-icon-close el-icon"></i>
74
+ {{ $t1('取 消') }}
75
+ </el-button>
76
+ <el-button type="primary" @click="dialogPrimary" class="button-sty">
77
+ <i class="el-icon-check el-icon"></i>
78
+ {{ $t1('确 定') }}
79
+ </el-button>
80
+ </span>
81
+ </el-dialog>
82
+ </template>
83
+
84
+ <script>
85
+ import {selectDialogMixins} from '@base/mixins/selectDialog/index.js';
86
+
87
+ export default {
88
+ name: 'userDialog',
89
+ props: ['visiable', 'multi', 'rows', 'param'],
90
+ mixins: [selectDialogMixins],
91
+ created() {
92
+ this.initSetting();
93
+ if (this.param) {
94
+ if (this.param.userType !== null) {
95
+ this.userType = this.param.userType;
96
+ }
97
+ }
98
+ },
99
+ mounted() {
100
+ this.initTableM1();
101
+ },
102
+ data() {
103
+ var that = this;
104
+ return {
105
+ showDialog: true,
106
+ falseValue: false,
107
+ userType: 0,
108
+ formData: {
109
+ saleOrgId: '',
110
+ saleOrgName: ''
111
+ },
112
+ selectMulti: true,
113
+ vxeOption: {}
114
+ };
115
+ },
116
+ methods: {
117
+ initTableM1() {
118
+ var that = this;
119
+ let tableOption = {
120
+ vue: that,
121
+ tableRef: 'table-m1',
122
+ tableName: 'user_user_form_dialog-m1',
123
+ path: USER_PREFIX + '/user/listCurrentPage',
124
+ param: () => {
125
+ // this.formData.userType = this.userType;
126
+ return {
127
+ enabled: true,
128
+ ...this.formData,
129
+ ...this.param
130
+ }
131
+ },
132
+ config: {
133
+ checkboxConfig: {
134
+ checkStrictly: true,
135
+ showHeader: this.selectMulti,
136
+ trigger: 'row'
137
+ }
138
+ },
139
+ columns: [
140
+ {type: 'checkbox', width: 50, resizable: false, fixed: 'left'},
141
+ {title: this.$t1('登录名'), field: 'loginAccount', width: 250, fixed: 'left'},
142
+ {field: 'nickName', title: this.$t1('姓名'), width: 150},
143
+ {field: 'companyNames', title: this.$t1('所属组织'), width: 250},
144
+ {
145
+ width: 47,
146
+ fixed: 'right',
147
+ title: '',
148
+ sortable: false
149
+ }
150
+ ]
151
+ };
152
+ this.$vxeTableUtil.initVxeTable(tableOption).then(opts => {
153
+ that.vxeOption = opts;
154
+ });
155
+ }
156
+ }
157
+ };
158
+ </script>