kz-ui-base 1.0.58 → 1.0.60

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.
@@ -48,12 +48,12 @@
48
48
  <script>
49
49
  import { addEntity, updateEntity } from "../../../api/common/common";
50
50
 
51
- // import FormColumns from "@components/customForm/formColumns";
51
+ import FormColumns from "@srcComponents/customForm/formColumns";
52
52
 
53
53
  export default {
54
54
  name: "EditDialog",
55
55
  components: {
56
- // FormColumns,
56
+ FormColumns,
57
57
  },
58
58
  props: {
59
59
  //微服务模块名称
@@ -69,6 +69,38 @@
69
69
  placeholder="请选择"
70
70
  />
71
71
  </el-form-item>
72
+
73
+ <el-form-item
74
+ v-else-if="setting.inputDropdown"
75
+ class="selectwidth"
76
+ :label="column.text"
77
+ :prop="column.property"
78
+ >
79
+ <el-popover
80
+ v-model="visible"
81
+ trigger="click"
82
+ popper-class="select-input"
83
+ placement="bottom"
84
+ width="400"
85
+ >
86
+ <div class="container">
87
+ <div
88
+ class="item"
89
+ v-for="(item, index) in items"
90
+ :key="index"
91
+ @click="chooseItem(item)"
92
+ >
93
+ {{ item.text }}
94
+ </div>
95
+ </div>
96
+ <el-input
97
+ slot="reference"
98
+ v-model="input"
99
+ placeholder="请输入内容"
100
+ @input="inputChange"
101
+ ></el-input>
102
+ </el-popover>
103
+ </el-form-item>
72
104
  <el-form-item
73
105
  v-else
74
106
  class="selectwidth"
@@ -122,7 +154,7 @@ import {
122
154
  Emit,
123
155
  Mixins,
124
156
  } from "vue-property-decorator";
125
- import { listEntity, ajaxUrl } from "kz-ui-base/common/src/api/common/common";
157
+ import { listEntity, ajaxUrl } from "../../../../common/src/api/common/common";
126
158
  import Treeselect from "@riophae/vue-treeselect";
127
159
  import "@riophae/vue-treeselect/dist/vue-treeselect.css";
128
160
  import {
@@ -169,6 +201,8 @@ export default class dropDownList extends Vue {
169
201
  private remote = false;
170
202
  private formatKeyValue = false;
171
203
  private itemList = [];
204
+ input = "";
205
+ visible = false;
172
206
  //查询返回的数组
173
207
  objList = [];
174
208
  // 列表查询参数
@@ -256,6 +290,9 @@ export default class dropDownList extends Vue {
256
290
  if (this.setting.parameter) {
257
291
  this.queryParams = { ...this.queryParams, ...this.setting.parameter };
258
292
  }
293
+ if (this.setting.inputDropdown) {
294
+ this.input = this.entity[this.column.property];
295
+ }
259
296
  if (this.setting.searchRules) {
260
297
  this.hasDependence = false;
261
298
  for (var rule of this.setting.searchRules) {
@@ -833,5 +870,49 @@ export default class dropDownList extends Vue {
833
870
  children: node.children,
834
871
  };
835
872
  }
873
+ chooseItem(item) {
874
+ this.input = item.text;
875
+ this.visible = false;
876
+ this.entity[this.column.property] = item.value;
877
+ this.$emit("change", {
878
+ property: this.column.property,
879
+ value: item.value,
880
+ data: this.entity,
881
+ column: this.column,
882
+ });
883
+ // this.$emit('update:inputValue', item[this.selectObj.value])
884
+ }
885
+ inputChange() {
886
+ this.visible = false;
887
+ this.entity[this.column.property] = this.input;
888
+ this.$emit("change", {
889
+ property: this.column.property,
890
+ value: this.input,
891
+ data: this.entity,
892
+ column: this.column,
893
+ });
894
+ }
836
895
  }
837
896
  </script>
897
+ <style lang="scss" scoped>
898
+ .container {
899
+ margin-top: 12px;
900
+ overflow: auto;
901
+ min-width: 192.5px;
902
+ max-height: 500px;
903
+ }
904
+ .item {
905
+ cursor: pointer;
906
+ padding: 0 20px;
907
+ height: 34px;
908
+ line-height: 34px;
909
+ &:hover {
910
+ background: #f5f7fa;
911
+ }
912
+ }
913
+ </style>
914
+ <style>
915
+ .select-input {
916
+ padding: 6px 0 !important;
917
+ }
918
+ </style>
@@ -1045,8 +1045,39 @@ import WfDialog from "@/components/base/dialog/wfDialog.vue";
1045
1045
 
1046
1046
  import { getToken } from "@utils/auth";
1047
1047
  import _ from "lodash";
1048
+ import KZ_DropDownList from "@srcComponents/customForm/dropDownList.vue";
1049
+ import KZ_TextBox from "@srcComponents/customForm/textBox.vue";
1050
+ import EditDialog from "@components/base/dialog/editDialog.vue";
1051
+ import KZ_CheckBox from "@srcComponents/customForm/checkBox.vue";
1052
+ import KZ_DatePicker from "@srcComponents/customForm/datePicker.vue";
1053
+ import KZ_Switch from "@srcComponents/customForm/switch.vue";
1054
+ import KZ_UploadButton from "@srcComponents/customForm/uploadButton.vue";
1055
+ import KZ_TextArea from "@srcComponents/customForm/textarea.vue";
1056
+ import KZ_Cascader from "@srcComponents/customForm/cascader.vue";
1057
+ import KZ_Radio from "@srcComponents/customForm/radio.vue";
1058
+ import UploadDialog from "@srcComponents/customForm/uploadDialog.vue";
1059
+ import PrintDialog from "@srcComponents/customForm/printDialog.vue";
1060
+ import KZ_Lookup from "@srcComponents/customForm/lookup.vue";
1048
1061
  @Component({
1049
- components: {},
1062
+ components: {
1063
+ // TableDialog,
1064
+ // Treeselect,
1065
+ EditDialog,
1066
+ UploadDialog,
1067
+ PrintDialog,
1068
+ KZ_DropDownList,
1069
+ KZ_TextBox,
1070
+ KZ_Cascader,
1071
+ KZ_CheckBox,
1072
+ // KZ_ColorPicker,
1073
+ KZ_DatePicker,
1074
+ KZ_Switch,
1075
+ // KZ_Upload,
1076
+ KZ_TextArea,
1077
+ KZ_UploadButton,
1078
+ KZ_Radio,
1079
+ KZ_Lookup,
1080
+ },
1050
1081
  })
1051
1082
  export default class listBasePage extends Vue {
1052
1083
  @Prop()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kz-ui-base",
3
- "version": "1.0.58",
3
+ "version": "1.0.60",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {