2 커밋 5f5f112771 ... 3117e23e66

작성자 SHA1 메시지 날짜
  qiny 3117e23e66 Merge branch 'master' of http://114.55.67.98:8070/Natural_p1/zjugis_OA 11 달 전
  qiny aac659c2fa feat: 员工档案功能完善 11 달 전

+ 9 - 1
client/src/components/UploadFile/src/UploadImgs.vue

@@ -82,7 +82,11 @@ const props = defineProps({
   fileType: propTypes.array.def(['image/jpeg', 'image/png', 'image/gif']), // 图片类型限制 ==> 非必传(默认为 ["image/jpeg", "image/png", "image/gif"])
   height: propTypes.string.def('150px'), // 组件高度 ==> 非必传(默认为 150px)
   width: propTypes.string.def('150px'), // 组件宽度 ==> 非必传(默认为 150px)
-  borderradius: propTypes.string.def('8px') // 组件边框圆角 ==> 非必传(默认为 8px)
+  borderradius: propTypes.string.def('8px'), // 组件边框圆角 ==> 非必传(默认为 8px)
+  callback: {
+    type: Function as PropType<any>,
+    required: false
+  }
 })
 
 const uploadHeaders = ref({
@@ -136,6 +140,8 @@ const uploadSuccess = (response, uploadFile: UploadFile) => {
   // TODO 多图上传组件成功后只是把保存成功后的url替换掉组件选图时的文件路径,所以返回的fileList包含的是一个包含文件信息的对象列表
   uploadFile.url = response.data
   emit('update:modelValue', fileList.value)
+  // 回传数据
+  props.callback?.(fileList.value)
   message.success('上传成功')
 }
 
@@ -145,6 +151,8 @@ const handleRemove = (uploadFile: UploadFile) => {
     (item) => item.url !== uploadFile.url || item.name !== uploadFile.name
   )
   emit('update:modelValue', fileList.value)
+  // 回传数据
+  props.callback?.(fileList.value)
 }
 
 // 图片上传错误提示

+ 2 - 2
client/src/views/OaSystem/marketCenter/contractSubOut/applyIndex.vue

@@ -128,8 +128,8 @@
               scope.row.contractSubFlowStatus != 90 && isSignType[scope.row.isSign] === '是'
                 ? '未签'
                 : scope.row.contractAmount - (scope.row.payAmount ?? 0) === 0
-                ? '已付清'
-                : '未付清'
+                  ? '已付清'
+                  : '未付清'
             }}</template>
           </el-table-column>
           <el-table-column label="操作" fixed="right" align="center" width="200">

+ 2 - 2
client/src/views/OaSystem/marketCenter/khglPage/CustomerTable.vue

@@ -142,8 +142,8 @@ const newCustomer = (isAdd: boolean, row?) => {
   const params = !isAdd
     ? `/editCustomer?id=${row.id}&edit=true`
     : row
-    ? `/newCustomer?id=${row.id}`
-    : '/newCustomer'
+      ? `/newCustomer?id=${row.id}`
+      : '/newCustomer'
   push(params)
 }
 // 查看客户详情

+ 49 - 49
client/src/views/OaSystem/mineCenter/rightChild/index.ts

@@ -108,55 +108,55 @@ export const formConfigList = [
       }
     ]
   },
-  {
-    title: '教育信息',
-    children: [
-      {
-        name: 'byxx',
-        title: '毕业院校'
-      },
-      {
-        name: 'bysj',
-        title: '毕业时间',
-        type: 'time'
-      },
-      {
-        name: 'zgxl',
-        title: '最高学历',
-        type: 'select',
-        options: [
-          {
-            value: 1,
-            label: '高中'
-          },
-          {
-            value: 2,
-            label: '中专'
-          },
-          {
-            value: 3,
-            label: '大专'
-          },
-          {
-            value: 4,
-            label: '本科'
-          },
-          {
-            value: 5,
-            label: '硕士'
-          },
-          {
-            value: 6,
-            label: '博士'
-          }
-        ]
-      },
-      {
-        name: 'major',
-        title: '专业'
-      }
-    ]
-  },
+  // {
+  //   title: '教育信息',
+  //   children: [
+  //     {
+  //       name: 'byxx',
+  //       title: '毕业院校'
+  //     },
+  //     {
+  //       name: 'bysj',
+  //       title: '毕业时间',
+  //       type: 'time'
+  //     },
+  //     {
+  //       name: 'zgxl',
+  //       title: '最高学历',
+  //       type: 'select',
+  //       options: [
+  //         {
+  //           value: 1,
+  //           label: '高中'
+  //         },
+  //         {
+  //           value: 2,
+  //           label: '中专'
+  //         },
+  //         {
+  //           value: 3,
+  //           label: '大专'
+  //         },
+  //         {
+  //           value: 4,
+  //           label: '本科'
+  //         },
+  //         {
+  //           value: 5,
+  //           label: '硕士'
+  //         },
+  //         {
+  //           value: 6,
+  //           label: '博士'
+  //         }
+  //       ]
+  //     },
+  //     {
+  //       name: 'major',
+  //       title: '专业'
+  //     }
+  //   ]
+  // },
   {
     title: '紧急联系人信息',
     children: [

+ 29 - 9
client/src/views/OaSystem/mineCenter/rightChild/wdda.vue

@@ -96,6 +96,19 @@ const submitForm = (formEl: FormInstance | undefined) => {
     }
   })
 }
+
+// 修改并保存工作经历
+const saveWorkList = (newData: any[]) => {
+  data.value['workList'] = newData.map((item) => ({ ...item, userId }))
+}
+// 修改并保存家庭成员
+const saveFamilyList = (newData: any[]) => {
+  data.value['familyList'] = newData.map((item) => ({ ...item, userId }))
+}
+// 修改并保存学习经历
+const saveSchoolList = (newData: any[]) => {
+  data.value['schoolList'] = newData.map((item) => ({ ...item, userId }))
+}
 </script>
 <template>
   <div class="form-unable-edit my-portrait">
@@ -151,23 +164,30 @@ const submitForm = (formEl: FormInstance | undefined) => {
     </el-form>
 
     <div class="my-portrait-item">
-      <WorkTable :defaultData="data['workList'] ?? []" :onlyRead="true" />
+      <WorkTable
+        :defaultData="data['workList'] ?? []"
+        :onlyRead="isDisabled"
+        @onSave="saveWorkList"
+      />
     </div>
     <div class="my-portrait-item">
-      <FamilyTable :defaultData="data['familyList'] ?? []" :onlyRead="true" />
+      <FamilyTable
+        :defaultData="data['familyList'] ?? []"
+        :onlyRead="isDisabled"
+        @onSave="saveFamilyList"
+      />
     </div>
     <div class="my-portrait-item">
-      <SchoolTable :defaultData="data['schoolList'] ?? []" :onlyRead="true" />
+      <SchoolTable
+        :defaultData="data['schoolList'] ?? []"
+        :onlyRead="isDisabled"
+        @onSave="saveSchoolList"
+      />
     </div>
 
     <div class="my-portrait-item" style="height: 200px">
-      <div class="title">
-        <i></i>
-        <span>技能证书</span>
-      </div>
-
       <div>
-        <TechCertificate />
+        <TechCertificate :defaultData="data['certList'] ?? []" :onlyRead="true" />
       </div>
     </div>
   </div>

+ 71 - 7
client/src/views/OaSystem/personnelManagement/ygdaPage/SchoolTable.vue

@@ -8,7 +8,7 @@
       class="add-tag"
       type="primary"
       effect="plain"
-      v-if="!tableData.length && !onlyRead"
+      v-if="!tableData.length && !readOnly"
       @click="onAddItem(-1)"
       >+ 新增</el-tag
     >
@@ -37,10 +37,11 @@
           <el-date-picker
             v-model="scope.row.bysj"
             type="date"
-            value-format="YYYY-MM-DD"
+            format="YYYY-MM-DD"
+            value-format="x"
             v-if="scope.row.isEdit"
           />
-          <span v-else>{{ scope.row.bysj }}</span>
+          <span v-else>{{ moment(scope.row.bysj).format('YYYY-MM-DD') }}</span>
         </template>
       </el-table-column>
       <el-table-column prop="xl" label="学历">
@@ -64,11 +65,31 @@
       <el-table-column prop="filePath" label="附件" width="400px">
         <template #default="scope">
           <!-- <el-input v-model="scope.row.filePath" v-if="scope.row.isEdit" /> -->
-          <!-- <span v-else>{{ scope.row.filePath }}</span> -->
-          <UploadImgs :modelValue="scope.row.filePath" :updateUrl="updateUrl" height="55px" />
+          <UploadImgs
+            :modelValue="imageUrl(scope.row.filePath)"
+            :updateUrl="updateUrl"
+            height="55px"
+            :limit="2"
+            v-if="scope.row.isEdit"
+            :callback="(file) => onUploadSuccess(file, scope.$index)"
+          />
+          <div v-else>
+            <span
+              style="margin-left: 3px"
+              v-for="(item, index) in getImgUrlList(scope.row.filePath)"
+              :key="index"
+            >
+              <el-image
+                style="width: 100px; height: 100px"
+                :src="item"
+                fit="scale-down"
+                :preview-src-list="[item]"
+              />
+            </span>
+          </div>
         </template>
       </el-table-column>
-      <el-table-column fixed="right" label="操作" width="140">
+      <el-table-column fixed="right" label="操作" width="140" v-if="!readOnly">
         <template #default="scope">
           <el-button
             link
@@ -100,6 +121,7 @@
 
 import { cloneDeep } from 'lodash-es'
 import { UploadImgs } from '@/components/UploadFile'
+import moment from 'moment'
 import { getDictList } from './index'
 
 // 学历字典
@@ -132,7 +154,25 @@ interface IProps {
   onlyRead?: boolean
 }
 const props = defineProps<IProps>()
-const { defaultData, onlyRead } = props
+const { defaultData } = props
+const readOnly = ref(props.onlyRead)
+watch(
+  () => props.onlyRead,
+  (newVal) => {
+    readOnly.value = newVal
+  }
+)
+watch(
+  () => props.defaultData,
+  (newVal) => {
+    tableData.value = newVal.map((item: any) => {
+      return {
+        ...item,
+        isEdit: false
+      }
+    })
+  }
+)
 onMounted(() => {
   if (defaultData && defaultData.length) {
     tableData.value = defaultData.map((item: any) => {
@@ -144,6 +184,13 @@ onMounted(() => {
   }
 })
 
+watch(
+  () => tableData.value,
+  () => {
+    console.log('tableData.value', tableData.value)
+  }
+)
+
 // 新增行
 const onAddItem = (index: number) => {
   tableData.value.splice(index + 1, 0, {
@@ -179,6 +226,23 @@ const onEditItem = (index: number) => {
 const deleteRow = (index: number) => {
   tableData.value.splice(index, 1)
 }
+// 回填正确路径
+const imageUrl = (url) => {
+  if (!url) return []
+  return url.split(',').map((item, index) => ({
+    url: item,
+    uid: index
+  }))
+}
+const getImgUrlList = (url) => {
+  if (!url) return []
+  return url.split(',')
+}
+// 附件上传成功
+const onUploadSuccess = (file: any, index) => {
+  const fileList = file.map((item) => item.url)
+  tableData.value[index].filePath = fileList.join(',')
+}
 </script>
 <style scoped lang="scss">
 .casually-name {

+ 257 - 38
client/src/views/OaSystem/personnelManagement/ygdaPage/TechCertificate.vue

@@ -1,40 +1,259 @@
-<script setup lang="ts">
-const tableData = [
-  // {
-  //   date: '2016-05-03',
-  //   name: '测绘质量检测技术',
-  //   level: '高级',
-  //   organization: '浙江省测绘与地理信息行业协会'
-  // },
-  // {
-  //   date: '2016-05-02',
-  //   name: '职称证书',
-  //   level: '中级',
-  //   organization: '浙江省测绘与地理信息行业协会'
-  // }
-]
-</script>
-
 <template>
-  <el-table
-    :header-cell-style="{
-      background: '#F2F4F8',
-      color: '#000000',
-      height: '46px'
-    }"
-    style="width: 100%; height: 100%"
-    :data="tableData"
-    height="150px"
-  >
-    <el-table-column type="index" width="50" />
-    <el-table-column prop="name" label="证书名称" />
-    <el-table-column prop="level" label="证书等级" />
-    <el-table-column prop="date" label="获得时间" />
-    <el-table-column prop="organization" label="发证机构" />
-    <el-table-column fixed="right" label="操作" width="120">
-      <template #default>
-        <el-button link type="primary" size="small">查看</el-button>
-      </template>
-    </el-table-column>
-  </el-table>
+  <div class="casually-name">
+    <div class="star-title">
+      <i></i>
+      <span>技能证书</span>
+    </div>
+    <el-tag
+      class="add-tag"
+      type="primary"
+      effect="plain"
+      v-if="!tableData.length && !readOnly"
+      @click="onAddItem(-1)"
+      >+ 新增</el-tag
+    >
+    <el-table
+      class="detail-table"
+      :header-cell-style="{
+        background: '#F2F4F8',
+        color: '#000000'
+      }"
+      :data="tableData"
+    >
+      <el-table-column prop="certName" label="证书名称">
+        <template #default="scope">
+          <el-input v-model="scope.row.certName" v-if="scope.row.isEdit" />
+          <span v-else>{{ scope.row.certName }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="zcjb" label="证书等级">
+        <template #default="scope">
+          <el-input v-model="scope.row.zcjb" v-if="scope.row.isEdit" />
+          <span v-else>{{ scope.row.zcjb }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="acTime" label="获得时间">
+        <template #default="scope">
+          <el-date-picker
+            v-model="scope.row.acTime"
+            type="date"
+            format="YYYY-MM-DD"
+            value-format="x"
+            v-if="scope.row.isEdit"
+          />
+          <span v-else>{{ moment(scope.row.acTime).format('YYYY-MM-DD') }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="certDetail" label="证书情况">
+        <template #default="scope">
+          <el-input v-model="scope.row.certDetail" v-if="scope.row.isEdit" />
+          <span v-else>{{ scope.row.certDetail }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column prop="filePath" label="附件" width="400px">
+        <template #default="scope">
+          <UploadImgs
+            :modelValue="imageUrl(scope.row.filePath)"
+            :updateUrl="updateUrl"
+            height="55px"
+            :limit="1"
+            v-if="scope.row.isEdit"
+            :callback="(file) => onUploadSuccess(file, scope.$index)"
+          />
+          <div v-else>
+            <span
+              style="margin-left: 3px"
+              v-for="(item, index) in getImgUrlList(scope.row.filePath)"
+              :key="index"
+            >
+              <el-image
+                style="width: 100px; height: 100px"
+                :src="item"
+                fit="scale-down"
+                :preview-src-list="[item]"
+              />
+            </span>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column fixed="right" label="操作" width="140" v-if="!readOnly">
+        <template #default="scope">
+          <el-button
+            link
+            type="primary"
+            size="small"
+            @click="onSaveItem(scope.$index)"
+            v-if="scope.row.isEdit"
+          >
+            保存
+          </el-button>
+          <el-button link type="primary" size="small" @click="onEditItem(scope.$index)" v-else>
+            编辑
+          </el-button>
+          <el-button link type="primary" size="small" @click="deleteRow(scope.$index)">
+            删除
+          </el-button>
+          <el-button link type="primary" size="small" @click="onAddItem(scope.$index)">
+            新增
+          </el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+  </div>
 </template>
+<script lang="ts" setup>
+/**
+ * @description 技能证书
+ */
+import { cloneDeep } from 'lodash-es'
+import moment from 'moment'
+import { UploadImgs } from '@/components/UploadFile'
+
+// 上传路径
+const updateUrl =
+  import.meta.env.VITE_BASE_URL + import.meta.env.VITE_API_URL + import.meta.env.VITE_UPLOAD_URL
+
+interface ITable {
+  id?: string
+  userId?: string
+  nickname?: string // 姓名
+  deptId?: string // 部门id
+  deptName?: string // 部门名称
+  zcjb?: string // 职称级别
+  certName?: string // 专业/资格名称
+  acTime?: string // 取得时间
+  exTime?: string // 注册到期时间
+  certDetail?: string // 证书情况
+  filePath?: string // 原件地址
+  isEdit?: boolean
+}
+const tableData = ref<ITable[]>([])
+
+const $emit = defineEmits<{
+  (e: 'onSave', v: any): void
+}>()
+
+interface IProps {
+  defaultData: any[]
+  onlyRead?: boolean
+}
+const props = defineProps<IProps>()
+const { defaultData } = props
+const readOnly = ref(props.onlyRead)
+watch(
+  () => props.onlyRead,
+  (newVal) => {
+    readOnly.value = newVal
+  }
+)
+watch(
+  () => props.defaultData,
+  (newVal) => {
+    tableData.value = newVal.map((item: any) => {
+      return {
+        ...item,
+        isEdit: false
+      }
+    })
+  }
+)
+onMounted(() => {
+  if (defaultData && defaultData.length) {
+    tableData.value = defaultData.map((item: any) => {
+      return {
+        ...item,
+        isEdit: false
+      }
+    })
+  }
+})
+
+// 新增行
+const onAddItem = (index: number) => {
+  tableData.value.splice(index + 1, 0, {
+    zcjb: '',
+    certName: '',
+    acTime: '',
+    exTime: '',
+    certDetail: '',
+    filePath: '',
+    isEdit: true
+  })
+}
+
+// 保存行
+const onSaveItem = (index: number) => {
+  tableData.value.forEach((item: any, num: number) => {
+    if (num == index) {
+      item.isEdit = false
+    }
+  })
+  const changeData = cloneDeep(tableData.value).map((item: any) => {
+    delete item.isEdit
+    return item
+  })
+  $emit('onSave', changeData)
+}
+
+// 编辑行
+const onEditItem = (index: number) => {
+  tableData.value[index].isEdit = true
+}
+
+// 删除
+const deleteRow = (index: number) => {
+  tableData.value.splice(index, 1)
+}
+// 回填正确路径
+const imageUrl = (url) => {
+  if (!url) return []
+  return url.split(',').map((item, index) => ({
+    url: item,
+    uid: index
+  }))
+}
+const getImgUrlList = (url) => {
+  if (!url) return []
+  return url.split(',')
+}
+// 附件上传成功
+const onUploadSuccess = (file: any, index) => {
+  const fileList = file.map((item) => item.url)
+  tableData.value[index].filePath = fileList.join(',')
+}
+</script>
+<style scoped lang="scss">
+.casually-name {
+  position: relative;
+}
+.star-title {
+  display: flex;
+  align-items: center;
+  margin-bottom: 8px;
+
+  i {
+    display: block;
+    width: 16px;
+    height: 16px;
+    margin-right: 9px;
+    background: url('../../../../assets/imgs/OA/mine/star.png') center no-repeat;
+    background-size: 100%;
+  }
+
+  span {
+    font-size: 18px;
+    font-weight: bold;
+    color: #000000;
+  }
+}
+.add-tag {
+  position: absolute;
+  top: 2px;
+  right: 0;
+  cursor: pointer;
+}
+.detail-table {
+  width: 100%;
+  min-height: 100px;
+}
+</style>

+ 28 - 7
client/src/views/OaSystem/personnelManagement/ygdaPage/WorkTable.vue

@@ -8,7 +8,7 @@
       class="add-tag"
       type="primary"
       effect="plain"
-      v-if="!tableData.length && !onlyRead"
+      v-if="!tableData.length && !readOnly"
       @click="onAddItem(-1)"
       >+ 新增</el-tag
     >
@@ -37,10 +37,11 @@
           <el-date-picker
             v-model="scope.row.startTime"
             type="date"
-            value-format="YYYY-MM-DD"
+            format="YYYY-MM-DD"
+            value-format="x"
             v-if="scope.row.isEdit"
           />
-          <span v-else>{{ scope.row.startTime }}</span>
+          <span v-else>{{ moment(scope.row.startTime).format('YYYY-MM-DD') }}</span>
         </template>
       </el-table-column>
       <el-table-column prop="endTime" label="结束时间">
@@ -48,10 +49,11 @@
           <el-date-picker
             v-model="scope.row.endTime"
             type="date"
-            value-format="YYYY-MM-DD"
+            format="YYYY-MM-DD"
+            value-format="x"
             v-if="scope.row.isEdit"
           />
-          <span v-else>{{ scope.row.endTime }}</span>
+          <span v-else>{{ moment(scope.row.endTime).format('YYYY-MM-DD') }}</span>
         </template>
       </el-table-column>
       <el-table-column prop="resignReason" label="离职原因">
@@ -72,7 +74,7 @@
           <span v-else>{{ scope.row.competitionDetail }}</span>
         </template>
       </el-table-column>
-      <el-table-column fixed="right" label="操作" width="140">
+      <el-table-column fixed="right" label="操作" width="140" v-if="!readOnly">
         <template #default="scope">
           <el-button
             link
@@ -102,6 +104,7 @@
  * @description 工作经历
  */
 import { cloneDeep } from 'lodash-es'
+import moment from 'moment'
 
 interface ITable {
   id?: string
@@ -126,7 +129,25 @@ interface IProps {
   onlyRead?: boolean
 }
 const props = defineProps<IProps>()
-const { defaultData, onlyRead } = props
+const { defaultData } = props
+const readOnly = ref(props.onlyRead)
+watch(
+  () => props.onlyRead,
+  (newVal) => {
+    readOnly.value = newVal
+  }
+)
+watch(
+  () => props.defaultData,
+  (newVal) => {
+    tableData.value = newVal.map((item: any) => {
+      return {
+        ...item,
+        isEdit: false
+      }
+    })
+  }
+)
 onMounted(() => {
   if (defaultData && defaultData.length) {
     tableData.value = defaultData.map((item: any) => {

+ 21 - 3
client/src/views/OaSystem/personnelManagement/ygdaPage/familyTable.vue

@@ -8,7 +8,7 @@
       class="add-tag"
       type="primary"
       effect="plain"
-      v-if="!tableData.length && !onlyRead"
+      v-if="!tableData.length && !readOnly"
       @click="onAddItem(-1)"
       >+ 新增</el-tag
     >
@@ -80,7 +80,7 @@
           <span v-else>{{ degreeShowValue(scope.row.gx, sexOptions) }}</span>
         </template>
       </el-table-column>
-      <el-table-column fixed="right" label="操作" width="140">
+      <el-table-column fixed="right" label="操作" width="140" v-if="!readOnly">
         <template #default="scope">
           <el-button
             link
@@ -143,7 +143,25 @@ interface IProps {
   onlyRead?: boolean
 }
 const props = defineProps<IProps>()
-const { defaultData, onlyRead } = props
+const { defaultData } = props
+const readOnly = ref(props.onlyRead)
+watch(
+  () => props.onlyRead,
+  (newVal) => {
+    readOnly.value = newVal
+  }
+)
+watch(
+  () => props.defaultData,
+  (newVal) => {
+    tableData.value = newVal.map((item: any) => {
+      return {
+        ...item,
+        isEdit: false
+      }
+    })
+  }
+)
 onMounted(() => {
   if (defaultData && defaultData.length) {
     tableData.value = defaultData.map((item: any) => {

+ 49 - 49
client/src/views/OaSystem/personnelManagement/ygdaPage/index.ts

@@ -287,55 +287,55 @@ export const formConfigList = [
       }
     ]
   },
-  {
-    title: '教育信息',
-    children: [
-      {
-        name: 'byxx',
-        title: '毕业院校'
-      },
-      {
-        name: 'bysj',
-        title: '毕业时间',
-        type: 'time'
-      },
-      {
-        name: 'zgxl',
-        title: '最高学历',
-        type: 'select',
-        options: [
-          {
-            value: 1,
-            label: '高中'
-          },
-          {
-            value: 2,
-            label: '中专'
-          },
-          {
-            value: 3,
-            label: '大专'
-          },
-          {
-            value: 4,
-            label: '本科'
-          },
-          {
-            value: 5,
-            label: '硕士'
-          },
-          {
-            value: 6,
-            label: '博士'
-          }
-        ]
-      },
-      {
-        name: 'major',
-        title: '专业'
-      }
-    ]
-  },
+  // {
+  //   title: '教育信息',
+  //   children: [
+  //     {
+  //       name: 'byxx',
+  //       title: '毕业院校'
+  //     },
+  //     {
+  //       name: 'bysj',
+  //       title: '毕业时间',
+  //       type: 'time'
+  //     },
+  //     {
+  //       name: 'zgxl',
+  //       title: '最高学历',
+  //       type: 'select',
+  //       options: [
+  //         {
+  //           value: 1,
+  //           label: '高中'
+  //         },
+  //         {
+  //           value: 2,
+  //           label: '中专'
+  //         },
+  //         {
+  //           value: 3,
+  //           label: '大专'
+  //         },
+  //         {
+  //           value: 4,
+  //           label: '本科'
+  //         },
+  //         {
+  //           value: 5,
+  //           label: '硕士'
+  //         },
+  //         {
+  //           value: 6,
+  //           label: '博士'
+  //         }
+  //       ]
+  //     },
+  //     {
+  //       name: 'major',
+  //       title: '专业'
+  //     }
+  //   ]
+  // },
   {
     title: '紧急联系人信息',
     children: [

+ 21 - 3
client/src/views/OaSystem/personnelManagement/ygdaPage/performanceTable.vue

@@ -8,7 +8,7 @@
       class="add-tag"
       type="primary"
       effect="plain"
-      v-if="!tableData.length && !onlyRead"
+      v-if="!tableData.length && !readOnly"
       @click="onAddItem(-1)"
       >+ 新增</el-tag
     >
@@ -50,7 +50,7 @@
           <span v-else>{{ scope.row.detail }}</span>
         </template>
       </el-table-column>
-      <el-table-column fixed="right" label="操作" width="140">
+      <el-table-column fixed="right" label="操作" width="140" v-if="!readOnly">
         <template #default="scope">
           <el-button
             link
@@ -101,7 +101,25 @@ interface IProps {
   onlyRead?: boolean
 }
 const props = defineProps<IProps>()
-const { defaultData, onlyRead } = props
+const { defaultData } = props
+const readOnly = ref(props.onlyRead)
+watch(
+  () => props.onlyRead,
+  (newVal) => {
+    readOnly.value = newVal
+  }
+)
+watch(
+  () => props.defaultData,
+  (newVal) => {
+    tableData.value = newVal.map((item: any) => {
+      return {
+        ...item,
+        isEdit: false
+      }
+    })
+  }
+)
 onMounted(() => {
   if (defaultData && defaultData.length) {
     tableData.value = defaultData.map((item: any) => {

+ 4 - 4
client/src/views/OaSystem/personnelManagement/ygdaPage/staffDetail.vue

@@ -128,22 +128,22 @@ const isEdit = computed(() => {
 // 修改并保存工作经历
 const saveWorkList = (data: any[]) => {
   // console.log('data', data)
-  formData.value['workList'] = data
+  formData.value['workList'] = data.map((item) => ({ ...item, userId: id }))
 }
 // 修改并保存家庭成员
 const saveFamilyList = (data: any[]) => {
   // console.log('data', data)
-  formData.value['familyList'] = data
+  formData.value['familyList'] = data.map((item) => ({ ...item, userId: id }))
 }
 // 修改并保存学习经历
 const saveSchoolList = (data: any[]) => {
   // console.log('data', data)
-  formData.value['schoolList'] = data
+  formData.value['schoolList'] = data.map((item) => ({ ...item, userId: id }))
 }
 // 修改并保存绩效考核记录
 const savePerformanceList = (data: any[]) => {
   // console.log('data', data)
-  formData.value['performanceList'] = data
+  formData.value['performanceList'] = data.map((item) => ({ ...item, userId: id }))
 }
 </script>
 <template>

+ 4 - 4
client/src/views/OaSystem/projectCenter/projectDetail/projectDetail.vue

@@ -297,10 +297,10 @@ const { mutate: startProjectStatusAndProcess } = useMutation(projectStatusAndPro
       sfysType.value === 'ys'
         ? '验收'
         : sfysType.value === 'jx'
-        ? '结项'
-        : sfysType.value === 'zz'
-        ? '中止'
-        : ''
+          ? '结项'
+          : sfysType.value === 'zz'
+            ? '中止'
+            : ''
     openFlow(router, data, `项目${subTitle}`)
   }
 })