Просмотр исходного кода

Merge branch 'master' of http://192.168.100.32:3000/fanfan/xt-front

fan 2 лет назад
Родитель
Сommit
dded47ff17

+ 69 - 0
src/api/biz/management/complication.ts

@@ -0,0 +1,69 @@
+import { defHttp } from '/@/utils/http/axios';
+enum Api {
+  getComplicationList = '/biz/sys/complication/query/page',
+  complicationAdd = '/biz/sys/complication/add',
+  complicationEdit = '/biz/sys/complication/edit',
+  complicationById = '/biz/sys/complication/detail',
+  complicationDelById = '/biz/sys/complication/removeByIds',
+  complicationExplad = '/biz/sys/complicationExplain/query/list',
+  noteFieldList = '/biz/sys/complication/field/query/list',
+  addComplicationExplain = '/biz/sys/complicationExplain/add',
+  complicationExplainById = '/biz/sys/complicationExplain/detail',
+  complicationExplainEdit = '/biz/sys/complicationExplain/edit',
+  perComplicationExplain = '/biz/sys/complication/field/preview',
+  complicationExplainDel = '/biz/sys/complicationExplain/removeByIds',
+  complicationExport = '/biz/sys/complication/export',
+}
+
+export const getComplicationList = (params?: object) => {
+  return defHttp.post({ url: Api.getComplicationList, params: params });
+};
+
+export const complicationAdd = (params?: object) => {
+  return defHttp.post({ url: Api.complicationAdd, params: params });
+};
+
+export const complicationEdit = (params?: object) => {
+  return defHttp.post({ url: Api.complicationEdit, params: params });
+};
+
+export const complicationById = (id?: string | number, params?: object) => {
+  return defHttp.get({ url: Api.complicationById + '/' + id, params: params });
+};
+
+export const complicationDelById = (params?: object) => {
+  return defHttp.post({ url: Api.complicationDelById, params: params });
+};
+
+export const getNoteList = (params?: object) => {
+  return defHttp.post({ url: Api.complicationExplad + '/' + params.ids });
+};
+
+export const getNoteFieldList = () => {
+  return defHttp.post({ url: Api.noteFieldList });
+};
+
+export const addComplicationExplain = (params?: object) => {
+  return defHttp.post({ url: Api.addComplicationExplain, params: params });
+};
+
+export const getComplicationExplainById = (id?: string | number, params?: object) => {
+  return defHttp.get({ url: Api.complicationExplainById + '/' + id, params: params });
+};
+
+export const editComplicationExplain = (params?: object) => {
+  return defHttp.post({ url: Api.complicationExplainEdit, params: params });
+};
+
+export const perComplicationExplain = (context: string) => {
+  console.log(context);
+  return defHttp.post({ url: Api.perComplicationExplain, data: context });
+};
+
+export const complicationExplainDelById = (params?: object) => {
+  return defHttp.post({ url: Api.complicationExplainDel, data: params });
+};
+
+export const complicationExport = (params?: object) => {
+  return defHttp.post({ url: Api.complicationExport, data: params });
+};

+ 4 - 1
src/components/XTCard/src/DescCard.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="card">
-    <div class="card-head">
+    <div class="card-head" v-if="showHead">
       <div class="card-head_label"> {{ title }}</div>
       <div class="flex card-head_value">
         <slot name="headRight" />
@@ -63,6 +63,8 @@
     id?: string;
     // 标题
     title: string;
+
+    showHead: boolean;
     // icon
     icon?: string | unknown;
     iconType?: string;
@@ -101,6 +103,7 @@
   }
   const props = withDefaults(defineProps<Props>(), {
     title: '标题',
+    showHead: true,
     wrapSpan: 6,
     type: '',
     data: () => [],

+ 71 - 0
src/views/biz/management/complication/complicationFormModal.vue

@@ -0,0 +1,71 @@
+<template>
+  <BasicModal
+    v-bind="$attrs"
+    destroyOnClose
+    @register="registerModal"
+    :title="getTitle"
+    @ok="handleSubmit"
+  >
+    <BasicForm @register="registerForm" />
+  </BasicModal>
+</template>
+<script lang="ts" setup>
+  import { ref, computed, unref } from 'vue';
+  import { BasicModal, useModalInner } from '/@/components/Modal';
+  import { BasicForm, useForm } from '/@/components/Form';
+  import { useMessage } from '/@/hooks/web/useMessage';
+  import { complicationFormSchema } from './data';
+
+  import {
+    complicationAdd,
+    complicationEdit,
+    complicationById,
+  } from '/@/api/biz/management/complication';
+
+  const emit = defineEmits(['success', 'register']);
+
+  const getTitle = computed(() => (!unref(isUpdate) ? '新增并发症' : '编辑并发症'));
+  const isUpdate = ref(false);
+  const rowId = ref();
+
+  const { createMessage } = useMessage();
+  const [registerForm, { resetFields, validate, setFieldsValue }] = useForm({
+    layout: 'vertical',
+    showResetButton: true,
+    labelWidth: 100,
+    schemas: complicationFormSchema,
+    showActionButtonGroup: false,
+    actionColOptions: {
+      span: 23,
+    },
+  });
+  const [registerModal, { setModalProps, closeModal }] = useModalInner(async data => {
+    await resetFields();
+    setModalProps({ confirmLoading: false });
+    isUpdate.value = !!data?.isUpdate;
+
+    if (unref(isUpdate)) {
+      rowId.value = data.record.id;
+      const resData = await complicationById(data.record.id);
+      await setFieldsValue({
+        ...resData,
+      });
+    }
+  });
+
+  // 提交按钮事件
+  async function handleSubmit() {
+    try {
+      const values = await validate();
+      setModalProps({ confirmLoading: true });
+      !unref(isUpdate)
+        ? await complicationAdd({ ...values })
+        : await complicationEdit({ ...values, id: rowId.value });
+      !unref(isUpdate) ? createMessage.success('新增成功!') : createMessage.success('编辑成功!');
+      closeModal();
+      emit('success', { isUpdate: unref(isUpdate), values: { ...values, id: rowId.value } });
+    } finally {
+      setModalProps({ confirmLoading: false, canFullscreen: false });
+    }
+  }
+</script>

+ 47 - 0
src/views/biz/management/complication/data.ts

@@ -0,0 +1,47 @@
+import { BasicColumn, FormSchema } from '/@/components/Table';
+// 表单信息新增编辑
+export const complicationFormSchema: FormSchema[] = [
+  {
+    label: '并发症名称',
+    field: 'name',
+    required: true,
+    component: 'Input',
+    componentProps: {
+      placeholder: '请输入并发症名称',
+    },
+  },
+  {
+    label: '排序',
+    field: 'sort',
+    required: true,
+    component: 'InputNumber',
+    componentProps: {
+      placeholder: '请输入排序编码',
+      min: 0,
+    },
+    defaultValue: 0,
+  },
+  {
+    label: '并发症描述',
+    field: 'remark',
+    component: 'InputTextArea',
+    componentProps: {
+      placeholder: '请输入并发症描述',
+    },
+  },
+];
+// 说明模板表单列
+export const noteInfoColumns: BasicColumn[] = [
+  {
+    title: '名称',
+    dataIndex: 'name',
+  },
+  {
+    title: '模板内容',
+    dataIndex: 'name',
+  },
+  {
+    title: '排序',
+    dataIndex: 'name',
+  },
+];

+ 368 - 0
src/views/biz/management/complication/index.vue

@@ -0,0 +1,368 @@
+<template>
+  <Card title="并发症维护" type="inner" class="main-card" size="default">
+    <Row>
+      <Col :span="6">
+        <Card style="height: 600px">
+          <Input
+            v-model:value="searchName"
+            placeholder="请输入并发症名称"
+            style="width: 70%; margin-bottom: 10px"
+            @change="handleSearch"
+          >
+            <template #prefix> <Icon icon="icon-search|iconfont" :size="14" /></template>
+          </Input>
+          <a-dropdown-button size="small">
+            <template #overlay>
+              <a-menu @click="handleMenuClick">
+                <a-menu-item key="1">添加并发症</a-menu-item>
+                <a-menu-item key="2">批量导入</a-menu-item>
+                <a-menu-item key="3">批量导出</a-menu-item>
+              </a-menu>
+            </template>
+          </a-dropdown-button>
+          <List item-layout="horizontal" :data-source="complicationList">
+            <template #renderItem="{ item, index }">
+              <ListItem
+                @click="handleDetail(item, index)"
+                :key="index"
+                :class="{ actives: classIndex === index }"
+              >
+                <ListItemMeta>
+                  <template #title>
+                    {{ item.name }}
+                  </template>
+                </ListItemMeta>
+              </ListItem>
+            </template>
+          </List>
+        </Card></Col
+      >
+      <Col :span="1" />
+      <Col :span="17">
+        <Card :title="detailName">
+          <template #extra>
+            <Button shape="circle" v-auth="['bizSys:wardInfo:add']" @click="handleEditInfo"
+              ><Icon icon="icon-xt-details_edit_default|iconfont" :size="14"
+            /></Button>
+            <Button
+              shape="circle"
+              v-auth="['bizSys:wardInfo:add']"
+              @click="handleDel(detailForm.id)"
+              style="margin-left: 20px"
+              ><Icon icon="icon-xt-details_delete_default|iconfont" :size="14"
+            /></Button>
+          </template>
+          <div class="mx-3 my-2">
+            <DescCard :showHead="false" type="touxi" :data="detailFromData" />
+          </div>
+          <Card
+            title="说明模板"
+            size="small"
+            style="border: 0"
+            headStyle="background: #FFFFFF;border: 0px;font-size: 14px !important;"
+          >
+            <template #extra
+              ><Button shape="circle" v-auth="['bizSys:wardInfo:add']" @click="handleAddNote"
+                ><Icon icon="icon-plus|iconfont" :size="14" /></Button
+            ></template>
+            <BasicTable @register="registerTable">
+              <template #bodyCell="{ column, record }">
+                <!-- <template v-if="column.key === 'disable'">
+                <Tag :color="formatDictColor(disableOptions, record.disable)">
+                  {{ formatDictValue(disableOptions, record.disable) }}
+                </Tag>
+              </template> -->
+                <template v-if="column.key === 'action'">
+                  <TableAction
+                    :actions="[
+                      {
+                        auth: 'bizSys:complicationExplain:edit',
+                        icon: 'icon-xt-details_edit_default|iconfont',
+                        tooltip: '编辑',
+                        onClick: handleEditNote.bind(null, record),
+                      },
+                      {
+                        auth: 'bizSys:complicationExplain:remove',
+                        icon: 'icon-xt-details_delete_default|iconfont',
+                        tooltip: '删除',
+                        popConfirm: {
+                          title: '是否删除此说明模板',
+                          placement: 'left',
+                          confirm: handleDelNote.bind(null, record),
+                        },
+                      },
+                    ]"
+                  />
+                </template>
+              </template>
+            </BasicTable>
+          </Card>
+        </Card>
+      </Col>
+    </Row>
+  </Card>
+  <ComplicationFormModal
+    @register="registerComplicationModal"
+    @success="handleComplicationSuccess"
+  />
+  <NoteFormModal @register="registerNoteModal" @success="handleAddNoteSuccess" />
+</template>
+
+<script lang="ts" setup>
+  import { Card, Row, Col, List, Input, Button } from 'ant-design-vue';
+  import Icon from '/@/components/Icon/src/Icon.vue';
+  import {
+    getComplicationList,
+    complicationById,
+    complicationDelById,
+    getNoteList,
+    complicationExplainDelById,
+    complicationExport,
+  } from '/@/api/biz/management/complication';
+  import { noteInfoColumns } from './data';
+  import { BasicTable, useTable, TableAction } from '/@/components/Table';
+  import ComplicationFormModal from './complicationFormModal.vue';
+  import NoteFormModal from './noteFormModal.vue';
+  import DescCard from '/@/components/XTCard/src/DescCard.vue';
+  import { useMessage } from '/@/hooks/web/useMessage';
+  import { useModal } from '/@/components/Modal';
+  import { onBeforeMount, ref } from 'vue';
+  import { downloadByBase64 } from '/@/utils/file/download';
+  const { createConfirm, createMessage } = useMessage();
+  const ListItem = List.Item;
+  const ListItemMeta = List.Item.Meta;
+  const searchName = ref();
+  const complicationList = ref([]);
+  const classIndex = ref([]);
+  const detailName = ref('详细信息');
+  const detailForm = ref({
+    id: null,
+  });
+  const detailFromData = ref([
+    {
+      label: '并发症名',
+      value: '并发症名称',
+    },
+    {
+      label: '排序',
+      value: '1',
+    },
+    {
+      label: '并发症描述',
+      value: '并发症描述有点长....',
+    },
+  ]);
+
+  const [registerTable, { reload }] = useTable({
+    api: getNoteList,
+    rowKey: 'id',
+    columns: noteInfoColumns,
+    showIndexColumn: false,
+    formConfig: {
+      labelWidth: 120,
+      autoSubmitOnEnter: true,
+      baseColProps: { xs: 24, sm: 12, md: 12, lg: 8 },
+      resetButtonOptions: {
+        preIcon: 'icon-delete|iconfont',
+      },
+      submitButtonOptions: {
+        preIcon: 'icon-search|iconfont',
+      },
+    },
+    pagination: false,
+    useSearchForm: false,
+    bordered: true,
+    actionColumn: {
+      width: 320,
+      title: '操作',
+      dataIndex: 'action',
+    },
+    beforeFetch: handleNoteBeforeFetch,
+  });
+
+  const [registerComplicationModal, { openModal: openComplicationModal }] = useModal();
+  const [registerNoteModal, { openModal: openNoteModal }] = useModal();
+  /**
+   * 页面加载前事件
+   */
+  onBeforeMount(async () => {
+    getDataList();
+  });
+  /**
+   * 获取并发症信息
+   */
+  async function getDataList(params?: object) {
+    const res = await getComplicationList({
+      ...params,
+      orders: [{ field: 'sort', direction: 'DESC' }],
+    });
+    complicationList.value = res.data;
+    if (complicationList.value && complicationList.value.length > 0) {
+      handleDetail(complicationList.value[0], 0);
+    }
+  }
+  // 点击更多中的各个按钮触发
+  function handleMenuClick(e) {
+    if (e.key == 1) {
+      openComplicationModal(true, {
+        isUpdate: false,
+      });
+    } else if (e.key == 2) {
+      console.log('批量导入');
+    } else {
+      console.log('批量导出');
+      batchExport();
+    }
+  }
+
+  // 导出并发症
+  async function batchExport() {
+    const keys = [];
+    complicationList.value.forEach(item => {
+      keys.push(item.id);
+    });
+    debugger;
+    complicationExport(keys).then(res => {
+      if (res && res.fileName && res.base64) {
+        downloadByBase64(res.base64, res.fileName);
+      } else {
+        createMessage.error('获取导出文件失败!');
+      }
+    });
+  }
+
+  /**
+   *并发症保存/修改/删除完成后回调函数
+   */
+  function handleComplicationSuccess() {
+    if (searchName.value) {
+      handleSearch();
+    } else {
+      getDataList();
+    }
+  }
+  /**
+   * 搜索并发症
+   */
+  function handleSearch() {
+    const searchVal = searchName.value;
+    getDataList({ name: searchVal });
+  }
+
+  /**
+   *点击并发症名称展示右侧详情
+   */
+  async function handleDetail(item, index) {
+    classIndex.value = index; // 点击的时改变点击并发症样式
+    if (item && item.id) {
+      const complication = await complicationById(item.id);
+      detailName.value = complication.name;
+      detailForm.value = complication;
+      detailFromData.value = [
+        {
+          label: '并发症名',
+          value: complication.name,
+        },
+        {
+          label: '排序',
+          value: complication.sort,
+        },
+        {
+          label: '并发症描述',
+          value: complication.remark,
+        },
+      ];
+    }
+    reload();
+  }
+  /**
+   * 打开编辑方法
+   */
+  function handleEditInfo() {
+    openComplicationModal(true, {
+      record: detailForm.value,
+      isUpdate: true,
+    });
+  }
+  // 删除并发症操作
+  function handleDel(id) {
+    if (id) {
+      createConfirm({
+        iconType: 'warning',
+        title: '警告',
+        content: '是否需要删除此并发症',
+        onOk: async () => {
+          await complicationDelById([id]);
+          handleComplicationSuccess();
+        },
+      });
+    } else {
+      createMessage.error('请选择要删除的并发症名称');
+    }
+  }
+
+  /*******************说明模板相关方法 */
+  function handleAddNote() {
+    openNoteModal(true, {
+      id: detailForm.value.id,
+      isUpdate: false,
+    });
+  }
+  //打开说明模板编辑弹框
+  function handleEditNote(record) {
+    openNoteModal(true, {
+      record: record,
+      isUpdate: true,
+    });
+  }
+  //说明模板查询前事件
+  function handleNoteBeforeFetch(params) {
+    return {
+      ...params,
+      ids: detailForm.value.id,
+    };
+  }
+  // 删除说明模板事件
+  async function handleDelNote(record) {
+    await complicationExplainDelById([record.id]);
+    createMessage.success('删除此说明模板成功');
+    reload();
+  }
+
+  function handleAddNoteSuccess() {
+    reload();
+  }
+</script>
+<style lang="less" scoped>
+  .main-card {
+    width: 100%;
+    height: 700px;
+  }
+
+  ::v-deep(.ant-btn-group-sm .ant-btn.ant-btn-icon-only) {
+    height: 32px !important;
+    width: 32px !important;
+  }
+
+  ::v-deep(.ant-list-item) {
+    border-bottom: 0 !important;
+    line-height: 50px;
+    padding-left: 6px;
+    cursor: pointer;
+  }
+
+  .actives {
+    background-color: rgb(246 248 250 / 100%);
+    border-left: 3px solid rgb(0 117 255 / 100%);
+
+    h4 {
+      color: rgb(0 117 255 / 100%) !important;
+    }
+  }
+
+  ::v-deep(.ant-card-head-title) {
+    font-size: 18px;
+    font-weight: 600;
+    color: #000a18;
+  }
+</style>

+ 239 - 0
src/views/biz/management/complication/noteFormModal.vue

@@ -0,0 +1,239 @@
+<template>
+  <BasicModal
+    width="800px"
+    v-bind="$attrs"
+    destroyOnClose
+    @register="registerModal"
+    :title="getTitle"
+    @ok="handleSubmit"
+  >
+    <Row>
+      <Col :span="16">
+        <BasicForm @register="registerForm">
+          <template #contextSlot="{ model, field }">
+            <InputGroup compact>
+              <Textarea
+                type="textarea"
+                :rows="4"
+                v-model:value="model[field]"
+                @focus="treeDis = false"
+                id="contexts"
+              />
+              <span class="context-tip"
+                >例:患者今日常规透析,预设超滤{V值}。透前称重测血压{透前血压}。</span
+              >
+              <Button size="mini" type="primary" shape="round" class="per-btn" @click="handlePer"
+                >内容预览</Button
+              >
+              <!-- @blur="treeDis = true" -->
+            </InputGroup>
+          </template>
+          <template #previewSlot="{ model, field }"> {{ model[field] }} </template>
+        </BasicForm>
+      </Col>
+      <Col :span="8">
+        <a-tree
+          :disabled="treeDis"
+          :tree-data="noteFieldList"
+          v-model:expanded-keys="expandedKeys"
+          @select="handleSel"
+          :field-names="{ children: 'children', title: 'fieldName', key: 'fieldName' }"
+        />
+      </Col>
+    </Row>
+  </BasicModal>
+</template>
+<script lang="ts" setup>
+  import { Row, Col, InputGroup, Button, Textarea } from 'ant-design-vue';
+  import { ref, computed, unref } from 'vue';
+  import { BasicModal, useModalInner } from '/@/components/Modal';
+  import { BasicForm, useForm } from '/@/components/Form';
+  import { useMessage } from '/@/hooks/web/useMessage';
+  import { FormSchema } from '/@/components/Table';
+  import { getNoteFieldList } from '/@/api/biz/management/complication';
+
+  import {
+    addComplicationExplain,
+    editComplicationExplain,
+    getComplicationExplainById,
+    perComplicationExplain,
+  } from '/@/api/biz/management/complication';
+
+  const emit = defineEmits(['success', 'register']);
+
+  const getTitle = computed(() => (!unref(isUpdate) ? '新增说明模板' : '编辑说明模板'));
+  const isUpdate = ref(false);
+  const rowId = ref();
+  const noteFieldList = ref([]);
+  const expandedKeys = ref([]);
+  const treeDis = ref(true);
+
+  const noteFormSchema: FormSchema[] = [
+    {
+      label: '并发症ID',
+      field: 'complicationId',
+      component: 'Input',
+      show: false,
+    },
+    {
+      label: '模版名称',
+      field: 'name',
+      required: true,
+      component: 'Input',
+      componentProps: {
+        placeholder: '请输入模版名称',
+        onFocus: function () {
+          treeDis.value = true;
+        },
+      },
+    },
+    {
+      label: '排序',
+      field: 'sort',
+      required: true,
+      component: 'InputNumber',
+      componentProps: {
+        placeholder: '请输入排序',
+        onFocus: function () {
+          treeDis.value = true;
+        },
+      },
+    },
+    {
+      label: '模版内容',
+      field: 'context',
+      required: true,
+      slot: 'contextSlot',
+      component: 'Input',
+    },
+    {
+      label: '预览内容',
+      field: 'preview',
+      slot: 'previewSlot',
+      component: 'InputTextArea',
+    },
+  ];
+
+  const { createMessage } = useMessage();
+  const [registerForm, { resetFields, validate, setFieldsValue, getFieldsValue }] = useForm({
+    layout: 'vertical',
+    showResetButton: true,
+    labelWidth: 100,
+    schemas: noteFormSchema,
+    showActionButtonGroup: false,
+    actionColOptions: {
+      span: 23,
+    },
+  });
+  const [registerModal, { setModalProps, closeModal }] = useModalInner(async data => {
+    await resetFields();
+    getNoteFieldLists();
+    setModalProps({ confirmLoading: false });
+    isUpdate.value = !!data?.isUpdate;
+    if (unref(isUpdate)) {
+      rowId.value = data.record.id;
+      const resData = await getComplicationExplainById(data.record.id);
+      await setFieldsValue({
+        ...resData,
+      });
+    } else {
+      await setFieldsValue({
+        complicationId: data.id,
+      });
+    }
+  });
+  //获取说明模板字段
+  async function getNoteFieldLists() {
+    const lists = await getNoteFieldList();
+    noteFieldList.value = [];
+    expandedKeys.value = Object.keys(lists);
+    Object.keys(lists).forEach((item, index) => {
+      lists[item].forEach((cItem, cIndex) => {
+        cItem.key = index * 1000 + cIndex;
+      });
+      noteFieldList.value.push({
+        fieldName: item,
+        key: index,
+        children: lists[item],
+      });
+    });
+  }
+
+  // 提交按钮事件
+  async function handleSubmit() {
+    try {
+      const values = await validate();
+      setModalProps({ confirmLoading: true });
+      !unref(isUpdate)
+        ? await addComplicationExplain({ ...values })
+        : await editComplicationExplain({ ...values, id: rowId.value });
+      !unref(isUpdate) ? createMessage.success('新增成功!') : createMessage.success('编辑成功!');
+      closeModal();
+      emit('success', { isUpdate: unref(isUpdate), values: { ...values, id: rowId.value } });
+    } finally {
+      setModalProps({ confirmLoading: false, canFullscreen: false });
+    }
+  }
+
+  // 预览按钮事件
+  async function handlePer() {
+    const formVal = getFieldsValue();
+    if (formVal && formVal.context) {
+      const perVal = await perComplicationExplain(formVal.context);
+      await setFieldsValue({
+        ...formVal,
+        preview: perVal,
+      });
+    } else {
+      createMessage.error('请输入模板内容后进行预览');
+    }
+  }
+
+  // 选择说明模板字段事件
+  function handleSel(selectedKeys, { selectedNodes }) {
+    // selected, selectedNodes, node, event
+    treeDis.value = false;
+    insertAtCursor(selectedNodes[0].fieldName);
+    selectedKeys = [];
+  }
+
+  // 在鼠标光标处插入对应说明模板字段
+  async function insertAtCursor(myValue: any) {
+    let res = '';
+    let frontString = '';
+    let afterString = '';
+    const fieldsValue = getFieldsValue();
+    const position = document.getElementById('contexts');
+    const pos = getPositionForTextArea(position);
+    const y = fieldsValue.context ? fieldsValue.context : '';
+    frontString = y.substring(0, pos);
+    afterString = y.substring(pos, fieldsValue.context?.length);
+    res = frontString + '{' + myValue + '}' + afterString;
+    await setFieldsValue({
+      ...fieldsValue,
+      context: res,
+    });
+  }
+  // 获取鼠标光标位置
+  function getPositionForTextArea(ctrl) {
+    let CaretPos = 0;
+    if (ctrl.selectionStart || ctrl.selectionStart == '0') {
+      CaretPos = ctrl.selectionStart;
+    }
+    return CaretPos;
+  }
+</script>
+<style lang="less" scoped>
+  .per-btn {
+    margin-top: 6px;
+    margin-right: 6px;
+    border-radius: 12px !important;
+    float: right;
+  }
+
+  .context-tip {
+    font-size: 12px;
+    font-weight: 400;
+    color: #c3cdd8;
+  }
+</style>

+ 1 - 1
src/views/biz/management/parameter/index.vue

@@ -12,7 +12,7 @@
           "
         >
           <div>
-            <a-input
+            <a-input-number
               v-if="editableData[record.key]"
               v-model:value="editableData[record.key][column.dataIndex]"
               placeholder="请输入参数内容"

+ 1 - 9
src/views/biz/management/ward/data.ts

@@ -72,14 +72,6 @@ export const wardInfoDataFormSchema: FormSchema[] = [
       placeholder: '请输入病区名',
     },
   },
-  {
-    label: '排序',
-    field: 'sort',
-    component: 'Input',
-    componentProps: {
-      placeholder: '请输入排序',
-    },
-  },
   {
     label: '状态',
     field: 'disable',
@@ -111,7 +103,7 @@ export const workDayDataFormSchema: FormSchema[] = [
         { label: '周四', value: 'thursday' },
         { label: '周五', value: 'friday' },
         { label: '周六', value: 'saturday' },
-        { label: '周', value: 'sunday' },
+        { label: '周', value: 'sunday' },
       ],
     },
   },

+ 0 - 3
src/views/biz/management/ward/index.vue

@@ -242,7 +242,6 @@
       dataIndex: 'action',
     },
     beforeFetch: handleBeforeFetch,
-    sortFn: handleSortFn,
   });
 
   const [registerSailingsTable, { reload: SailingsReload }] = useTable({
@@ -275,8 +274,6 @@
   function handleBeforeFetch(params) {
     return { ...params, propertiesId: selectType.value, orders: tableSort.value };
   }
-
-  function handleSortFn() {}
   // 打开新增属性方法
   function handleAddAttr() {
     openWardTypeModal(true, {