소스 검색

代码暂存

zhangqi 1 년 전
부모
커밋
ba921bd2b0

+ 2 - 2
src/MAR/archivesMag/detail/index.vue

@@ -16,7 +16,7 @@
                 <span style="display: block;text-align-last: justify;width: 70px;transform: translateY(50%);">封面</span>
               </div>
             </template>
-            <a-image v-if="mainData.attinfos && mainData.attinfos.length" :src="mainData.attinfos[0].url" style="width:100px"></a-image>
+            <a-image v-if="mainData.attinfos && mainData.attinfos.length" :src="mainData.attinfos[0].url"  style="width:100px;height: 100px"></a-image>
           </a-descriptions-item>
         </a-descriptions>
       </template>
@@ -54,7 +54,7 @@
         <span class="normal-title" style="margin-bottom: 10px">基本信息</span>
         <defaultInfo :data="baseInfo">
           <template #封面图>
-            <a-image :src="mainData.attinfos.length ? mainData.attinfos[0].url : ''" style="width:100px"></a-image>
+            <a-image :src="mainData.attinfos.length ? mainData.attinfos[0].url : ''" style="width:100px;height: 100px"></a-image>
           </template>
         </defaultInfo>
         <span class="normal-title" style="margin: 10px 0">系统信息</span>

+ 2 - 7
src/MAR/archivesMag/modules/setClass/add.vue

@@ -15,7 +15,7 @@
         <a-row :gutter="16">
           <a-col :span="24">
             <a-form-item label="分类名称" name="classname" :rules="[{ required: true, message: '请输入分类名称' }]">
-              <a-input v-model:value="form.classname" placeholder="请输入分类名称"></a-input>
+              <a-input v-focus v-model:value="form.classname" placeholder="请输入分类名称"></a-input>
             </a-form-item>
           </a-col>
           <a-col :span="24">
@@ -23,11 +23,6 @@
               <a-input v-model:value="form.remarks" placeholder="请输入描述"></a-input>
             </a-form-item>
           </a-col>
-          <a-col :span="24">
-            <a-form-item label="排序" name="sequence">
-              <a-input v-model:value="form.sequence" placeholder="请输入排序"></a-input>
-            </a-form-item>
-          </a-col>
           <!-- <a-col :span="24" v-if="!props.data">
             <a-form-item label="封面图" name="attinfos" :rules="[{ required: true, message: '请选择封面',trigger:'change'}]">
               <Upload ref="upload" :multiple="false" :bindData="bindData" accept="image/*" @fileChange="form.attinfos='1'"></Upload>
@@ -49,7 +44,7 @@
       </a-form>
       <template #extra>
         <a-space>
-          <a-button type="primary" @click="submit" :loading=loading>保存</a-button>
+          <CustomButton type="primary" @click="submit">保存</CustomButton>
         </a-space>
       </template>
     </a-drawer>

+ 5 - 12
src/MAR/archivesMag/modules/setClass/edit.vue

@@ -10,12 +10,13 @@
       :destroyOnClose="true"
       :closable="false"
       @close="onClose"
+      ref="drawer"
     >
       <a-form :model="form" ref="formRef" layout="vertical">
         <a-row :gutter="16">
           <a-col :span="24">
             <a-form-item label="分类名称" name="classname" :rules="[{ required: true, message: '请输入分类名称' }]">
-              <a-input v-model:value="form.classname" placeholder="请输入分类名称"></a-input>
+              <a-input v-focus v-model:value="form.classname" placeholder="请输入分类名称"></a-input>
             </a-form-item>
           </a-col>
           <a-col :span="24">
@@ -23,11 +24,6 @@
               <a-input v-model:value="form.remarks" placeholder="请输入描述"></a-input>
             </a-form-item>
           </a-col>
-          <a-col :span="24">
-            <a-form-item label="排序" name="sequence">
-              <a-input v-model:value="form.sequence" placeholder="请输入排序"></a-input>
-            </a-form-item>
-          </a-col>
           <!-- <a-col :span="24" v-if="data.parentid == 0">
             <a-form-item label="封面图" name="attinfos" :rules="[{ required: true, message: '请选择封面',trigger:'change'}]">
               <Upload ref="upload" :multiple="false" @deleteSuccess="$refs.upload.fileList=[]" :bindData="bindData" accept="image/*" @fileChange="form.attinfos='1';"></Upload>
@@ -49,7 +45,7 @@
       </a-form>
       <template #extra>
         <a-space>
-          <a-button type="primary" @click="submit">保存</a-button>
+          <CustomButton type="primary" @click="submit">保存</CustomButton>
         </a-space>
       </template>
     </a-drawer>
@@ -57,7 +53,7 @@
 </template>
 
 <script setup>
-import {ref,defineEmits,createVNode, nextTick,watch} from 'vue'
+import {ref,defineEmits,createVNode, nextTick,watch, onMounted} from 'vue'
 import Api from '@/api/api'
 import utils from '@/utils/utils'
 import { useRouter } from "vue-router";
@@ -82,7 +78,7 @@ const form = ref({
 watch(() => visible.value,(val) => {
   if (!val) emit('back')
 })
-
+let drawer = ref()
 const showDrawer = ()=>{
   visible.value = true
   form.value = Object.assign({},form.value,props.data)
@@ -91,9 +87,6 @@ const showDrawer = ()=>{
     "ownerid": form.value.sat_courseware_classid,
     "usetype": 'default',
   }
-  nextTick(() => {
-    upload.value.fileList = form.value.attinfos
-  })
   console.log(form.value);
 }
 const formRef = ref()

+ 3 - 1
src/MAR/archivesMag/modules/setClass/index.vue

@@ -15,7 +15,7 @@
         <Add @onSuccess="$refs.table.listData()" v-if="utils.hasPermission('setClass')"></Add>
         <!-- <a-input style="width: 150px;margin-left: 10px;" v-model:value="param.content.where.condition" @keyup.enter="search"  placeholder="请输入搜索内容" autocomplete="off"></a-input> -->
       </div>
-      <normalTable @listData="listData" rowKey="sat_courseware_classid" :is-select="false" ref="table" size="small" :columns="utils.TBLayout('tableSCChildclass')" :param="param">
+      <normalTable :sequence="true" @listData="listData" rowKey="sat_courseware_classid" :is-select="false" ref="table" size="small" :columns="utils.TBLayout('tableSCChildclass')" :param="param">
         <template #tb_cell="{data}">
           <template v-if="data.column.dataIndex === 'issecret'">
             <a-switch
@@ -58,6 +58,8 @@ let param = ref({
   "id": "20221102143302",
   "content": {
     "parentid": 0,
+    "pageSize":20,
+    "pageNumber":1,
     "where": {
         "isenable": ''
     }

+ 2 - 2
src/MAR/assetsStore/detail/index.vue

@@ -43,7 +43,7 @@
                 <span style="display: block;text-align-last: justify;width: 70px;transform: translateY(50%);">封面</span>
               </div>
             </template>
-            <a-image v-if="mainData.attinfos && mainData.attinfos.filter(item => item.usetype == 'avatar').length" :src="mainData.attinfos.filter(item => item.usetype == 'avatar')[0].url" style="width:100px"></a-image>
+            <a-image v-if="mainData.attinfos && mainData.attinfos.filter(item => item.usetype == 'avatar').length" :src="mainData.attinfos.filter(item => item.usetype == 'avatar')[0].url" style="width:100px;height: 100px"></a-image>
           </a-descriptions-item>
         </a-descriptions>
       </template>
@@ -54,7 +54,7 @@
         <span class="normal-title" style="margin-bottom: 10px">基本信息</span>
         <defaultInfo :data="baseInfo">
           <template #封面图>
-            <a-image :src="mainData.attinfos.filter(item => item.usetype == 'avatar').length ? mainData.attinfos.filter(item => item.usetype == 'avatar')[0].url : ''" style="width:100px"></a-image>
+            <a-image :src="mainData.attinfos.filter(item => item.usetype == 'avatar').length ? mainData.attinfos.filter(item => item.usetype == 'avatar')[0].url : ''" style="width:100px;height: 100px"></a-image>
           </template>
         </defaultInfo>
         <span class="normal-title" style="margin: 10px 0">系统信息</span>

+ 1 - 6
src/MAR/assetsStore/modules/setClass/add.vue

@@ -15,7 +15,7 @@
         <a-row :gutter="16">
           <a-col :span="24">
             <a-form-item label="分类名称" name="classname" :rules="[{ required: true, message: '请输入分类名称' }]">
-              <a-input v-model:value="form.classname" placeholder="请输入分类名称"></a-input>
+              <a-input v-focus v-model:value="form.classname" placeholder="请输入分类名称"></a-input>
             </a-form-item>
           </a-col>
           <a-col :span="24">
@@ -23,11 +23,6 @@
               <a-input v-model:value="form.remarks" placeholder="请输入描述"></a-input>
             </a-form-item>
           </a-col>
-          <a-col :span="24">
-            <a-form-item label="排序" name="sequence">
-              <a-input v-model:value="form.sequence" placeholder="请输入排序"></a-input>
-            </a-form-item>
-          </a-col>
           <!-- <a-col :span="24" v-if="!props.data">
             <a-form-item label="封面图" name="attinfos" :rules="[{ required: true, message: '请选择封面',trigger:'change'}]">
               <Upload 

+ 1 - 6
src/MAR/assetsStore/modules/setClass/edit.vue

@@ -15,7 +15,7 @@
         <a-row :gutter="16">
           <a-col :span="24">
             <a-form-item label="分类名称" name="classname" :rules="[{ required: true, message: '请输入分类名称' }]">
-              <a-input v-model:value="form.classname" placeholder="请输入分类名称"></a-input>
+              <a-input v-focus v-model:value="form.classname" placeholder="请输入分类名称"></a-input>
             </a-form-item>
           </a-col>
           <a-col :span="24">
@@ -23,11 +23,6 @@
               <a-input v-model:value="form.remarks" placeholder="请输入描述"></a-input>
             </a-form-item>
           </a-col>
-          <a-col :span="24">
-            <a-form-item label="排序" name="sequence">
-              <a-input v-model:value="form.sequence" placeholder="请输入排序"></a-input>
-            </a-form-item>
-          </a-col>
           <!-- <a-col :span="24" v-if="data.parentid == 0">
             <a-form-item label="封面图" name="attinfos" :rules="[{ required: true, message: '请选择封面',trigger:'change'}]">
               <Upload 

+ 3 - 1
src/MAR/assetsStore/modules/setClass/index.vue

@@ -14,7 +14,7 @@
       <div style="margin-bottom: 10px" class="inline-16">
         <Add @onSuccess="$refs.table.listData()" v-if="utils.hasPermission('setClass')"></Add>
       </div>
-      <normalTable @listData="listData" rowKey="sat_sharematerial_classid" :is-select="false" ref="table" size="small" :columns="utils.TBLayout('tableSCChildclass')" :param="param">
+      <normalTable :sequence="true" @listData="listData" rowKey="sat_sharematerial_classid" :is-select="false" ref="table" size="small" :columns="utils.TBLayout('tableSCChildclass')" :param="param">
         <template #tb_cell="{data}">
           <template v-if="data.column.dataIndex === 'issecret'">
             <a-switch
@@ -56,6 +56,8 @@ let param = ref({
   "id": "20221102143202",
   "content": {
       "parentid": 0,
+      "pageSize":20,
+      "pageNumber":1,
       "where": {
           "isenable": ''
       }

+ 20 - 26
src/MAR/dataPanel/modules/Detail.vue

@@ -10,7 +10,7 @@
         style="margin-bottom: 20px"
         title="类型:"
         :options="typeOptions"
-        v-model="type"
+        v-model="param.content.usertype"
         @update:modelValue="typeChange"
       />
 
@@ -57,14 +57,12 @@ import CustomSelect from "./select.vue";
 import normalTable from "@/template/normalTable/index.vue";
 import { useRouter } from "vue-router";
 const router = useRouter();
-let type = ref("");
-type.value = router.currentRoute.value.query.type;
 let time = ref("近30天");
 let ranges = ref([]);
 let typeOptions = ref([
-  { label: "公司人员", value: "1" },
-  { label: "经销商", value: "21" },
-  { label: "经销商员工", value: "22" },
+  { label: "公司人员", value: 1 },
+  { label: "经销商", value: 21 },
+  { label: "经销商员工", value: 22 },
 ]);
 let timeOptions = ref([
   { label: "今日", value: "1" },
@@ -77,7 +75,7 @@ let table = ref();
 let param = ref({
   id: "2024061114184602",
   content: {
-    usertype: type.value,
+    usertype: router.currentRoute.value.query.type,
     pageNumber: 1,
     pageSize: 20,
     where: {
@@ -89,12 +87,6 @@ let param = ref({
 });
 
 const typeChange = (value) => {
-  router.replace({
-    path: "/dataPanelDetail",
-    query: {
-      type: value,
-    },
-  });
   param.value.content.pageNumber = 1;
   table.value.listData();
 };
@@ -102,16 +94,25 @@ const timeChange = (value) => {
   let today = new Date();
   switch (value) {
     case "1":
-      calcTime(today);
+      ranges.value = [calcTime(today), calcTime(today)];
       break;
     case "2":
-      calcTime(new Date(today.setDate(today.getDate() - 1)));
+      ranges.value = [
+        calcTime(new Date(new Date().setDate(new Date().getDate() - 1))),
+        calcTime(new Date(new Date().setDate(new Date().getDate() - 1))),
+      ];
       break;
     case "3":
-      calcTime(new Date(today.setDate(today.getDate() - 7)));
+      ranges.value = [
+        calcTime(new Date(new Date().setDate(new Date().getDate() - 7))),
+        calcTime(new Date()),
+      ];
       break;
     default:
-      calcTime(new Date(today.setDate(today.getDate() - 30)));
+      ranges.value = [
+        calcTime(new Date(new Date().setDate(new Date().getDate() - 30))),
+        calcTime(new Date()),
+      ];
       break;
   }
   param.value.content.where.begindate = "";
@@ -125,14 +126,7 @@ const calcTime = (date) => {
   const month = String(date.getMonth() + 1).padStart(2, "0");
   const day = String(date.getDate()).padStart(2, "0");
   const yyyymmdd = year + "-" + month + "-" + day;
-
-  let today = new Date();
-  const _year = today.getFullYear();
-  const _month = String(today.getMonth() + 1).padStart(2, "0");
-  const _day = String(today.getDate()).padStart(2, "0");
-  const _yyyymmdd = _year + "-" + _month + "-" + _day;
-
-  ranges.value = [yyyymmdd, _yyyymmdd];
+  return yyyymmdd;
 };
 
 const dateRangeChange = (time) => {
@@ -161,6 +155,6 @@ onMounted(() => {
   font-size: "14px" !important;
 }
 /deep/.ant-card-body {
-    padding: 24px 24px 24px 10px;
+  padding: 24px 24px 24px 10px;
 }
 </style>

+ 3 - 3
src/MAR/dataPanel/modules/dataBox.vue

@@ -14,7 +14,7 @@
             <div @click="showUserModel('1', calcType.name)">
               <a-tooltip placement="top">
                 <template #title>
-                  <span>单击查看明细</span>
+                  <span>单击查看账户列表</span>
                 </template>
                 <span style="margin-right: 2px;">{{ calcType.used }}</span
                 >/<span style="margin-left: 2px;">{{ calcType.all }}</span>
@@ -28,7 +28,7 @@
             <div @click="showUserModel('2', calcType.name)">
               <a-tooltip placement="top">
                 <template #title>
-                  <span>单击查看明细</span>
+                  <span>单击查看账户列表</span>
                 </template>
                 <span>{{ calcType.unbind }}</span>
               </a-tooltip>
@@ -41,7 +41,7 @@
             <div @click="showUserModel('3', calcType.name)">
               <a-tooltip placement="top">
                 <template #title>
-                  <span>单击查看明细</span>
+                  <span>单击查看账户列表</span>
                 </template>
                 <span>{{ calcType.stop }}</span>
               </a-tooltip>

+ 1 - 0
src/MAR/dataPanel/modules/select.vue

@@ -24,6 +24,7 @@ const props = defineProps({
     }
 })
 const update = (value) => {
+    if (props.modelValue == value) return
     emit('update:modelValue',value)
 }
 </script>

+ 2 - 2
src/MAR/designManage/detail/index.vue

@@ -43,7 +43,7 @@
                 <span style="display: block;text-align-last: justify;width: 70px;transform: translateY(50%);">封面</span>
               </div>
             </template>
-            <a-image v-if="mainData.attinfos && mainData.attinfos.filter(item => item.usetype == 'sat_sharematerial').length" :src=" mainData.attinfos.filter(item => item.usetype == 'sat_sharematerial')[0].fileType=='video' ? mainData.attinfos.filter(item => item.usetype == 'sat_sharematerial')[0].subfiles[0].url:mainData.attinfos.filter(item => item.usetype == 'sat_sharematerial')[0].url" style="width:100px"></a-image>
+            <a-image v-if="mainData.attinfos && mainData.attinfos.filter(item => item.usetype == 'sat_sharematerial').length" :src=" mainData.attinfos.filter(item => item.usetype == 'sat_sharematerial')[0].fileType=='video' ? mainData.attinfos.filter(item => item.usetype == 'sat_sharematerial')[0].subfiles[0].url:mainData.attinfos.filter(item => item.usetype == 'sat_sharematerial')[0].url" style="width:100px;height: 100px"></a-image>
           </a-descriptions-item>
         </a-descriptions>
       </template>
@@ -54,7 +54,7 @@
         <span class="normal-title" style="margin-bottom: 10px">基本信息</span>
         <defaultInfo :data="baseInfo">
           <template #封面图>
-            <a-image v-if="mainData.attinfos && mainData.attinfos.filter(item => item.usetype == 'sat_sharematerial').length" :src=" mainData.attinfos.filter(item => item.usetype == 'sat_sharematerial')[0].fileType=='video' ? mainData.attinfos.filter(item => item.usetype == 'sat_sharematerial')[0].subfiles[0].url:mainData.attinfos.filter(item => item.usetype == 'sat_sharematerial')[0].url" style="width:100px"></a-image>
+            <a-image v-if="mainData.attinfos && mainData.attinfos.filter(item => item.usetype == 'sat_sharematerial').length" :src=" mainData.attinfos.filter(item => item.usetype == 'sat_sharematerial')[0].fileType=='video' ? mainData.attinfos.filter(item => item.usetype == 'sat_sharematerial')[0].subfiles[0].url:mainData.attinfos.filter(item => item.usetype == 'sat_sharematerial')[0].url" style="width:100px;height: 100px"></a-image>
           </template>
         </defaultInfo>
         <span class="normal-title" style="margin: 10px 0">系统信息</span>

+ 2 - 2
src/MAR/effectImgManage/detail/index.vue

@@ -43,7 +43,7 @@
                 <span style="display: block;text-align-last: justify;width: 70px;transform: translateY(50%);">封面</span>
               </div>
             </template>
-            <a-image v-if="mainData.attinfos && mainData.attinfos.filter(item => item.usetype == 'sat_sharematerial').length" :src="mainData.attinfos.filter(item => item.usetype == 'sat_sharematerial')[0].url" style="width:100px"></a-image>
+            <a-image v-if="mainData.attinfos && mainData.attinfos.filter(item => item.usetype == 'sat_sharematerial').length" :src="mainData.attinfos.filter(item => item.usetype == 'sat_sharematerial')[0].url" style="width:100px;height: 100px;"></a-image>
           </a-descriptions-item>
         </a-descriptions>
       </template>
@@ -57,7 +57,7 @@
         <span class="normal-title" style="margin-bottom: 10px">基本信息</span>
         <defaultInfo :data="baseInfo">
           <template #封面图>
-            <a-image v-if="mainData.attinfos && mainData.attinfos.filter(item => item.usetype == 'sat_sharematerial').length" :src="mainData.attinfos.filter(item => item.usetype == 'sat_sharematerial')[0].url" style="width:100px"></a-image>
+            <a-image v-if="mainData.attinfos && mainData.attinfos.filter(item => item.usetype == 'sat_sharematerial').length" :src="mainData.attinfos.filter(item => item.usetype == 'sat_sharematerial')[0].url" style="width:100px;height: 100px;"></a-image>
           </template>
         </defaultInfo>
         <span class="normal-title" style="margin: 10px 0">系统信息</span>

+ 2 - 0
src/MAR/imgTextManage/detail/index.vue

@@ -140,6 +140,8 @@ const contentSave = async () => {
         "style_signup": "",
         "style_bottom": "",
         "contentstr":""},mainData.value)
+      form.style_bottom = mainData.value.sharepagecontrol.style_bottom
+      form.style_signup = mainData.value.sharepagecontrol.style_signup
       const res = await Api.post({
         "id": 20240329131402,
         "content": form

+ 3 - 0
src/MAR/imgTextManage/index.vue

@@ -7,6 +7,9 @@
       <template v-if="data.column.dataIndex == 'type'">
           {{ data.record.type == 1?'图片':'图文' }}
       </template>
+      <template v-else-if="data.column.dataIndex == 'style_signup'">
+          {{ data.record.sharepagecontrol.style_signup }}
+      </template>
     </template>
   </listTemp>
 

+ 11 - 3
src/MAR/itemsManage/detail/index.vue

@@ -44,7 +44,7 @@
                 <span style="display: block;text-align-last: justify;width: 70px;transform: translateY(50%);">封面</span>
               </div>
             </template>
-            <a-image v-if="mainData.attinfos && mainData.attinfos.filter(item => item.usetype == 'sa_fad').length" :src=" mainData.attinfos.filter(item => item.usetype == 'sa_fad')[0].fileType=='video' ? mainData.attinfos.filter(item => item.usetype == 'sa_fad')[0].subfiles[0].url:mainData.attinfos.filter(item => item.usetype == 'sa_fad')[0].url" style="width:100px"></a-image>
+            <a-image v-if="mainData.attinfos && mainData.attinfos.filter(item => item.usetype == 'sa_fad').length" :src=" mainData.attinfos.filter(item => item.usetype == 'sa_fad')[0].fileType=='video' ? mainData.attinfos.filter(item => item.usetype == 'sa_fad')[0].subfiles[0].url:mainData.attinfos.filter(item => item.usetype == 'sa_fad')[0].url" style="width:100px;height: 100px;"></a-image>
           </a-descriptions-item>
         </a-descriptions>
       </template>
@@ -58,10 +58,18 @@
         <span class="normal-title" style="margin-bottom: 10px">基本信息</span>
         <defaultInfo :data="baseInfo">
           <template #封面图>
-            <a-image v-if="mainData.attinfos && mainData.attinfos.filter(item => item.usetype == 'sa_fad').length" :src=" mainData.attinfos.filter(item => item.usetype == 'sa_fad')[0].fileType=='video' ? mainData.attinfos.filter(item => item.usetype == 'sa_fad')[0].subfiles[0].url:mainData.attinfos.filter(item => item.usetype == 'sa_fad')[0].url" style="width:100px"></a-image>
+            <a-image v-if="mainData.attinfos && mainData.attinfos.filter(item => item.usetype == 'sa_fad').length" :src=" mainData.attinfos.filter(item => item.usetype == 'sa_fad')[0].fileType=='video' ? mainData.attinfos.filter(item => item.usetype == 'sa_fad')[0].subfiles[0].url:mainData.attinfos.filter(item => item.usetype == 'sa_fad')[0].url" style="width:100px;height: 100px"></a-image>
           </template>
           <template #二维码>
-            <a-qrcode :value="mainData.appleturl" :size="100" />
+            <a-popover  placement="left">
+              <template #content>
+                <div style="display: flex;flex-direction: column;align-items: center;">
+                    <a-qrcode :value="mainData.appleturl" />
+                      <div style="margin-top: 10px;">微信扫码</div>
+                    </div>
+              </template>
+              <a-qrcode :value="mainData.appleturl" :size="100" />
+            </a-popover>
           </template>
         </defaultInfo>
         <span class="normal-title" style="margin: 10px 0">系统信息</span>

+ 9 - 1
src/MAR/itemsManage/index.vue

@@ -8,7 +8,15 @@
         <a-image v-if="data.record.attinfos && data.record.attinfos.filter(item => item.usetype == 'sa_fad').length" :src=" data.record.attinfos.filter(item => item.usetype == 'sa_fad')[0].fileType=='video' ? data.record.attinfos.filter(item => item.usetype == 'sa_fad')[0].subfiles[0].url:data.record.attinfos.filter(item => item.usetype == 'sa_fad')[0].url"  style="width:100px;height: 100px;"></a-image>
       </template>
       <template v-if="data.column.dataIndex === 'qrcode'">
-        <a-qrcode :value="data.record.appleturl" :size="100" />
+        <a-popover placement="left">
+          <template #content>
+            <div style="display: flex;flex-direction: column;align-items: center;">
+              <a-qrcode :value="data.record.appleturl" />
+              <div style="margin-top: 10px;">微信扫码</div>
+            </div>
+          </template>
+          <a-qrcode :value="data.record.appleturl" :size="100" />
+        </a-popover>
       </template>
       <template v-if="data.column.dataIndex === 'isonsale'">
         <span :style="{color:utils.statusAndColor(data.record.isonsale?'上架':'下架')}">{{ data.record.isonsale?'上架':'下架' }}</span>

+ 11 - 3
src/MAR/productManage/detail/index.vue

@@ -44,7 +44,7 @@
                 <span style="display: block;text-align-last: justify;width: 70px;transform: translateY(50%);">封面</span>
               </div>
             </template>
-            <a-image v-if="mainData.attinfos && mainData.attinfos.filter(item => item.usetype == 'sa_fad').length" :src=" mainData.attinfos.filter(item => item.usetype == 'sa_fad')[0].fileType=='video' ? mainData.attinfos.filter(item => item.usetype == 'sa_fad')[0].subfiles[0].url:mainData.attinfos.filter(item => item.usetype == 'sa_fad')[0].url" style="width:100px"></a-image>
+            <a-image v-if="mainData.attinfos && mainData.attinfos.filter(item => item.usetype == 'sa_fad').length" :src=" mainData.attinfos.filter(item => item.usetype == 'sa_fad')[0].fileType=='video' ? mainData.attinfos.filter(item => item.usetype == 'sa_fad')[0].subfiles[0].url:mainData.attinfos.filter(item => item.usetype == 'sa_fad')[0].url" style="width:100px;height: 100px"></a-image>
           </a-descriptions-item>
         </a-descriptions>
       </template>
@@ -61,10 +61,18 @@
         <span class="normal-title" style="margin-bottom: 10px">基本信息</span>
         <defaultInfo :data="baseInfo">
           <template #封面图>
-            <a-image v-if="mainData.attinfos && mainData.attinfos.filter(item => item.usetype == 'sa_fad').length" :src=" mainData.attinfos.filter(item => item.usetype == 'sa_fad')[0].fileType=='video' ? mainData.attinfos.filter(item => item.usetype == 'sa_fad')[0].subfiles[0].url:mainData.attinfos.filter(item => item.usetype == 'sa_fad')[0].url" style="width:100px"></a-image>
+            <a-image v-if="mainData.attinfos && mainData.attinfos.filter(item => item.usetype == 'sa_fad').length" :src=" mainData.attinfos.filter(item => item.usetype == 'sa_fad')[0].fileType=='video' ? mainData.attinfos.filter(item => item.usetype == 'sa_fad')[0].subfiles[0].url:mainData.attinfos.filter(item => item.usetype == 'sa_fad')[0].url" style="width:100px;height: 100px"></a-image>
           </template>
           <template #二维码>
-            <a-qrcode :value="mainData.appleturl" :size="100" />
+            <a-popover  placement="left">
+              <template #content>
+                <div style="display: flex;flex-direction: column;align-items: center;">
+                    <a-qrcode :value="mainData.appleturl" />
+                      <div style="margin-top: 10px;">微信扫码</div>
+                    </div>
+              </template>
+              <a-qrcode :value="mainData.appleturl" :size="100" />
+            </a-popover>
           </template>
         </defaultInfo>
         <span class="normal-title" style="margin: 10px 0">系统信息</span>

+ 9 - 1
src/MAR/productManage/index.vue

@@ -9,7 +9,15 @@
         <a-image v-if="data.record.attinfos && data.record.attinfos.filter(item => item.usetype == 'sa_fad').length" :src=" data.record.attinfos.filter(item => item.usetype == 'sa_fad')[0].fileType=='video' ? data.record.attinfos.filter(item => item.usetype == 'sa_fad')[0].subfiles[0].url:data.record.attinfos.filter(item => item.usetype == 'sa_fad')[0].url" style="width:100px;height: 100px;"></a-image>
       </template>
       <template v-if="data.column.dataIndex === 'qrcode'">
-        <a-qrcode :value="data.record.appleturl" :size="100" />
+        <a-popover placement="left">
+          <template #content>
+            <div style="display: flex;flex-direction: column;align-items: center;">
+              <a-qrcode :value="data.record.appleturl" />
+              <div style="margin-top: 10px;">微信扫码</div>
+            </div>
+          </template>
+          <a-qrcode :value="data.record.appleturl" :size="100" />
+        </a-popover>
       </template>
       <template v-if="data.column.dataIndex === 'isonsale'">
         <span :style="{color:utils.statusAndColor(data.record.isonsale?'上架':'下架')}">{{ data.record.isonsale?'上架':'下架' }}</span>

+ 2 - 7
src/MAR/productManage/modules/setClass/add.vue

@@ -15,7 +15,7 @@
         <a-row :gutter="16">
           <a-col :span="24">
             <a-form-item label="分类名称" name="classname" :rules="[{ required: true, message: '请输入分类名称' }]">
-              <a-input v-model:value="form.classname" placeholder="请输入分类名称"></a-input>
+              <a-input v-focus v-model:value="form.classname" placeholder="请输入分类名称"></a-input>
             </a-form-item>
           </a-col>
           <a-col :span="24">
@@ -23,11 +23,6 @@
               <a-input v-model:value="form.remarks" placeholder="请输入描述"></a-input>
             </a-form-item>
           </a-col>
-          <a-col :span="24">
-            <a-form-item label="排序" name="sequence">
-              <a-input v-model:value="form.sequence" placeholder="请输入排序"></a-input>
-            </a-form-item>
-          </a-col>
           <!-- <a-col :span="24" v-if="!props.data">
             <a-form-item label="封面图" name="attinfos">
               <Upload ref="upload" :multiple="false" :bindData="bindData" accept="image/*" @fileChange="form.attinfos='1'"></Upload>
@@ -49,7 +44,7 @@
       </a-form>
       <template #extra>
         <a-space>
-          <a-button type="primary" @click="submit" :loading=loading>保存</a-button>
+          <CustomButton type="primary" @click="submit">保存</CustomButton>
         </a-space>
       </template>
     </a-drawer>

+ 2 - 7
src/MAR/productManage/modules/setClass/edit.vue

@@ -15,7 +15,7 @@
         <a-row :gutter="16">
           <a-col :span="24">
             <a-form-item label="分类名称" name="classname" :rules="[{ required: true, message: '请输入分类名称' }]">
-              <a-input v-model:value="form.classname" placeholder="请输入分类名称"></a-input>
+              <a-input v-focus v-model:value="form.classname" placeholder="请输入分类名称"></a-input>
             </a-form-item>
           </a-col>
           <a-col :span="24">
@@ -23,11 +23,6 @@
               <a-input v-model:value="form.remarks" placeholder="请输入描述"></a-input>
             </a-form-item>
           </a-col>
-          <a-col :span="24">
-            <a-form-item label="排序" name="sequence">
-              <a-input v-model:value="form.sequence" placeholder="请输入排序"></a-input>
-            </a-form-item>
-          </a-col>
           <!-- <a-col :span="24" v-if="data.parentid == 0">
             <a-form-item label="封面图" name="attinfos">
               <Upload ref="upload" :multiple="false" @deleteSuccess="$refs.upload.fileList=[]" :bindData="bindData" accept="image/*" @fileChange="form.attinfos='1';"></Upload>
@@ -49,7 +44,7 @@
       </a-form>
       <template #extra>
         <a-space>
-          <a-button type="primary" @click="submit">保存</a-button>
+          <CustomButton type="primary" @click="submit">保存</CustomButton>
         </a-space>
       </template>
     </a-drawer>

+ 3 - 1
src/MAR/productManage/modules/setClass/index.vue

@@ -15,7 +15,7 @@
         <Add @onSuccess="$refs.table.listData()" v-if="utils.hasPermission('setClass')"></Add>
         <!-- <a-input style="width: 150px;margin-left: 10px;" v-model:value="param.content.where.condition" @keyup.enter="search"  placeholder="请输入搜索内容" autocomplete="off"></a-input> -->
       </div>
-      <normalTable @listData="listData" rowKey="sa_fadclassid" :is-select="false" ref="table" size="small" :columns="utils.TBLayout('tableSCChildclass')" :param="param">
+      <normalTable :sequence="true" @listData="listData" rowKey="sa_fadclassid" :is-select="false" ref="table" size="small" :columns="utils.TBLayout('tableSCChildclass')" :param="param">
         <template #tb_cell="{data}">
           <template v-if="data.column.dataIndex === 'issecret'">
             <a-switch
@@ -58,6 +58,8 @@ let param = ref({
   "id": "20240418112002",
   "content": {
     "parentid": 0,
+    "pageSize":20,
+    "pageNumber":1,
     "where": {
         "isenable": ''
     }

+ 2 - 2
src/MAR/topiceManage/detail/index.vue

@@ -15,7 +15,7 @@
                 <span style="display: block;text-align-last: justify;width: 70px;transform: translateY(50%);">封面</span>
               </div>
             </template>
-            <a-image v-if="mainData.attinfos && mainData.attinfos.length" :src="mainData.attinfos[0].url" style="width:100px"></a-image>
+            <a-image v-if="mainData.attinfos && mainData.attinfos.length" :src="mainData.attinfos[0].url" style="width:100px;height: 100px"></a-image>
           </a-descriptions-item>
         </a-descriptions>
       </template>
@@ -29,7 +29,7 @@
         <span class="normal-title" style="margin-bottom: 10px">基本信息</span>
         <defaultInfo :data="baseInfo">
           <template #封面图>
-            <a-image :src="mainData.attinfos.length ? mainData.attinfos[0].url : ''" style="width:100px"></a-image>
+            <a-image :src="mainData.attinfos.length ? mainData.attinfos[0].url : ''" style="width:100px;height: 100px"></a-image>
           </template>
         </defaultInfo>
         <span class="normal-title" style="margin: 10px 0">系统信息</span>

+ 5 - 1
src/api/request.js

@@ -4,7 +4,7 @@ import axios from 'axios'
 import { useAuthStore } from '@/stores/modules/auth'
 import { useBaseStore } from '@/stores/modules/base'
 import { message } from 'ant-design-vue';
-import NProgress from 'nprogress' // nprogress插件 
+import NProgress, { set } from 'nprogress' // nprogress插件 
 import 'nprogress/nprogress.css' // nprogress样式
 import utils from '@/utils/utils'
 import router from '@/router'
@@ -54,6 +54,7 @@ const service = axios.create({
 
 // 2.请求拦截器
 service.interceptors.request.use(async config => {
+    useBaseStore().loading = true
     const token = sessionStorage.getItem('token')?sessionStorage.getItem('token'):''
     const appid = useAuthStore().app ? useAuthStore().app.systemappid :''
     //发请求前做的一些处理,数据转化,配置请求头,设置token,设置loading等,根据需求去添加
@@ -81,6 +82,9 @@ service.interceptors.request.use(async config => {
 
 // 3.响应拦截器
 service.interceptors.response.use(response => {
+    setTimeout(() => {
+        useBaseStore().loading = false
+    },500)
         if (response.data.code == -1) {
             message.error({content:response.data.msg,key:1})
             router.push({name:'login'})

+ 3 - 0
src/main.js

@@ -8,8 +8,11 @@ import pinia  from './stores'
 import GlobalComponent from './utils/globalComponent.js'
 import { ConfigProvider } from 'ant-design-vue';
 import { message } from 'ant-design-vue';
+import Directive from './utils/directive.js'
 
 const app = createApp(App)
+Directive(app)
+
 message.config({
   rtl: true,
   maxCount:1,

+ 2 - 1
src/stores/modules/base.js

@@ -24,7 +24,8 @@ export const useBaseStore = defineStore('base', {
       currentComponent:null,  //抽屉详情路径
       connection:0, // 网络状态
       billChangeData:{},
-      useloading:false
+      useloading:false,
+      loading:false
     }
   },
   // 开启数据缓存

+ 334 - 160
src/template/normalTable/index.vue

@@ -1,229 +1,403 @@
 // 单据中使用商品表
 <template>
-  <div :id="'normalTable' + app.name" class="normalTable" :style="fullscreen?'padding:15px':''">
-    <div v-if="props.tableName ? true :false">
+  <div
+    :id="'normalTable' + app.name"
+    class="normalTable"
+    :style="fullscreen ? 'padding:15px' : ''"
+  >
+    <div v-if="props.tableName ? true : false">
       <div class="fl-l">
         <slot name="operation"></slot>
       </div>
       <a-space size="middle" class="fl-r mt-10">
-        <setting-columns ref="setColumns" :columns="columns" :param="props.param" :tableName="props.tableName"></setting-columns>
+        <setting-columns
+          ref="setColumns"
+          :columns="columns"
+          :param="props.param"
+          :tableName="props.tableName"
+        ></setting-columns>
         <fullScreen :domId="'normalTable' + app.name"></fullScreen>
       </a-space>
     </div>
     <a-table
       :loading="loading"
       class="ant-table-striped ant-table-small"
-      :row-selection="isSelect ? {type:props.filterMultiple?'radio':'checkbox',columnWidth:'10px', selectedRowKeys: selectedRowKeys,onSelectAll:onSelectAll, onChange: onSelectChange,fixed:true,onSelect:onSelect ,hideSelectAll:false,preserveSelectedRowKeys:false} : null"
+      v-model:expandedRowKeys="expandedRowKeys"
+      :row-selection="
+        isSelect
+          ? {
+              type: props.filterMultiple ? 'radio' : 'checkbox',
+              columnWidth: '10px',
+              selectedRowKeys: selectedRowKeys,
+              onSelectAll: onSelectAll,
+              onChange: onSelectChange,
+              fixed: true,
+              onSelect: onSelect,
+              hideSelectAll: false,
+              preserveSelectedRowKeys: false,
+            }
+          : null
+      "
       :rowKey="rowKey"
       :keep-selection="true"
       :columns="columns"
       :defaultExpandAllRows="defaultExpandAllRows"
       :data-source="data"
-      :scroll="fullscreen?{x:'max-content',y:'86vh'}:{x:'max-content'}"
-      :pagination="{showSizeChanger:true,defaultPageSize:props.param.content.pageSize,total:total,current:props.param.content.pageNumber,showTotal:total => `共 ${total} 条`}"
+      :scroll="
+        fullscreen ? { x: 'max-content', y: '86vh' } : { x: 'max-content' }
+      "
+      :pagination="{
+        showSizeChanger: true,
+        defaultPageSize: props.param.content.pageSize,
+        total: total,
+        current: props.param.content.pageNumber,
+        showTotal: (total) => `共 ${total} 条`,
+      }"
       @change="onChange"
       :size="size"
+      :customRow="sequence ? customRow : noRequence"
       :bordered="!hideBorder"
-      :row-class-name="(_record, index) => formatter(_record, index)">
+      :row-class-name="(_record, index) => formatter(_record, index)"
+    >
       <template #headerCell="{ column }">
-        <div style="width:100%" v-if="column.filter == 1 || column.filter == 2">
+        <div
+          style="width: 100%"
+          v-if="column.filter == 1 || column.filter == 2"
+        >
           <!-- <a-input v-model:value="column.value" :placeholder="column.title" @change="setSearchParam(column.dataIndex,column.value)" @pressEnter="listData"></a-input> -->
-          <a-input v-model:value="column.value" :placeholder="column.title" @change="setSearchParam(column.dataIndex,column.value)" @pressEnter="listData" :bordered="true">
+          <a-input
+            v-model:value="column.value"
+            :placeholder="column.title"
+            @change="setSearchParam(column.dataIndex, column.value)"
+            @pressEnter="listData"
+            :bordered="true"
+          >
             <template v-if="column.sortable == 1" #suffix>
-              <sort-ascending-outlined v-if="column.sort == 0" @click="setSort(column,1)"/>
-              <sort-descending-outlined v-else @click="setSort(column,0)"/>
+              <sort-ascending-outlined
+                v-if="column.sort == 0"
+                @click="setSort(column, 1)"
+              />
+              <sort-descending-outlined v-else @click="setSort(column, 0)" />
             </template>
           </a-input>
         </div>
-        <span v-else style="display:inline-block;padding:0;">
-          {{column.title}}
+        <span v-else style="display: inline-block; padding: 0">
+          {{ column.title }}
           <template v-if="column.sortable == 1">
-            <sort-ascending-outlined v-if="column.sort == 0" @click="setSort(column,1)"/>
-            <sort-descending-outlined v-else @click="setSort(column,0)"/>
+            <sort-ascending-outlined
+              v-if="column.sort == 0"
+              @click="setSort(column, 1)"
+            />
+            <sort-descending-outlined v-else @click="setSort(column, 0)" />
           </template>
         </span>
       </template>
-      
+
       <template #bodyCell="{ column, record }">
-        <template v-if="column.fn" >
-          <div style="pointer-events: none;">{{column.fn(column.fn?record:'')}}</div>
+        <template v-if="column.fn">
+          <div style="pointer-events: none">
+            {{ column.fn(column.fn ? record : "") }}
+          </div>
         </template>
-        <slot name="tb_cell" :data="{column, record}"></slot>
+        <slot name="tb_cell" :data="{ column, record }"></slot>
       </template>
       <template #footer v-if="Object.keys($slots).indexOf('footer') != -1">
-        <slot name="footer">
-        </slot>
+        <slot name="footer"> </slot>
       </template>
     </a-table>
   </div>
 </template>
 
 <script setup>
-  import {defineEmits,ref,defineProps,defineExpose,onMounted,onBeforeUnmount,computed,watch,onActivated,onDeactivated } from 'vue';
-  import settingColumns from '@/components/tableConfiguration/settingColumns.vue'
-  import fullScreen from '@/components/tableConfiguration/fullScreen.vue'
-  import Api  from '@/api/api'
-  import utils  from '@/utils/utils'
-  import { useRouter } from "vue-router";
-  import { storeToRefs } from 'pinia'
-  import { useBaseStore } from '@/stores/modules/base'
-  import { useColumnsStore } from '@/stores/modules/columns'
-  import { useAuthStore } from '@/stores/modules/auth'
-  import { SortAscendingOutlined,SortDescendingOutlined,DownOutlined,SyncOutlined,SettingOutlined  } from '@ant-design/icons-vue';
+import {
+  defineEmits,
+  ref,
+  defineProps,
+  defineExpose,
+  onMounted,
+  onBeforeUnmount,
+  computed,
+  watch,
+  onActivated,
+  onDeactivated,
+} from "vue";
+import settingColumns from "@/components/tableConfiguration/settingColumns.vue";
+import fullScreen from "@/components/tableConfiguration/fullScreen.vue";
+import Api from "@/api/api";
+import utils from "@/utils/utils";
+import { useRouter } from "vue-router";
+import { storeToRefs } from "pinia";
+import { useBaseStore } from "@/stores/modules/base";
+import { useColumnsStore } from "@/stores/modules/columns";
+import { useAuthStore } from "@/stores/modules/auth";
+import {
+  SortAscendingOutlined,
+  SortDescendingOutlined,
+  DownOutlined,
+  SyncOutlined,
+  SettingOutlined,
+} from "@ant-design/icons-vue";
+import { template } from "@antv/g2plot/lib/utils";
 
-  const store = useAuthStore()
-  const colStore = useColumnsStore()
-  const base = useBaseStore()
-  let { app } = storeToRefs(store)
-  let { tableRecord,fullscreen} = storeToRefs(base)
-  let { selectedColumns } = storeToRefs(colStore)
-  const router = useRouter()
-  const props = defineProps({
-    tableName:String,
-    columns: Array,
-    param: Object,
-    hideBorder:Boolean,
-    size:String,
-    tableid:Number,
-    rowKey:String,
-    defaultExpandAllRows:{
-      type:Boolean,
-      default:() => false
-    },
-    filterMultiple:Boolean,
-    noQuery:false,
-    tableRowStyle:Function,
-    isSelect: {
-      type:Boolean,
-      default:() => true
-    }
-  })
-  const formatter = (_record, index) => {
-    if (props.tableRowStyle) 
-      return props.tableRowStyle(_record, index)
-    if (index % 2 === 1) {
-      return 'table-striped'
-    } else {
-      return null
-    }
+const store = useAuthStore();
+const colStore = useColumnsStore();
+const base = useBaseStore();
+let { app } = storeToRefs(store);
+let { tableRecord, fullscreen } = storeToRefs(base);
+let { selectedColumns } = storeToRefs(colStore);
+const router = useRouter();
+const props = defineProps({
+  tableName: String,
+  columns: Array,
+  param: Object,
+  hideBorder: Boolean,
+  size: String,
+  tableid: Number,
+  rowKey: String,
+  defaultExpandAllRows: {
+    type: Boolean,
+    default: () => false,
+  },
+  sequence: {
+    type: Boolean,
+    default: () => false,
+  },
+  filterMultiple: Boolean,
+  noQuery: false,
+  tableRowStyle: Function,
+  isSelect: {
+    type: Boolean,
+    default: () => true,
+  },
+});
+const formatter = (_record, index) => {
+  if (props.tableRowStyle) return props.tableRowStyle(_record, index);
+  if (index % 2 === 1) {
+    return "table-striped";
+  } else {
+    return null;
   }
-  const columns = ref(props.columns)
-  const data = ref([])
-  const selectedRowKeys = ref([])
-  const total = ref(0)
-  const emit = defineEmits(['onSelect','listData','emitParam'])
+};
+let expandedRowKeys = ref([])
+const columns = ref(props.columns);
+const data = ref([]);
+const selectedRowKeys = ref([]);
+const total = ref(0);
+const emit = defineEmits(["onSelect", "listData", "emitParam"]);
 
-  const onSelectChange =(changableRowKeys, selectedRows)=>{
-    selectedRowKeys.value = changableRowKeys;
-  }
-  const onChange = (pagination, filters, sorter, { currentDataSource })=>{
-    selectedRowKeys.value = tableRecord.value.map(e=>e[props.rowKey])
-    props.param.content.pageNumber = pagination.current
-    props.param.content.pageSize = pagination.pageSize
-    listData()
+const onSelectChange = (changableRowKeys, selectedRows) => {
+  selectedRowKeys.value = changableRowKeys;
+};
+const onChange = (pagination, filters, sorter, { currentDataSource }) => {
+  selectedRowKeys.value = tableRecord.value.map((e) => e[props.rowKey]);
+  props.param.content.pageNumber = pagination.current;
+  props.param.content.pageSize = pagination.pageSize;
+  listData();
+};
+const loading = ref(false);
+const listData = async (num, size) => {
+  loading.value = true;
+  props.param.content.tableid = props.tableid;
+  emit("emitParam", props.param);
+  const res = await Api.requested(props.param);
+  data.value = res.data;
+  total.value = res.total;
+  loading.value = false;
+  emit("listData", data.value, total.value);
+};
+const onSelect = async (record, selected, selectedRows, nativeEvent) => {
+  if (!selected) {
+    tableRecord.value = tableRecord.value.filter(
+      (e) => e[props.rowKey] !== record[props.rowKey]
+    );
+  } else {
+    tableRecord.value.push(record);
   }
-  const loading = ref(false)
-  const listData = async (num,size)=> {
-    loading.value = true
-    props.param.content.tableid = props.tableid
-    emit('emitParam',props.param)
-    const res = await Api.requested(props.param)
-    data.value = res.data
-    total.value = res.total
-    loading.value = false
-    emit('listData',data.value,total.value)
+  emit("onSelect", tableRecord.value);
+};
+const onSelectAll = (selected, selectedRows, changeRows) => {
+  if (selected) {
+    tableRecord.value = [...tableRecord.value, ...changeRows];
+  } else {
+    tableRecord.value = tableRecord.value.filter((itemA) => {
+      return !changeRows.some((itemB) => itemB.itemid === itemA.itemid);
+    });
   }
-  const onSelect = async (record, selected, selectedRows, nativeEvent)=>{
-    if (!selected) {
-      tableRecord.value = tableRecord.value.filter(e=>e[props.rowKey] !== record[props.rowKey])
-    } else {
-      tableRecord.value.push(record)
+  emit("onSelect", tableRecord.value);
+};
+const reloadSelect = () => {
+  selectedRowKeys.value = [];
+  tableRecord.value = [];
+  emit("onSelect", tableRecord.value);
+};
+const setSearchParam = (dataIndex, value) => {
+  props.param.content.pageNumber = 1;
+  props.param.content.where.tablefilter = props.param.content.where.tablefilter
+    ? props.param.content.where.tablefilter
+    : {};
+  props.param.content.where.tablefilter[dataIndex] = value;
+};
+const setSort = (column, sort) => {
+  props.param.content.simplesort = {};
+  column.sort = props.param.content.simplesort[column.dataIndex] = sort;
+  columns.value.forEach((e) => {
+    if (e.dataIndex !== column.dataIndex) {
+      e.sort = 0;
     }
-    emit('onSelect',tableRecord.value)
-  }
-  const onSelectAll = (selected, selectedRows, changeRows)=>{
-    if (selected) {
-      tableRecord.value = [...tableRecord.value,...changeRows]
-    } else {
-      tableRecord.value = tableRecord.value.filter(itemA => {
-        return !changeRows.some(itemB => itemB.itemid === itemA.itemid);
-      })
-    }
-    emit('onSelect',tableRecord.value)
-  }
-  const reloadSelect = () =>{
-    selectedRowKeys.value = []
-    tableRecord.value = []
-    emit('onSelect',tableRecord.value)
-  }
-  const setSearchParam = (dataIndex,value)=>{
-    props.param.content.pageNumber = 1
-    props.param.content.where.tablefilter = props.param.content.where.tablefilter ? props.param.content.where.tablefilter : {}
-    props.param.content.where.tablefilter[dataIndex] = value
-  }
-  const setSort = (column,sort)=>{
-    props.param.content.simplesort = {}
-    column.sort = props.param.content.simplesort[column.dataIndex] = sort
-    columns.value.forEach(e=>{
-      if (e.dataIndex !== column.dataIndex) {
-        e.sort = 0
+  });
+  listData();
+};
+let sourceObj = ref({});
+let targetObj = ref({});
+let noRequence = () => {};
+let customRow = (record, index) => {
+  return {
+    style: {
+      cursor: "move",
+    },
+    // 鼠标移入
+    onMouseenter: (event) => {
+      // 兼容IE
+      var ev = event || window.event;
+      ev.target.draggable = true;
+    },
+    // 开始拖拽
+    onDragstart: (event) => {
+      // 兼容IE
+      var ev = event || window.event;
+      // 阻止冒泡
+      ev.stopPropagation();
+      // 得到源目标数据
+      sourceObj.value = record;
+      setTimeout(() => {
+        if (record.parentid == 0) expandedRowKeys.value = []
+      },100)
+      console.log(sourceObj,'源数据');
+    },
+    // 拖动元素经过的元素
+    onDragover: (event) => {
+      // 兼容 IE
+      var ev = event || window.event;
+      // 阻止默认行为
+      let temp = record;
+      if ((sourceObj.value.parentid!=0 && temp.parentid==0) || sourceObj.value.level != temp.level) return
+      ev.preventDefault();
+    },
+    onDragEnd: (event) => {
+    },
+    // 鼠标松开
+    onDrop: async (event) => {
+      // 兼容IE
+      var ev = event || window.event;
+      // 阻止冒泡
+      ev.stopPropagation();
+      // 得到目标数据
+      targetObj.value = record;
+       event.preventDefault()
+      let tempDta = []
+      if (record.parentid != 0) {
+        for (let index = 0; index < data.value.length; index++) {
+          _findParentData(data.value[index],data.value)
+        }
+      } else {
+        tempDta = data.value;
       }
-    })
-    listData()
-    
-  }
-  const emitParam = (callback) => {
-    callback(props.param)
+      
+      function _findParentData (data,all) {
+        if (data[props.rowKey] == record[props.rowKey]) return tempDta = all
+        if (data.children && data.children.length) {
+          data.children.forEach(v => _findParentData(v,data.children))
+        }
+      }
+      tempDta[targetObj.value.weight] = sourceObj.value;
+      tempDta[sourceObj.value.weight] = targetObj.value;
+      let source;
+      let target;
+      tempDta.forEach((item, index) => {
+        item.weight = index;
+        if (sourceObj.value[props.rowKey] == item[props.rowKey]) source = item;
+        if (targetObj.value[props.rowKey] == item[props.rowKey]) target = item;
+      });
+      let res = await Api.requested({
+        id: "20221201134901",
+        content: {
+          ownertable: props.rowKey.substring(0, props.rowKey.indexOf("id")),
+          sequencesorts: [
+            {
+              ownerid: source[props.rowKey],
+              sequence:
+                props.param.content.pageSize *
+                  (props.param.content.pageNumber - 1) +
+                source.weight,
+            },
+            {
+              ownerid: target[props.rowKey],
+              sequence:
+                props.param.content.pageSize *
+                  (props.param.content.pageNumber - 1) +
+                target.weight,
+            },
+          ],
+        },
+      });
+    },
+  };
+};
+const emitParam = (callback) => {
+  callback(props.param);
+};
+onMounted(() => {
+  props.tableName
+    ? (columns.value = colStore.loadTableConfig(props.tableName))
+    : (columns.value = props.columns);
+  props.noQuery ? "" : listData();
+});
+onActivated(() => {});
+onDeactivated(() => {
+  reloadSelect();
+});
+watch(
+  () => selectedColumns.value,
+  (n, o) => {
+    columns.value = colStore.loadTableConfig(props.tableName);
   }
-  onMounted(()=>{
-    props.tableName ? columns.value = colStore.loadTableConfig(props.tableName) : columns.value = props.columns
-    props.noQuery ? '' : listData()
-  })
-  onActivated(()=>{
-  })
-  onDeactivated(()=>{
-    reloadSelect()
-  })
-  watch (() => selectedColumns.value,(n, o) => {
-    columns.value = colStore.loadTableConfig(props.tableName)
-  })
-  /**
-   * 开启缓存后需要拉取新数据
-   */
-  defineExpose({
-    data,
-    listData,
-    reloadSelect,
-    emitParam,
-    tableRecord,
-    total
-  })
+);
+/**
+ * 开启缓存后需要拉取新数据
+ */
+defineExpose({
+  data,
+  listData,
+  reloadSelect,
+  emitParam,
+  tableRecord,
+  total,
+});
 </script>
 <style>
-
 </style>
 <style scoped>
 .ant-table-small :deep(.table-striped) td {
   background-color: #f8f9fd;
-  
 }
-.ant-table-striped :deep td{
+.ant-table-striped :deep td {
   font-size: 12px;
 }
-.normalTable{
+.normalTable {
   background: #fff;
 }
-.fl-l{
+.fl-l {
   float: left;
 }
-.fl-r{
+.fl-r {
   float: right;
 }
 .ant-table-small :deep(.table-striped-red) td {
   background: #f1f2f3;
-  color:#d9363e;
+  color: #d9363e;
 }
-.ant-table-small :deep(.table-striped-red) .ant-input-number-input,.ant-table-small :deep(.table-striped-red) .ant-input{
+.ant-table-small :deep(.table-striped-red) .ant-input-number-input,
+.ant-table-small :deep(.table-striped-red) .ant-input {
   color: #d9363e !important;
 }
 </style>

+ 9 - 0
src/utils/directive.js

@@ -0,0 +1,9 @@
+export default (app) => {
+    app.directive('focus',{
+        mounted:(el) => {
+            setTimeout(() => {
+            el.focus()
+            })
+        }
+    })
+}