@witlink/usercenter 1.2.39 → 1.2.41

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.
@@ -11,7 +11,7 @@ import { notification, message, Modal } from "ant-design-vue";
11
11
  import en_US from "ant-design-vue/es/locale/en_US";
12
12
  import zh_CN from "ant-design-vue/es/locale/zh_CN";
13
13
  import fr_FR from "ant-design-vue/es/locale/fr_FR";
14
- import { Table, SelectOption, Select, Tree, Input, FormItem, CheckboxGroup, Form, Button, Spin, Col, Divider, Tooltip, Card, Row, ConfigProvider, Textarea, Modal as Modal$1, Drawer, InputSearch, MenuItem, Menu, Dropdown, Checkbox, ListItem, List, Cascader, Avatar, ListItemMeta, Rate, Upload, TabPane, Tabs, InputNumber, Switch, DropdownButton, DatePicker } from "ant-design-vue/es";
14
+ import { Table, SelectOption, Select, Tree, Input, FormItem, CheckboxGroup, Form, Button, Spin, Col, Divider, Tooltip, Card, Row, ConfigProvider, Textarea, Modal as Modal$1, Drawer, InputSearch, MenuItem, Menu, Dropdown, Checkbox, ListItem, List, Cascader, Avatar, ListItemMeta, Rate, Upload, TabPane, Tabs, InputNumber, DropdownButton, Switch, DatePicker } from "ant-design-vue/es";
15
15
  import { useSlots, ref, reactive, onMounted, openBlock, createBlock, mergeProps, createSlots, renderList, unref, withCtx, renderSlot, normalizeProps, guardReactiveProps, defineComponent, watch, createElementBlock, Fragment, createTextVNode, toDisplayString, createCommentVNode, createVNode, createElementVNode, onBeforeMount, computed, resolveComponent, withDirectives, vShow, h, normalizeClass, nextTick, normalizeStyle, onBeforeUnmount, resolveDynamicComponent } from "vue";
16
16
  import * as Icon from "@ant-design/icons-vue";
17
17
  import Icon__default, { AppstoreOutlined, CloseCircleOutlined, CaretDownOutlined, CaretRightOutlined, DownOutlined, ExclamationCircleOutlined, UploadOutlined, PlusOutlined, MinusOutlined, CloudUploadOutlined, FormOutlined, EditOutlined, DeleteOutlined, QuestionCircleOutlined, DownloadOutlined, PrinterOutlined, CheckOutlined, StopOutlined, SolutionOutlined } from "@ant-design/icons-vue";
@@ -2564,6 +2564,9 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
2564
2564
  expandedRowKeys.value.push(record.id);
2565
2565
  }
2566
2566
  };
2567
+ const showMoreOperation = (record) => {
2568
+ return [0, 1].includes(record.type) && (addShow.value || removeShow.value && record.deleteStatus == 0);
2569
+ };
2567
2570
  function buildTree(data) {
2568
2571
  const tree = [];
2569
2572
  const map = {};
@@ -2864,7 +2867,10 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
2864
2867
  [vShow, editShow.value]
2865
2868
  ]),
2866
2869
  withDirectives(createVNode(_component_a_divider, { type: "vertical" }, null, 512), [
2867
- [vShow, record.type == 2 || record.type == 3]
2870
+ [
2871
+ vShow,
2872
+ (record.type == 2 || record.type == 3) && addShow.value && editShow.value
2873
+ ]
2868
2874
  ]),
2869
2875
  withDirectives(createVNode(_component_a_button, {
2870
2876
  type: "link",
@@ -2900,7 +2906,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
2900
2906
  ]
2901
2907
  ]),
2902
2908
  withDirectives(createVNode(_component_a_divider, { type: "vertical" }, null, 512), [
2903
- [vShow, record.type != 3 && record.type != 2]
2909
+ [vShow, showMoreOperation(record)]
2904
2910
  ]),
2905
2911
  withDirectives(createElementVNode("span", null, [
2906
2912
  createVNode(_component_a_dropdown, null, {
@@ -2924,7 +2930,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
2924
2930
  _: 2
2925
2931
  }, 1024)
2926
2932
  ], 512), [
2927
- [vShow, record.branchUpdateFlag == 0]
2933
+ [vShow, record.branchUpdateFlag == 0 && addShow.value]
2928
2934
  ]),
2929
2935
  withDirectives(createElementVNode("div", null, [
2930
2936
  createVNode(_component_a_menu_item, { key: "2" }, {
@@ -3005,7 +3011,7 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
3005
3011
  _: 2
3006
3012
  }, 1024)
3007
3013
  ], 512), [
3008
- [vShow, record.type != 3 && record.type != 2]
3014
+ [vShow, showMoreOperation(record)]
3009
3015
  ])
3010
3016
  ], 512), [
3011
3017
  [vShow, !record.operationPermissions]
@@ -3033,7 +3039,10 @@ const _sfc_main$O = /* @__PURE__ */ defineComponent({
3033
3039
  _: 2
3034
3040
  }, 1024),
3035
3041
  withDirectives(createVNode(_component_a_divider, { type: "vertical" }, null, 512), [
3036
- [vShow, (record.type == 2 || record.type == 3) && addShow.value]
3042
+ [
3043
+ vShow,
3044
+ (record.type == 2 || record.type == 3) && addShow.value && editShow.value
3045
+ ]
3037
3046
  ]),
3038
3047
  createVNode(_component_a_tooltip, { placement: "top" }, {
3039
3048
  title: withCtx(() => [
@@ -12506,14 +12515,18 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
12506
12515
  setup(__props, { emit: __emit }) {
12507
12516
  const emit = __emit;
12508
12517
  const props = __props;
12518
+ const SHOWSYSCODE = ["01", "02", "04"];
12509
12519
  const formRef = ref();
12510
- const loading = ref(true);
12520
+ const loading = ref(false);
12511
12521
  const formData = reactive({
12512
12522
  parentCode: "",
12513
12523
  items: {}
12514
12524
  });
12515
- const form = ref({});
12516
- const dataSource = ref([]);
12525
+ const formState = ref({
12526
+ ["01"]: null,
12527
+ ["02"]: null,
12528
+ ["04"]: null
12529
+ });
12517
12530
  const formItemLayout = {
12518
12531
  labelCol: {
12519
12532
  span: 6,
@@ -12531,44 +12544,37 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
12531
12544
  if (!props.record.code) {
12532
12545
  return;
12533
12546
  }
12547
+ loading.value = true;
12534
12548
  const { result } = await getParameterSearchTypeDetail({
12535
12549
  parentCode: props.record.code
12536
12550
  });
12537
12551
  formData.parentCode = props.record.code;
12538
12552
  loading.value = false;
12539
- result.forEach((item) => {
12540
- var _a;
12541
- item.v2 = item.v2 ? JSON.parse(item.v2) : "";
12542
- if (((_a = item == null ? void 0 : item.v2) == null ? void 0 : _a.field) == "2") {
12543
- item.isChecked = item.v1 == "Y" ? true : false;
12553
+ const obj = {};
12554
+ result == null ? void 0 : result.forEach((item) => {
12555
+ if (SHOWSYSCODE.includes(item.code)) {
12556
+ obj[item.code] = item.v1;
12544
12557
  }
12545
12558
  });
12546
- dataSource.value = result;
12559
+ formState.value = obj;
12547
12560
  };
12548
- const onSubmit = async () => {
12549
- console.log(dataSource.value, "source");
12550
- const itemsData = {};
12551
- dataSource.value.forEach((item) => {
12552
- var _a;
12553
- if (((_a = item == null ? void 0 : item.v2) == null ? void 0 : _a.field) == "2") {
12554
- item.isChecked ? item.v1 == "Y" : item.v1 == "N";
12561
+ const onSubmit = () => {
12562
+ formRef.value && formRef.value.validate().then(async () => {
12563
+ formData.items = JSON.stringify(formState.value);
12564
+ const { result } = await setParameterUpdate(formData);
12565
+ if (result) {
12566
+ emit("ok");
12555
12567
  }
12556
- itemsData[item.code] = item.v1;
12557
12568
  });
12558
- formData.items = JSON.stringify(itemsData);
12559
- const { result } = await setParameterUpdate(formData);
12560
- if (result) {
12561
- emit("ok");
12562
- }
12563
12569
  };
12564
12570
  onMounted(() => {
12565
12571
  initData();
12566
12572
  });
12567
12573
  return (_ctx, _cache) => {
12568
- const _component_a_input = Input;
12569
12574
  const _component_a_input_number = InputNumber;
12570
- const _component_a_switch = Switch;
12571
12575
  const _component_a_form_item = FormItem;
12576
+ const _component_a_select_option = SelectOption;
12577
+ const _component_a_select = Select;
12572
12578
  const _component_a_form = Form;
12573
12579
  const _component_a_button = Button;
12574
12580
  const _component_a_spin = Spin;
@@ -12577,49 +12583,111 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
12577
12583
  default: withCtx(() => [
12578
12584
  createVNode(_component_a_form, {
12579
12585
  class: "form",
12580
- model: form.value,
12586
+ model: formState.value,
12581
12587
  ref_key: "formRef",
12582
12588
  ref: formRef
12583
12589
  }, {
12584
12590
  default: withCtx(() => [
12585
- (openBlock(true), createElementBlock(Fragment, null, renderList(dataSource.value, (item, index2) => {
12586
- return openBlock(), createBlock(_component_a_form_item, mergeProps({
12587
- key: index2,
12588
- label: _ctx.$t("dct.SYS" + item.code),
12589
- ref_for: true
12590
- }, formItemLayout), {
12591
- default: withCtx(() => [
12592
- !(item.v2 instanceof Object) ? (openBlock(), createBlock(_component_a_input, {
12593
- key: 0,
12594
- value: item.v1,
12595
- "onUpdate:value": ($event) => item.v1 = $event
12596
- }, null, 8, ["value", "onUpdate:value"])) : createCommentVNode("v-if", true),
12597
- item.v2 instanceof Object && item.v2.field && item.v2.field == "0" ? (openBlock(), createBlock(_component_a_input, {
12598
- key: 1,
12599
- style: normalizeStyle(
12600
- item.v2.width ? "width:" + item.v2.width + "px" : "width: 100% "
12601
- ),
12602
- maxLength: item.v2.length ? item.v2.length : 100,
12603
- value: item.v1,
12604
- "onUpdate:value": ($event) => item.v1 = $event
12605
- }, null, 8, ["style", "maxLength", "value", "onUpdate:value"])) : createCommentVNode("v-if", true),
12606
- item.v2 instanceof Object && item.v2.field && item.v2.field == "1" ? (openBlock(), createBlock(_component_a_input_number, {
12607
- key: 2,
12608
- style: normalizeStyle(
12609
- item.v2.width ? "width:" + item.v2.width + "px" : "width: 100% "
12610
- ),
12611
- value: item.v1,
12612
- "onUpdate:value": ($event) => item.v1 = $event
12613
- }, null, 8, ["style", "value", "onUpdate:value"])) : createCommentVNode("v-if", true),
12614
- item.v2 instanceof Object && item.v2.field && item.v2.field == "2" ? (openBlock(), createBlock(_component_a_switch, {
12615
- key: 3,
12616
- checked: item.isChecked,
12617
- "onUpdate:checked": ($event) => item.isChecked = $event
12618
- }, null, 8, ["checked", "onUpdate:checked"])) : createCommentVNode("v-if", true)
12619
- ]),
12620
- _: 2
12621
- }, 1040, ["label"]);
12622
- }), 128))
12591
+ createVNode(_component_a_form_item, mergeProps({
12592
+ label: _ctx.$t("dct.SYS01")
12593
+ }, formItemLayout, {
12594
+ name: "01",
12595
+ required: ""
12596
+ }), {
12597
+ default: withCtx(() => [
12598
+ createVNode(_component_a_input_number, {
12599
+ style: { "width": "100%" },
12600
+ id: "inputNumber",
12601
+ value: formState.value["01"],
12602
+ "onUpdate:value": _cache[0] || (_cache[0] = ($event) => formState.value["01"] = $event),
12603
+ min: 1,
12604
+ precision: 0,
12605
+ controls: false
12606
+ }, null, 8, ["value"])
12607
+ ]),
12608
+ _: 1
12609
+ }, 16, ["label"]),
12610
+ createVNode(_component_a_form_item, mergeProps({
12611
+ label: _ctx.$t("dct.SYS02")
12612
+ }, formItemLayout, {
12613
+ name: "02",
12614
+ required: ""
12615
+ }), {
12616
+ default: withCtx(() => [
12617
+ createVNode(_component_a_input_number, {
12618
+ style: { "width": "100%" },
12619
+ id: "inputNumber",
12620
+ value: formState.value["02"],
12621
+ "onUpdate:value": _cache[1] || (_cache[1] = ($event) => formState.value["02"] = $event),
12622
+ min: 1,
12623
+ precision: 0,
12624
+ controls: false
12625
+ }, null, 8, ["value"])
12626
+ ]),
12627
+ _: 1
12628
+ }, 16, ["label"]),
12629
+ createCommentVNode(` <a-form-item :label="$t('dct.SYS03')" v-bind="formItemLayout" name="03" required>\r
12630
+ <a-input-number\r
12631
+ style="width: 100%"\r
12632
+ id="inputNumber"\r
12633
+ v-model:value="formState['03']"\r
12634
+ :min="1"\r
12635
+ :precision="0"\r
12636
+ :controls="false"\r
12637
+ />\r
12638
+ </a-form-item> `),
12639
+ createVNode(_component_a_form_item, mergeProps({
12640
+ label: _ctx.$t("dct.SYS04")
12641
+ }, formItemLayout, {
12642
+ name: "04",
12643
+ required: ""
12644
+ }), {
12645
+ default: withCtx(() => [
12646
+ createCommentVNode(` <a-input-number\r
12647
+ style="width: 100%"\r
12648
+ id="inputNumber"\r
12649
+ v-model:value="formState['04']"\r
12650
+ :min="0"\r
12651
+ :max="3"\r
12652
+ :precision="0"\r
12653
+ :controls="false"\r
12654
+ /> `),
12655
+ createVNode(_component_a_select, {
12656
+ value: formState.value["04"],
12657
+ "onUpdate:value": _cache[2] || (_cache[2] = ($event) => formState.value["04"] = $event),
12658
+ style: { "width": "100%" }
12659
+ }, {
12660
+ default: withCtx(() => [
12661
+ createVNode(_component_a_select_option, { value: "0" }, {
12662
+ default: withCtx(() => _cache[3] || (_cache[3] = [
12663
+ createTextVNode("0")
12664
+ ])),
12665
+ _: 1
12666
+ }),
12667
+ createVNode(_component_a_select_option, { value: "1" }, {
12668
+ default: withCtx(() => _cache[4] || (_cache[4] = [
12669
+ createTextVNode("1")
12670
+ ])),
12671
+ _: 1
12672
+ }),
12673
+ createVNode(_component_a_select_option, { value: "2" }, {
12674
+ default: withCtx(() => _cache[5] || (_cache[5] = [
12675
+ createTextVNode("2")
12676
+ ])),
12677
+ _: 1
12678
+ }),
12679
+ createVNode(_component_a_select_option, { value: "3" }, {
12680
+ default: withCtx(() => _cache[6] || (_cache[6] = [
12681
+ createTextVNode("3")
12682
+ ])),
12683
+ _: 1
12684
+ })
12685
+ ]),
12686
+ _: 1
12687
+ }, 8, ["value"])
12688
+ ]),
12689
+ _: 1
12690
+ }, 16, ["label"])
12623
12691
  ]),
12624
12692
  _: 1
12625
12693
  }, 8, ["model"]),