xiaoqiao před 1 rokem
rodič
revize
1f0895986b

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 153 - 141
lib/华北油田Ai检索.PDM


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 153 - 141
lib/华北油田Ai检索.pdb


+ 10 - 0
src/main/java/com/bowintek/practice/model/SrSubject.java

@@ -23,6 +23,8 @@ public class SrSubject {
 
     private String execSql;
 
+    private String subjectName;
+
     public String getSubId() {
         return subId;
     }
@@ -102,4 +104,12 @@ public class SrSubject {
     public void setExecSql(String execSql) {
         this.execSql = execSql == null ? null : execSql.trim();
     }
+
+    public String getSubjectName() {
+        return subjectName;
+    }
+
+    public void setSubjectName(String subjectName) {
+        this.subjectName = subjectName == null ? null : subjectName.trim();
+    }
 }

+ 70 - 0
src/main/java/com/bowintek/practice/model/SrSubjectExample.java

@@ -764,6 +764,76 @@ public class SrSubjectExample {
             addCriterion("execSql not between", value1, value2, "execSql");
             return (Criteria) this;
         }
+
+        public Criteria andSubjectNameIsNull() {
+            addCriterion("subjectName is null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectNameIsNotNull() {
+            addCriterion("subjectName is not null");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectNameEqualTo(String value) {
+            addCriterion("subjectName =", value, "subjectName");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectNameNotEqualTo(String value) {
+            addCriterion("subjectName <>", value, "subjectName");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectNameGreaterThan(String value) {
+            addCriterion("subjectName >", value, "subjectName");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectNameGreaterThanOrEqualTo(String value) {
+            addCriterion("subjectName >=", value, "subjectName");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectNameLessThan(String value) {
+            addCriterion("subjectName <", value, "subjectName");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectNameLessThanOrEqualTo(String value) {
+            addCriterion("subjectName <=", value, "subjectName");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectNameLike(String value) {
+            addCriterion("subjectName like", value, "subjectName");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectNameNotLike(String value) {
+            addCriterion("subjectName not like", value, "subjectName");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectNameIn(List<String> values) {
+            addCriterion("subjectName in", values, "subjectName");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectNameNotIn(List<String> values) {
+            addCriterion("subjectName not in", values, "subjectName");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectNameBetween(String value1, String value2) {
+            addCriterion("subjectName between", value1, value2, "subjectName");
+            return (Criteria) this;
+        }
+
+        public Criteria andSubjectNameNotBetween(String value1, String value2) {
+            addCriterion("subjectName not between", value1, value2, "subjectName");
+            return (Criteria) this;
+        }
     }
 
     public static class Criteria extends GeneratedCriteria {

+ 0 - 5
src/main/resources/generatorConfig.xml

@@ -121,10 +121,5 @@
             <table schema="" tableName="Sys_Log"><property name="useActualColumnNames" value="true"/></table>
         </table>-->
         <table schema="" tableName="sr_subject"><property name="useActualColumnNames" value="true"/></table>
-        <table schema="" tableName="sr_subjectField"><property name="useActualColumnNames" value="true"/></table>
-        <table schema="" tableName="sr_saerchTemp"><property name="useActualColumnNames" value="true"/></table>
-        <table schema="" tableName="sr_tempField"><property name="useActualColumnNames" value="true"/></table>
-        <table schema="" tableName="sr_tempDimension"><property name="useActualColumnNames" value="true"/></table>
-        <table schema="" tableName="sr_tempMeasure"><property name="useActualColumnNames" value="true"/></table>
     </context>
 </generatorConfiguration>

+ 20 - 5
src/main/resources/mapping/SrSubjectMapper.xml

@@ -12,6 +12,7 @@
     <result column="status" jdbcType="INTEGER" property="status" />
     <result column="isReferences" jdbcType="INTEGER" property="isReferences" />
     <result column="execSql" jdbcType="VARCHAR" property="execSql" />
+    <result column="subjectName" jdbcType="VARCHAR" property="subjectName" />
   </resultMap>
   <sql id="Example_Where_Clause">
     <where>
@@ -73,7 +74,7 @@
   </sql>
   <sql id="Base_Column_List">
     subId, tabCode, tabName, tabDesc, createTime, modiTime, createdBy, status, isReferences, 
-    execSql
+    execSql, subjectName
   </sql>
   <select id="selectByExample" parameterType="com.bowintek.practice.model.SrSubjectExample" resultMap="BaseResultMap">
     select
@@ -109,11 +110,11 @@
     insert into sr_subject (subId, tabCode, tabName, 
       tabDesc, createTime, modiTime, 
       createdBy, status, isReferences, 
-      execSql)
+      execSql, subjectName)
     values (#{subId,jdbcType=VARCHAR}, #{tabCode,jdbcType=VARCHAR}, #{tabName,jdbcType=VARCHAR}, 
       #{tabDesc,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{modiTime,jdbcType=TIMESTAMP}, 
       #{createdBy,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{isReferences,jdbcType=INTEGER}, 
-      #{execSql,jdbcType=VARCHAR})
+      #{execSql,jdbcType=VARCHAR}, #{subjectName,jdbcType=VARCHAR})
   </insert>
   <insert id="insertSelective" parameterType="com.bowintek.practice.model.SrSubject">
     insert into sr_subject
@@ -148,6 +149,9 @@
       <if test="execSql != null">
         execSql,
       </if>
+      <if test="subjectName != null">
+        subjectName,
+      </if>
     </trim>
     <trim prefix="values (" suffix=")" suffixOverrides=",">
       <if test="subId != null">
@@ -180,6 +184,9 @@
       <if test="execSql != null">
         #{execSql,jdbcType=VARCHAR},
       </if>
+      <if test="subjectName != null">
+        #{subjectName,jdbcType=VARCHAR},
+      </if>
     </trim>
   </insert>
   <select id="countByExample" parameterType="com.bowintek.practice.model.SrSubjectExample" resultType="java.lang.Long">
@@ -221,6 +228,9 @@
       <if test="row.execSql != null">
         execSql = #{row.execSql,jdbcType=VARCHAR},
       </if>
+      <if test="row.subjectName != null">
+        subjectName = #{row.subjectName,jdbcType=VARCHAR},
+      </if>
     </set>
     <if test="example != null">
       <include refid="Update_By_Example_Where_Clause" />
@@ -237,7 +247,8 @@
       createdBy = #{row.createdBy,jdbcType=VARCHAR},
       status = #{row.status,jdbcType=INTEGER},
       isReferences = #{row.isReferences,jdbcType=INTEGER},
-      execSql = #{row.execSql,jdbcType=VARCHAR}
+      execSql = #{row.execSql,jdbcType=VARCHAR},
+      subjectName = #{row.subjectName,jdbcType=VARCHAR}
     <if test="example != null">
       <include refid="Update_By_Example_Where_Clause" />
     </if>
@@ -272,6 +283,9 @@
       <if test="execSql != null">
         execSql = #{execSql,jdbcType=VARCHAR},
       </if>
+      <if test="subjectName != null">
+        subjectName = #{subjectName,jdbcType=VARCHAR},
+      </if>
     </set>
     where subId = #{subId,jdbcType=VARCHAR}
   </update>
@@ -285,7 +299,8 @@
       createdBy = #{createdBy,jdbcType=VARCHAR},
       status = #{status,jdbcType=INTEGER},
       isReferences = #{isReferences,jdbcType=INTEGER},
-      execSql = #{execSql,jdbcType=VARCHAR}
+      execSql = #{execSql,jdbcType=VARCHAR},
+      subjectName = #{subjectName,jdbcType=VARCHAR}
     where subId = #{subId,jdbcType=VARCHAR}
   </update>
 </mapper>

+ 0 - 96
vue/src/api/system/dept/index.ts

@@ -1,96 +0,0 @@
-import { request } from '@/utils/request';
-// import type { BaseResponse } from '@/utils/request';
-import Api from '@/core/permission/modules/sys/dept';
-
-/**
- * @description 获取部门列表
- * @returns
- */
-export function getDeptList() {
-  return request<API.SysDeptListResult[]>({
-    url: Api.list,
-    method: 'get',
-  });
-}
-
-/**
- * @description 部门移动排序
- * @param {API.MovedDeptsParams} data
- * @returns
- */
-export function moveDeptList(data: API.MovedDeptsParams) {
-  return request({
-    url: Api.move,
-    method: 'post',
-    data,
-  });
-}
-
-/**
- * @description 删除部门
- * @param {API.DelDeptParams} data
- * @returns
- */
-export function deleteDept(data: API.DelDeptParams) {
-  return request(
-    {
-      url: 'sys/dept/delete',
-      method: 'post',
-      data,
-    },
-    {
-      successMsg: '删除成功',
-    },
-  );
-}
-
-/**
- * @description 更新某个部门
- * @param {API.UpdateDeptParams} data 参数
- * @returns
- */
-export function updateDept(data: API.UpdateDeptParams) {
-  return request({
-    url: Api.update,
-    method: 'post',
-    data,
-  });
-}
-
-/**
- * @description 创建部门
- * @param {API.CreateDeptParams} data 参数
- * @returns
- */
-export function createDept(data: API.CreateDeptParams) {
-  return request({
-    url: Api.add,
-    method: 'post',
-    data,
-  });
-}
-/**
- * @description 查询单个部门信息
- * @param query
- * @returns
- */
-export function getDeptInfo(query: { departmentId: string | number }) {
-  return request<API.GetDeptInfoResult>({
-    url: Api.info,
-    method: 'get',
-    params: query,
-  });
-}
-
-/**
- * @description 管理员部门转移
- * @param data
- * @returns
- */
-export function transferDept(data: API.TransferDeptParams) {
-  return request({
-    url: Api.transfer,
-    method: 'post',
-    data,
-  });
-}

+ 0 - 68
vue/src/api/system/dept/model.d.ts

@@ -1,68 +0,0 @@
-declare namespace API {
-  /** 获取系统部门返回结果 */
-  type SysDeptListResult = {
-    createTime: string;
-    updateTime: string;
-    id: number;
-    parentId: number;
-    name: string;
-    orderNum: number;
-    keyPath?: number[];
-  };
-  /** 部门 */
-  type MovedDeptItem = {
-    id: number;
-    parentId: number;
-  };
-
-  /** 要排序的部门 */
-  type MovedDeptsParams = {
-    depts: MovedDeptItem[];
-  };
-
-  /** 删除部门的参数 */
-  type DelDeptParams = {
-    departmentId: number | string;
-  };
-
-  /** 更新某个部门需要传的参数 */
-  type UpdateDeptParams = {
-    name: string;
-    parentId: number | string;
-    orderNum: number;
-    id: number | string;
-  };
-
-  /** 创建部门参数 */
-  type CreateDeptParams = {
-    name: string;
-    parentId: number;
-    orderNum: number;
-  };
-
-  /** 管理员部门转移 */
-  type TransferDeptParams = {
-    userIds: number[];
-    departmentId: number;
-  };
-
-  /** 部门详情 */
-  type GetDeptInfoResult = {
-    department: {
-      createTime: string;
-      updateTime: string;
-      id: number;
-      parentId: number;
-      name: 'string';
-      orderNum: number;
-    };
-    parentDepartment: {
-      createTime: string;
-      updateTime: string;
-      id: number;
-      parentId: number;
-      name: 'string';
-      orderNum: number;
-    };
-  };
-}

+ 0 - 101
vue/src/api/system/dictionary/index.ts

@@ -23,107 +23,6 @@ export function getSysDictionaryList(code: string) {
   });
 }
 
-export function getSchoolyearList() {
-  return request<any>({
-    url: 'system/dictionary/getSchoolyearList',
-    method: 'get',
-    params: {},
-  }, {
-    isNew: true,
-  });
-}
-
-export function getMajorGradeList(schoolYearID?: string,collegeID?: string, majorID?: string) {
-  return request<any>({
-    url: 'system/dictionary/getMajorGradeList',
-    method: 'get',
-    params: {schoolYearID: schoolYearID,collegeID:collegeID,majorID: majorID},
-  }, {
-    isNew: true,
-  });
-}
-
-export function getpracticeTaskList(userId: string) {
-  return request<any>({
-    url: 'system/dictionary/getpracticeTaskList',
-    method: 'get',
-    params: {userId: userId},
-  }, {
-    isNew: true,
-  });
-}
-
-export function getCollegeList() {
-  return request<any>({
-    url: 'system/dictionary/getCollegeList',
-    method: 'get',
-    params: {},
-  }, {
-    isNew: true,
-  });
-}
-
-export function getMajorClassList(schoolYearID?: string,collegeID?: string,majorGradeID?: string) {
-  return request<any>({
-    url: 'system/dictionary/getMajorClassList',
-    method: 'get',
-    params: {schoolYearID: schoolYearID,collegeID:collegeID,majorGradeID:majorGradeID},
-  }, {
-    isNew: true,
-  });
-}
-
-export function getMajorList(collegeID?: string,code?: string,name?: string) {
-  return request<any>({
-    url: 'system/dictionary/getMajorList',
-    method: 'get',
-    params: {collegeID,code,name},
-  }, {
-    isNew: true,
-  });
-}
-
-
-export function getPracticeBaseList() {
-  return request<any>({
-    url: 'system/dictionary/getPracticeBaseList',
-    method: 'get',
-    params: {},
-  }, {
-    isNew: true,
-  });
-}
-
-export function getProfessionaldoctype() {
-  return request<any>({
-    url: 'databank/professionaldoc/parentList',
-    method: 'get',
-    params: {},
-  }, {
-    isNew: true,
-  });
-}
-
-export function getStudentBasePosition(userId?: string) {
-  return request<any>({
-    url: 'system/dictionary/getStudentBasePosition',
-    method: 'get',
-    params: {userId},
-  }, {
-    isNew: true,
-  });
-}
-
-export function getPracticeBaseForStudentList(schoolYearID:string) {
-  return request<any>({
-    url: 'system/dictionary/getPracticeBaseForStudentList',
-    method: 'get',
-    params: {schoolYearID:schoolYearID},
-  }, {
-    isNew: true,
-  });
-}
-
 export function getPositionForStudentList(schoolYearID: string,practiceBaseID:string) {
   return request<any>({
     url: 'system/dictionary/getPositionForStudentList',

+ 0 - 17
vue/src/api/system/online/index.ts

@@ -1,17 +0,0 @@
-import { request } from '@/utils/request';
-import OnlineApi from '@/core/permission/modules/sys/online';
-
-export function getOnlineList() {
-  return request<API.TableListResult<API.OnlineUserListResult>>({
-    url: OnlineApi.list,
-    method: 'get',
-  });
-}
-
-export function kickUser(data: { id: number }) {
-  return request({
-    url: OnlineApi.kick,
-    method: 'post',
-    data,
-  });
-}

+ 0 - 15
vue/src/api/system/online/model.d.ts

@@ -1,15 +0,0 @@
-declare namespace API {
-  /** 在线用户列表项 */
-  type OnlineUserListItem = {
-    id: number;
-    ip: string;
-    username: string;
-    isCurrent: true;
-    time: string;
-    os: string;
-    browser: string;
-    disable: boolean;
-  };
-  /** 在线用户列表 */
-  type OnlineUserListResult = OnlineUserListItem[];
-}

+ 0 - 9
vue/src/api/system/serve/index.ts

@@ -1,9 +0,0 @@
-import { request } from '@/utils/request';
-import ServeApi from '@/core/permission/modules/sys/serve';
-
-export function getServeStat() {
-  return request<API.SysServeStat>({
-    url: ServeApi.stat,
-    method: 'get',
-  });
-}

+ 0 - 42
vue/src/api/system/serve/model.d.ts

@@ -1,42 +0,0 @@
-declare namespace API {
-  export interface Runtime {
-    os: string;
-    arch: string;
-    nodeVersion: string;
-    npmVersion: string;
-  }
-
-  export interface CoresLoad {
-    rawLoad: number;
-    rawLoadIdle: number;
-  }
-
-  export interface Cpu {
-    manufacturer: string;
-    brand: string;
-    physicalCores: number;
-    model: string;
-    speed: number;
-    rawCurrentLoad: number;
-    rawCurrentLoadIdle: number;
-    coresLoad: CoresLoad[];
-  }
-
-  export interface Disk {
-    size: number;
-    used: number;
-    available: number;
-  }
-
-  export interface Memory {
-    total: number;
-    available: number;
-  }
-
-  export interface SysServeStat {
-    runtime: Runtime;
-    cpu: Cpu;
-    disk: Disk;
-    memory: Memory;
-  }
-}

+ 0 - 27
vue/src/core/permission/utils.ts

@@ -4,33 +4,6 @@ export interface TreeDataItem extends ATreeDataItem {
   children: any;
 }
 
-/**
- * 渲染部门至树形控件
- * @param {Array} depts 所有部门
- * @param {Number | null} parentId 父级部门ID
- * @param {number[]|string[]} keyPath ID路径
- */
-export const formatDept2Tree = (
-  depts: API.SysDeptListResult[],
-  parentId: number | null = null,
-  keyPath: (string | number)[] = [],
-): TreeDataItem[] => {
-  return depts
-    .filter((item) => item.parentId === parentId)
-    .map((item) => {
-      const _keyPath = keyPath.concat(parentId || []);
-      const arr = formatDept2Tree(depts, item.id, _keyPath);
-      return Object.assign(item, {
-        keyPath: _keyPath,
-        title: item.name,
-        key: item.id,
-        value: item.id,
-        formData: item,
-        children: arr.length ? arr : null,
-      });
-    });
-};
-
 /**
  * 渲染菜单至树形控件
  * @param {Array} menus 所有菜单

+ 12 - 0
vue/src/enums/dictions.ts

@@ -0,0 +1,12 @@
+export enum DataType {
+  VARCHAR = 'VARCHAR',
+  DECIMAL = 'DECIMAL',
+  DATE = 'DATE',
+  BIGINT='BIGINT',
+}
+
+const DataTypeList = new Array();
+for (let key in DataType) {
+  DataTypeList.push({label: key, value: DataType[key]});
+}
+export {DataTypeList}

+ 3 - 0
vue/src/router/asyncModules/sale.ts

@@ -2,4 +2,7 @@ export default {
   'views/positionlist': () => import( '@/views/position/index.vue'),
   'views/positionedit': () => import( '@/views/position/edit.vue'),
   'views/positiondetail': () => import( '@/views/position/detail.vue'),
+  'views/subjectlist': () => import( '@/views/subject/index.vue'),
+  'views/subjectedit': () => import( '@/views/subject/edit.vue'),
+  'views/subjectdetail': () => import( '@/views/subject/detail.vue'),
 }

+ 1 - 7
vue/src/views/position/edit.vue

@@ -88,7 +88,7 @@ import {Form, Row, Col, Space} from 'ant-design-vue';
 import type {SelectProps} from 'ant-design-vue';
 import {ref,defineComponent} from "vue";
 import { useRoute} from 'vue-router';
-import {getDictionaryItemList, getMajorGradeList, getSchoolyearList} from "@/api/system/dictionary";
+import {getDictionaryItemList} from "@/api/system/dictionary";
 import {get, save} from "@/api/common";
 import {useTabsViewStore} from "@/store/modules/tabsView";
 import BUploadFile from "@/components/file/uploadFile.vue";
@@ -120,13 +120,7 @@ export default defineComponent({
     getDictionaryItemList({code: "PracticeBaseType"}).then(x => {
       practiceBaseTypeList.value = x.filter(f => f.value != 3);
     })
-    getSchoolyearList().then(data => {
-      schoolYearList.value = data;
-    });
 
-    getMajorGradeList(formState.value.schoolYearID).then(data => {
-      majorGradeList.value = data;
-    });
     const loadPracticebaseList = () => {
       formState.value.practiceBaseID = "";
       getPracticebaseList();

+ 1 - 17
vue/src/views/position/index.vue

@@ -113,7 +113,7 @@ import type {TableColumnsType, TableProps,SelectProps} from 'ant-design-vue';
 import { get, postdel} from '@/api/common';
 import {useRoute, useRouter} from "vue-router";
 import {useTabsViewStore} from "@/store/modules/tabsView";
-import {getDictionaryItemList, getMajorGradeList, getSchoolyearList} from "@/api/system/dictionary";
+import {getDictionaryItemList} from "@/api/system/dictionary";
 import {message} from "ant-design-vue";
 import {DownOutlined, UpOutlined} from "@ant-design/icons-vue";
 import type {ImportProps} from "@/components/basic/excel/importExcel/ImportProps";
@@ -185,23 +185,7 @@ export default defineComponent({
         value: x.value
       }));
     })
-    getSchoolyearList().then(data => {
-      schoolYearList.value = data.map(x => ({
-        label: x.schoolYear,
-        value: x.schoolYearID
-      }));
-    });
 
-    const loadMajorGradeList = () => {
-      getMajorGradeList(formState.schoolYearID).then(data => {
-        majorGradeList.value = data.map(x => ({
-          label: x.name,
-          value: x.majorGradeID
-        }));
-        loadData();
-      });
-    }
-    loadMajorGradeList();
 
     const filterOption = (input: string, option: any) => {
       return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;

+ 164 - 138
vue/src/views/subject/edit.vue

@@ -1,175 +1,201 @@
 <template>
   <div class="card-edit">
-    <Form :model="formState" @finish="onFinish" autocomplete="off">
-      <a-divider orientation="left">学校信息</a-divider>
-      <Row :gutter="[16,8]">
-        <Col :span="8">
-          <a-form-item label="实习学年" :label-col="{span:6}" name="schoolYearID"
-                       :rules="[{ required: true, message: '请选择学年!' }]">
-            <a-select
-              ref="select" style="width: 200px"
-              v-model:value="formState.schoolYearID"
-              :options="schoolYearList"
-              :field-names="{label:'schoolYear',value:'schoolYearID'}"
-            >
-            </a-select>
-          </a-form-item>
-        </Col>
+    <a-form :model="dataModel" @finish="onFinish" autocomplete="off">
+      <a-divider orientation="left">主题定义</a-divider>
+      <a-row :gutter="24">
         <a-col :span="8">
-          <a-form-item label="专业" :label-col="{span:6}" name="majorGradeID"
-                       :rules="[{ required: true, message: '请选择专业!' }]">
-            <a-select style="width: 200px"
-                      ref="select" show-search :filter-option="filterOption"
-                      v-model:value="formState.majorGradeID"
-                      :options="majorGradeList"
-                      :field-names="{label:'name',value:'majorGradeID'}"
-            >
-            </a-select>
+          <a-form-item :label-col="{span:6}" label="表编码" name="tabcode"
+                       :rules="[{ required: true, message: '请填写表编码!' }]">
+            <a-input v-model:value="dataModel.tabcode" placeholder="">
+            </a-input>
           </a-form-item>
         </a-col>
         <a-col :span="8">
-          <a-form-item label="基地类型" :label-col="{span:6}" name="practiceBaseTypeID"
-                       :rules="[{ required: true, message: '请选择基地类型!' }]">
-            <a-select style="width: 200px"
-                      ref="select"
-                      v-model:value="formState.practiceBaseTypeID"
-                      :options="practiceBaseTypeList" @change="loadPracticebaseList"
-                      :field-names="{label:'name',value:'value'}"
-            >
-            </a-select>
+          <a-form-item :label-col="{span:6}" label="表名称" name="tabname"
+                       :rules="[{ required: true, message: '请填表名称!' }]">
+            <a-input v-model:value="dataModel.tabname" placeholder="">
+            </a-input>
           </a-form-item>
         </a-col>
-      </Row>
-      <a-divider orientation="left">岗位信息</a-divider>
-      <Row :gutter="[16,8]">
-        <Col :span="8">
-          <a-form-item label="单位" :label-col="{span:6}" name="practiceBaseID"
-                       :rules="[{ required: true, message: '请选择单位!' }]">
-            <a-select
-              ref="select" show-search :filter-option="filterOption"
-              v-model:value="formState.practiceBaseID"
-              :options="practicebaseList"
-              :field-names="{label:'name',value:'practiceBaseID'}"
-            >
-            </a-select>
+      </a-row>
+      <a-row :gutter="24">
+        <a-col :span="8">
+          <a-form-item :label-col="{span:6}" label="是否有外键字段" name="isreferences"
+                       :rules="[{ required: true, message: '请填写是否有外键字段!' }]">
+            <a-radio-group v-model:value="dataModel.isreferences">
+              <a-radio :value="1">是</a-radio>
+              <a-radio :value="0">否</a-radio>
+            </a-radio-group>
           </a-form-item>
-        </Col>
-        <Col :span="8">
-          <a-form-item :label-col="{span:6}" :rules="[{ required: true, message: '岗位名称为空!' }]" label="岗位名称" name="name">
-            <a-input v-model:value="formState.name" class="form-input">
+        </a-col>
+        <a-col :span="8">
+          <a-form-item :label-col="{span:6}" label="描述" name="tabdesc">
+            <a-input v-model:value="dataModel.tabdesc" placeholder="">
             </a-input>
           </a-form-item>
-        </Col>
-        <Col :span="8">
-          <a-form-item :label-col="{span:6}" :rules="[{ required: true, message: '岗位数量为空!' }]" label="岗位数量" name="qty">
-            <a-input-number v-model:value="formState.qty" class="form-input">
-            </a-input-number>
+        </a-col>
+      </a-row>
+      <a-divider orientation="left">字段定义</a-divider>
+      <a-row>
+        <a-col :span="24" style="margin-right: 20px;">
+          <div style="float: right;">
+            <Space>
+              <a-button @click="add()">
+                <template #icon>
+                  <plus-circle-outlined/>
+                </template>
+                新增
+              </a-button>
+            </Space>
+          </div>
+        </a-col>
+      </a-row>
+      <a-row>
+        <a-col style="margin-bottom: 20px;">
+          <a-table :columns="columns" :data-source="data" :pagination="false"
+                   bordered>
+            <template #bodyCell="{ column ,index}">
+              <template v-if="column.key === 'name'">
+                <div>
+                  <a-input v-if="isEdit"
+                           v-model:value="data[index][column.key]" style="width: 200px"
+                  />
+                  <template v-else>
+                    {{ data[index][column.key] }}
+                  </template>
+                </div>
+              </template>
+              <template v-if="column.key === 'typeName'">
+                <div>
+                  <a-input v-if="isEdit"
+                           v-model:value="data[index][column.key]" style="width: 200px"
+                  />
+                  <template v-else>
+                    {{ data[index][column.key] }}
+                  </template>
+                </div>
+              </template>
+              <template v-if="column.key === 'qty'">
+                <div>
+                  <a-input v-if="isEdit"
+                           v-model:value="data[index][column.key]" style="width: 200px"
+                  />
+                  <template v-else>
+                    {{ data[index][column.key] }}
+                  </template>
+                </div>
+              </template>
+              <template v-if="column.key === 'operation'">
+                <a-button type="link" size="small" @click="deleteDevice(index)">删除</a-button>
+              </template>
+            </template>
+          </a-table>
+        </a-col>
+      </a-row>
+      <a-divider orientation="left">生成Sql</a-divider>
+      <a-row>
+        <a-col class="table-bottom-a1">
+          <a-form-item :label-col="{span:8}" label="" name="remark">
+            <a-textarea v-model:value="dataModel.remark" placeholder="备注" :rows="5"/>
           </a-form-item>
-        </Col>
-      </Row>
-      <Row>
-        <Col class="table-bottom-a1">
-          <a-textarea v-model:value="formState.remark" placeholder="备注" :rows="5"/>
-        </Col>
-      </Row>
-      <Row>
-        <Col :span="24" style="text-align: right;margin: 20px;">
+        </a-col>
+      </a-row>
+      <a-row>
+        <a-col :span="24" style="text-align: right;margin: 20px;">
           <Space>
-            <a-button type="primary" html-type="submit">提交</a-button>
+            <a-form-item class="buttom-btns">
+              <a-button @click="onClose">取消</a-button>
+              <a-button type="primary" html-type="submit">提交</a-button>
+            </a-form-item>
           </Space>
-        </Col>
-      </Row>
-    </Form>
+        </a-col>
+      </a-row>
+    </a-form>
+    <FieldEdit ref="modalRef" :loadData="loadData"></FieldEdit>
   </div>
 </template>
 
-<script  lang="ts">
-import {Form, Row, Col, Space} from 'ant-design-vue';
-import type {SelectProps} from 'ant-design-vue';
-import {ref,defineComponent} from "vue";
-import { useRoute} from 'vue-router';
-import {getDictionaryItemList, getMajorGradeList, getSchoolyearList} from "@/api/system/dictionary";
-import {get, save} from "@/api/common";
-import {useTabsViewStore} from "@/store/modules/tabsView";
+<script lang="ts">
+import {defineComponent, reactive, ref, toRefs} from 'vue';
+import {useTabsViewStore} from '@/store/modules/tabsView';
 import BUploadFile from "@/components/file/uploadFile.vue";
-import Approve from "@/components/basic/approve/Approve.vue";
-import BApproveList from "@/components/basic/approve/ApproveList.vue";
+import type {TableColumnsType} from 'ant-design-vue';
+import {save} from '@/api/common';
+import FieldEdit from "@/views/subject/fieldedit.vue";
+
+interface FormState {
+  dataModel: any;
+}
 
 export default defineComponent({
-  name: 'positionedit',
-  components: {BUploadFile, Approve, BApproveList,Form, Row, Col, Space},
+  name: 'ClassroomEditForm',
+  components: {
+    BUploadFile,FieldEdit
+  },
   setup() {
-
-    const route = useRoute();
+    const formState = reactive<FormState>({dataModel: {}});
     const tabsViewStore = useTabsViewStore();
-    const schoolYearList = ref<SelectProps['options']>();
-    const majorGradeList = ref<SelectProps['options']>();
-    const practiceBaseTypeList = ref<SelectProps['options']>();
-    const practicebaseList = ref<SelectProps['options']>();
-
-    const formState = ref({
-      schoolYearID: "",
-      majorGradeID: "",
-      practiceBaseTypeID: "",
-      practiceBaseID: "",
-      name: null,
-      qty: null,
-      remark: "",
-    });
-
-    getDictionaryItemList({code: "PracticeBaseType"}).then(x => {
-      practiceBaseTypeList.value = x.filter(f => f.value != 3);
-    })
-    getSchoolyearList().then(data => {
-      schoolYearList.value = data;
-    });
+    const modalRef = ref();
 
-    getMajorGradeList(formState.value.schoolYearID).then(data => {
-      majorGradeList.value = data;
-    });
-    const loadPracticebaseList = () => {
-      formState.value.practiceBaseID = "";
-      getPracticebaseList();
-    }
-    const getPracticebaseList = async function () {
+    const onFinish = () => {
+      formState.dataModel.device = data.value
+      save('', formState.dataModel).then(result => {
+        if (result) {
+          onClose(1)
+        }
+      });
+    };
+    const onFinishFailed = (errorInfo: any) => {
+      console.log('Failed:', errorInfo);
+    };
 
-      if (formState.value.practiceBaseTypeID) {
-        const result: any = await get('practicebase/practicebase/getList', {
-          page: 1, rows: 999,
-          practiceBaseTypeID: formState.value.practiceBaseTypeID,
-          recordStatus: 1
-        });
-        practicebaseList.value = result.list;
-      }
-    }
-    const filterOption = (input: string, option: any) => {
-      return option.name.toLowerCase().indexOf(input.toLowerCase()) >= 0;
+    const onClose = (reload: any) => {
+      tabsViewStore.closeCurrentTabByPath("/practicebase/classroom/edit");
+      tabsViewStore.openTab("/practicebase/classroom/list", {reload: reload});
     };
 
     const loadData = async (id) => {
-      const reqData = await get('position/getPosition', {positionID: id});
-      (formState.value as any) = reqData;
-      getPracticebaseList();
+      console.log(id)
     }
 
-    const onFinish = () => {
-      save('position/savePosition', formState.value).then(result => {
-        if (result) {
-          tabsViewStore.addTabByPath('/position/list', {reload: 1});
+    const columns: TableColumnsType = [
+      {
+        title: '序号', width: 80, dataIndex: 'num', key: 'num', align: "center", customRender: ({index}) => {
+          return `${index + 1}`;
         }
-      });
-    };
+      },
+      {title: '设备名称', dataIndex: 'name', key: 'name', align: "center"},
+      {title: '设备型号', dataIndex: 'typeName', key: 'typeName', align: "center"},
+      {title: '数量', dataIndex: 'qty', key: 'qty', align: "center"},
+      {title: '操作', key: 'operation', fixed: 'right', width: 120, align: "center"},
+    ];
+    const isEdit = true;
+    const data = ref([]);
 
+    const add = () => {
+      modalRef.value.show(formState.dataModel.subid);
+    }
+    const deleteDevice = (record) => {
+      (data.value as any[]).splice(record, 1);
+      // delDev();
+    }
     return {
-      route, formState,tabsViewStore, schoolYearList, filterOption,majorGradeList,practiceBaseTypeList,practicebaseList,
-      loadPracticebaseList,
-      onFinish, loadData
+      ...toRefs(formState),
+      onFinish,
+      onFinishFailed,
+      loadData,
+      onClose,
+      add,
+      deleteDevice,
+      columns,
+      isEdit,
+      data,
+      modalRef,
     };
   },
   created() {
-    if (history.state.params?.id ) {
-      this.loadData( history.state.params?.id);
-    }
+    const id = history.state.params?.id;
+    this.loadData(id);
   }
-});
+})
 </script>

+ 220 - 0
vue/src/views/subject/fieldedit.vue

@@ -0,0 +1,220 @@
+<template>
+  <a-modal
+    :width="1200"
+    v-model:visible="visible"
+    :title="title"
+    :confirm-loading="confirmLoading"
+    :keyboard="false"
+    :footer="null"
+    :mask-closable="false">
+    <Form :ref="modalFormRef" :model="dataModel" autocomplete="off">
+      <a-divider orientation="left">基础信息</a-divider>
+      <a-row type="flex">
+        <a-col :span="7">
+          <a-form-item label="字段编码" name="fieldCode" :label-col="{span:7}"
+                       :rules="[{ required: true, message: '请填写字段编码!' }]">
+            <a-input v-model:value="dataModel.fieldCode" placeholder="">
+            </a-input>
+          </a-form-item>
+        </a-col>
+        <a-col :span="7">
+          <a-form-item label="字段名称" name="fieldName" :label-col="{span:7}"
+                       :rules="[{ required: true, message: '请填写字段名称!' }]">
+            <a-input v-model:value="dataModel.fieldName" placeholder="">
+            </a-input>
+          </a-form-item>
+        </a-col>
+        <a-col :span="7">
+          <a-form-item label="显示别名" name="fieldAlias" :label-col="{span:7}"
+                       :rules="[{ required: true, message: '请填写显示别名!' }]">
+            <a-input v-model:value="dataModel.fieldAlias" placeholder="">
+            </a-input>
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row type="flex">
+        <a-col :span="7">
+          <a-form-item label="配置类型" name="settingTypeId" :label-col="{span:7}"
+                       :rules="[{ required: true, message: '请选择配置类型!' }]">
+            <a-select ref="select" v-model:value="dataModel.settingTypeId"
+                      :options="settingTypeList" :field-names="{label:'name',value:'value'}" :allow-clear="true">
+            </a-select>
+          </a-form-item>
+        </a-col>
+        <a-col :span="7">
+          <a-form-item label="数据类型" name="dataType" :label-col="{span:7}"
+                       :rules="[{ required: true, message: '请选择数据类型!' }]">
+            <a-select ref="select" v-model:value="dataModel.dataType"
+                      :options="DataTypeList" :field-names="{label:'name',value:'value'}" :allow-clear="true">
+            </a-select>
+          </a-form-item>
+        </a-col>
+        <a-col :span="7">
+          <a-form-item label="是否查询字段" name="isSearchField" :label-col="{span:7}">
+            <a-radio-group v-model:value="dataModel.isSearchField">
+              <a-radio :value="1">是</a-radio>
+              <a-radio :value="0">否</a-radio>
+            </a-radio-group>
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-row type="flex">
+        <a-col :span="7">
+          <a-form-item label="查询类型" name="queryTypeId" :label-col="{span:7}"
+                       :rules="[{ required: true, message: '请选择配置类型!' }]">
+            <a-select ref="select" v-model:value="dataModel.queryTypeId"
+                      :options="queryTypeList" :field-names="{label:'name',value:'value'}" :allow-clear="true">
+            </a-select>
+          </a-form-item>
+        </a-col>
+        <a-col :span="7">
+          <a-form-item label="取数字典编码" name="dictionaryCode" :label-col="{span:7}"
+                       :rules="[{ required: true, message: '请选择数据类型!' }]">
+            <a-input v-model:value="dataModel.dictionaryCode" placeholder="">
+            </a-input>
+          </a-form-item>
+        </a-col>
+        <a-col :span="7">
+          <a-form-item label="是否查询字段" name="isSearchField" :label-col="{span:7}">
+            <a-radio-group v-model:value="dataModel.isSearchField">
+              <a-radio :value="1">是</a-radio>
+              <a-radio :value="0">否</a-radio>
+            </a-radio-group>
+          </a-form-item>
+        </a-col>
+      </a-row>
+      <a-divider orientation="left">问题描述</a-divider>
+      <a-row>
+        <a-textarea :auto-size="{ minRows: 4, maxRows: 10 }" v-model:value="dataModel.problemDesc"
+                    :disabled="isDetail"/>
+      </a-row>
+      <a-row style="height: 20px"></a-row>
+      <a-row type="flex">
+        <a-col :span="7">
+          <a-form-item label="是否解决" name="IsResolve" :label-col="{span:7}">
+            <a-radio-group v-model:value="dataModel.isResolve">
+              <a-radio :value="1">是</a-radio>
+              <a-radio :value="0">否</a-radio>
+            </a-radio-group>
+          </a-form-item>
+        </a-col>
+        <a-col :span="7">
+          <a-form-item label="解决时间" name="ResolveDate" :label-col="{span:7}">
+            <label v-if="isDetail">{{ resolveDateDetail }}</label>
+            <a-date-picker name="resolveDate2" v-model:value="dataModel.resolveDate" value-format="YYYY-MM-DD"
+                           placeholder="请选择解决时间" v-if="!isDetail"/>
+          </a-form-item>
+        </a-col>
+        <a-col :span="10"></a-col>
+      </a-row>
+      <a-row type="flex">
+        <a-col :span="24" style="text-align: right;margin-right: 20px;">
+          <a-button type="primary" html-type="submit">提交</a-button>
+        </a-col>
+      </a-row>
+    </Form>
+  </a-modal>
+</template>
+<script lang="ts">
+import {Form} from 'ant-design-vue';
+import {defineComponent, ref} from "vue";
+import BUploadFile from "@/components/file/uploadFile.vue";
+import type {SelectProps} from "ant-design-vue";
+import {getDictionaryItemList} from "@/api/system/dictionary";
+import {get, save} from "@/api/common";
+import type {FormInstance} from 'ant-design-vue';
+import {DataTypeList} from '@/enums/dictions';
+
+export default defineComponent({
+  name: 'FieldEdit',
+  components: {BUploadFile, Form},
+  props: {
+    loadData: {
+      type: Function,
+      default: null
+    }
+  },
+  setup(props) {
+    const visible = ref<boolean>(false);
+    const confirmLoading = ref<boolean>(false);
+    const modalFormRef = ref<FormInstance>();
+
+    const dataModel = ref({
+      fieldCode: "",
+      fieldName: "",
+      fieldAlias: "",
+      settingTypeId: "",
+      fieldDesc: null,
+      dataType: null,
+      queryTypeId: "",
+      isSearchField: 1,
+      dictionaryCode:''
+    });
+    const settingTypeList = ref<SelectProps['options']>();
+    const queryTypeList = ref<SelectProps['options']>();
+
+    const fileList = ref();
+    const title = ref();
+    const isAllowCommit = ref<boolean>(false);
+    const isDetail = ref<boolean>(false);
+
+    getDictionaryItemList({code: "settingType"}).then(data => {
+      settingTypeList.value = data;
+    });
+    getDictionaryItemList({code: "queryType"}).then(data => {
+      queryTypeList.value = data;
+    });
+
+    const show = (id: any) => {
+      loadData(id);
+      title.value = "主题字段定义";
+      visible.value = true;
+    };
+
+
+    const handleOk = () => {
+      save('', dataModel).then(result => {
+        if (result) {
+          visible.value = false;
+          props.loadData();
+        }
+      });
+    };
+
+    const handleCancel = () => {
+      visible.value = false;
+    };
+
+    const setFileList = (files) => {
+      fileList.value = files;
+    }
+
+
+    const loadData = (id: string) => {
+      get('', id).then((result: any) => {
+        console.log(result);
+      });
+    }
+
+    return {
+      dataModel,
+      modalFormRef,
+      isAllowCommit,
+      isDetail,
+      visible,
+      title,
+      confirmLoading,
+      settingTypeList,
+      DataTypeList,
+      queryTypeList,
+      show,
+      handleOk,
+      handleCancel,
+      setFileList,
+    };
+  },
+  created() {
+  },
+})
+</script>
+

+ 13 - 28
vue/src/views/subject/index.vue

@@ -113,13 +113,14 @@ import type {TableColumnsType, TableProps,SelectProps} from 'ant-design-vue';
 import { get, postdel} from '@/api/common';
 import {useRoute, useRouter} from "vue-router";
 import {useTabsViewStore} from "@/store/modules/tabsView";
-import {getDictionaryItemList, getMajorGradeList, getSchoolyearList} from "@/api/system/dictionary";
+import {getDictionaryItemList} from "@/api/system/dictionary";
 import {message} from "ant-design-vue";
 import {DownOutlined, UpOutlined} from "@ant-design/icons-vue";
 import type {ImportProps} from "@/components/basic/excel/importExcel/ImportProps";
 import BImportExcel from "@/components/basic/excel/importExcel/importExcel.vue";
 import BExportExcel from "@/components/basic/excel/exportExcel/exportExcel.vue";
 import {getPaginationTotalTitle} from "@/utils/common";
+import dayjs from "dayjs";
 
 export default defineComponent({
   name: 'positionlist',
@@ -150,13 +151,14 @@ export default defineComponent({
         align: "center",
         customRender: item => `${formState.rows * (formState.page - 1) + item.index + 1}`
       },
-      {title: '实习学年', width: 120, dataIndex: 'schoolYear', key: 'schoolYear',align:"center"},
-      {title: '年级专业', dataIndex: 'majorGradeName', key: '1', width:180},
-      {title: '基地类型', dataIndex: 'practiceBaseTypeName', key: '2', width: 150, align: "center"},
-      {title: '单位名称', dataIndex: 'practiceBaseName', key: '3', width: 200},
-      {title: '岗位名称', dataIndex: 'name', key: '5', width: 120},
-      {title: '岗位数量', dataIndex: 'qty', key: '5', width: 100,align:"center"},
-      {title: '备注', dataIndex: 'remark', key: '5', width: 180,ellipsis: true},
+      {title: '表编码', width: 120, dataIndex: 'tabCode', key: 'tabCode',align:"center"},
+      {title: '表名称', dataIndex: 'tabName', key: '1', width:180},
+      {title: '描述', dataIndex: 'tabDesc', key: '2', width: 150, align: "center"},
+      {title: '创建时间', dataIndex: 'createTime', key: '3', width: 200, customRender: ({record}) =>
+          record.createTime==null?"": (dayjs(record.createTime).format('YYYY-MM-DD'))},
+      {title: '创建人', dataIndex: 'createdBy', key: '5', width: 120},
+      {title: '是否是否有外键字段', dataIndex: 'isReferences', key: '5', width: 200,align:"center", customRender: ({record}) =>
+          record.isReferences==1?"是":"否"},
       {
         title: '操作', key: 'operation', width: 120, align: "center"
       },
@@ -185,23 +187,6 @@ export default defineComponent({
         value: x.value
       }));
     })
-    getSchoolyearList().then(data => {
-      schoolYearList.value = data.map(x => ({
-        label: x.schoolYear,
-        value: x.schoolYearID
-      }));
-    });
-
-    const loadMajorGradeList = () => {
-      getMajorGradeList(formState.schoolYearID).then(data => {
-        majorGradeList.value = data.map(x => ({
-          label: x.name,
-          value: x.majorGradeID
-        }));
-        loadData();
-      });
-    }
-    loadMajorGradeList();
 
     const filterOption = (input: string, option: any) => {
       return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
@@ -247,13 +232,13 @@ export default defineComponent({
       })
     };
     const detail = (key: string) => {
-      tabsViewStore.addTabByPath('/position/detail', {id: key});
+      tabsViewStore.addTabByPath('/subject/detail', {id: key});
     };
     const add = () => {
-      tabsViewStore.addTabByPath('/position/edit', {});
+      tabsViewStore.addTabByPath('/subject/edit', {});
     };
     const edit = (key: string) => {
-      tabsViewStore.addTabByPath('/position/edit', {id: key});
+      tabsViewStore.addTabByPath('/subject/edit', {id: key});
     };
     const onSelectChange = (keys: any) => {
       selectedRowKeys.value = keys;