فهرست منبع

基础信息数据查询功能修复

liao-sea 1 سال پیش
والد
کامیت
626269dab1

+ 23 - 17
src/main/java/com/hz/employmentsite/controller/baseSettings/InstitutionController.java

@@ -5,10 +5,11 @@ import com.github.pagehelper.PageInfo;
 import com.hz.employmentsite.filter.exception.BaseResponse;
 import com.hz.employmentsite.filter.exception.RespGenerstor;
 import com.hz.employmentsite.util.ExcelHelper;
-import org.apache.ibatis.annotations.Param;
+import com.hz.employmentsite.vo.baseSettings.SiteInfoModel;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 import com.hz.employmentsite.services.service.baseSettings.InstitutionService;
+import com.hz.employmentsite.services.service.baseSettings.SiteInfoService;
 import com.hz.employmentsite.services.service.AccountService;
 import com.hz.employmentsite.vo.baseSettings.InstitutionModel;
 
@@ -25,6 +26,9 @@ public class InstitutionController {
     @Autowired
     private InstitutionService institutionService;
 
+    @Autowired
+    private SiteInfoService siteInfoService;
+
     @Autowired
     private ExcelHelper excelHelper;
 
@@ -42,12 +46,14 @@ public class InstitutionController {
 
 
     @GetMapping("get")
-    public BaseResponse<InstitutionModel> get(@RequestParam(required = false) String szkey) {
+    public BaseResponse<InstitutionModel> get(@RequestParam("pageIndex") int pageIndex, @RequestParam("pageSize") int pageSize,@RequestParam(required = false) String institutionID) {
         InstitutionModel dataModel = new  InstitutionModel();
-        if (szkey==null || szkey==""){
-            dataModel.InstitutionID = UUID.randomUUID().toString();
+        if (institutionID == null || institutionID == ""){
+            dataModel.institutionID = UUID.randomUUID().toString();
+            dataModel.manageSites = null;
         }else{
-            dataModel = institutionService.get(szkey);
+            dataModel = institutionService.get(institutionID);
+            dataModel.manageSites = siteInfoService.getListByInstitutionID(pageIndex,pageSize,institutionID).getList();
         }
         return RespGenerstor.success(dataModel);
     }
@@ -75,18 +81,18 @@ public class InstitutionController {
                 List<Object> row = new ArrayList();
                 ++i;
                 row.add(i);
-                row.add(item.CompanyCode);
-                row.add(item.CompanyCode);
-                row.add(item.FzrName);
-                row.add(item.FzrMobile);
-                row.add(item.FrName);
-                row.add(item.FrMobile);
-                row.add(item.CompanyAddress);
-                row.add(item.CompanyDesc);
-                row.add(item.CreateUserID);
-                row.add(item.CreateTime);
-                row.add(item.ModifyUserID);
-                row.add(item.ModifyTime);
+                row.add(item.companyCode);
+                row.add(item.companyCode);
+                row.add(item.fzrName);
+                row.add(item.fzrMobile);
+                row.add(item.frName);
+                row.add(item.frMobile);
+                row.add(item.companyAddress);
+                row.add(item.companyDesc);
+                row.add(item.createUserID);
+                row.add(item.createTime);
+                row.add(item.modifyUserID);
+                row.add(item.modifyTime);
                 rowDatas.add(row);
             }
             data.setRows(rowDatas);

+ 1 - 0
src/main/java/com/hz/employmentsite/mapper/cquery/SiteInfoCQuery.java

@@ -10,4 +10,5 @@ public interface SiteInfoCQuery {
                                 @Param("siteName") String siteName, @Param("institutionName") String institutionName,
                                 @Param("regionCode") String regionCode, @Param("streetCode") String streetCode);
 
+    List<SiteInfoModel> getListByInstitutionID(@Param("institutionID") String institutionID);
 }

+ 17 - 13
src/main/java/com/hz/employmentsite/services/impl/baseSettings/InstitutionImpl.java

@@ -1,5 +1,6 @@
 package com.hz.employmentsite.services.impl.baseSettings;
 
+import com.alibaba.druid.sql.ast.statement.SQLPrimaryKey;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.hz.employmentsite.mapper.PcInstitutionMapper;
@@ -37,19 +38,22 @@ public class InstitutionImpl implements InstitutionService {
         return result;
     }
 
+
+
     @Override
-    public InstitutionModel get(String problemLedgerRecordID) {
+    public InstitutionModel get(String InstitutionID) {
         List<String> ids = new ArrayList<>();
-        ids.add(problemLedgerRecordID);
-        InstitutionModel model = institutionCQuery.getList(stringUtils.ListToInSql(ids),null,null ,null).stream().findFirst().orElse(null);
+        ids.add(InstitutionID);
+        String sqlPrimaryKey = stringUtils.ListToInSql(ids);
+        InstitutionModel model = institutionCQuery.getList(sqlPrimaryKey,null,null ,null).stream().findFirst().orElse(null);
         return model;
     }
 
     @Override
     public Integer save(InstitutionModel data, String userId) {
         int result = 0;
-        InstitutionModel record = get(data.InstitutionID);
-        PcInstitution dbData = record ==null ? null : pcInstitutionMapper.selectByPrimaryKey(record.InstitutionID);
+        InstitutionModel record = get(data.institutionID);
+        PcInstitution dbData = record ==null ? null : pcInstitutionMapper.selectByPrimaryKey(record.institutionID);
         Boolean isExist = dbData != null;
         if (!isExist) {
             //添加
@@ -68,14 +72,14 @@ public class InstitutionImpl implements InstitutionService {
             result = pcInstitutionMapper.insert(dbData);
         } else {
             //修改
-            dbData.setCompanyCode(data.CompanyCode);
-            dbData.setCompanyName(data.CompanyName);
-            dbData.setCompanyAddress(data.CompanyAddress);
-            dbData.setFzrName(data.FzrName);
-            dbData.setFzrMobile(data.FzrMobile);
-            dbData.setFrName(data.FzrName);
-            dbData.setFrMobile(data.FzrMobile);
-            dbData.setCompanyDesc(data.CompanyDesc);
+            dbData.setCompanyCode(data.companyCode);
+            dbData.setCompanyName(data.companyName);
+            dbData.setCompanyAddress(data.companyAddress);
+            dbData.setFzrName(data.fzrName);
+            dbData.setFzrMobile(data.fzrMobile);
+            dbData.setFrName(data.fzrName);
+            dbData.setFrMobile(data.fzrMobile);
+            dbData.setCompanyDesc(data.companyDesc);
             dbData.setModifyUserID(userId);
             dbData.setModifyTime(new Date());
             result = pcInstitutionMapper.updateByPrimaryKey(dbData);

+ 8 - 0
src/main/java/com/hz/employmentsite/services/impl/baseSettings/SiteInfoImpl.java

@@ -5,6 +5,7 @@ import com.github.pagehelper.PageInfo;
 import com.hz.employmentsite.mapper.cquery.SiteInfoCQuery;
 import com.hz.employmentsite.services.service.baseSettings.SiteInfoService;
 import com.hz.employmentsite.util.StringUtils;
+import com.hz.employmentsite.vo.baseSettings.InstitutionModel;
 import com.hz.employmentsite.vo.baseSettings.SiteInfoModel;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
@@ -28,5 +29,12 @@ public class SiteInfoImpl implements SiteInfoService {
         return result;
     }
 
+    @Override
+    public PageInfo<SiteInfoModel> getListByInstitutionID(int pageIndex, int pageSize,String institutionID) {
+        PageHelper.startPage(pageIndex, pageSize);
+        List<SiteInfoModel> dataList = siteInfoCQuery.getListByInstitutionID(institutionID);
+        PageInfo<SiteInfoModel> result = new PageInfo(dataList);
+        return result;
+    }
 
 }

+ 1 - 0
src/main/java/com/hz/employmentsite/services/service/baseSettings/InstitutionService.java

@@ -2,6 +2,7 @@ package com.hz.employmentsite.services.service.baseSettings;
 
 import com.github.pagehelper.PageInfo;
 import com.hz.employmentsite.vo.baseSettings.InstitutionModel;
+import com.hz.employmentsite.vo.baseSettings.SiteInfoModel;
 
 import java.util.List;
 

+ 2 - 0
src/main/java/com/hz/employmentsite/services/service/baseSettings/SiteInfoService.java

@@ -1,6 +1,7 @@
 package com.hz.employmentsite.services.service.baseSettings;
 
 import com.github.pagehelper.PageInfo;
+import com.hz.employmentsite.vo.baseSettings.InstitutionModel;
 import com.hz.employmentsite.vo.baseSettings.SiteInfoModel;
 
 
@@ -8,4 +9,5 @@ public interface SiteInfoService {
 
     PageInfo<SiteInfoModel> getList(int pageIndex, int pageSize, String primaryKey, String siteCode, String siteName, String institutionName, String regionCode, String streetCode);
 
+    PageInfo<SiteInfoModel> getListByInstitutionID(int pageIndex, int pageSize, String institutionID);
 }

+ 17 - 14
src/main/java/com/hz/employmentsite/vo/baseSettings/InstitutionModel.java

@@ -2,27 +2,30 @@ package com.hz.employmentsite.vo.baseSettings;
 import lombok.Data;
 
 import java.sql.Time;
+import java.util.ArrayList;
+import java.util.List;
 
 @Data
 public class InstitutionModel {
 
-    public String InstitutionID;
-    public String CompanyCode;
-    public String CompanyName;
-    public String CompanyAddress;
-    public String CompanyDesc;
+    public String institutionID;
+    public String companyCode;
+    public String companyName;
+    public String companyAddress;
+    public String companyDesc;
 
-    public String FzrName;
-    public String FzrMobile;
+    public String fzrName;
+    public String fzrMobile;
 
-    public String FrName;
-    public String FrMobile;
+    public String frName;
+    public String frMobile;
 
-    public Integer SiteCount;
+    public List<SiteInfoModel> manageSites;
+    public Integer siteCount;
 
-    public String CreateUserID;
-    public Time CreateTime;
-    public String ModifyUserID;
-    public Time ModifyTime;
+    public String createUserID;
+    public Time createTime;
+    public String modifyUserID;
+    public Time modifyTime;
 
 }

+ 15 - 15
src/main/java/com/hz/employmentsite/vo/baseSettings/SiteInfoModel.java

@@ -6,24 +6,24 @@ import java.sql.Time;
 @Data
 public class SiteInfoModel {
 
-    public String SiteID;
-    public String SiteCode;
-    public String RegionCode;
-    public String StreetCode;
-    public String DetailAddress;
+    public String siteID;
+    public String siteCode;
+    public String regionCode;
+    public String streetCode;
+    public String detailAddress;
 
-    public String SiteX;
-    public String SiteY;
+    public String siteX;
+    public String siteY;
 
-    public String SiteName;
-    public String FzrName;
-    public String FzrMobile;
+    public String siteName;
+    public String fzrName;
+    public String fzrMobile;
 
-    public String CompanyName;
+    public String institutionName;
 
-    public String CreateUserID;
-    public Time CreateTime;
-    public String ModifyUserID;
-    public Time ModifyTime;
+    public String createUserID;
+    public Time createTime;
+    public String modifyUserID;
+    public Time modifyTime;
 
 }

+ 11 - 11
src/main/java/com/hz/employmentsite/vo/baseSettings/UserInfoModel.java

@@ -5,18 +5,18 @@ import java.sql.Time;
 @Data
 public class UserInfoModel {
 
-    public String UserID;
-    public Integer UserTypeID;
-    public String UserTypeName;
-    public String LoginID;
-    public String Password;
-    public String Name;
+    public String userID;
+    public Integer userTypeID;
+    public String userTypeName;
+    public String loginID;
+    public String password;
+    public String name;
 
-    public Integer RecordStatus;
+    public Integer recordStatus;
 
-    public String CreateBy;
-    public Time CreateTime;
-    public String UpdateBy;
-    public Time UpdateTime;
+    public String createBy;
+    public Time createTime;
+    public String updateBy;
+    public Time updateTime;
 
 }

+ 7 - 7
src/main/resources/mapping/cquery/InstitutionCQuery.xml

@@ -2,21 +2,21 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.hz.employmentsite.mapper.cquery.InstitutionCQuery">
     <select id="getList" resultType="com.hz.employmentsite.vo.baseSettings.InstitutionModel">
-        select  B.*,Count(A.SiteInstitutionID)as SiteCount from pc_site_institution  A inner join  pc_institution B on
-        A.InstitutionID = B.InstitutionID  where 1=1
+        select  B.*,Count(A.siteInstitutionID)as siteCount from pc_site_institution  A left join  pc_institution B on
+        A.institutionID = B.institutionID  where 1=1
         <if test="primaryKey!='' and primaryKey!=null">
-            and InstitutionID in (${primaryKey})
+            and B.institutionID in (${primaryKey})
         </if>
         <if test="companyName!='' and companyName!=null">
-            and Companyname like Concat('%',#{companyName},'%')
+            and companyname like Concat('%',#{companyName},'%')
         </if>
         <if test="companyAddress!='' and companyAddress!=null">
-            and CompanyAddress like Concat('%',#{companyAddress},'%')
+            and companyAddress like Concat('%',#{companyAddress},'%')
         </if>
         <if test="dutyUserName!='' and dutyUserName!=null">
-            and FzrName like Concat('%',#{dutyUserName},'%')
+            and fzrName like Concat('%',#{dutyUserName},'%')
         </if>
-        group by B.InstitutionID
+        group by B.institutionID
     </select>
 
 </mapper>

+ 15 - 8
src/main/resources/mapping/cquery/SiteInfoCQuery.xml

@@ -2,26 +2,33 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.hz.employmentsite.mapper.cquery.SiteInfoCQuery">
     <select id="getList" resultType="com.hz.employmentsite.vo.baseSettings.SiteInfoModel">
-        select  A.*,C.CompanyName as CompanyName from pc_site A,pc_site_institution B,pc_institution C
-        where A.SiteID = B.SiteID and B.InstitutionID = C.InstitutionID and 1=1
+        select  A.*,C.companyName as institutionName from pc_site A,pc_site_institution B,pc_institution C
+        where A.SiteID = B.SiteID and B.institutionID = C.institutionID and 1=1
         <if test="primaryKey!='' and primaryKey!=null">
-            and A.SiteID in (${primaryKey})
+            and A.siteID in (${primaryKey})
         </if>
         <if test="siteCode!='' and siteCode!=null">
-            and SiteCode like Concat('%',#{siteCode},'%')
+            and siteCode like Concat('%',#{siteCode},'%')
         </if>
         <if test="siteName!='' and siteName!=null">
-            and SiteName like Concat('%',#{siteName},'%')
+            and siteName like Concat('%',#{siteName},'%')
         </if>
         <if test="institutionName!='' and institutionName!=null">
-            and C.CompanyName like Concat('%',#{institutionName},'%')
+            and C.companyName like Concat('%',#{institutionName},'%')
         </if>
         <if test="regionCode!='' and regionCode!=null">
-            and RegionCode like Concat('%',#{regionCode},'%')
+            and regionCode like Concat('%',#{regionCode},'%')
         </if>
         <if test="streetCode!='' and streetCode!=null">
-            and StreetCode like Concat('%',#{streetCode},'%')
+            and streetCode like Concat('%',#{streetCode},'%')
         </if>
     </select>
 
+    <select id="getListByInstitutionID" resultType="com.hz.employmentsite.vo.baseSettings.SiteInfoModel">
+        select  A.* from pc_site A,pc_site_institution B,pc_institution C
+        where A.siteID = B.siteID and B.institutionID = C.institutionID and 1=1
+        <if test="institutionID!='' and institutionID!=null">
+            and C.institutionID = #{institutionID}
+        </if>
+    </select>
 </mapper>

+ 4 - 4
src/main/resources/mapping/cquery/UserInfoCQuery.xml

@@ -2,13 +2,13 @@
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.hz.employmentsite.mapper.cquery.UserInfoCQuery">
     <select id="getList" resultType="com.hz.employmentsite.vo.baseSettings.UserInfoModel">
-        select A.*,B.Name as UserTypeName from sys_user A,(select * from  sys_dictionary_item where DictionaryCode ='UserType') B
-        where A.UserTypeID = B.Value and 1=1
+        select A.*,B.name as userTypeName from sys_user A,(select * from  sys_dictionary_item where dictionaryCode ='UserType') B
+        where A.userTypeID = B.value and 1=1
         <if test="primaryKey!='' and primaryKey!=null">
-            and UserID in (${primaryKey})
+            and userID in (${primaryKey})
         </if>
         <if test="userName!='' and userName!=null">
-            and A.Name like Concat('%',#{userName},'%')
+            and A.name like Concat('%',#{userName},'%')
         </if>
 
     </select>

+ 2 - 2
vue/src/api/baseSettings/institution.ts

@@ -27,12 +27,12 @@ export function getDataList(params:any){
   );
 }
 
-export function get(id: string) {
+export function get(params: any) {
   return request<object>(
     {
       url: 'institution/get',
       method: 'get',
-      params: {problemLedgerRecordID: id},
+      params: params,
     },
     {
       isNew: true,

+ 4 - 0
vue/src/router/asyncModules/companyService.ts

@@ -0,0 +1,4 @@
+export default {
+  'companyService/company/index': () => import('@/views/company/index.vue'),
+  'companyService/post/index': () => import('@/views/post/index.vue'),
+};

+ 103 - 96
vue/src/views/baseSettings/institution/edit.vue

@@ -15,20 +15,20 @@
       <a-row type="flex">
         <a-col :span="7">
           <a-form-item label="企业名称" name="CompanyName" :label-col="{span:7}">
-            <label v-if="isDetail">{{dataModel.szcompanyname}}</label>
-            <a-input v-model:value="dataModel.szcompanyname" placeholder=""/>
+            <label v-if="isDetail">{{dataModel.companyName}}</label>
+            <a-input v-model:value="dataModel.companyName" placeholder=""/>
           </a-form-item>
         </a-col>
         <a-col :span="7">
           <a-form-item label="企业地址" name="CompanyAddress" :label-col="{span:7}">
-            <label v-if="isDetail">{{ dataModel.szcomaddress }}</label>
-            <a-input v-model:value="dataModel.szcomaddress" placeholder=""/>
+            <label v-if="isDetail">{{dataModel.companyAddress }}</label>
+            <a-input v-model:value="dataModel.companyAddress" placeholder=""/>
           </a-form-item>
         </a-col>
         <a-col :span="10">
           <a-form-item label="负责人姓名" name="DutyUserName" :label-col="{span:10}" >
-            <label v-if="isDetail">{{dataModel.szcomusername}}</label>
-            <a-input v-model:value="dataModel.szcomusername" placeholder=""/>
+            <label v-if="isDetail">{{dataModel.fzrName}}</label>
+            <a-input v-model:value="dataModel.fzrName" placeholder=""/>
 <!--            <a-date-picker  name="feedbackDate2" v-model:value="dataModel.feedbackDate"   value-format="YYYY-MM-DD" picker="date"
                             placeholder="请选择问题反馈日期"  v-if="!isDetail"  />
                 <a-select  ref="select" v-model:value="dataModel.problemCharacteristics"
@@ -41,78 +41,70 @@
       <a-row type="flex">
         <a-col :span="7">
           <a-form-item label="负责人电话:"  name="DutyUserMobile" :label-col="{span:7}">
-            <label v-if="isDetail">{{dataModel.szcomusermobile }}</label>
-            <a-input v-model:value="dataModel.szcomusermobile" placeholder=""/>
+            <label v-if="isDetail">{{dataModel.fzrMobile }}</label>
+            <a-input v-model:value="dataModel.fzrMobile" placeholder=""/>
           </a-form-item>
         </a-col>
         <a-col :span="7">
           <a-form-item label="法人姓名:"  name="LegalerName" :label-col="{span:7}">
-            <label v-if="isDetail">{{dataModel.szfrname }}</label>
-            <a-input v-model:value="dataModel.szfrname" placeholder=""/>
+            <label v-if="isDetail">{{dataModel.frName }}</label>
+            <a-input v-model:value="dataModel.frName" placeholder=""/>
           </a-form-item>
         </a-col>
         <a-col :span="10">
           <a-form-item label="法人电话:"  name="LegalerMobile" :label-col="{span:10}">
-            <label v-if="isDetail">{{dataModel.szfrmobile }}</label>
-            <a-input v-model:value="dataModel.szfrmobile" placeholder=""/>
+            <label v-if="isDetail">{{dataModel.frMobile }}</label>
+            <a-input v-model:value="dataModel.frMobile" placeholder=""/>
           </a-form-item>
         </a-col>
       </a-row>
       <a-row type="flex">
         <a-col :span="7">
           <a-form-item label="企业机构代码:"  name="CompanyCode" :label-col="{span:7}">
-            <label v-if="isDetail">{{dataModel.szcompanycode }}</label>
-            <a-input v-model:value="dataModel.szcompanycode" placeholder=""/>
+            <label v-if="isDetail">{{dataModel.companyCode }}</label>
+            <a-input v-model:value="dataModel.companyCode" placeholder=""/>
           </a-form-item>
         </a-col>
         <a-col :span="7"></a-col>
         <a-col :span="10"></a-col>
       </a-row>
-      <a-divider orientation="left">管理驿站 共计:{{dataModel.szCount}}</a-divider>
+      <a-divider orientation="left">管理驿站 共计:{{dataModel.siteCount}}</a-divider>
       <a-row>
-      <!--        <a-table :columns="columns" :data-source="dataList" :scroll="{ x:'100%', y: 500 }" :pagination="pagination"
+      <a-table :columns="columns" :data-source="dataModel.manageSites" :scroll="{ x:'100%', y: 500 }" :pagination="pagination"
                  :loading="formState.loading"
                  @change="handleTableChange"
                  :row-selection="{ selectedRowKeys: formState.selectedRowKeys, onChange: onSelectChange}"
-                 :row-key="record=>record.szkey"
+                 :row-key="record=>record.siteId"
                  bordered>
-          <template #bodyCell="{ column, text, record }">
-            <template v-if="column.key === 'operation'">
-              <div class="table-operation">
-                <a-button type="link" size="small" @click='onOperates(record.szkey.toString(),"修改",false)' >编辑</a-button>
-                <a-button type="link" size="small" @click="onDel(record)" >删除</a-button>
-              </div>
-            </template>
-          </template>
-        </a-table>-->
+          <template #bodyCell="{ column, text, record }"></template>
+        </a-table>
       </a-row>
       <a-divider orientation="left">其他</a-divider>
       <a-row>
-        <a-textarea :auto-size="{ minRows: 4, maxRows: 10 }"  v-model:value="dataModel.szdetail"  :disabled="isDetail"
+        <a-textarea :auto-size="{ minRows: 4, maxRows: 10 }"  v-model:value="dataModel.companyDesc"  :disabled="isDetail"
                     placeholder="企业简介" style="text-align: center;" />
       </a-row>
       <a-row style="height: 10px"></a-row>
       <a-row>
-        <a-textarea :auto-size="{ minRows: 4, maxRows: 10 }"  v-model:value="dataModel.remark"  :disabled="isDetail"
+        <a-textarea :auto-size="{ minRows: 4, maxRows: 10 }"  v-model:value="dataModel.remarkDesc"  :disabled="isDetail"
                     placeholder="备注" style="text-align: center;" />
       </a-row>
     </a-form>
   </a-modal>
 </template>
 <script lang="ts">
-import {defineComponent, reactive, ref, toRefs} from "vue";
-import {get, save, getDataList} from "@/api/baseSettings/institution";
+import {computed, defineComponent, reactive, ref, toRefs} from "vue";
+import {get, save} from "@/api/baseSettings/institution";
 import BUploadFile from "@/components/file/uploadFile.vue";
-import type {SelectProps} from "ant-design-vue";
-import {getCollegeList,getDictionaryItemList} from "@/api/system/dictionary";
-import dayjs from "dayjs";
-import {message} from "ant-design-vue";
+/*import dayjs from "dayjs";*/
+import {message, TableColumnsType, TableProps} from "ant-design-vue";
+import {getPaginationTotalTitle} from "@/utils/common";
 
-interface FormState {
+interface InstitutionModel {
   dataModel: any;
 }
 export default defineComponent({
-  name:'institutionEditForm',
+  name:'InstitutionEditForm',
   components: {BUploadFile},
   props: {
     loadData: {
@@ -121,70 +113,94 @@ export default defineComponent({
     }
   },
   setup(props) {
-    const feedbackDateDetail = ref();
-    const resolveDateDetail = ref();
-    const formState = reactive<FormState>({dataModel: {}});
+    /*const feedbackDateDetail = ref();
+    const resolveDateDetail = ref();*/
+    const formData = reactive<InstitutionModel>({ dataModel:{}});
     const visible = ref<boolean>(false);
     const confirmLoading = ref<boolean>(false);
-    const fileList = ref();
     const title = ref();
     const isAllowCommit = ref<boolean>(false);
     const isDetail = ref<boolean>(false);
+    const pageParams = reactive({
+      pageIndex: 1,
+      pageSize: 20,
+      institutionID:''
+    });
+    const columns: TableColumnsType = [
+      {title: '序号', align: "center",key: 'siteID',customRender: item => `${pageParams.pageSize * (pageParams.pageIndex - 1) + item.index + 1}`},
+      {title: '驿站名称', dataIndex: 'siteName', key: 'siteName', align: "center"},
+      {title: '驿站地址', dataIndex: 'detailAddress', key: 'detailAddress', align: "center"}
+    ];
+    const pagination = computed(() => ({
+      total: formState.total,
+      current: pageParams.pageIndex,
+      pageSize: pageParams.pageSize,
+      showSizeChanger: true,
+      showTotal: total => getPaginationTotalTitle(total)
+    }));
+    const formState = reactive({
+      total: 0,
+      selectedRowKeys: [],
+      loading: false
+    });
 
-    const problemAttrList = ref<SelectProps['options']>();
-    const collegeList = ref<SelectProps['options']>();
-    const schoolYearList = ref<SelectProps['options']>();
-
-    const loadProblemAttrList = () => {
-      getDictionaryItemList({code:"Characteristics"}).then(data => {
-        problemAttrList.value = data;
-      });
-    }
-    const loadCollegeList = () => {
-      getCollegeList().then(data => {
-        collegeList.value = data;
+    const loadData = (id: string) => {
+      pageParams.institutionID = id;
+      get(pageParams).then((result: any) => {
+        formData.dataModel = result;
+        console.log(formData.dataModel);
+        /*feedbackDateDetail.value = dayjs(formState.dataModel.feedbackDate).format('YYYY-MM-DD');
+        resolveDateDetail.value = formState.dataModel.resolveDate == null?"": dayjs(formState.dataModel.resolveDate).format('YYYY-MM-DD');*/
       });
     }
-    const loadSchoolYearList =()=>{
-      getDataList({page:1,rows:100000}).then(data=>{
-        schoolYearList.value =data.list;
-      })
-    }
 
+    const show = (id: any,method:string,ifDetail:boolean) => {
+      isDetail.value = ifDetail;
+      loadData(id);
+      title.value ="运营机构管理-"+method;
+      visible.value = true;
+    };
+
+    const handleTableChange: TableProps['onChange'] = (pag: { pageSize: number; current: number },) => {
+      pageParams.pageIndex = pag.current;
+      pageParams.pageSize = pag.pageSize;
+    };
+
+    const onSelectChange = (selectedRowKeys: any) => {
+      formState.selectedRowKeys = selectedRowKeys;
+    };
 
     const validate = ()  =>{
-      console.log(formState.dataModel);
-      if (formState.dataModel.collegeID==null) {
-        message.error("请选择学院!");
+      console.log(formData.dataModel);
+      if (formData.dataModel.companyName==null) {
+        message.error("请输入企业名称!");
+        return;
+      }else if (formData.dataModel.companyAddress==null) {
+        message.error("请输入企业地址!");
         return;
-      }else if (formState.dataModel.feedbackDate==null) {
-        message.error("请选择问题反馈日期!");
+      }else if (formData.dataModel.fzrName==null) {
+        message.error("请输入负责人名称!");
         return;
-      }else if (formState.dataModel.problemCharacteristics==null) {
-        message.error("请选择问题特性!");
+      }else if (formData.dataModel.fzrMobile==null) {
+        message.error("请填写负责人电话!");
         return;
-      }else if (formState.dataModel.problemDesc==null) {
-        message.error("请填写问题描述!");
+      }else if (formData.dataModel.frName==null) {
+        message.error("请填写法人姓名!");
+        return;
+      }else if (formData.dataModel.frMobile==null) {
+        message.error("请填写法人电话!");
+        return;
+      }else if (formData.dataModel.companyCode==null) {
+        message.error("请填写企业机构代码!");
         return;
       }
       isAllowCommit.value = true;
     };
 
-    const show = (id: any,method:string,ifDetail:boolean) => {
-      isDetail.value = ifDetail;
-      loadData(id);
-      loadProblemAttrList();
-      loadCollegeList();
-      loadSchoolYearList();
-      title.value ="运营机构管理-"+method;
-      visible.value = true;
-    };
-
-
     const handleOk = () => {
       validate();
       if (isAllowCommit.value){
-        save(formState.dataModel).then(result => {
+        save(formData.dataModel).then(result => {
           if (result) {
             visible.value = false;
             props.loadData();
@@ -197,35 +213,26 @@ export default defineComponent({
       visible.value = false;
     };
 
-    const setFileList = (files) => {
-      fileList.value = files;
-    }
-
 
-    const loadData = (id: string) => {
-      get(id).then((result: any) => {
-        formState.dataModel = result;
-        feedbackDateDetail.value = dayjs(formState.dataModel.feedbackDate).format('YYYY-MM-DD');
-        resolveDateDetail.value = formState.dataModel.resolveDate == null?"": dayjs(formState.dataModel.resolveDate).format('YYYY-MM-DD');
-      });
-    }
 
     return {
-      ...toRefs(formState),
-      feedbackDateDetail,
-      resolveDateDetail,
+      ...toRefs(formData),
+      pageParams,
+      columns,
+      pagination,
+      formState,
+      /*feedbackDateDetail,
+      resolveDateDetail,*/
       isAllowCommit,
       isDetail,
       visible,
       title,
       confirmLoading,
-      problemAttrList,
-      collegeList,
-      schoolYearList,
       show,
+      handleTableChange,
+      onSelectChange,
       handleOk,
       handleCancel,
-      setFileList,
       validate
     };
   },

+ 22 - 22
vue/src/views/baseSettings/institution/index.vue

@@ -81,12 +81,12 @@
                :loading="formState.loading"
                @change="handleTableChange"
                :row-selection="{ selectedRowKeys: formState.selectedRowKeys, onChange: onSelectChange}"
-               :row-key="record=>record.szkey"
+               :row-key="record=>record.institutionID"
                bordered>
         <template #bodyCell="{ column, text, record }">
           <template v-if="column.key === 'operation'">
             <div class="table-operation">
-              <a-button type="link" size="small" @click='onOperates(record.szkey.toString(),"修改",false)' >编辑</a-button>
+              <a-button type="link" size="small" @click='onOperates(record.institutionID,"修改",false)' >编辑</a-button>
               <a-button type="link" size="small" @click="onDel(record)" >删除</a-button>
             </div>
           </template>
@@ -127,16 +127,15 @@ export default defineComponent({
       loading: false
     });
     const columns: TableColumnsType = [
-      {title: '序号', align: "center",key: 'szkey',customRender: item => `${searchParams.pageSize * (searchParams.pageIndex - 1) + item.index + 1}`},
-      {title: '企业名称', dataIndex: 'CompanyName', key: 'CompanyName', align: "center"},
-      {title: '企业地址', dataIndex: 'CompanyAddress', key: 'CompanyAddress',width:120, align: "center"},
-      {title: '负责人姓名', dataIndex: 'FzrName', key: 'FzrName', align: "center"},
-      {title: '负责人电话', dataIndex: 'FzrMobile', key: 'FzrMobile', align: "center"},
-      {title: '法人姓名', dataIndex: 'FrName', key: 'FrName', align: "center"},
-      {title: '法人电话', dataIndex: 'FrMobile', key: 'FrMobile', align: "center"},
-      {title: '企业机构代码', dataIndex: 'CompanyCode', key: 'CompanyCode', align: "center"},
-      {
-        title: '管理驿站数量', dataIndex: 'SiteCount', key: 'SiteCount', align: "center",
+      {title: '序号', align: "center",key: 'institutionID',customRender: item => `${searchParams.pageSize * (searchParams.pageIndex - 1) + item.index + 1}`},
+      {title: '企业名称', dataIndex: 'companyName', key: 'companyName', align: "center"},
+      {title: '企业地址', dataIndex: 'companyAddress', key: 'companyAddress',width:120, align: "center"},
+      {title: '负责人姓名', dataIndex: 'fzrName', key: 'fzrName', align: "center"},
+      {title: '负责人电话', dataIndex: 'fzrMobile', key: 'fzrMobile', align: "center"},
+      {title: '法人姓名', dataIndex: 'frName', key: 'frName', align: "center"},
+      {title: '法人电话', dataIndex: 'frMobile', key: 'frMobile', align: "center"},
+      {title: '企业机构代码', dataIndex: 'companyCode', key: 'companyCode', align: "center"},
+      {title: '管理驿站数量', dataIndex: 'siteCount', key: 'siteCount', align: "center",
         /*customRender:  ({record}) => record.resolveDate == null?"":dayjs(record.resolveDate).format('YYYY-MM-DD')*/
       },
       {title: '操作', key: 'operation', fixed: 'right',width:170, align: "center"},
@@ -155,6 +154,16 @@ export default defineComponent({
     const resolveList = ref([{resolveName:"是",resolveID:1},{resolveName:"否",resolveID:0}]);*/
     const institutionEditModelRef = ref();
 
+
+    const loadData = async function () {
+      formState.loading = true;
+      const result: any = await getList(searchParams);
+      dataList.value = result.list;
+      console.log(dataList.value);
+      formState.total = result.total;
+      formState.loading = false;
+    }
+
     const handleTableChange: TableProps['onChange'] = (pag: { pageSize: number; current: number },) => {
       searchParams.pageIndex = pag.current;
       searchParams.pageSize = pag.pageSize;
@@ -171,7 +180,7 @@ export default defineComponent({
 
     const onDel= (item: any) => {
       if (item) {
-        formState.selectedRowKeys.push(item.szkey as never)
+        formState.selectedRowKeys.push(item.InstitutionID as never)
       }
 
       if (formState.selectedRowKeys.length <= 0) {
@@ -201,15 +210,6 @@ export default defineComponent({
     const onOperates = (id: string,operation:string,isDetail:boolean) => {
       institutionEditModelRef.value.show(id,operation,isDetail);
     };
-    const loadData = async function () {
-      formState.loading = true;
-      const result: any = await getList(searchParams);
-      dataList.value = result.list;
-      formState.total = result.total;
-      formState.loading = false;
-    }
-
-
 
     return {
       formRef,

+ 185 - 0
vue/src/views/company/index.vue

@@ -0,0 +1,185 @@
+<template>
+  <div class="card-search">
+    <a-form ref="formRef" name="advanced_search"  class="ant-advanced-search-form" :model="searchParams" >
+      <a-row :gutter="24">
+        <a-col :span="6">
+          <a-form-item label="计划名称" :label-col="{span:6}" name="CompanyName">
+            <a-input v-model:value="searchParams.companyName" placeholder=""/>
+          </a-form-item>
+        </a-col>
+        <a-col :span="7">
+          <a-form-item label="计划所属学年" :label-col="{span:7}" name="CompanyAddress">
+            <a-input v-model:value="searchParams.companyAddress" placeholder=""/>
+          </a-form-item>
+        </a-col>
+        <a-col :span="6">
+          <a-form-item label="参与实习的专业" :label-col="{span:6}" name="DutyUserName">
+            <a-input v-model:value="searchParams.dutyUserName" placeholder=""/>
+          </a-form-item>
+        </a-col>
+      <a-col :span="5" style="text-align: right">
+          <a-button type="primary" html-type="submit" @click="onSearch">查询</a-button>
+        </a-col>
+      </a-row>
+      <a-row class="edit-operation">
+        <a-col :span="24" style="text-align: right">
+          <a-button type="primary" html-type="submit" @click='onOperates(null,"新增",false)' >新增</a-button>
+          <a-button type="primary" html-type="submit" @click='onOperates(null,"导入",false)' >导入</a-button>
+          <a-button type="primary" html-type="submit" @click='onOperates(null,"导出",false)' >导出</a-button>
+        </a-col>
+      </a-row>
+    </a-form>
+    <div class="search-result-list">
+      <a-table :columns="columns" :data-source="dataList" :scroll="{ x:'100%', y: 500 }" :pagination="pagination"
+               :loading="formState.loading"
+               @change="handleTableChange"
+               :row-selection="{ selectedRowKeys: formState.selectedRowKeys, onChange: onSelectChange}"
+               :row-key="record=>record.institutionID"
+               bordered>
+        <template #bodyCell="{ column, text, record }">
+          <template v-if="column.key === 'operation'">
+            <div class="table-operation">
+              <a-button type="link" size="small" @click='onOperates(record.institutionID,"修改",false)' >编辑</a-button>
+              <a-button type="link" size="small" @click="onDel(record)" >删除</a-button>
+            </div>
+          </template>
+        </template>
+      </a-table>
+    </div>
+    <InstitutionEditForm ref="institutionEditModelRef" :loadData="loadData"></InstitutionEditForm>
+  </div>
+</template>
+
+<script lang="ts">
+import {reactive, ref, computed, defineComponent, createVNode} from 'vue';
+import {DownOutlined, ExclamationCircleOutlined, UpOutlined} from '@ant-design/icons-vue';
+import type {FormInstance} from 'ant-design-vue';
+import type {TableColumnsType, TableProps} from 'ant-design-vue';
+import {getList, del} from '@/api/baseSettings/institution';
+import InstitutionEditForm from "@/views/baseSettings/institution/edit.vue";
+import BExportExcel from "@/components/basic/excel/exportExcel/exportExcel.vue";
+import {getPaginationTotalTitle} from "@/utils/common";
+import {message, Modal} from "ant-design-vue";
+
+export default defineComponent({
+  name: 'CompanyList',
+  components: {InstitutionEditForm, DownOutlined, UpOutlined, BExportExcel},
+  setup() {
+    const formRef = ref<FormInstance>();
+    const searchParams = reactive({
+      pageIndex: 1,
+      pageSize: 20,
+      primaryKey:'',
+      companyName: '',
+      companyAddress: '',
+      dutyUserName:''
+    });
+    const formState = reactive({
+      total: 0,
+      selectedRowKeys: [],
+      loading: false
+    });
+    const columns: TableColumnsType = [
+      {title: '序号', align: "center",key: 'institutionID',customRender: item => `${searchParams.pageSize * (searchParams.pageIndex - 1) + item.index + 1}`},
+      {title: '企业名称', dataIndex: 'companyName', key: 'companyName', align: "center"},
+      {title: '所属县区', dataIndex: 'companyAddress', key: 'companyAddress',width:120, align: "center"},
+      {title: '所属街道', dataIndex: 'fzrName', key: 'fzrName', align: "center"},
+      {title: '参与实习的专业', dataIndex: 'fzrMobile', key: 'fzrMobile', align: "center"},
+      {title: '实习开始时间', dataIndex: 'frName', key: 'frName', align: "center"},
+      {title: '实习结束时间', dataIndex: 'frMobile', key: 'frMobile', align: "center"},
+      {title: '上传计划文档', dataIndex: 'companyCode', key: 'companyCode', align: "center"},
+      {title: '操作', key: 'operation', fixed: 'right',width:170, align: "center"},
+    ];
+    const pagination = computed(() => ({
+      total: formState.total,
+      current: searchParams.pageIndex,
+      pageSize: searchParams.pageSize,
+      showSizeChanger: true,
+      showTotal: total => getPaginationTotalTitle(total)
+    }));
+
+    const dataList = ref([]);
+    const institutionEditModelRef = ref();
+
+
+    const loadData = async function () {
+      formState.loading = true;
+      const result: any = await getList(searchParams);
+      dataList.value = result.list;
+      console.log(dataList.value);
+      formState.total = result.total;
+      formState.loading = false;
+    }
+
+    const handleTableChange: TableProps['onChange'] = (pag: { pageSize: number; current: number },) => {
+      searchParams.pageIndex = pag.current;
+      searchParams.pageSize = pag.pageSize;
+      loadData();
+    };
+
+    const onSelectChange = (selectedRowKeys: any) => {
+      formState.selectedRowKeys = selectedRowKeys;
+    };
+
+    const onSearch = () => {
+      loadData();
+    }
+
+    const onDel= (item: any) => {
+      if (item) {
+        formState.selectedRowKeys.push(item.InstitutionID as never)
+      }
+
+      if (formState.selectedRowKeys.length <= 0) {
+        message.warning('请选择需要删除的数据!');
+        return false;
+      }
+
+      Modal.confirm({
+        title: '确认删除选中的运营机构?',
+        icon: createVNode(ExclamationCircleOutlined),
+        content: '',
+        okText: '确认删除',
+        okType: 'danger',
+        okButtonProps: {},
+        cancelText: '取消',
+        onOk() {
+          del(formState.selectedRowKeys).then(() => {
+            loadData();
+          });
+        },
+        onCancel() {
+
+        },
+      });
+    };
+
+    const onOperates = (id: string,operation:string,isDetail:boolean) => {
+      institutionEditModelRef.value.show(id,operation,isDetail);
+    };
+
+    return {
+      formRef,
+      searchParams,
+      formState,
+      columns,
+      pagination,
+      dataList,
+      institutionEditModelRef,
+      handleTableChange,
+      onSelectChange,
+      onSearch,
+      onOperates,
+      onDel,
+      loadData
+    };
+  },
+  created() {
+    this.loadData();
+  },
+  activated() {
+    if (history.state.params?.reload)
+      this.loadData();
+  }
+});
+</script>

+ 238 - 0
vue/src/views/post/index.vue

@@ -0,0 +1,238 @@
+<template>
+  <div class="card-search">
+    <a-form ref="formRef" name="advanced_search"  class="ant-advanced-search-form" :model="searchParams" >
+      <a-row :gutter="24">
+        <a-col :span="6">
+          <a-form-item label="企业名称" :label-col="{span:6}" name="CompanyName">
+            <a-input v-model:value="searchParams.companyName" placeholder=""/>
+          </a-form-item>
+        </a-col>
+        <a-col :span="7">
+          <a-form-item label="企业地址" :label-col="{span:7}" name="CompanyAddress">
+            <a-input v-model:value="searchParams.companyAddress" placeholder=""/>
+<!--<a-range-picker format="YYYY-MM-DD" :placeholder="['开始日期', '结束日期']" @change="onRangeChange"/>-->
+          </a-form-item>
+        </a-col>
+        <a-col :span="6">
+          <a-form-item label="负责人名称" :label-col="{span:6}" name="DutyUserName">
+            <a-input v-model:value="searchParams.dutyUserName" placeholder=""/>
+<!--            <a-select  ref="select"  v-model:value="searchParamsState.collegeID" :options="collegeList"
+                       :field-names="{label:'name',value:'collegeID'}"  @change="loadData"  functioncode="T014000" :allow-clear="true"  >
+            </a-select>-->
+          </a-form-item>
+        </a-col>
+      <a-col :span="5" style="text-align: right">
+          <a-button type="primary" html-type="submit" @click="onSearch">查询</a-button>
+<!--          <a style="font-size: 12px" @click="expand = !expand">
+            <template v-if="expand">
+              <UpOutlined/>
+            </template>
+            <template v-else>
+              <DownOutlined/>
+            </template>
+            {{ expand ? '收缩' : '展开' }}
+          </a>-->
+        </a-col>
+      </a-row>
+<!--      <a-row :gutter="24" v-show="expand">
+        <a-col :span="6">
+          <a-form-item label="问题描述" :label-col="{span:6}" name="ProblemDesc">
+            <a-input v-model:value="searchParamsState.problemDesc" placeholder=""/>
+          </a-form-item>
+        </a-col>
+        <a-col :span="7">
+          <a-form-item label="问题特性" :label-col="{span:7}" name="ProblemCharacteristics">
+            <a-select
+              ref="select"
+              v-model:value="searchParamsState.problemCharacteristics"
+              :options="problemAttrList"
+              :field-names="{label:'name',value:'value'}"
+              @change="loadData"
+              :allow-clear="true" >
+            </a-select>
+          </a-form-item>
+        </a-col>
+        <a-col :span="6">
+          <a-form-item label="是否解决" :label-col="{span:6}" name="IsResolve">
+            <a-select
+              ref="select"
+              v-model:value="searchParamsState.isResolve"
+              :options="resolveList"
+              :field-names="{label:'resolveName',value:'resolveID'}"
+              @change="loadData"
+              :allow-clear="true" >
+            </a-select>
+          </a-form-item>
+        </a-col>
+        <a-col :span="5" style="text-align: left">
+        </a-col>
+      </a-row>-->
+      <a-row class="edit-operation">
+        <a-col :span="24" style="text-align: right">
+<!--functioncode="T014001"-->
+          <a-button type="primary" html-type="submit" @click='onOperates(null,"新增",false)' >新增</a-button>
+<!--          <BExportExcel :title="'导出'" :filename="'问题台账记录'" :url="'stitution/export'"
+                        :params="{...searchParams,isExport: true, rows:100000}"></BExportExcel>-->
+        </a-col>
+      </a-row>
+    </a-form>
+    <div class="search-result-list">
+      <a-table :columns="columns" :data-source="dataList" :scroll="{ x:'100%', y: 500 }" :pagination="pagination"
+               :loading="formState.loading"
+               @change="handleTableChange"
+               :row-selection="{ selectedRowKeys: formState.selectedRowKeys, onChange: onSelectChange}"
+               :row-key="record=>record.institutionID"
+               bordered>
+        <template #bodyCell="{ column, text, record }">
+          <template v-if="column.key === 'operation'">
+            <div class="table-operation">
+              <a-button type="link" size="small" @click='onOperates(record.institutionID,"修改",false)' >编辑</a-button>
+              <a-button type="link" size="small" @click="onDel(record)" >删除</a-button>
+            </div>
+          </template>
+        </template>
+      </a-table>
+    </div>
+    <InstitutionEditForm ref="institutionEditModelRef" :loadData="loadData"></InstitutionEditForm>
+  </div>
+</template>
+
+<script lang="ts">
+import {reactive, ref, computed, defineComponent, createVNode} from 'vue';
+import {DownOutlined, ExclamationCircleOutlined, UpOutlined} from '@ant-design/icons-vue';
+import type {FormInstance} from 'ant-design-vue';
+import type {TableColumnsType, TableProps} from 'ant-design-vue';
+import {getList, del} from '@/api/baseSettings/institution';
+import InstitutionEditForm from "@/views/baseSettings/institution/edit.vue";
+import BExportExcel from "@/components/basic/excel/exportExcel/exportExcel.vue";
+import {getPaginationTotalTitle} from "@/utils/common";
+import {message, Modal} from "ant-design-vue";
+
+export default defineComponent({
+  name: 'InstitutionList',
+  components: {InstitutionEditForm, DownOutlined, UpOutlined, BExportExcel},
+  setup() {
+    const formRef = ref<FormInstance>();
+    const searchParams = reactive({
+      pageIndex: 1,
+      pageSize: 20,
+      primaryKey:'',
+      companyName: '',
+      companyAddress: '',
+      dutyUserName:''
+    });
+    const formState = reactive({
+      total: 0,
+      selectedRowKeys: [],
+      loading: false
+    });
+    const columns: TableColumnsType = [
+      {title: '序号', align: "center",key: 'institutionID',customRender: item => `${searchParams.pageSize * (searchParams.pageIndex - 1) + item.index + 1}`},
+      {title: '企业名称', dataIndex: 'companyName', key: 'companyName', align: "center"},
+      {title: '企业地址', dataIndex: 'companyAddress', key: 'companyAddress',width:120, align: "center"},
+      {title: '负责人姓名', dataIndex: 'fzrName', key: 'fzrName', align: "center"},
+      {title: '负责人电话', dataIndex: 'fzrMobile', key: 'fzrMobile', align: "center"},
+      {title: '法人姓名', dataIndex: 'frName', key: 'frName', align: "center"},
+      {title: '法人电话', dataIndex: 'frMobile', key: 'frMobile', align: "center"},
+      {title: '企业机构代码', dataIndex: 'companyCode', key: 'companyCode', align: "center"},
+      {title: '管理驿站数量', dataIndex: 'siteCount', key: 'siteCount', align: "center",
+        /*customRender:  ({record}) => record.resolveDate == null?"":dayjs(record.resolveDate).format('YYYY-MM-DD')*/
+      },
+      {title: '操作', key: 'operation', fixed: 'right',width:170, align: "center"},
+    ];
+    const pagination = computed(() => ({
+      total: formState.total,
+      current: searchParams.pageIndex,
+      pageSize: searchParams.pageSize,
+      showSizeChanger: true,
+      showTotal: total => getPaginationTotalTitle(total)
+    }));
+
+    const dataList = ref([]);
+    /*const problemAttrList = ref<SelectProps['options']>();
+    const collegeList = ref<SelectProps['options']>();
+    const resolveList = ref([{resolveName:"是",resolveID:1},{resolveName:"否",resolveID:0}]);*/
+    const institutionEditModelRef = ref();
+
+
+    const loadData = async function () {
+      formState.loading = true;
+      const result: any = await getList(searchParams);
+      dataList.value = result.list;
+      console.log(dataList.value);
+      formState.total = result.total;
+      formState.loading = false;
+    }
+
+    const handleTableChange: TableProps['onChange'] = (pag: { pageSize: number; current: number },) => {
+      searchParams.pageIndex = pag.current;
+      searchParams.pageSize = pag.pageSize;
+      loadData();
+    };
+
+    const onSelectChange = (selectedRowKeys: any) => {
+      formState.selectedRowKeys = selectedRowKeys;
+    };
+
+    const onSearch = () => {
+      loadData();
+    }
+
+    const onDel= (item: any) => {
+      if (item) {
+        formState.selectedRowKeys.push(item.InstitutionID as never)
+      }
+
+      if (formState.selectedRowKeys.length <= 0) {
+        message.warning('请选择需要删除的数据!');
+        return false;
+      }
+
+      Modal.confirm({
+        title: '确认删除选中的运营机构?',
+        icon: createVNode(ExclamationCircleOutlined),
+        content: '',
+        okText: '确认删除',
+        okType: 'danger',
+        okButtonProps: {},
+        cancelText: '取消',
+        onOk() {
+          del(formState.selectedRowKeys).then(() => {
+            loadData();
+          });
+        },
+        onCancel() {
+
+        },
+      });
+    };
+
+    const onOperates = (id: string,operation:string,isDetail:boolean) => {
+      institutionEditModelRef.value.show(id,operation,isDetail);
+    };
+
+    return {
+      formRef,
+      searchParams,
+      formState,
+      columns,
+      pagination,
+      dataList,
+      institutionEditModelRef,
+      handleTableChange,
+      onSelectChange,
+      onSearch,
+      onOperates,
+      onDel,
+      loadData
+    };
+  },
+  created() {
+    this.loadData();
+  },
+  activated() {
+    if (history.state.params?.reload)
+      this.loadData();
+  }
+});
+</script>