extend.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762
  1. <template>
  2. <div class="app-container">
  3. <h3 class="title">编辑管理人员信息</h3>
  4. <div class="info-box">
  5. <el-descriptions >
  6. <el-descriptions-item v-for="v in dataInfo" :label="v.label" :key="v.key">{{ v.value }}</el-descriptions-item>
  7. <el-descriptions-item label="角色">{{ roleName }}</el-descriptions-item>
  8. <el-descriptions-item label="性别">{{ sex }}</el-descriptions-item>
  9. <el-descriptions-item label="状态">{{ status }}</el-descriptions-item>
  10. <!-- <el-descriptions-item label="机构类型">一级机构</el-descriptions-item> -->
  11. </el-descriptions>
  12. </div>
  13. <div class="info-box">
  14. <el-form inline :model="formData" :rules="rules" ref="form" label-position="left" label-width="140px">
  15. <el-row>
  16. <el-col :xs="24" :sm="12" :md="8" :lg="6" >
  17. <el-form-item label="是否专职" prop="isFullTime">
  18. <el-switch
  19. v-model="formData.isFullTime"
  20. active-text
  21. inactive-text
  22. active-value="1"
  23. inactive-value="0"
  24. ></el-switch>
  25. </el-form-item>
  26. </el-col>
  27. <el-col :xs="24" :sm="12" :md="8" :lg="6" >
  28. <el-form-item label="是否持证上岗" prop="certificateWork">
  29. <el-switch
  30. v-model="formData.certificateWork"
  31. active-text
  32. inactive-text
  33. active-value="1"
  34. inactive-value="0"
  35. ></el-switch>
  36. </el-form-item>
  37. </el-col>
  38. </el-row>
  39. <el-row >
  40. <el-col :xs="24" :sm="12" :md="8" :lg="6" >
  41. <el-form-item label="所属部门" prop="deptId">
  42. <tree-select style="width:217px;" v-model="formData.deptId" :options="deptList" :show-count="true" :normalizer="tenantIdnormalizer" placeholder="所属部门"> </tree-select>
  43. </el-form-item>
  44. </el-col>
  45. <el-col :xs="24" :sm="12" :md="8" :lg="6" >
  46. <el-form-item label="责任职务" prop="duties">
  47. <el-select v-model="formData.duties" placeholder="请选择">
  48. <el-option
  49. v-for="dict in dict.type.sys_duties"
  50. :key="dict.value"
  51. :label="dict.label"
  52. :value="dict.value"
  53. />
  54. </el-select>
  55. </el-form-item>
  56. </el-col>
  57. <el-col :xs="24" :sm="12" :md="8" :lg="6" >
  58. <el-form-item label="用工形式" prop="workType">
  59. <el-select v-model="formData.workType" placeholder="请选择">
  60. <el-option
  61. v-for="dict in dict.type.sys_work_type"
  62. :key="dict.value"
  63. :label="dict.label"
  64. :value="dict.value"
  65. />
  66. </el-select>
  67. </el-form-item>
  68. </el-col>
  69. <el-col :xs="24" :sm="12" :md="8" :lg="6" >
  70. <el-form-item label="最高学历" prop="highestEducation">
  71. <el-select v-model="formData.highestEducation" placeholder="请选择">
  72. <el-option
  73. v-for="dict in dict.type.sys_highest_education"
  74. :key="dict.value"
  75. :label="dict.label"
  76. :value="dict.value"
  77. />
  78. </el-select>
  79. </el-form-item>
  80. </el-col>
  81. <el-col :xs="24" :sm="12" :md="8" :lg="6" >
  82. <el-form-item label="学历取得方式" prop="educationType">
  83. <el-select v-model="formData.educationType" placeholder="请选择">
  84. <el-option
  85. v-for="dict in dict.type.sys_education_type"
  86. :key="dict.value"
  87. :label="dict.label"
  88. :value="dict.value"
  89. />
  90. </el-select>
  91. </el-form-item>
  92. </el-col>
  93. </el-row>
  94. <el-row>
  95. <el-col :xs="24" :sm="12" :md="8" :lg="6" >
  96. <el-form-item label="初级以上相关专业技术职业资格" prop="professionalQualifications">
  97. <el-input v-model="formData.professionalQualifications" placeholder="请输入">
  98. </el-input>
  99. </el-form-item>
  100. </el-col>
  101. <el-col :xs="24" :sm="12" :md="8" :lg="6" >
  102. <el-form-item label="持证上岗未通过原因" prop="certificateFailReason">
  103. <el-input v-model="formData.certificateFailReason" placeholder="请输入">
  104. </el-input>
  105. </el-form-item>
  106. </el-col>
  107. <el-col :xs="24" :sm="12" :md="8" :lg="6" >
  108. <el-form-item label="参加工作时间" prop="workTime">
  109. <el-date-picker
  110. clearable
  111. v-model="formData.workTime"
  112. type="date"
  113. value-format="yyyy-MM-dd HH:mm:ss"
  114. placeholder="请选择时间">
  115. </el-date-picker>
  116. </el-form-item>
  117. </el-col>
  118. <el-col :xs="24" :sm="12" :md="8" :lg="6" >
  119. <el-form-item label="现任职时间" prop="workTime">
  120. <el-date-picker
  121. clearable
  122. v-model="formData.entryTime"
  123. type="date"
  124. value-format="yyyy-MM-dd HH:mm:ss"
  125. placeholder="请选择时间">
  126. </el-date-picker>
  127. </el-form-item>
  128. </el-col>
  129. <el-col :xs="24" :sm="12" :md="8" :lg="6" >
  130. <el-form-item label="出生日期" prop="bornTime">
  131. <el-date-picker
  132. clearable
  133. v-model="formData.bornTime"
  134. type="date"
  135. value-format="yyyy-MM-dd HH:mm:ss"
  136. placeholder="请选择时间">
  137. </el-date-picker>
  138. </el-form-item>
  139. </el-col>
  140. <el-col :xs="24" :sm="12" :md="8" :lg="6" >
  141. <el-form-item label="分管领导姓名" prop="responsibilitiesLeaderName">
  142. <el-input v-model="formData.responsibilitiesLeaderName" placeholder="请输入">
  143. </el-input>
  144. </el-form-item>
  145. </el-col>
  146. <el-col :xs="24" :sm="12" :md="8" :lg="6" >
  147. <el-form-item label="分管领导职务" prop="responsibilitiesLeaderDuties">
  148. <el-select v-model="formData.responsibilitiesLeaderDuties" placeholder="请选择">
  149. <el-option
  150. v-for="dict in dict.type.sys_duties"
  151. :key="dict.value"
  152. :label="dict.label"
  153. :value="dict.value"
  154. />
  155. </el-select>
  156. </el-form-item>
  157. </el-col>
  158. </el-row>
  159. <el-row>
  160. <el-col :xs="24" :sm="12" :md="8" :lg="6" >
  161. <el-form-item label="上传相关证书">
  162. <image-upload :limit="5" :fileSize="2"></image-upload>
  163. </el-form-item>
  164. </el-col>
  165. <el-col :xs="24" :sm="12" :md="8" :lg="6" >
  166. <el-form-item label="示例图">
  167. <div style="width: 280px;">
  168. <el-image :src="uplp"></el-image>
  169. </div>
  170. </el-form-item>
  171. </el-col>
  172. </el-row>
  173. </el-form>
  174. </div>
  175. <div style="margin-top: 50px; margin-left: 42%">
  176. <el-button type="primary" @click="saveExtend" size="small">提交</el-button>
  177. <el-button type="primary" @click="nosaveExtend" size="small">取消</el-button>
  178. </div>
  179. </div>
  180. </template>
  181. <script>
  182. import uploadpng from "@/assets/images/upload.png";
  183. import uplpng from "@/assets/images/upl.png";
  184. import {getUser} from "@/api/system/user";
  185. import TreeSelect from '@riophae/vue-treeselect'
  186. import "@riophae/vue-treeselect/dist/vue-treeselect.css";
  187. import { deptTreeList } from "@/api/system/public";
  188. import {extendUserInformation} from "@/api/system/information";
  189. export default {
  190. props: [],
  191. components: {TreeSelect},
  192. dicts:['sys_highest_education',"sys_work_type","sys_duties","sys_education_type"],
  193. data() {
  194. return {
  195. //基础信息key
  196. infoKeys:[
  197. {label:'用户姓名',key:'username'},
  198. {label:'姓名',key:'name'},
  199. {label:'工号',key:'jobNumber'},
  200. {label:'部门',key:'orgName'},
  201. {label:'手机',key:'phone'},
  202. // {label:'性别',key:'gender'},
  203. // {label:'状态',key:'isLock'},
  204. {label:'机构',key:'orgName'},
  205. ],
  206. dataInfo:[],
  207. //机构补充信息
  208. // extendId: null,
  209. // orgType: 1,
  210. // weatherAreaCode: null,
  211. // premisesArea: null,
  212. // ownership: null,
  213. // outsideArea: null,
  214. // askari: 1,
  215. // businessLibraryType: 1,
  216. // dutyMode: 0,
  217. // remoteControl: null,
  218. // selfServiceBank: null,
  219. // lobbyEquipment: 1,
  220. // wallPenetratingEquipment: 2,
  221. // platformBrand: null,
  222. // platformSupplierBrand: null,
  223. // constructionTime: null,
  224. // lastUpdateTime: null,
  225. formData:{
  226. deptId: null,
  227. duties: null,
  228. workType: null,
  229. isFullTime: '0',
  230. highestEducation: null,
  231. educationType: null,
  232. certificateWork: '0',
  233. professionalQualifications: null,
  234. certificateFailReason: null,
  235. workTime: null,
  236. entryTime: null,
  237. bornTime: null,
  238. responsibilitiesLeaderName: null,
  239. responsibilitiesLeaderDuties: null,
  240. qualificationCertificateUrl: null,
  241. userId: null,
  242. },
  243. rules: {
  244. deptId: [
  245. { required: true,message: '请选择组织机构', trigger: 'blur' },
  246. ],
  247. duties:[
  248. { required: true,message: '请选择组织机构', trigger: 'blur' },
  249. ],
  250. workType:[
  251. { required: true, message: '请选择组织机构',trigger: 'blur' },
  252. ],
  253. isFullTime:[
  254. { required: true,message: '请选择组织机构', trigger: 'change' },
  255. ],
  256. highestEducation:[
  257. { required: true,message: '请选择组织机构', trigger: 'blur' },
  258. ],
  259. educationType:[
  260. { required: true,message: '请选择组织机构', trigger: 'blur' },
  261. ],
  262. certificateWork:[
  263. { required: true,message: '请选择组织机构', trigger: 'blur' },
  264. ],
  265. workTime:[
  266. { required: true,message: '请选择组织机构',trigger: 'blur' },
  267. ],
  268. entryTime: [
  269. { required: true,message: '请选择组织机构', trigger: 'change' }
  270. ],
  271. bornTime: [
  272. { required: true,message: '请选择组织机构', trigger: 'change' }
  273. ],
  274. responsibilitiesLeaderName: [
  275. { required: true,message: '请选择组织机构', trigger: 'change' }
  276. ],
  277. responsibilitiesLeaderDuties: [
  278. { required: true,message: '请选择组织机构', trigger: 'change' }
  279. ],
  280. qualificationCertificateUrl: [
  281. { required: true,message: '请选择组织机构', trigger: 'change' }
  282. ],
  283. professionalQualifications:[
  284. { required: true,message: '请选择组织机构', trigger: 'change' }
  285. ],
  286. date1: [
  287. { type: 'date', required: true, message: '请选择日期', trigger: 'change' }
  288. ],
  289. date2: [
  290. { type: 'date', required: true, message: '请选择时间', trigger: 'change' }
  291. ],
  292. type: [
  293. { type: 'array', required: true, message: '请至少选择一个活动性质', trigger: 'change' }
  294. ],
  295. resource: [
  296. { required: true, message: '请选择活动资源', trigger: 'change' }
  297. ],
  298. desc: [
  299. { required: true, message: '请填写活动形式', trigger: 'blur' }
  300. ]
  301. },
  302. // 机构树选项
  303. deptList: undefined,
  304. // 遮罩层
  305. orgloading: true,
  306. // 选中数组
  307. orgids: [],
  308. // 选中数组
  309. Bankids: [],
  310. // 非单个禁用
  311. single: true,
  312. // 非多个禁用
  313. multiple: true,
  314. // 显示搜索条件
  315. showSearch: true,
  316. // 总条数
  317. total: 0,
  318. // 机构物防建设表格数据
  319. constructionList: [],
  320. // 银行物防建设表格数据
  321. BankPhysicalDefenseConstructionList: [],
  322. // 弹出层标题
  323. orgtitle: "",
  324. // 弹出层标题
  325. Banktitle: "",
  326. // 是否显示弹出层
  327. Bankopen: false,
  328. // 表单参数
  329. Bankform: {},
  330. // 是否显示弹出层
  331. orgopen: false,
  332. roleName: null,
  333. sex: null,
  334. status: null,
  335. // 表单参数
  336. orgform: {},
  337. //2个图片信息
  338. uploadp: uploadpng,
  339. uplp: uplpng,
  340. //下拉框生成信息
  341. orgTypes: {
  342. orgTyp1: { label: "营业网点", value: 0 },
  343. orgTyp2: { label: "监控中心", value: 1 },
  344. },
  345. businessLibraryTypes: {
  346. businessLibraryTyp1: { label: "1类业务库", value: 1 },
  347. businessLibraryTyp2: { label: "2类业务库", value: 2 },
  348. businessLibraryTyp3: { label: "3类业务库", value: 3 },
  349. },
  350. platformBrands: {
  351. platformBrand1: { label: "品牌1", value: 0 },
  352. platformBrand2: { label: "品牌2", value: 1 },
  353. },
  354. platformSupplierBrands: {
  355. platformSupplierBrand1: { label: "品牌1", value: 0 },
  356. platformSupplierBrand2: { label: "品牌2", value: 1 },
  357. },
  358. prop: "",
  359. propItem: "",
  360. row: "",
  361. };
  362. },
  363. computed: {
  364. switchModel: {
  365. get() {
  366. return this.switchValue === 1; // 将0转换为false,1转换为true
  367. },
  368. set(value) {
  369. this.switchValue = value ? 1 : 0; // 将false转换为0,true转换为1
  370. },
  371. },
  372. },
  373. created() {
  374. this.getInfo();
  375. this.getDeptTreeList();
  376. },
  377. mounted() {},
  378. methods: {
  379. request() {},
  380. handleChange(value) {},
  381. //自定义数据
  382. tenantIdnormalizer(node, instanceId) {
  383. if (node.children && !node.children.length) {
  384. delete node.children
  385. }
  386. return {
  387. id: node.deptId,
  388. label: node.deptName,
  389. children: node.children
  390. }
  391. },
  392. getInfo() {
  393. getUser(this.$route.params.userId).then((data) => {
  394. console.log(data,'userdata');
  395. if (!data.data ) return;
  396. let res = data.data;
  397. this.dataInfo = this.infoKeys.map((v,i)=> {
  398. v.value = res[v.key];
  399. return v
  400. })
  401. this.roleName=data.roleName;
  402. this.sex=data.sex;
  403. this.status=data.status;
  404. this.formData=data.information;
  405. console.log(this.formData, 'formData')
  406. });
  407. },
  408. saveExtend(){
  409. this.formData.userId = this.$route.params.userId;
  410. this.$refs['form'].validate((valid) => {
  411. if (valid) {
  412. extendUserInformation(this.formData).then(res=>{
  413. this.$message.success('保存成功!')
  414. this.$router.go(-1)
  415. })
  416. }
  417. });
  418. },
  419. getExtendInfo() {
  420. getExtendByOrgId(this.$route.params.id).then((data) => {
  421. console.log(data.data);
  422. if (data.data != null) {
  423. this.orgType = data.data.orgType;
  424. this.weatherAreaCode = data.data.weatherAreaCode;
  425. this.premisesArea = data.data.premisesArea;
  426. this.ownership = data.data.ownership;
  427. this.outsideArea = data.data.outsideArea;
  428. this.askari = data.data.askari;
  429. this.remoteControl = data.data.remoteControl;
  430. this.selfServiceBank = data.data.selfServiceBank;
  431. this.lobbyEquipment = data.data.lobbyEquipment;
  432. this.wallPenetratingEquipment = data.data.wallPenetratingEquipment;
  433. this.extendId = data.data.id;
  434. }
  435. });
  436. },
  437. /** 查询机构下拉树结构 */
  438. getDeptTreeList() {
  439. deptTreeList().then(response => {
  440. this.deptList = response.data;
  441. console.log(response.data,11111111)
  442. this.defaultKeys = response.data[0];
  443. });
  444. },
  445. getOrgPhysicalDefenseConstructionInfo() {
  446. this.orgloading = true;
  447. let dat = { orgId: this.$route.params.id };
  448. listOrgPhysicalDefenseConstruction(dat).then((data) => {
  449. // console.log(data);
  450. this.constructionList = data.rows;
  451. this.orgloading = false;
  452. });
  453. },
  454. getBankPhysicalDefenseConstructionInfo() {
  455. this.bankloading = true;
  456. let dat = { orgId: this.$route.params.id };
  457. listBankPhysicalDefenseConstruction(dat).then((data) => {
  458. // console.log(data);
  459. this.BankPhysicalDefenseConstructionList = data.rows;
  460. this.bankloading = false;
  461. });
  462. },
  463. // 取消按钮
  464. Bankcancel() {
  465. this.Bankopen = false;
  466. this.Bankreset();
  467. },
  468. // 表单重置
  469. Bankreset() {
  470. this.Bankform = {
  471. id: null,
  472. standard: null,
  473. dateOfCompliance: null,
  474. certificateEvidence: null,
  475. certificate: null,
  476. evidence: null,
  477. createTime: null,
  478. updateTime: null,
  479. createBy: null,
  480. updateBy: null,
  481. orgId: null,
  482. };
  483. this.resetForm("Bankform");
  484. },
  485. // 多选框选中数据
  486. handleBankSelectionChange(selection) {
  487. this.Bankids = selection.map((item) => item.id);
  488. this.single = selection.length !== 1;
  489. this.multiple = !selection.length;
  490. },
  491. /** 新增按钮操作 */
  492. handleBankAdd() {
  493. this.Bankreset();
  494. this.Bankopen = true;
  495. this.Banktitle = "添加银行物防建设";
  496. },
  497. /** 修改按钮操作 */
  498. handleBankUpdate(row) {
  499. this.Bankreset();
  500. const id = row.id || this.Bankids;
  501. getBankPhysicalDefenseConstruction(id).then((response) => {
  502. this.Bankform = response.data;
  503. this.Bankopen = true;
  504. this.Banktitle = "修改银行物防建设";
  505. });
  506. },
  507. /** 提交按钮 */
  508. submitBankForm() {
  509. this.Bankform.orgId = this.$route.params.id;
  510. this.$refs["Bankform"].validate((valid) => {
  511. if (valid) {
  512. if (this.Bankform.id != null) {
  513. updateBankPhysicalDefenseConstruction(this.Bankform).then(
  514. (response) => {
  515. this.$modal.msgSuccess("修改成功");
  516. this.Bankopen = false;
  517. this.getBankPhysicalDefenseConstructionInfo();
  518. }
  519. );
  520. } else {
  521. addBankPhysicalDefenseConstruction(this.Bankform).then(
  522. (response) => {
  523. this.$modal.msgSuccess("新增成功");
  524. this.Bankopen = false;
  525. this.getBankPhysicalDefenseConstructionInfo();
  526. }
  527. );
  528. }
  529. }
  530. });
  531. },
  532. /** 删除按钮操作 */
  533. handleBankDelete(row) {
  534. const Bankids = row.id || this.Bankids;
  535. this.$modal
  536. .confirm('是否确认删除银行物防建设编号为"' + Bankids + '"的数据项?')
  537. .then(function () {
  538. return delBankPhysicalDefenseConstruction(Bankids);
  539. })
  540. .then(() => {
  541. this.getBankPhysicalDefenseConstructionInfo();
  542. this.$modal.msgSuccess("删除成功");
  543. })
  544. .catch(() => {});
  545. },
  546. // 表单重置
  547. orgreset() {
  548. this.orgform = {
  549. id: null,
  550. standard: null,
  551. dateOfCompliance: null,
  552. certificateEvidence: null,
  553. certificate: null,
  554. evidence: null,
  555. createTime: null,
  556. updateTime: null,
  557. createBy: null,
  558. updateBy: null,
  559. orgId: null,
  560. };
  561. this.resetForm("orgform");
  562. },
  563. // 取消按钮
  564. orgcancel() {
  565. this.orgopen = false;
  566. this.orgreset();
  567. },
  568. // 多选框选中数据
  569. handleOrgSelectionChange(selection) {
  570. this.orgids = selection.map((item) => item.id);
  571. this.single = selection.length !== 1;
  572. this.multiple = !selection.length;
  573. },
  574. /** 新增按钮操作 */
  575. handleOrgAdd() {
  576. this.orgreset();
  577. this.orgopen = true;
  578. this.orgtitle = "添加机构物防建设";
  579. },
  580. /** 修改按钮操作 */
  581. handleOrgUpdate(row) {
  582. this.orgreset();
  583. const id = row.id || this.orgids;
  584. getOrgPhysicalDefenseConstruction(id).then((response) => {
  585. // console.log(response)
  586. this.orgform = response.data;
  587. this.orgopen = true;
  588. this.orgtitle = "修改机构物防建设";
  589. });
  590. },
  591. /** 提交按钮 */
  592. submitOrgForm() {
  593. this.orgform.orgId = this.$route.params.id;
  594. this.$refs["orgform"].validate((valid) => {
  595. if (valid) {
  596. if (this.orgform.id != null) {
  597. updateOrgPhysicalDefenseConstruction(this.orgform).then(
  598. (response) => {
  599. this.$modal.msgSuccess("修改成功");
  600. this.orgopen = false;
  601. this.getOrgPhysicalDefenseConstructionInfo();
  602. }
  603. );
  604. } else {
  605. addOrgPhysicalDefenseConstruction(this.orgform).then((response) => {
  606. this.$modal.msgSuccess("新增成功");
  607. this.orgopen = false;
  608. this.getOrgPhysicalDefenseConstructionInfo();
  609. });
  610. }
  611. }
  612. });
  613. },
  614. /** 删除按钮操作 */
  615. handleOrgDelete(row) {
  616. const orgids = row.id || this.orgids;
  617. this.$modal
  618. .confirm('是否确认删除机构物防建设编号为"' + orgids + '"的数据项?')
  619. .then(function () {
  620. return delOrgPhysicalDefenseConstruction(orgids);
  621. })
  622. .then(() => {
  623. this.getOrgPhysicalDefenseConstructionInfo();
  624. this.$modal.msgSuccess("删除成功");
  625. })
  626. .catch(() => {});
  627. },
  628. // saveExtend() {
  629. // let dat = {
  630. // deptId: this.deptId,
  631. // duties: this.duties,
  632. // workType: this.workType,
  633. // isFullTime: this.isFullTime,
  634. // highestEducation: this.highestEducation,
  635. // educationType: this.educationType,
  636. // certificateWork: this.certificateWork,
  637. // professionalQualifications: this.professionalQualifications,
  638. // certificateFailReason: this.certificateFailReason,
  639. // workTime: this.workTime,
  640. // entryTime: this.entryTime,
  641. // bornTime: this.bornTime,
  642. // responsibilitiesLeaderName: this.responsibilitiesLeaderName,
  643. // responsibilitiesLeaderDuties: this.responsibilitiesLeaderDuties,
  644. // qualificationCertificateUrl: this.qualificationCertificateUrl,
  645. // id: this.id,
  646. // };
  647. // if(this.extendId){
  648. // updateExtend(dat).then((res) => {
  649. // this.$modal.msgSuccess("保存成功");
  650. // this.$router.go(-1);
  651. // });
  652. // }else{
  653. // addExtend(dat).then((res) => {
  654. // this.$modal.msgSuccess("保存成功");
  655. // this.$router.go(-1);
  656. // });
  657. // }
  658. // },
  659. nosaveExtend() {
  660. this.$router.go(-1);
  661. },
  662. triggerFileInput() {
  663. this.$refs.fileInput.click();
  664. },
  665. async handleFileChange(event) {
  666. const file = event.target.files[0];
  667. if (!file) return;
  668. // 创建 FormData 对象并添加文件
  669. const formData = new FormData();
  670. formData.append('file', file);
  671. // // 发送文件到您的文件上传 API
  672. try {
  673. uploadFile(formData).then((res) => {
  674. console.log(res);
  675. // this.orgform.certificateEvidence = res.data;
  676. });
  677. // 处理上传成功的逻辑
  678. console.log('上传成功');
  679. } catch (error) {
  680. // 处理上传失败的逻辑
  681. console.log('上传失败');
  682. }
  683. // try {
  684. // const response = await request.post('http://localhost:9527/dev-api/file/file/upload', formData, {
  685. // headers: {
  686. // 'Content-Type': 'multipart/form-data',
  687. // },
  688. // });
  689. // // 处理上传成功的逻辑
  690. // console.log('上传成功', response);
  691. // } catch (error) {
  692. // // 处理上传失败的逻辑
  693. // console.log('上传失败', error);
  694. // }
  695. // 重置 input 元素,以便下次选择相同文件时仍能触发 change 事件
  696. event.target.value = '';
  697. },
  698. },
  699. fillter: {},
  700. };
  701. </script>
  702. <style scoped lang="scss">
  703. .title{
  704. font-size: 18px;
  705. text-align: left;
  706. background: #4f9baabd;
  707. color:#fff;
  708. height: 36px;
  709. line-height: 36px;
  710. padding-left: 8px;
  711. margin: 0;
  712. }
  713. .info-box{
  714. margin: 30px;
  715. }
  716. .demo-form-inline {
  717. }
  718. .dialog-footer {
  719. }
  720. .container {
  721. }
  722. .image-container {
  723. display: inline-block;
  724. width: 200px;
  725. margin-right: 20px; /* 设置与下一个div的水平间距 */
  726. }
  727. .zoom-image {
  728. transition: transform 0.3s ease;
  729. }
  730. .zoom-image:hover {
  731. transform: scale(1.02);
  732. }
  733. .border-color-change {
  734. border: 1px solid #ccc;
  735. transition: border-color 0.3s ease;
  736. }
  737. .border-color-change:hover {
  738. border-color: #1ea8e9; /* 您可以将此颜色更改为所需的颜色 */
  739. }
  740. </style>