ruoyi-ui/src/views/self/show.vue
@@ -209,9 +209,9 @@
    <!--折叠面板-->
    <el-collapse v-model="activeNames" @change="handleChange">
      <el-collapse-item title="主要学习及工作经历" name="1">
      <el-collapse-item title="主要学习及工作经历" name="1" >
        <el-table v-loading="loading" :data="experienceList" @selection-change="handleSelectionChange" :row-class-name="tableRowClassName" style="background: #FFEFF2;  border-radius: 14px 14px 14px 14px;">
          <el-table-column label="起止日期" prop="startDate" sortable width="300" align="center" />
          <el-table-column label="开始日期" prop="startDate" sortable width="300" align="center" />
          <el-table-column label="主要学习经历、工作单位及任职情况" prop="content" sortable width="350" align="center" />
          <el-table-column label="证明人" prop="witness" sortable width="300" align="center" />
          <!--      操作-->
@@ -222,9 +222,9 @@
                size="mini"
                type="text"
                icon="el-icon-edit"
                @click="handleAdd"
                @click="showDialog1"
                v-hasPermi="['system:role:edit']"
              >修改</el-button>
              >新增</el-button>
              <el-button
                size="mini"
                type="text"
@@ -232,10 +232,14 @@
                @click="handleExperienceDelete(scope.row)"
                v-hasPermi="['system:role:remove']"
              >删除</el-button>
              <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:role:edit']">
                <el-button size="mini" type="text" icon="el-icon-d-arrow-right"  @click="handleCheck(scope.row)">查看详情</el-button>
<!--              <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:role:edit']">-->
<!--                <el-button size="mini" -->
<!--                           type="text" -->
<!--                           icon="el-icon-d-arrow-right"  -->
<!--                           @click="handleCheck(scope.row)"-->
<!--                >查看详情</el-button>-->
              </el-dropdown>
<!--              </el-dropdown>-->
            </template>
          </el-table-column>
        </el-table>
@@ -257,6 +261,13 @@
                size="mini"
                type="text"
                icon="el-icon-edit"
                @click="showDialog2"
                v-hasPermi="['system:role:edit']"
              >新增</el-button>
              <el-button
                size="mini"
                type="text"
                icon="el-icon-edit"
                @click="handleUpdate(scope.row)"
                v-hasPermi="['system:role:edit']"
              >修改</el-button>
@@ -264,13 +275,13 @@
                size="mini"
                type="text"
                icon="el-icon-delete"
                @click="handleCertificateDelete(scope.row)"
                @click="handDelete(scope.row)"
                v-hasPermi="['system:role:remove']"
              >删除</el-button>
              <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:role:edit']">
                <el-button size="mini" type="text" icon="el-icon-d-arrow-right"  @click="handleCheck(scope.row)">查看详情</el-button>
<!--              <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:role:edit']">-->
<!--                <el-button size="mini" type="text" icon="el-icon-d-arrow-right"  @click="handleCheck(scope.row)">查看详情</el-button>-->
              </el-dropdown>
<!--              </el-dropdown>-->
            </template>
          </el-table-column>
        </el-table>
@@ -305,17 +316,97 @@
          <el-table-column label="证件名称" prop="cerName" sortable width="280" align="center" />
          <el-table-column label="持有情况" prop="ownStatus" sortable width="280" align="center" />
          <el-table-column label="证件号码" prop="idNo" sortable width="280" align="center" />
          <el-table-column label="有效期" prop="validityDate"  sortable width="280" align="center">
          <el-table-column label="有效期" prop="startTime endTime"  sortable width="280" align="center">
            <template slot-scope="scope">
              <span v-if="scope.row.startTime || scope.row.endTime  == true">
                {{scope.row.startTime}} 至 {{scope.row.endTime}}
              </span>
              <span v-else>————</span>
            </template>
          </el-table-column>
          <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
            <template slot-scope="scope" v-if="scope.row.roleId !== 1">
              <!--              @click="handleUpdate(scope.row)"-->
              <el-button
                size="mini"
                type="text"
                icon="el-icon-edit"
                @click="showDialog3"
                v-hasPermi="['system:role:edit']"
              >新增</el-button>
              <el-button
                size="mini"
                type="text"
                icon="el-icon-edit"
                @click="handleAdd"
                v-hasPermi="['system:role:edit']"
              >修改</el-button>
              <el-button
                size="mini"
                type="text"
                icon="el-icon-delete"
                @click="handleCertificateDelete(scope.row)"
                v-hasPermi="['system:role:remove']"
              >删除</el-button>
              <!--              <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:role:edit']">-->
              <!--                <el-button size="mini" -->
              <!--                           type="text" -->
              <!--                           icon="el-icon-d-arrow-right"  -->
              <!--                           @click="handleCheck(scope.row)"-->
              <!--                >查看详情</el-button>-->
              <!--              </el-dropdown>-->
            </template>
          </el-table-column>
        </el-table>
      </el-collapse-item>
      <el-collapse-item title="出国(境)情况" name="5">
        <el-table v-loading="loading" :data="AbroadList" @selection-change="handleSelectionChange"
                  :row-class-name="tableRowClassName" style="background: #FFEFF2;  border-radius: 14px 14px 14px 14px;">
          <el-table-column label="起止日期" prop="startDate" sortable width="350" align="center" />
          <el-table-column label="起止日期" prop="startTime endTime" sortable width="350" align="center" >
            <template slot-scope="scope">
              <span v-if="scope.row.startTime || scope.row.endTime  == true">
                {{scope.row.startTime}} 至 {{scope.row.endTime}}
              </span>
              <span v-else>————</span>
            </template>
          </el-table-column>
          <el-table-column label="所到国家或者地区" prop="destination" sortable width="350" align="center" />
          <el-table-column label="事由(旅游、走访、探亲、继承财产、其他)" prop="cause" sortable width="400" align="center" />
          <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
            <template slot-scope="scope" v-if="scope.row.roleId !== 1">
              <!--              @click="handleUpdate(scope.row)"-->
              <el-button
                size="mini"
                type="text"
                icon="el-icon-edit"
                @click="showDialog4"
                v-hasPermi="['system:role:edit']"
              >新增</el-button>
              <el-button
                size="mini"
                type="text"
                icon="el-icon-edit"
                @click="handleAdd"
                v-hasPermi="['system:role:edit']"
              >修改</el-button>
              <el-button
                size="mini"
                type="text"
                icon="el-icon-delete"
                @click="handleAbroadDelete(scope.row)"
                v-hasPermi="['system:role:remove']"
              >删除</el-button>
              <!--              <el-dropdown size="mini" @command="(command) => handleCommand(command, scope.row)" v-hasPermi="['system:role:edit']">-->
              <!--                <el-button size="mini" -->
              <!--                           type="text" -->
              <!--                           icon="el-icon-d-arrow-right"  -->
              <!--                           @click="handleCheck(scope.row)"-->
              <!--                >查看详情</el-button>-->
              <!--              </el-dropdown>-->
            </template>
          </el-table-column>
        </el-table>
      </el-collapse-item>
    </el-collapse>
@@ -339,26 +430,6 @@
          <div v-if="item.term === '工作'"> {{item.content}}</div>
          <div v-if="item.term === '结婚后'"> {{item.content}}</div>
        </el-tab-pane>
<!--        <el-tab-pane label="婴儿"  >-->
<!--          <div v-if="AutobiographyList.term === '婴儿'" v-model="AutobiographyList.content">-->
<!--            {{AutobiographyList.content}}-->
<!--          </div>-->
<!--        </el-tab-pane>-->
<!--        <el-tab-pane label="3~6岁(幼儿期)" name="2" ></el-tab-pane>-->
<!--        <el-tab-pane label="6~12(小学)" name="3" ></el-tab-pane>-->
<!--        <el-tab-pane label="12~15(初中)" name="4"></el-tab-pane>-->
<!--        <el-tab-pane label="15~18(高中)" name="5"></el-tab-pane>-->
<!--        <el-tab-pane label="18~22(大学)" name="6"></el-tab-pane>-->
<!--        <el-tab-pane label="22~25(研究生)" name="7"></el-tab-pane>-->
<!--        <el-tab-pane label="26~ (工作)" name="8"></el-tab-pane>-->
<!--        <el-tab-pane label="?岁结婚" name="9"></el-tab-pane>-->
<!--        &lt;!&ndash;    </div>&ndash;&gt;-->
<!--        &lt;!&ndash;        <el-tab-pane&ndash;&gt;-->
<!--        &lt;!&ndash;          v-for="(item, index) in AutobiographyTermList"&ndash;&gt;-->
<!--        &lt;!&ndash;          :key="index"&ndash;&gt;-->
<!--        &lt;!&ndash;          :name="item"&ndash;&gt;-->
<!--        &lt;!&ndash;          :label="item"&ndash;&gt;-->
<!--        &lt;!&ndash;        />&ndash;&gt;-->
      </el-tabs>
@@ -372,11 +443,11 @@
      @pagination="getList"
    />
    <!-- 修改主要经历信息配置对话框 -->
    <!-- 新增主要经历信息配置对话框 -->
    <el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
      <el-form ref="elForm" :model="formDat" :rules="rules" size="medium" label-width="140px">
        <el-form-item label="起止日期" prop="startDate">
          <el-input v-model="formDat.startDate" placeholder="请输入起止日期" clearable :style="{width: '100%'}" ></el-input>
      <el-form ref="elForm1" :model="formDat" :rules="rules" size="medium" label-width="140px">
        <el-form-item label="开始日期" prop="startDate">
          <el-input v-model="formDat.startDate" placeholder="请输入开始日期" clearable :style="{width: '100%'}" ></el-input>
        </el-form-item>
        <el-form-item label="主要学习经历、工作单位及任职情况" prop="content">
          <el-input v-model="formDat.content" placeholder="请输入主要学习经历、工作单位及任职情况" clearable :style="{width: '100%'}" >
@@ -391,12 +462,98 @@
      <h4 class="form-header"> </h4>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">保 存</el-button>
        <el-button type="primary" @click="submitDataScope">保 存</el-button>
        <el-button @click="cancelData">取 消</el-button>
      </div>
    </el-dialog>
    <!-- 新增家庭成员及主要社会关系情况信息配置对话框 -->
    <el-dialog :title="title" :visible.sync="relation1" width="900px" append-to-body>
      <el-form ref="elForm" :model="formDat" :rules="rules" size="medium" label-width="140px">
        <el-form-item label="与本人关系" prop="relation">
          <el-input v-model="formDat.relation" placeholder="请输入与本人关系" clearable :style="{width: '100%'}" ></el-input>
        </el-form-item>
        <el-form-item label="姓名" prop="nickName">
          <el-input v-model="formDat.nickName" placeholder="请输入姓名" clearable :style="{width: '100%'}" >
          </el-input>
        </el-form-item>
        <el-form-item label="单位" prop="unit">
          <el-input v-model="formDat.unit" placeholder="请输入单位" clearable :style="{width: '100%'}" >
          </el-input>
        </el-form-item>
        <el-form-item label="职务" prop="position">
          <el-input v-model="formDat.position" placeholder="请输入职务" clearable :style="{width: '100%'}" >
          </el-input>
        </el-form-item>
        <el-form-item label="政治面貌" prop="politicalOutlook">
          <el-input v-model="formDat.politicalOutlook" placeholder="请输入政治面貌" clearable :style="{width: '100%'}" >
          </el-input>
        </el-form-item>
      </el-form>
      <h4 class="form-header"> </h4>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitDataScope">保 存</el-button>
        <el-button @click="cancelData">取 消</el-button>
      </div>
    </el-dialog>
    <!-- 新增持有出入境证件情况信息配置对话框 -->
    <el-dialog :title="title" :visible.sync="certificate" width="900px" append-to-body>
      <el-form ref="elForm" :model="formDat" :rules="rules" size="medium" label-width="140px">
        <el-form-item label="证件名称" prop="cerName">
          <el-input v-model="formDat.cerName" placeholder="请输入证件名称" clearable :style="{width: '100%'}" >
          </el-input>
        </el-form-item>
        <el-form-item label="持有情况" prop="ownStatus">
          <el-input v-model="formDat.ownStatus" placeholder="请输入持有情况" clearable :style="{width: '100%'}" >
          </el-input>
        </el-form-item>
        <el-form-item label="证件号码" prop="idNo">
          <el-input v-model="formDat.idNo" placeholder="请输入证件号码" clearable :style="{width: '100%'}" >
          </el-input>
        </el-form-item>
        <el-form-item label="开始日期" prop="startTime">
          <el-input v-model="formDat.startTime" placeholder="请输入开始日期" clearable :style="{width: '100%'}" ></el-input>
        </el-form-item>
        <el-form-item label="结束日期" prop="endTime">
          <el-input v-model="formDat.endTime" placeholder="请输入结束日期" clearable :style="{width: '100%'}" >
          </el-input>
        </el-form-item>
         </el-form>
      <h4 class="form-header"> </h4>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitDataScope">保 存</el-button>
        <el-button @click="cancelData">取 消</el-button>
      </div>
    </el-dialog>
    <!-- 新增出国(境)情况信息配置对话框 -->
    <el-dialog :title="title" :visible.sync="abroad" width="900px" append-to-body>
      <el-form ref="elForm" :model="formDat" :rules="rules" size="medium" label-width="140px">
        <el-form-item label="开始日期" prop="startTime">
          <el-input v-model="formDat.startTime" placeholder="请输入开始日期" clearable :style="{width: '100%'}" ></el-input>
        </el-form-item>
        <el-form-item label="结束日期" prop="endTime">
          <el-input v-model="formDat.endTime" placeholder="请输入结束日期" clearable :style="{width: '100%'}" >
          </el-input>
        </el-form-item>
        <el-form-item label="所到国家或者地区" prop="destination">
          <el-input v-model="formDat.destination" placeholder="请输入所到国家或者地区" clearable :style="{width: '100%'}" >
          </el-input>
        </el-form-item>
        <el-form-item label="事由(旅游、走访、探亲、继承财产、其他)" prop="cause">
          <el-input v-model="formDat.cause" placeholder="请输入事由(旅游、走访、探亲、继承财产、其他)" clearable :style="{width: '100%'}" >
          </el-input>
        </el-form-item>
      </el-form>
      <h4 class="form-header"> </h4>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitDataScope">保 存</el-button>
        <el-button @click="cancelData">取 消</el-button>
      </div>
    </el-dialog>
  </div>
@@ -409,10 +566,22 @@
//在system/note/index.js中导入接口函数  --接好了
import {getIndividualList, getIndividualRelation, delIndividual, updateIndividual, addIndividual,listExperience,updateExperience,
  addExperience,delExperience} from "@/api/self/index";
import {
  getIndividualList,
  getIndividualRelation,
  delIndividual,
  updateIndividual,
  addIndividual,
  listExperience,
  updateExperience,
  addExperience,
  delExperience,
  delCertificate,
  addCertificate,
  addAbroad,
  delAbroad
} from "@/api/self/index";
import {
  getAbroadList,
  getAutobiography,
  getAutobiographyList,
@@ -422,6 +591,7 @@
import { delFamilyevent, uploadPic } from '../../api/bignote'
import { blobValidate } from '../../utils/ruoyi'
import {getCategory} from "@/api/self/index";
import {addContact} from "@/api/contacts";
export default {
  name: "show",
@@ -482,6 +652,9 @@
      title: "",
      // 是否显示弹出层
      open: false,
      relation1:false,
      certificate:false,
      abroad:false,
      // open:true,
      // 是否显示弹出层(数据权限)
      openDataScope: false,
@@ -543,6 +716,8 @@
        ownStatus:undefined,
        //出国(境)情况
        destination:undefined,
        startTime:undefined,
        endTime:undefined,
        cause:undefined,
        url: undefined,
      },
@@ -655,8 +830,52 @@
      this.reset();
    },
    //下拉
    handleChange(val) {
      console.log(val);
    handleChange(activeNames) {
      // console.log(val);
      this.reset();
      if (activeNames.includes('1')) {
        this.showDialog1();
      }else if (activeNames.includes('2')) {
        this.showDialog2();
      }else if (activeNames.includes('3')) {
        this.showDialog3();
      }else if (activeNames.includes('4')) {
        this.showDialog4();
      }else {
        this.open = false;
        this.relation1 = false;
        this.certificate =false;
        this.abroad=false
      }
    },
    //打开不同的新增弹窗
    showDialog1() {
      this.open = true;
      this.relation1 = false;
      this.certificate =false;
      this.abroad=false;
      this.title = "添加主要个人经历信息";
    },
    showDialog2() {
      this.open = false;
      this.relation1 = true;
      this.certificate =false;
      this.abroad=false;
      this.title = "添加家庭成员及主要社会关系情况";
    },
    showDialog3() {
      this.open = false;
      this.relation1 = false;
      this.certificate =true;
      this.abroad=false;
      this.title = "添加持有出入境证件情况";
    },
    showDialog4() {
      this.open = false;
      this.relation1 = false;
      this.certificate =false;
      this.abroad=true;
      this.title = "添加出国(境)情况";
    },
    //个人自传
@@ -769,8 +988,6 @@
      this.formDat.url = ul+","+uls
      this.$refs['elForm'].validate(valid => {
        if (valid) {
          if (this.formDat.id != undefined) {
            updateIndividual(this.formDat).then(response => {
@@ -886,11 +1103,11 @@
      this.isShow_2=true
    },
    //修改按钮
    /** 修改按钮操作 */
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.open = true;
      this.title = "修改详细信息";
      // this.open = true;
      this.title = "新增详细信息";
    },
    /** 查询自传信息 */
    getAutobiographyInfor()
@@ -916,9 +1133,20 @@
      this.$refs["elForm"].validate(valid => {
        if (valid) {
          addIndividual(this.formDat).then(response => {
          addExperience(this.formDat).then(response => {
            this.$modal.msgSuccess("新增成功");
            this.open = false;
            this.getList();
          });
          addCertificate(this.formDat).then(response => {
            this.$modal.msgSuccess("新增成功");
            this.certificate = false;
            this.getList();
          });
          addAbroad(this.formDat).then(response => {
            this.$modal.msgSuccess("新增成功");
            this.abroad = false;
            this.getList();
          });
        }
@@ -950,7 +1178,7 @@
    /** 删除个人经历按钮操作 */
    handleExperienceDelete(row) {
      const Ids = row.id || this.ids;
      this.$modal.confirm('是否确认删除序号为"' + Ids + '"的数据项?').then(function() {
      this.$modal.confirm('是否确认删除数据项?').then(function() {
        return delExperience(Ids);
      }).then(() => {
        this.getList();
@@ -960,13 +1188,23 @@
    /** 删除持有出入境证件情况按钮操作 */
    handleCertificateDelete(row) {
      const Ids = row.id || this.ids;
      this.$modal.confirm('是否确认删除序号为"' + Ids + '"的数据项?').then(function() {
      this.$modal.confirm('是否确认删除数据项?').then(function() {
        return delCertificate(Ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** 删除出国(境)情况按钮操作 */
    handleAbroadDelete(row) {
      const Ids = row.id || this.ids;
      this.$modal.confirm('是否确认删除数据项?').then(function() {
        return delAbroad(Ids);
      }).then(() => {
        this.getList();
        this.$modal.msgSuccess("删除成功");
      }).catch(() => {});
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('/self/user/export', {