|  |  |  | 
|---|
|  |  |  | <template> | 
|---|
|  |  |  | <div class="app-container"> | 
|---|
|  |  |  | <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="80px"> | 
|---|
|  |  |  | <el-form | 
|---|
|  |  |  | :model="queryParams" | 
|---|
|  |  |  | ref="queryForm" | 
|---|
|  |  |  | :inline="true" | 
|---|
|  |  |  | v-show="showSearch" | 
|---|
|  |  |  | label-width="80px" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <el-form-item label="账号编号" prop="userno"> | 
|---|
|  |  |  | <el-input v-model="queryParams.userno" placeholder="请输入账号编号" clearable size="small" | 
|---|
|  |  |  | @keyup.enter.native="handleQuery" /> | 
|---|
|  |  |  | <el-input | 
|---|
|  |  |  | v-model="queryParams.userno" | 
|---|
|  |  |  | placeholder="请输入账号编号" | 
|---|
|  |  |  | clearable | 
|---|
|  |  |  | size="small" | 
|---|
|  |  |  | @keyup.enter.native="handleQuery" | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="账号名称" prop="username"> | 
|---|
|  |  |  | <el-input v-model="queryParams.username" placeholder="请输入账号名称" clearable size="small" | 
|---|
|  |  |  | @keyup.enter.native="handleQuery" /> | 
|---|
|  |  |  | <el-input | 
|---|
|  |  |  | v-model="queryParams.username" | 
|---|
|  |  |  | placeholder="请输入账号名称" | 
|---|
|  |  |  | clearable | 
|---|
|  |  |  | size="small" | 
|---|
|  |  |  | @keyup.enter.native="handleQuery" | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item label="账号类别" prop="usertype"> | 
|---|
|  |  |  | <el-select v-model="queryParams.usertype" placeholder="请选择账号类别" clearable size="small"> | 
|---|
|  |  |  | <el-option v-for="dict in dict.type.sys_UserType" :key="dict.value" :label="dict.label" :value="dict.value" /> | 
|---|
|  |  |  | <el-select | 
|---|
|  |  |  | v-model="queryParams.usertype" | 
|---|
|  |  |  | placeholder="请选择账号类别" | 
|---|
|  |  |  | clearable | 
|---|
|  |  |  | size="small" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <el-option | 
|---|
|  |  |  | v-for="dict in dict.type.sys_UserType" | 
|---|
|  |  |  | :key="dict.value" | 
|---|
|  |  |  | :label="dict.label" | 
|---|
|  |  |  | :value="dict.value" | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </el-select> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | <el-form-item> | 
|---|
|  |  |  | <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> | 
|---|
|  |  |  | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> | 
|---|
|  |  |  | <el-button | 
|---|
|  |  |  | type="primary" | 
|---|
|  |  |  | icon="el-icon-search" | 
|---|
|  |  |  | size="mini" | 
|---|
|  |  |  | @click="handleQuery" | 
|---|
|  |  |  | >搜索</el-button | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" | 
|---|
|  |  |  | >重置</el-button | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-form> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <el-row :gutter="10" class="mb8"> | 
|---|
|  |  |  | <el-col :span="1.5"> | 
|---|
|  |  |  | <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" | 
|---|
|  |  |  | v-hasPermi="['project:externalperson:add']">新增</el-button> | 
|---|
|  |  |  | <el-button | 
|---|
|  |  |  | type="primary" | 
|---|
|  |  |  | plain | 
|---|
|  |  |  | icon="el-icon-plus" | 
|---|
|  |  |  | size="mini" | 
|---|
|  |  |  | @click="handleAdd" | 
|---|
|  |  |  | v-hasPermi="['project:externalperson:add']" | 
|---|
|  |  |  | >新增</el-button | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | <el-col :span="1.5"> | 
|---|
|  |  |  | <el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" | 
|---|
|  |  |  | v-hasPermi="['project:externalperson:edit']">修改</el-button> | 
|---|
|  |  |  | <el-button | 
|---|
|  |  |  | type="success" | 
|---|
|  |  |  | plain | 
|---|
|  |  |  | icon="el-icon-edit" | 
|---|
|  |  |  | size="mini" | 
|---|
|  |  |  | :disabled="single" | 
|---|
|  |  |  | @click="handleUpdate" | 
|---|
|  |  |  | v-hasPermi="['project:externalperson:edit']" | 
|---|
|  |  |  | >修改</el-button | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | <el-col :span="1.5"> | 
|---|
|  |  |  | <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" | 
|---|
|  |  |  | v-hasPermi="['project:externalperson:remove']">删除</el-button> | 
|---|
|  |  |  | <el-button | 
|---|
|  |  |  | type="danger" | 
|---|
|  |  |  | plain | 
|---|
|  |  |  | icon="el-icon-delete" | 
|---|
|  |  |  | size="mini" | 
|---|
|  |  |  | :disabled="multiple" | 
|---|
|  |  |  | @click="handleDelete" | 
|---|
|  |  |  | v-hasPermi="['project:externalperson:remove']" | 
|---|
|  |  |  | >删除</el-button | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | <el-col :span="1.5"> | 
|---|
|  |  |  | <el-button type="warning" plain icon="el-icon-download" size="mini" :loading="exportLoading" @click="handleExport" | 
|---|
|  |  |  | v-hasPermi="['project:externalperson:export']">导出</el-button> | 
|---|
|  |  |  | <el-button | 
|---|
|  |  |  | type="warning" | 
|---|
|  |  |  | plain | 
|---|
|  |  |  | icon="el-icon-download" | 
|---|
|  |  |  | size="mini" | 
|---|
|  |  |  | :loading="exportLoading" | 
|---|
|  |  |  | @click="handleExport" | 
|---|
|  |  |  | v-hasPermi="['project:externalperson:export']" | 
|---|
|  |  |  | >导出</el-button | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> | 
|---|
|  |  |  | <right-toolbar | 
|---|
|  |  |  | :showSearch.sync="showSearch" | 
|---|
|  |  |  | @queryTable="getList" | 
|---|
|  |  |  | ></right-toolbar> | 
|---|
|  |  |  | </el-row> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <el-table v-loading="loading" :data="externalpersonList" @selection-change="handleSelectionChange"> | 
|---|
|  |  |  | <el-table | 
|---|
|  |  |  | v-loading="loading" | 
|---|
|  |  |  | :data="externalpersonList" | 
|---|
|  |  |  | @selection-change="handleSelectionChange" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <el-table-column type="selection" width="55" align="center" /> | 
|---|
|  |  |  | <el-table-column label="账号类别" align="center" prop="usertype"> | 
|---|
|  |  |  | <template slot-scope="scope"> | 
|---|
|  |  |  | <dict-tag :options="dict.type.sys_UserType" :value="scope.row.usertype" /> | 
|---|
|  |  |  | <dict-tag | 
|---|
|  |  |  | :options="dict.type.sys_UserType" | 
|---|
|  |  |  | :value="scope.row.usertype" | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column label="账号编号" align="center" prop="userno" /> | 
|---|
|  |  |  | <el-table-column label="账号名称" align="center" prop="username" /> | 
|---|
|  |  |  | <el-table-column label="身份证号" width="200" align="center" prop="idcardno" /> | 
|---|
|  |  |  | <el-table-column | 
|---|
|  |  |  | label="身份证号" | 
|---|
|  |  |  | width="200" | 
|---|
|  |  |  | align="center" | 
|---|
|  |  |  | prop="idcardno" | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | <el-table-column label="职称" align="center" prop="title"> | 
|---|
|  |  |  | <template slot-scope="scope"> | 
|---|
|  |  |  | <dict-tag :options="dict.type.sys_professionaltitle" :value="scope.row.title" /> </template></el-table-column> | 
|---|
|  |  |  | <el-table-column label="单位名称" width="250" align="center" prop="unitname" /> | 
|---|
|  |  |  | <dict-tag | 
|---|
|  |  |  | :options="dict.type.sys_professionaltitle" | 
|---|
|  |  |  | :value="scope.row.title" | 
|---|
|  |  |  | /> </template | 
|---|
|  |  |  | ></el-table-column> | 
|---|
|  |  |  | <el-table-column | 
|---|
|  |  |  | label="单位名称" | 
|---|
|  |  |  | width="250" | 
|---|
|  |  |  | align="center" | 
|---|
|  |  |  | prop="unitname" | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | <!-- | 
|---|
|  |  |  | <el-table-column label="性别" align="center" prop="sex"> | 
|---|
|  |  |  | <template slot-scope="scope"> | 
|---|
|  |  |  | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column label="联系电话" width="200" align="center" prop="telephone" /> | 
|---|
|  |  |  | <el-table-column label="联系地址" width="250" align="center" prop="address" />-->x | 
|---|
|  |  |  | <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | 
|---|
|  |  |  | <el-table-column | 
|---|
|  |  |  | label="操作" | 
|---|
|  |  |  | align="center" | 
|---|
|  |  |  | class-name="small-padding fixed-width" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <template slot-scope="scope"> | 
|---|
|  |  |  | <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" | 
|---|
|  |  |  | v-hasPermi="['project:externalperson:edit']">修改</el-button> | 
|---|
|  |  |  | <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" | 
|---|
|  |  |  | >删除</el-button> | 
|---|
|  |  |  | <el-button | 
|---|
|  |  |  | size="mini" | 
|---|
|  |  |  | type="text" | 
|---|
|  |  |  | icon="el-icon-edit" | 
|---|
|  |  |  | @click="handleUpdate(scope.row)" | 
|---|
|  |  |  | v-hasPermi="['project:externalperson:edit']" | 
|---|
|  |  |  | >修改</el-button | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <el-button | 
|---|
|  |  |  | size="mini" | 
|---|
|  |  |  | type="text" | 
|---|
|  |  |  | icon="el-icon-delete" | 
|---|
|  |  |  | @click="handleDelete(scope.row)" | 
|---|
|  |  |  | >删除</el-button | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | </el-table> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" | 
|---|
|  |  |  | @pagination="getList" /> | 
|---|
|  |  |  | <pagination | 
|---|
|  |  |  | v-show="total > 0" | 
|---|
|  |  |  | :total="total" | 
|---|
|  |  |  | :page.sync="queryParams.pageNum" | 
|---|
|  |  |  | :limit.sync="queryParams.pageSize" | 
|---|
|  |  |  | @pagination="getList" | 
|---|
|  |  |  | /> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!-- 添加或修改人员/单位账号信息对话框 --> | 
|---|
|  |  |  | <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body :close-on-click-modal="false"> | 
|---|
|  |  |  | <el-dialog | 
|---|
|  |  |  | :title="title" | 
|---|
|  |  |  | :visible.sync="open" | 
|---|
|  |  |  | width="800px" | 
|---|
|  |  |  | append-to-body | 
|---|
|  |  |  | :close-on-click-modal="false" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <el-form ref="form" :model="form" :rules="rules" label-width="120px"> | 
|---|
|  |  |  | <el-row> | 
|---|
|  |  |  | <el-col :span="12"><el-form-item label="账号类别" prop="usertype"> | 
|---|
|  |  |  | <el-col :span="12" | 
|---|
|  |  |  | ><el-form-item label="账号类别" prop="usertype"> | 
|---|
|  |  |  | <el-select v-model="form.usertype" placeholder="请选择账号类别"> | 
|---|
|  |  |  | <el-option v-for="dict in dict.type.sys_UserType" :key="dict.value" :label="dict.label" | 
|---|
|  |  |  | :value="dict.value"></el-option> | 
|---|
|  |  |  | </el-select> </el-form-item> | 
|---|
|  |  |  | <el-option | 
|---|
|  |  |  | v-for="dict in dict.type.sys_UserType" | 
|---|
|  |  |  | :key="dict.value" | 
|---|
|  |  |  | :label="dict.label" | 
|---|
|  |  |  | :value="dict.value" | 
|---|
|  |  |  | ></el-option> | 
|---|
|  |  |  | </el-select> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | <el-col :span="12"> | 
|---|
|  |  |  | <el-form-item label="账号编号" prop="userno"> | 
|---|
|  |  |  | <el-input disabled=true v-model="form.userno" placeholder="请输入账号编号" /> </el-form-item> | 
|---|
|  |  |  | <el-input | 
|---|
|  |  |  | disabled="true" | 
|---|
|  |  |  | v-model="form.userno" | 
|---|
|  |  |  | placeholder="请输入账号编号" | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | </el-row> | 
|---|
|  |  |  | <el-row> | 
|---|
|  |  |  | <el-col :span="12"> | 
|---|
|  |  |  | <el-form-item label="账号名称" prop="username"> | 
|---|
|  |  |  | <el-input v-model="form.username" placeholder="请输入账号名称" /> </el-form-item> | 
|---|
|  |  |  | <el-input v-model="form.username" placeholder="请输入账号名称" /> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | <el-col :span="12"> | 
|---|
|  |  |  | <el-form-item label="启用状态" prop="userstatus" :disabled="ismanager == false"> | 
|---|
|  |  |  | <el-form-item | 
|---|
|  |  |  | label="启用状态" | 
|---|
|  |  |  | prop="userstatus" | 
|---|
|  |  |  | :disabled="ismanager == false" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <el-radio-group v-model="form.userstatus"> | 
|---|
|  |  |  | <el-radio v-for="dict in dict.type.sys_0_1" :key="dict.value" :label="parseInt(dict.value)">{{ dict.label | 
|---|
|  |  |  | }}</el-radio> | 
|---|
|  |  |  | <el-radio | 
|---|
|  |  |  | v-for="dict in dict.type.sys_0_1" | 
|---|
|  |  |  | :key="dict.value" | 
|---|
|  |  |  | :label="parseInt(dict.value)" | 
|---|
|  |  |  | >{{ dict.label }}</el-radio | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </el-radio-group> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | 
|---|
|  |  |  | <el-row v-if="form.usertype != 'org'"> | 
|---|
|  |  |  | <el-col :span="24"> | 
|---|
|  |  |  | <el-form-item label="身份证号" prop="idcardno"> | 
|---|
|  |  |  | <el-input v-model="form.idcardno" placeholder="请输入身份证号" /> </el-form-item> | 
|---|
|  |  |  | <el-input v-model="form.idcardno" placeholder="请输入身份证号" /> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | </el-row> | 
|---|
|  |  |  | <el-row v-if="form.usertype != 'org'"><el-col :span="12"> | 
|---|
|  |  |  | <el-row v-if="form.usertype != 'org'" | 
|---|
|  |  |  | ><el-col :span="12"> | 
|---|
|  |  |  | <el-form-item label="性别" prop="sex"> | 
|---|
|  |  |  | <el-select v-model="form.sex" placeholder="请选择性别"> | 
|---|
|  |  |  | <el-option v-for="dict in dict.type.sys_user_sex" :key="dict.value" :label="dict.label" | 
|---|
|  |  |  | :value="dict.value"></el-option> </el-select></el-form-item> | 
|---|
|  |  |  | <el-option | 
|---|
|  |  |  | v-for="dict in dict.type.sys_user_sex" | 
|---|
|  |  |  | :key="dict.value" | 
|---|
|  |  |  | :label="dict.label" | 
|---|
|  |  |  | :value="dict.value" | 
|---|
|  |  |  | ></el-option> </el-select | 
|---|
|  |  |  | ></el-form-item> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | <el-col :span="12"> | 
|---|
|  |  |  | <el-form-item label="职称" prop="title"> | 
|---|
|  |  |  | <el-select v-model="form.title" placeholder="请选择人员职称"> | 
|---|
|  |  |  | <el-option v-for="dict in dict.type.sys_professionaltitle" :key="dict.value" :label="dict.label" | 
|---|
|  |  |  | :value="dict.value"></el-option> </el-select> | 
|---|
|  |  |  | <el-option | 
|---|
|  |  |  | v-for="dict in dict.type.sys_professionaltitle" | 
|---|
|  |  |  | :key="dict.value" | 
|---|
|  |  |  | :label="dict.label" | 
|---|
|  |  |  | :value="dict.value" | 
|---|
|  |  |  | ></el-option> | 
|---|
|  |  |  | </el-select> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | </el-row> | 
|---|
|  |  |  | <el-row v-if="form.usertype != 'org'"> | 
|---|
|  |  |  | <el-col :span="12"> | 
|---|
|  |  |  | <el-form-item label="所在单位" prop="unitname"> | 
|---|
|  |  |  | <el-select v-model="form.unitname" placeholder="所在单位" clearable filterable allow-create style="width: 100%"> | 
|---|
|  |  |  | <el-option v-for="(spec, index) in unitList" :key="index" :label="spec.organizationname" | 
|---|
|  |  |  | :value="spec.organizationid"></el-option> | 
|---|
|  |  |  | <el-select | 
|---|
|  |  |  | v-model="form.unitno" | 
|---|
|  |  |  | placeholder="所在单位" | 
|---|
|  |  |  | clearable | 
|---|
|  |  |  | filterable | 
|---|
|  |  |  | allow-create | 
|---|
|  |  |  | style="width: 100%" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <el-option | 
|---|
|  |  |  | v-for="(spec, index) in unitList" | 
|---|
|  |  |  | :key="index" | 
|---|
|  |  |  | :label="spec.organizationname" | 
|---|
|  |  |  | :value="spec.organizationid" | 
|---|
|  |  |  | ></el-option> | 
|---|
|  |  |  | </el-select> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | <el-col :span="12"> | 
|---|
|  |  |  | <el-form-item label="单位工号" prop="personnelunitno"> | 
|---|
|  |  |  | <el-input v-model="form.personnelunitno" placeholder="请输入所在单位的工号" /> | 
|---|
|  |  |  | <el-input | 
|---|
|  |  |  | v-model="form.personnelunitno" | 
|---|
|  |  |  | placeholder="请输入所在单位的工号" | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | </el-row> | 
|---|
|  |  |  | <el-row> | 
|---|
|  |  |  | <el-col :span="24"><el-form-item label="开户银行" prop="depositbank"> | 
|---|
|  |  |  | <el-input v-model="form.depositbank" placeholder="请输入开户银行名称" /> </el-form-item> | 
|---|
|  |  |  | <el-col :span="24" | 
|---|
|  |  |  | ><el-form-item label="开户银行" prop="depositbank"> | 
|---|
|  |  |  | <el-input | 
|---|
|  |  |  | v-model="form.depositbank" | 
|---|
|  |  |  | placeholder="请输入开户银行名称" | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | <el-col :span="24"><el-form-item label="银行卡号" prop="bankcardno"> | 
|---|
|  |  |  | <el-input v-model="form.bankcardno" placeholder="请输入银行卡号" /> | 
|---|
|  |  |  | <el-col :span="24" | 
|---|
|  |  |  | ><el-form-item label="银行卡号" prop="bankcardno"> | 
|---|
|  |  |  | <el-input | 
|---|
|  |  |  | v-model="form.bankcardno" | 
|---|
|  |  |  | placeholder="请输入银行卡号" | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | </el-row> | 
|---|
|  |  |  | <el-row> | 
|---|
|  |  |  | <el-col :span="24"> | 
|---|
|  |  |  | <el-form-item label="联系地址" prop="address"> | 
|---|
|  |  |  | <el-input v-model="form.address" placeholder="请输入联系地址" /> </el-form-item> | 
|---|
|  |  |  | <el-input v-model="form.address" placeholder="请输入联系地址" /> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | </el-row> | 
|---|
|  |  |  | <el-row> | 
|---|
|  |  |  | <el-col :span="24"> | 
|---|
|  |  |  | <el-form-item label="联系电话" prop="telephone"> | 
|---|
|  |  |  | <el-input v-model="form.telephone" placeholder="请输入联系电话" /> </el-form-item> | 
|---|
|  |  |  | <el-input v-model="form.telephone" placeholder="请输入联系电话" /> | 
|---|
|  |  |  | </el-form-item> | 
|---|
|  |  |  | </el-col> | 
|---|
|  |  |  | </el-row> | 
|---|
|  |  |  | <!-- | 
|---|
|  |  |  | 
|---|
|  |  |  | addExternalperson, | 
|---|
|  |  |  | updateExternalperson, | 
|---|
|  |  |  | exportExternalperson, | 
|---|
|  |  |  | getOnlyCode, | 
|---|
|  |  |  | getOnlyCode | 
|---|
|  |  |  | } from "@/api/project/externalperson"; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import { | 
|---|
|  |  |  | 
|---|
|  |  |  | pageSize: 10, | 
|---|
|  |  |  | userno: null, | 
|---|
|  |  |  | username: null, | 
|---|
|  |  |  | usertype: null, | 
|---|
|  |  |  | usertype: null | 
|---|
|  |  |  | }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 查询最新序号参数 | 
|---|
|  |  |  | seqnoParams: { | 
|---|
|  |  |  | businessType: "externalperson", | 
|---|
|  |  |  | datequery: false, | 
|---|
|  |  |  | datequery: false | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | // 表单参数 | 
|---|
|  |  |  | form: {}, | 
|---|
|  |  |  | 
|---|
|  |  |  | ] | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | //是否是专家费的OPO审批人员 | 
|---|
|  |  |  | ismanager: false, | 
|---|
|  |  |  | ismanager: false | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | created() { | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** 查询单位、人员账号列表 */ | 
|---|
|  |  |  | getList() { | 
|---|
|  |  |  | if (this.queryParams.username === null || this.queryParams.username.replace(/\s/g, '') == "") { | 
|---|
|  |  |  | this.$modal.msgWarning("查找账户时,账户名称不能为空,请输入账户名称!"); | 
|---|
|  |  |  | if ( | 
|---|
|  |  |  | this.queryParams.username === null || | 
|---|
|  |  |  | this.queryParams.username.replace(/\s/g, "") == "" | 
|---|
|  |  |  | ) { | 
|---|
|  |  |  | this.$modal.msgWarning( | 
|---|
|  |  |  | "查找账户时,账户名称不能为空,请输入账户名称!" | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // this.loading = true; | 
|---|
|  |  |  | listExternalperson(this.queryParams).then((response) => { | 
|---|
|  |  |  | listExternalperson(this.queryParams).then(response => { | 
|---|
|  |  |  | this.externalpersonList = response.rows; | 
|---|
|  |  |  | this.total = response.total; | 
|---|
|  |  |  | // this.loading = false; | 
|---|
|  |  |  | 
|---|
|  |  |  | updateBy: null, | 
|---|
|  |  |  | updateTime: null, | 
|---|
|  |  |  | pym: null, | 
|---|
|  |  |  | wbm: null, | 
|---|
|  |  |  | wbm: null | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | this.resetForm("form"); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | /** 搜索按钮操作 */ | 
|---|
|  |  |  | handleQuery() { | 
|---|
|  |  |  | console.log("handleQuery", this.queryParams); | 
|---|
|  |  |  | if (this.queryParams.username === null || this.queryParams.username.replace(/\s/g, '') == "") { | 
|---|
|  |  |  | this.$modal.msgWarning("为限制批量查找账户信息,限制账户名称为必输项,请输入账户名称后再搜索!"); | 
|---|
|  |  |  | if ( | 
|---|
|  |  |  | this.queryParams.username === null || | 
|---|
|  |  |  | this.queryParams.username.replace(/\s/g, "") == "" | 
|---|
|  |  |  | ) { | 
|---|
|  |  |  | this.$modal.msgWarning( | 
|---|
|  |  |  | "为限制批量查找账户信息,限制账户名称为必输项,请输入账户名称后再搜索!" | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | // 多选框选中数据 | 
|---|
|  |  |  | handleSelectionChange(selection) { | 
|---|
|  |  |  | this.ids = selection.map((item) => item.id); | 
|---|
|  |  |  | this.ids = selection.map(item => item.id); | 
|---|
|  |  |  | this.single = selection.length !== 1; | 
|---|
|  |  |  | this.multiple = !selection.length; | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | 
|---|
|  |  |  | handleUpdate(row) { | 
|---|
|  |  |  | this.reset(); | 
|---|
|  |  |  | const id = row.id || this.ids; | 
|---|
|  |  |  | getExternalperson(id).then((response) => { | 
|---|
|  |  |  | getExternalperson(id).then(response => { | 
|---|
|  |  |  | this.form = response.data; | 
|---|
|  |  |  | this.open = true; | 
|---|
|  |  |  | this.title = "人员/单位账号信息修改"; | 
|---|
|  |  |  | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | /** 提交按钮 */ | 
|---|
|  |  |  | submitForm() { | 
|---|
|  |  |  | this.$refs["form"].validate((valid) => { | 
|---|
|  |  |  | this.$refs["form"].validate(valid => { | 
|---|
|  |  |  | if (valid) { | 
|---|
|  |  |  | console.log("unitList", this.unitList); | 
|---|
|  |  |  | this.unitList.map(res => { | 
|---|
|  |  |  | if (res.organizationid == this.form.unitno) | 
|---|
|  |  |  | this.form.unitname = res.organizationname; | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | console.log(this.form); | 
|---|
|  |  |  | if (this.form.id != null) { | 
|---|
|  |  |  | updateExternalperson(this.form).then((response) => { | 
|---|
|  |  |  | updateExternalperson(this.form).then(response => { | 
|---|
|  |  |  | this.$modal.msgSuccess("修改成功"); | 
|---|
|  |  |  | this.open = false; | 
|---|
|  |  |  | this.queryParams.username = this.form.username; | 
|---|
|  |  |  | this.getList(); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | getOnlyCode(this.seqnoParams).then((res) => { | 
|---|
|  |  |  | getOnlyCode(this.seqnoParams).then(res => { | 
|---|
|  |  |  | this.form.userno = res.data.currentvalue; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | addExternalperson(this.form).then((response) => { | 
|---|
|  |  |  | addExternalperson(this.form).then(response => { | 
|---|
|  |  |  | this.$modal.msgSuccess("新增成功"); | 
|---|
|  |  |  | this.open = false; | 
|---|
|  |  |  | this.queryParams.username = this.form.username; | 
|---|
|  |  |  | 
|---|
|  |  |  | const ids = row.id || this.ids; | 
|---|
|  |  |  | this.$modal | 
|---|
|  |  |  | .confirm('是否确认删除人员/单位账号信息编号为"' + ids + '"的数据项?') | 
|---|
|  |  |  | .then(function () { | 
|---|
|  |  |  | .then(function() { | 
|---|
|  |  |  | return delExternalperson(ids); | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | .then(() => { | 
|---|
|  |  |  | this.getList(); | 
|---|
|  |  |  | this.$modal.msgSuccess("删除成功"); | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | .catch(() => { }); | 
|---|
|  |  |  | .catch(() => {}); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | /** 导出按钮操作 */ | 
|---|
|  |  |  | handleExport() { | 
|---|
|  |  |  | 
|---|
|  |  |  | this.exportLoading = true; | 
|---|
|  |  |  | return exportExternalperson(queryParams); | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | .then((response) => { | 
|---|
|  |  |  | .then(response => { | 
|---|
|  |  |  | this.$download.name(response.msg); | 
|---|
|  |  |  | this.exportLoading = false; | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | .catch(() => { }); | 
|---|
|  |  |  | .catch(() => {}); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //获取医疗机构列表 | 
|---|
|  |  |  | 
|---|
|  |  |  | for (let i = 0; i < response.rows.length; i++) { | 
|---|
|  |  |  | this.unitList.push({ | 
|---|
|  |  |  | //organizationid: response.rows[i].organizationid, | 
|---|
|  |  |  | organizationid: response.rows[i].id, | 
|---|
|  |  |  | organizationid: response.rows[i].id.toString(), | 
|---|
|  |  |  | organizationname: response.rows[i].organizationname | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | console.log(this.unitList); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | </script> | 
|---|