index.vue 57 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963
  1. <template>
  2. <div id="informationTemplate">
  3. <table-list
  4. :tableSets="tableSet"
  5. :tableData="tableData"
  6. :navText="navText"
  7. @addClick="addClick"
  8. :loading="loading"
  9. @editInfo="editInfo"
  10. @aboutGoods="aboutGoods"
  11. >
  12. <template slot="btn" slot-scope="props">
  13. <el-button type="text" @click="addClick(props.scope.row, 0)"
  14. >修改</el-button
  15. >
  16. <el-button type="text" @click="associate(props.scope.row)"
  17. >关联</el-button
  18. >
  19. <el-button type="text" @click="del(props.scope.row)">删除</el-button>
  20. </template>
  21. </table-list>
  22. <pagination
  23. :total="total"
  24. :pageSize="formData.pageSize"
  25. :currentPage="formData.pageNum"
  26. @handleSizeChange="handleSizeChange"
  27. @handleCurrentChange="handleCurrentChange"
  28. />
  29. <el-dialog
  30. @closed="loadingClose"
  31. :visible.sync="dialogVisible"
  32. width="630px"
  33. :show-close="false"
  34. :close-on-click-modal="false"
  35. >
  36. <div slot="title" class="hearders">
  37. <div class="leftTitle">
  38. {{ statusPop === 1 ? "添加" : statusPop === 0 ? "修改" : "详情" }}
  39. </div>
  40. <div class="rightBoxs">
  41. <img src="@/assets/images/Close@2x.png" alt="" @click="close" />
  42. </div>
  43. </div>
  44. <div style="overflow-y: auto; max-height: 600px">
  45. <p class="p_infos">模板基本信息</p>
  46. <el-form
  47. label-position="right"
  48. label-width="110px"
  49. :model="listData"
  50. :rules="rules"
  51. ref="listData"
  52. >
  53. <el-form-item
  54. v-for="(items, indexs) in listitem"
  55. :key="indexs"
  56. :label="items.label"
  57. :prop="items.prop"
  58. >
  59. <el-radio-group
  60. v-if="items.scope === 'status'"
  61. v-model="listData[items.prop]"
  62. >
  63. <el-radio
  64. v-for="(item, index) in items.options"
  65. :key="index"
  66. :label="item.value"
  67. :disabled="statusPop === 2"
  68. >{{ item.label }}</el-radio
  69. >
  70. </el-radio-group>
  71. <div v-else-if="items.scope === 'activeType'">
  72. <div :class="changeHeight ? 'ach' : 'clh'">
  73. <div
  74. v-for="(item, index) in zhType"
  75. :key="index"
  76. class="listBoxStys"
  77. >
  78. {{
  79. item.educationName +
  80. " - " +
  81. item.projectName +
  82. "-" +
  83. item.businessName
  84. }}
  85. <i
  86. class="el-icon-error closeIcons"
  87. @click="closeType(item.id)"
  88. ></i>
  89. </div>
  90. </div>
  91. <el-button
  92. size="mini"
  93. v-if="zhType.length > 1"
  94. @click="changeType"
  95. >{{ changeHeight ? "展开" : "关闭" }}</el-button
  96. ><el-button
  97. size="mini"
  98. v-if="cauType.length > 0"
  99. @click="allclear"
  100. >清空</el-button
  101. >
  102. </div>
  103. <div
  104. v-else-if="items.scope === 'certificate'"
  105. style="display: flex; align-items: center"
  106. >
  107. <el-select
  108. v-model="eduType"
  109. placeholder="请选择教育类型"
  110. @change="eduChange"
  111. >
  112. <el-option
  113. v-for="item in itemOption1"
  114. :key="item.value"
  115. :label="item.label"
  116. :value="item.value"
  117. >
  118. </el-option>
  119. </el-select>
  120. <el-popover
  121. placement="bottom"
  122. trigger="click"
  123. :disabled="eduType ? false : true"
  124. ><el-checkbox
  125. v-model="checkAll"
  126. @change="handleCheckAllChange"
  127. :indeterminate="isIndeterminate"
  128. >全选</el-checkbox
  129. >
  130. <el-checkbox-group
  131. v-model="cauType"
  132. class="checkboxSty"
  133. @change="handleCheckedCitiesChange"
  134. >
  135. <el-checkbox
  136. v-for="(item, index) in itemOption2"
  137. :label="item.id"
  138. :key="index"
  139. >{{
  140. item.projectName + "-" + item.businessName
  141. }}</el-checkbox
  142. >
  143. </el-checkbox-group>
  144. <el-button
  145. slot="reference"
  146. style="margin-left: 12px"
  147. @click="getMessage"
  148. >请选择业务层次</el-button
  149. >
  150. </el-popover>
  151. <span style="margin-left: 10px">注:可多选</span>
  152. </div>
  153. <!-- <div v-else-if="items.scope === 'select'">
  154. <el-select
  155. v-model="listData[items.prop]"
  156. multiple
  157. placeholder="请选择审核人"
  158. >
  159. <el-option
  160. v-for="item in userList"
  161. :key="item.userId"
  162. :label="item.nickName"
  163. :value="item.userId"
  164. >
  165. </el-option>
  166. </el-select>
  167. <span style="margin-left: 10px">注:可多选</span>
  168. </div> -->
  169. <div v-else>
  170. <el-input v-model="listData[items.prop]"></el-input>
  171. <div v-if="items.ch">{{ items.ch }}</div>
  172. </div>
  173. </el-form-item>
  174. </el-form>
  175. <p class="p_infos">
  176. 模板字段组合<el-button
  177. type="text"
  178. style="margin-left: 20px"
  179. @click="openYL"
  180. >预览</el-button
  181. >
  182. </p>
  183. <div class="dis_fs">
  184. <div style="width: 49%">
  185. <div>
  186. <el-button size="mini" type="primary" @click="openThisLiting"
  187. >添加</el-button
  188. >
  189. <span style="margin-left: 10px">按字段选择时间顺序排序</span>
  190. </div>
  191. <ul>
  192. <li
  193. v-for="(item, index) in listData.keyValue"
  194. :key="index"
  195. class="dis_fls"
  196. >
  197. <div>
  198. <el-button
  199. type="text"
  200. @click="del1(index)"
  201. style="margin-right: 14px"
  202. >删除</el-button
  203. >
  204. {{ item.fieldName }}{{ item.required ? " (必填)" : "" }}
  205. </div>
  206. <div style="margin-right: 10px"></div>
  207. </li>
  208. </ul>
  209. </div>
  210. <div class="fengs"></div>
  211. <div style="width: 49%">
  212. <div>
  213. <el-button size="mini" type="primary" @click="openThisLitingRight"
  214. >添加</el-button
  215. >
  216. <span style="margin-left: 10px">按字段选择时间顺序排序</span>
  217. </div>
  218. <ul>
  219. <li
  220. v-for="(item, index) in listData.keyValue2"
  221. :key="index"
  222. class="dis_fls"
  223. >
  224. <div>
  225. <el-button
  226. type="text"
  227. @click="del2(index)"
  228. style="margin-right: 14px"
  229. >删除</el-button
  230. >
  231. {{ item.fieldName }}{{ item.required ? " (必填)" : "" }}
  232. </div>
  233. <div style="margin-right: 10px"></div>
  234. </li>
  235. </ul>
  236. </div>
  237. </div>
  238. </div>
  239. <span slot="footer" class="dialog-footer">
  240. <el-button @click="close">取 消</el-button>
  241. <el-button
  242. type="primary"
  243. :loading="disabledBtn"
  244. v-if="statusPop !== 2"
  245. @click="submit('listData')"
  246. >确 定</el-button
  247. >
  248. </span>
  249. </el-dialog>
  250. <el-dialog
  251. :visible.sync="dialogVisYL"
  252. width="800px"
  253. append-to-body
  254. :show-close="false"
  255. :close-on-click-modal="false"
  256. >
  257. <div slot="title" class="hearders">
  258. <div class="leftTitle">预览</div>
  259. <div class="rightBoxs">
  260. <img src="@/assets/images/Close@2x.png" alt="" @click="closeYL" />
  261. </div>
  262. </div>
  263. <header class="headerStys">{{ listData.name }}</header>
  264. <el-row
  265. :gutter="20"
  266. style="background-color: #999; max-height: 600px; overflow-y: auto"
  267. >
  268. <el-col :span="12">
  269. <ul>
  270. <template v-for="(item, index) in listData.keyValue">
  271. <li
  272. :key="index"
  273. v-if="item.inputType === 1"
  274. class="autoFlex bgcFFF"
  275. >
  276. <span
  277. ><i class="required" v-if="item.required">*</i
  278. >{{ item.fieldName }}</span
  279. >
  280. <span class="color:#b4b4b4;">{{
  281. "请输入" + item.fieldName
  282. }}</span>
  283. </li>
  284. <li
  285. :key="index"
  286. v-if="item.inputType === 2 || item.inputType === 5"
  287. class="autoFlex bgcFFF"
  288. >
  289. <span
  290. ><i class="required" v-if="item.required">*</i
  291. >{{ item.fieldName }}</span
  292. >
  293. <span class="color:#b4b4b4;"
  294. >{{ "请选择" + item.fieldName
  295. }}<i class="el-icon-arrow-right"></i
  296. ></span>
  297. </li>
  298. <li
  299. :key="index"
  300. v-if="item.inputType === 3"
  301. class="borstyflex bgcFFF"
  302. >
  303. <div class="autoFlex" style="border: 1px solid transparent">
  304. <span
  305. ><i class="required" v-if="item.required">*</i
  306. >{{ item.fieldName }}</span
  307. >
  308. <div style="display: flex; align-items: center">
  309. <i
  310. v-if="item.fieldKey !== 'commitment_electr_signature'"
  311. class="el-icon-warning-outline"
  312. style="
  313. font-weight: bold;
  314. color: red;
  315. font-size: 20px;
  316. margin-right: 6px;
  317. "
  318. ></i>
  319. <div v-if="item.fieldKey === 'recent_photos'">
  320. 证件照竖向<br />文件大小下≤2M
  321. </div>
  322. <div v-if="item.fieldKey === 'idcard_face_photo'">
  323. 人像面(横向)<br />文件大小下≤2M
  324. </div>
  325. <div v-if="item.fieldKey === 'idcard_national_photo'">
  326. 国徽面(横向)<br />文件大小下≤2M
  327. </div>
  328. </div>
  329. </div>
  330. <div v-if="item.fieldKey === 'commitment_electr_signature'">
  331. <p>
  332. 本人自愿做出如下承诺:<br />本人己仔细阅读《广东
  333. 省住房和城乡建设厅关于推进住房和城乡建设领域施
  334. 工现场专业人员职业培训工作的通知》
  335. 全部内容并知晓和理解,本人的学历证书、身份证、工作年限、相片等所有资料完全真实、符合报名条件、资格审查要求和相关规定,本人在报名、审查、培训、测试等有关的事项中会严格道守相关规定和要求,如有虛假或与实际规定不符等情况造成的一切后果由本人承担。<br />
  336. 特此承诺!
  337. </p>
  338. <div>
  339. <p style="color: red; text-align: center">
  340. 签名板(请在此处进行签名)
  341. </p>
  342. <div class="poters">手动签名区</div>
  343. </div>
  344. </div>
  345. <div v-else style="text-align: center">
  346. <img
  347. class="imgs"
  348. src="../../../../assets/images/imgpng.png"
  349. alt="加载失败"
  350. />
  351. </div>
  352. </li>
  353. <li
  354. :key="index"
  355. v-if="item.inputType === 4"
  356. class="borstyflex bgcFFF"
  357. >
  358. <div class="autoFlex" style="border: 1px solid transparent">
  359. <span
  360. ><i class="required" v-if="item.required">*</i
  361. >{{ item.fieldName }}</span
  362. >
  363. <div style="display: flex; align-items: center">
  364. <i
  365. class="el-icon-warning-outline"
  366. style="
  367. font-weight: bold;
  368. color: red;
  369. font-size: 20px;
  370. margin-right: 6px;
  371. "
  372. ></i>
  373. <div
  374. v-if="item.fieldKey === 'commitment_seal'"
  375. style="font-size: 12px"
  376. >
  377. 下载承诺书进行填写盖章<br />并上传<br />文件大小下≤2M
  378. <el-button type="text" @click="getDowm"
  379. >点击下载</el-button
  380. >
  381. </div>
  382. </div>
  383. </div>
  384. <div style="text-align: center">
  385. <img
  386. class="imgs"
  387. src="../../../../assets/images/imgsqty.png"
  388. alt="加载失败"
  389. />
  390. </div>
  391. </li>
  392. </template>
  393. </ul>
  394. </el-col>
  395. <el-col :span="12">
  396. <ul>
  397. <template v-for="(item, index) in listData.keyValue2">
  398. <li
  399. :key="index"
  400. v-if="item.inputType === 1"
  401. class="autoFlex bgcFFF"
  402. >
  403. <span
  404. ><i class="required" v-if="item.required">*</i
  405. >{{ item.fieldName }}</span
  406. >
  407. <span class="color:#b4b4b4;">{{
  408. "请输入" + item.fieldName
  409. }}</span>
  410. </li>
  411. <li
  412. :key="index"
  413. v-if="item.inputType === 2 || item.inputType === 5"
  414. class="autoFlex bgcFFF"
  415. >
  416. <span
  417. ><i class="required" v-if="item.required">*</i
  418. >{{ item.fieldName }}</span
  419. >
  420. <span class="color:#b4b4b4;"
  421. >{{ "请选择" + item.fieldName
  422. }}<i class="el-icon-arrow-right"></i
  423. ></span>
  424. </li>
  425. <li
  426. :key="index"
  427. v-if="item.inputType === 3"
  428. class="borstyflex bgcFFF"
  429. >
  430. <div class="autoFlex" style="border: 1px solid transparent">
  431. <span
  432. ><i class="required" v-if="item.required">*</i
  433. >{{ item.fieldName }}</span
  434. >
  435. <div style="display: flex; align-items: center">
  436. <i
  437. v-if="item.fieldKey !== 'commitment_electr_signature'"
  438. class="el-icon-warning-outline"
  439. style="
  440. font-weight: bold;
  441. color: red;
  442. font-size: 20px;
  443. margin-right: 6px;
  444. "
  445. ></i>
  446. <div v-if="item.fieldKey === 'recent_photos'">
  447. 证件照竖向<br />文件大小下≤2M
  448. </div>
  449. <div v-if="item.fieldKey === 'idcard_face_photo'">
  450. 人像面(横向)<br />文件大小下≤2M
  451. </div>
  452. <div v-if="item.fieldKey === 'idcard_national_photo'">
  453. 国徽面(横向)<br />文件大小下≤2M
  454. </div>
  455. </div>
  456. </div>
  457. <div v-if="item.fieldKey === 'commitment_electr_signature'">
  458. <p>
  459. 本人自愿做出如下承诺:<br />本人己仔细阅读《广东
  460. 省住房和城乡建设厅关于推进住房和城乡建设领域施
  461. 工现场专业人员职业培训工作的通知》
  462. 全部内容并知晓和理解,本人的学历证书、身份证、工作年限、相片等所有资料完全真实、符合报名条件、资格审查要求和相关规定,本人在报名、审查、培训、测试等有关的事项中会严格道守相关规定和要求,如有虛假或与实际规定不符等情况造成的一切后果由本人承担。<br />
  463. 特此承诺!
  464. </p>
  465. <div>
  466. <p style="color: red; text-align: center">
  467. 签名板(请在此处进行签名)
  468. </p>
  469. <div class="poters">手动签名区</div>
  470. </div>
  471. </div>
  472. <div v-else style="text-align: center">
  473. <img
  474. class="imgs"
  475. src="../../../../assets/images/imgpng.png"
  476. alt="加载失败"
  477. />
  478. </div>
  479. </li>
  480. <li
  481. :key="index"
  482. v-if="item.inputType === 4"
  483. class="borstyflex bgcFFF"
  484. >
  485. <div class="autoFlex" style="border: 1px solid transparent">
  486. <span
  487. ><i class="required" v-if="item.required">*</i
  488. >{{ item.fieldName }}</span
  489. >
  490. <div style="display: flex; align-items: center">
  491. <i
  492. class="el-icon-warning-outline"
  493. style="
  494. font-weight: bold;
  495. color: red;
  496. font-size: 20px;
  497. margin-right: 6px;
  498. "
  499. ></i>
  500. <div
  501. v-if="item.fieldKey === 'commitment_seal'"
  502. style="font-size: 12px"
  503. >
  504. 下载承诺书进行填写盖章<br />并上传<br />文件大小下≤2M
  505. <el-button type="text" @click="getDowm"
  506. >点击下载</el-button
  507. >
  508. </div>
  509. </div>
  510. </div>
  511. <div style="text-align: center">
  512. <img
  513. class="imgs"
  514. src="../../../../assets/images/imgsqty.png"
  515. alt="加载失败"
  516. />
  517. </div>
  518. </li>
  519. </template>
  520. </ul>
  521. </el-col>
  522. </el-row>
  523. <span slot="footer" class="dialog-footer">
  524. <el-button @click="closeYL">取 消</el-button>
  525. </span>
  526. </el-dialog>
  527. <el-dialog
  528. :visible.sync="dialogVisibleLitsing1"
  529. width="300px"
  530. append-to-body
  531. :show-close="false"
  532. :close-on-click-modal="false"
  533. >
  534. <div slot="title" class="hearders">
  535. <div class="leftTitle">字段配置(第一步)</div>
  536. <div class="rightBoxs">
  537. <img
  538. src="@/assets/images/Close@2x.png"
  539. alt=""
  540. @click="closeLitsing"
  541. />
  542. </div>
  543. </div>
  544. <ul>
  545. <li v-for="(item, index) in pzList1" :key="index" class="disos">
  546. <div
  547. class="disChild"
  548. @click="item.disable === true ? '' : changeStatus1(item, index)"
  549. >
  550. <i class="checkSty" :class="item.disable === true ? 'disable' : ''">
  551. <i
  552. v-if="item.checked"
  553. class="el-icon-check"
  554. style="color: #409eff"
  555. ></i></i
  556. ><span>{{ item.fieldName }}</span>
  557. </div>
  558. <div
  559. class="disChild"
  560. @click="item.disable === true ? '' : changeStatus1s(item, index)"
  561. >
  562. <i class="radiosty" :class="item.disable === true ? 'disable' : ''"
  563. ><div :class="item.required ? 'activeRadio' : ''"></div></i
  564. ><span>必填</span>
  565. </div>
  566. </li>
  567. </ul>
  568. <span slot="footer" class="dialog-footer">
  569. <el-button @click="closeLitsing">取 消</el-button>
  570. <el-button type="primary" @click="submitLitsing">确 定</el-button>
  571. </span>
  572. </el-dialog>
  573. <el-dialog
  574. :visible.sync="dialogVisibleLitsing2"
  575. width="300px"
  576. append-to-body
  577. :show-close="false"
  578. :close-on-click-modal="false"
  579. >
  580. <div slot="title" class="hearders">
  581. <div class="leftTitle">字段配置(第二步)</div>
  582. <div class="rightBoxs">
  583. <img
  584. src="@/assets/images/Close@2x.png"
  585. alt=""
  586. @click="closeLitsing2"
  587. />
  588. </div>
  589. </div>
  590. <ul>
  591. <li v-for="(item, index) in pzList2" :key="index" class="disos">
  592. <div
  593. class="disChild"
  594. @click="item.disable === true ? '' : changeStatus2(item, index)"
  595. >
  596. <i class="checkSty" :class="item.disable === true ? 'disable' : ''">
  597. <i
  598. v-if="item.checked"
  599. class="el-icon-check"
  600. style="color: #409eff"
  601. ></i></i
  602. ><span>{{ item.fieldName }}</span>
  603. </div>
  604. <!-- @click="item.disable == true ? '' : changeStatus2s(item, index)" (旧)下面按钮事件 -->
  605. <div class="disChild" @click="titleFunc">
  606. <i class="radiosty" :class="item.disable === true ? 'disable' : ''"
  607. ><div :class="item.required ? 'activeRadio' : ''"></div></i
  608. ><span>必填</span>
  609. </div>
  610. </li>
  611. </ul>
  612. <span slot="footer" class="dialog-footer">
  613. <el-button @click="closeLitsing2">取 消</el-button>
  614. <el-button type="primary" @click="submitLitsing2">确 定</el-button>
  615. </span>
  616. </el-dialog>
  617. <el-dialog
  618. :visible.sync="dialogVisibleAss"
  619. width="800px"
  620. append-to-body
  621. :show-close="false"
  622. :close-on-click-modal="false"
  623. >
  624. <div slot="title" class="hearders">
  625. <div class="leftTitle">关联商品</div>
  626. <div class="rightBoxs">
  627. <img
  628. src="@/assets/images/Close@2x.png"
  629. alt=""
  630. @click="dialogVisibleAss = false"
  631. />
  632. </div>
  633. </div>
  634. <search-box-new
  635. ref="searchBox"
  636. :formData="formData5"
  637. :formList="formList5"
  638. @search="getInfosCX(1)"
  639. @init="init5"
  640. />
  641. <el-table
  642. ref="multipleTable"
  643. :data="boxtableData"
  644. border
  645. @select-all="selectAll"
  646. @select="select"
  647. :row-key="getRowKeys"
  648. :header-cell-style="{
  649. 'background-color': '#eee',
  650. padding: '8px',
  651. color: '#333',
  652. }"
  653. >
  654. <el-table-column
  655. align="center"
  656. type="selection"
  657. width="55"
  658. header-align="center"
  659. :selectable="checkboxT"
  660. :reserve-selection="true"
  661. >
  662. </el-table-column>
  663. <template v-for="(item, index) in tableSetAss">
  664. <el-table-column
  665. v-if="item.scope !== 'inputs'"
  666. :width="item.width"
  667. :key="index"
  668. :label="item.label"
  669. align="center"
  670. :show-overflow-tooltip="true"
  671. header-align="center"
  672. >
  673. <template slot-scope="scope">
  674. <span v-if="item.scope === 'types'">{{
  675. scope.row[item.prop] === 1
  676. ? "视频"
  677. : scope.row[item.prop] === 2
  678. ? "题库"
  679. : scope.row[item.prop] === 3
  680. ? "面授"
  681. : scope.row[item.prop] === 4
  682. ? "服务"
  683. : scope.row[item.prop] === 5
  684. ? "组合"
  685. : "未知"
  686. }}</span>
  687. <span v-else-if="item.scope === 'maRY'">
  688. {{ scope.row["educationName"] }} -
  689. {{ scope.row["projectName"] }} - {{ scope.row["businessName"] }}
  690. </span>
  691. <span v-else-if="item.scope === 'Status'">
  692. {{
  693. scope.row[item.prop] === 1
  694. ? "有效"
  695. : scope.row[item.prop] === 0
  696. ? "无效"
  697. : "未知"
  698. }}
  699. </span>
  700. <span v-else>{{ scope.row[item.prop] }}</span></template
  701. >
  702. </el-table-column></template
  703. >
  704. </el-table>
  705. <pagination
  706. :total="total5"
  707. :pageSize="formData5.pageSize"
  708. :currentPage="formData5.pageNum"
  709. @handleSizeChange="handleSizeChange5"
  710. @handleCurrentChange="handleCurrentChange5"
  711. />
  712. <span slot="footer" class="dialog-footer">
  713. <el-button @click="dialogVisibleAss = false">取 消</el-button>
  714. <el-button
  715. type="primary"
  716. :disabled="activeLists.length === 0"
  717. @click="submitForm"
  718. >确 定</el-button
  719. >
  720. </span>
  721. </el-dialog>
  722. <el-dialog
  723. :visible.sync="dialogVisibleisActive"
  724. width="800px"
  725. append-to-body
  726. :show-close="false"
  727. :close-on-click-modal="false"
  728. >
  729. <div slot="title" class="hearders">
  730. <div class="leftTitle">所有关联商品</div>
  731. <div class="rightBoxs">
  732. <img
  733. src="@/assets/images/Close@2x.png"
  734. alt=""
  735. @click="dialogVisibleisActive = false"
  736. />
  737. </div>
  738. </div>
  739. <el-table
  740. :data="boxtableDataIsActive"
  741. border
  742. :header-cell-style="{
  743. 'background-color': '#eee',
  744. padding: '8px',
  745. color: '#333',
  746. }"
  747. >
  748. <template v-for="(item, index) in tableSetIsActive">
  749. <el-table-column
  750. v-if="item.scope !== 'inputs'"
  751. :width="item.width"
  752. :key="index"
  753. :label="item.label"
  754. align="center"
  755. header-align="center"
  756. >
  757. <template slot-scope="scope">
  758. <span v-if="item.scope === 'types'">{{
  759. scope.row[item.prop] === 1
  760. ? "视频"
  761. : scope.row[item.prop] === 2
  762. ? "题库"
  763. : scope.row[item.prop] === 3
  764. ? "面授"
  765. : scope.row[item.prop] === 4
  766. ? "服务"
  767. : scope.row[item.prop] === 5
  768. ? "组合"
  769. : "未知"
  770. }}</span>
  771. <span v-else-if="item.scope === 'maRY'">
  772. {{ scope.row["educationName"] }} -
  773. {{ scope.row["projectName"] }} - {{ scope.row["businessName"] }}
  774. </span>
  775. <span v-else-if="item.scope === 'Status'">
  776. {{
  777. scope.row[item.prop] === 1
  778. ? "有效"
  779. : scope.row[item.prop] === 0
  780. ? "无效"
  781. : "未知"
  782. }}
  783. </span>
  784. <span v-else>{{ scope.row[item.prop] }}</span></template
  785. >
  786. </el-table-column></template
  787. ><el-table-column fixed="right" label="操作" width="120" align="center">
  788. <template slot-scope="scope">
  789. <el-button type="text" @click="delIsActive(scope.row, scope.$index)"
  790. >删除</el-button
  791. >
  792. </template>
  793. </el-table-column>
  794. </el-table>
  795. <pagination
  796. :total="totala"
  797. :pageSize="formDataa.pageSize"
  798. :currentPage="formDataa.pageNum"
  799. @handleSizeChange="handleSizeChangea"
  800. @handleCurrentChange="handleCurrentChangea"
  801. />
  802. <span slot="footer" class="dialog-footer">
  803. <el-button @click="dialogVisibleisActive = false">取 消</el-button>
  804. </span>
  805. </el-dialog>
  806. </div>
  807. </template>
  808. <!-- 输入类型 1输入框 2下拉选择 3上传文件 4下载文件 5时间选择器 -->
  809. <script>
  810. import * as baseUrls from "@/utils/request.js";
  811. import searchBoxNew from "@/components/searchBoxNew";
  812. import tableList from "@/components/tableList";
  813. import pagination from "@/components/pagination";
  814. export default {
  815. name: "InformationTemplate",
  816. components: { searchBoxNew, tableList, pagination },
  817. data() {
  818. return {
  819. disabledBtn: false,
  820. isIndeterminate: false,
  821. checkAll: false,
  822. changeHeight: true,
  823. loading: false, //当前表单加载是否加载动画
  824. navText: {
  825. title: "资料模板",
  826. index: 0,
  827. ch: "条",
  828. num: true,
  829. choice: true,
  830. border: true,
  831. addHide: false,
  832. backFatherBtn: {
  833. status: false,
  834. title: "未定义",
  835. },
  836. },
  837. // 表单
  838. tableSet: [
  839. {
  840. label: "资料模板编码",
  841. prop: "code",
  842. hidden: true,
  843. },
  844. {
  845. label: "资料模板标题",
  846. prop: "name",
  847. hidden: true,
  848. scope: "editInfo",
  849. // width: "240px",
  850. },
  851. {
  852. label: "适用业务层级",
  853. prop: "businessList",
  854. hidden: true,
  855. scope: "mapTypesBUS",
  856. },
  857. // {
  858. // label: "资料审核人",
  859. // prop: "userList",
  860. // hidden: true,
  861. // scope: "teachers",
  862. // width: "180px",
  863. // },
  864. {
  865. label: "关联商品",
  866. prop: "goodsIds",
  867. hidden: true,
  868. scope: "goodsIds",
  869. },
  870. {
  871. label: "状态",
  872. prop: "status",
  873. hidden: true,
  874. scope: "isOptions",
  875. options:[
  876. {
  877. label:"启用",
  878. value:1
  879. },{
  880. label:"停用",
  881. value:0
  882. }
  883. ]
  884. },
  885. ],
  886. tableData: [], //表单数据
  887. formData: {
  888. status: "0,1",
  889. pageSize: 10,
  890. pageNum: 1,
  891. },
  892. //搜索
  893. formList: [
  894. {
  895. prop: "educationId",
  896. placeholder: "教育类型",
  897. scope: "educationType",
  898. },
  899. {
  900. prop: "businessId",
  901. placeholder: "业务层次",
  902. scope: "businessLevel",
  903. edu: "educationId",
  904. },
  905. {
  906. prop: "subjectId",
  907. placeholder: "科目",
  908. scope: "sujectType",
  909. edu: "educationId",
  910. },
  911. {
  912. prop: "type",
  913. placeholder: "题目类型",
  914. scope: "selectBank",
  915. },
  916. {
  917. prop: "prefixName",
  918. placeholder: "请输入标题前缀",
  919. },
  920. ],
  921. total: 0, //一共多少条
  922. options1: [],
  923. options2: [],
  924. courseProjectType: [],
  925. itemOption1: [],
  926. itemOption2: [],
  927. eduType: "",
  928. cauType: [],
  929. zhType: [],
  930. // 弹窗字段
  931. listitem: [
  932. {
  933. label: "适用业务层级",
  934. scope: "certificate",
  935. },
  936. {
  937. label: "",
  938. scope: "activeType",
  939. },
  940. {
  941. label: "模板标题",
  942. prop: "name",
  943. },
  944. // {
  945. // label: "指派审核人",
  946. // prop: "userIds",
  947. // scope: "select",
  948. // },
  949. {
  950. label: "状态",
  951. prop: "status",
  952. scope: "status",
  953. options: [
  954. {
  955. label: "启用",
  956. value: 1,
  957. },
  958. {
  959. label: "停用",
  960. value: 0,
  961. },
  962. ],
  963. },
  964. ],
  965. // 弹窗数据
  966. listData: {
  967. keyValue: [],
  968. keyValue2: [],
  969. },
  970. statusPop: -1,
  971. dialogVisible: false,
  972. dialogVisibleLitsing1: false,
  973. dialogVisibleLitsing2: false,
  974. dialogVisYL: false,
  975. pzList1: [], //配置列表
  976. pzList2: [], //配置列表
  977. pzList1sss: [], //配置列表
  978. pzList2sss: [], //配置列表
  979. bfPzList: [], //备份配置列表
  980. userList: [],
  981. activeLists: [],
  982. total5: 0,
  983. formData5: {
  984. goodsType: 1,
  985. status: 1,
  986. goodsStatus: 1,
  987. pageNum: 1,
  988. pageSize: 10,
  989. },
  990. formList5: [
  991. {
  992. prop: "educationTypeId",
  993. placeholder: "教育类型",
  994. scope: "educationType",
  995. },
  996. {
  997. prop: "businessId",
  998. placeholder: "业务层次",
  999. scope: "businessLevel",
  1000. edu: "educationTypeId",
  1001. },
  1002. {
  1003. prop: "goodsName",
  1004. placeholder: "请输入商品名称",
  1005. },
  1006. ],
  1007. tableSetAss: [
  1008. {
  1009. label: "商品编码",
  1010. prop: "code",
  1011. width: "130px",
  1012. },
  1013. {
  1014. label: "年份",
  1015. prop: "year",
  1016. },
  1017. {
  1018. label: "商品名称",
  1019. prop: "goodsName",
  1020. width: "260px",
  1021. },
  1022. {
  1023. label: "业务层级",
  1024. scope: "maRY",
  1025. width: "360px",
  1026. },
  1027. {
  1028. label: "商品类型",
  1029. prop: "goodsType",
  1030. scope: "types",
  1031. width: "100px",
  1032. },
  1033. {
  1034. label: "有效状态",
  1035. prop: "status",
  1036. scope: "Status",
  1037. width: "100px",
  1038. },
  1039. {
  1040. label: "商品标价",
  1041. prop: "standPrice",
  1042. width: "100px",
  1043. },
  1044. ],
  1045. disCheckList: [],
  1046. boxtableData: [],
  1047. id: "",
  1048. dialogVisibleAss: false,
  1049. tableSetIsActive: [
  1050. {
  1051. label: "商品编码",
  1052. prop: "code",
  1053. width: "130px",
  1054. },
  1055. {
  1056. label: "年份",
  1057. prop: "year",
  1058. },
  1059. {
  1060. label: "商品名称",
  1061. prop: "goodsName",
  1062. width: "260px",
  1063. },
  1064. {
  1065. label: "业务层级",
  1066. scope: "maRY",
  1067. width: "360px",
  1068. },
  1069. {
  1070. label: "商品类型",
  1071. prop: "goodsType",
  1072. scope: "types",
  1073. width: "140px",
  1074. },
  1075. {
  1076. label: "有效状态",
  1077. prop: "status",
  1078. scope: "Status",
  1079. width: "100px",
  1080. },
  1081. {
  1082. label: "商品标价",
  1083. prop: "standPrice",
  1084. width: "100px",
  1085. },
  1086. ],
  1087. boxtableDataIsActive: [],
  1088. dialogVisibleisActive: false,
  1089. ars: "", //关联业务层级储存
  1090. //表单验证
  1091. rules: {
  1092. name: [{ required: true, message: "请输入模板标题", trigger: "blur" }],
  1093. userIds: [
  1094. { required: true, message: "请选择指派审核人", trigger: "change" },
  1095. ],
  1096. status: [{ required: true, message: "请选择状态", trigger: "change" }],
  1097. },
  1098. activeListGoods: [],
  1099. totala: 0,
  1100. formDataa: {
  1101. pageNum: 1,
  1102. pageSize: 10,
  1103. },
  1104. };
  1105. },
  1106. watch: {
  1107. cauType: function () {
  1108. this.changeTypes();
  1109. },
  1110. },
  1111. mounted() {
  1112. this.search();
  1113. this.initOptions();
  1114. this.getInfos();
  1115. this.getUserInfoList();
  1116. },
  1117. activated() {
  1118. this.search();
  1119. this.initOptions();
  1120. this.getInfos();
  1121. this.getUserInfoList();
  1122. },
  1123. methods: {
  1124. loadingClose() {
  1125. this.disabledBtn = false;
  1126. },
  1127. allclear() {
  1128. this.cauType = [];
  1129. this.handleCheckedCitiesChange();
  1130. },
  1131. handleCheckedCitiesChange() {
  1132. let nid = this.itemOption2.map((item) => {
  1133. return item.id;
  1134. });
  1135. this.checkAll = nid.every((item) => {
  1136. if (this.cauType.includes(item)) {
  1137. this.isIndeterminate = true;
  1138. return true;
  1139. } else {
  1140. return false;
  1141. }
  1142. });
  1143. if (this.cauType.length) {
  1144. this.isIndeterminate = true;
  1145. } else {
  1146. this.isIndeterminate = false;
  1147. }
  1148. if (this.checkAll) {
  1149. this.isIndeterminate = false;
  1150. }
  1151. },
  1152. handleCheckAllChange(val) {
  1153. if (val) {
  1154. let nid = this.itemOption2.map((item) => {
  1155. return item.id;
  1156. });
  1157. let arrays = this.cauType.concat(nid);
  1158. this.cauType = this.setFunc(arrays);
  1159. this.isIndeterminate = false;
  1160. } else {
  1161. let nid = this.itemOption2.map((item) => {
  1162. return item.id;
  1163. });
  1164. let newArr = [];
  1165. this.cauType.forEach((item) => {
  1166. if (!nid.includes(item)) {
  1167. newArr.push(item);
  1168. }
  1169. });
  1170. this.cauType = newArr;
  1171. if (this.cauType.length) {
  1172. this.isIndeterminate = true;
  1173. } else {
  1174. this.isIndeterminate = false;
  1175. }
  1176. }
  1177. },
  1178. setFunc(arr) {
  1179. var arrays = [];
  1180. for (let i = 0; i < arr.length; i++) {
  1181. if (!arrays.includes(arr[i])) {
  1182. arrays.push(arr[i]);
  1183. }
  1184. }
  1185. return arrays;
  1186. },
  1187. handleSizeChangea(v) {
  1188. this.formDataa.pageSize = v;
  1189. this.formDataa.pageNum = 1;
  1190. this.getNewInfos();
  1191. },
  1192. handleCurrentChangea(v) {
  1193. this.formDataa.pageNum = v;
  1194. this.getNewInfos();
  1195. },
  1196. getNewInfos() {
  1197. this.$api.inquireGoods(this.formDataa).then((res) => {
  1198. this.boxtableDataIsActive = res.rows;
  1199. this.totala = res.total;
  1200. this.search();
  1201. });
  1202. },
  1203. getDowm() {
  1204. let url = baseUrls.BASE_IMG_URL + "/oss/images/file/20211214.docx" +
  1205. `?time=${this.$methodsTools.getNewTime()}`;;
  1206. let link = document.createElement("a");
  1207. let fileName = "导入模板" + ".xlsx";
  1208. document.body.appendChild(link);
  1209. link.href = url;
  1210. link.dowmload = fileName;
  1211. link.click();
  1212. link.remove();
  1213. },
  1214. getActiveList() {
  1215. this.$api.inquirebaseprofilefieldgoods_list().then((res) => {
  1216. this.activeListGoods = res.data.map(Number);
  1217. });
  1218. },
  1219. delIsActive(items) {
  1220. var dataInt = this.formDataa.goodsIds.split(",").map(Number);
  1221. var ats = dataInt.filter((item) => {
  1222. return item != items.goodsId;
  1223. });
  1224. this.$api
  1225. .editbaseprofile({ profileTpId: this.id, goodsIds: ats.toString() })
  1226. .then((res) => {
  1227. this.formDataa.goodsIds = ats.toString();
  1228. this.$message.success("删除成功");
  1229. if (!this.formDataa.goodsIds) {
  1230. this.dialogVisibleisActive = false;
  1231. this.search();
  1232. return;
  1233. }
  1234. this.getNewInfos();
  1235. });
  1236. },
  1237. submitFormIsActive() {
  1238. // var arrays = [];
  1239. // this.boxtableDataIsActive.map((item) => {
  1240. // arrays.push(item.goodsId);
  1241. // });
  1242. // this.$api
  1243. // .editbaseprofile({ profileTpId: this.id, goodsIds: arrays.toString() })
  1244. // .then((res) => {
  1245. // this.dialogVisibleisActive = false;
  1246. // this.$message.success("修改成功");
  1247. // this.search();
  1248. // });
  1249. },
  1250. aboutGoods(option) {
  1251. if (!option.goodsIds) {
  1252. this.$message.warning("该资料模板无关联商品");
  1253. return;
  1254. }
  1255. this.formDataa.pageNum = 1;
  1256. this.formDataa.goodsIds = option.goodsIds;
  1257. this.$api.inquireGoods(this.formDataa).then((res) => {
  1258. this.totala = res.total;
  1259. this.boxtableDataIsActive = res.rows;
  1260. this.dialogVisibleisActive = true;
  1261. this.id = option.profileTpId;
  1262. });
  1263. },
  1264. submitForm() {
  1265. if (this.activeLists.length === 0) {
  1266. this.dialogVisibleAss = false;
  1267. return;
  1268. }
  1269. let arrays = this.disCheckList;
  1270. this.activeLists.map((item) => {
  1271. arrays.push(item.goodsId);
  1272. });
  1273. this.$api
  1274. .editbaseprofile({ profileTpId: this.id, goodsIds: arrays.toString() })
  1275. .then((res) => {
  1276. this.dialogVisibleAss = false;
  1277. this.$message.success("添加成功");
  1278. this.activeLists = [];
  1279. this.search();
  1280. });
  1281. },
  1282. //关联
  1283. associate(v) {
  1284. var self = this;
  1285. var ars = [];
  1286. v.businessList.map((item) => {
  1287. ars.push(item.businessId);
  1288. });
  1289. this.ars = ars.toString();
  1290. this.$api
  1291. .inquireGoods({
  1292. goodsType: 1,
  1293. businessIds: this.ars,
  1294. status: 1,
  1295. goodsStatus: 1,
  1296. pageNum: 1,
  1297. pageSize: 10,
  1298. })
  1299. .then((res) => {
  1300. if (v.goodsIds) {
  1301. this.disCheckList = v.goodsIds.split(",").map(Number);
  1302. } else {
  1303. this.disCheckList = [];
  1304. }
  1305. this.boxtableData = res.rows;
  1306. this.total5 = res.total;
  1307. this.dialogVisibleAss = true;
  1308. this.id = v.profileTpId;
  1309. this.$nextTick(function () {
  1310. self.$refs.multipleTable.clearSelection();
  1311. });
  1312. });
  1313. },
  1314. selectAll(value) {
  1315. this.activeLists = value;
  1316. },
  1317. select(value) {
  1318. this.activeLists = value;
  1319. },
  1320. checkboxT(row, index) {
  1321. if (this.activeListGoods.indexOf(row.goodsId) !== -1) {
  1322. return false;
  1323. } else {
  1324. return true;
  1325. }
  1326. },
  1327. getRowKeys(row) {
  1328. return row.goodsId;
  1329. },
  1330. init5() {
  1331. this.getInfosCX(2);
  1332. },
  1333. getInfosCX(int) {
  1334. if (int === 1) {
  1335. this.formData5.pageNum = 1;
  1336. }
  1337. if (int === 2) {
  1338. this.formData5 = {
  1339. goodsType: 1,
  1340. status: 1,
  1341. goodsStatus: 1,
  1342. pageNum: 1,
  1343. pageSize: 10,
  1344. };
  1345. }
  1346. this.formData5.businessIds = this.ars;
  1347. this.$api.inquireGoods(this.formData5).then((res) => {
  1348. this.boxtableData = res.rows;
  1349. this.total5 = res.total;
  1350. });
  1351. },
  1352. titleFunc() {
  1353. this.$message.warning("该选项默认必填且不允许修改");
  1354. },
  1355. openYL() {
  1356. this.dialogVisYL = true;
  1357. },
  1358. closeYL() {
  1359. this.dialogVisYL = false;
  1360. },
  1361. getUserInfoList() {
  1362. this.$api.obtainUserList({ status: 1 }).then((res) => {
  1363. this.userList = res.rows;
  1364. });
  1365. },
  1366. changeStatus1(item, index) {
  1367. if (item.checked) {
  1368. item.checked = false;
  1369. var indexs = this.pzList1sss.findIndex((items) => {
  1370. return items.fieldKey === item.fieldKey;
  1371. });
  1372. this.pzList1sss.splice(indexs, 1);
  1373. } else {
  1374. item.checked = true;
  1375. this.pzList1sss.push(item);
  1376. }
  1377. },
  1378. changeStatus1s(item, index) {
  1379. if (item.required) {
  1380. item.required = false;
  1381. } else {
  1382. var ars = this.pzList1sss.some((items) => {
  1383. return items.fieldKey === item.fieldKey;
  1384. });
  1385. if (ars) {
  1386. item.required = true;
  1387. } else {
  1388. this.$message.warning("请先勾选相对应的配置项,再勾选对应必填项");
  1389. return;
  1390. }
  1391. }
  1392. this.pzList1sss.map((items) => {
  1393. if (items.fieldKey === item.fieldKey) {
  1394. items.required = item.required;
  1395. }
  1396. });
  1397. },
  1398. changeStatus2(item, index) {
  1399. if (item.checked) {
  1400. item.checked = false;
  1401. this.pzList2sss.splice(index, 1);
  1402. } else {
  1403. item.checked = true;
  1404. this.pzList2sss.push(item);
  1405. }
  1406. },
  1407. changeStatus2s(item, index) {
  1408. if (item.required) {
  1409. item.required = false;
  1410. } else {
  1411. var ars = this.pzList2sss.some((items) => {
  1412. return items.fieldKey === item.fieldKey;
  1413. });
  1414. if (ars) {
  1415. item.required = true;
  1416. } else {
  1417. this.$message.warning("请先勾选相对应的配置项,再勾选对应必填项");
  1418. return;
  1419. }
  1420. item.required = true;
  1421. }
  1422. this.pzList2sss.map((items) => {
  1423. if (items.fieldKey === item.fieldKey) {
  1424. items.required = item.required;
  1425. }
  1426. });
  1427. },
  1428. del1(index) {
  1429. this.listData.keyValue.splice(index, 1);
  1430. },
  1431. del2(index) {
  1432. this.listData.keyValue2.splice(index, 1);
  1433. },
  1434. getInfos() {
  1435. this.$api.inquirebaseprofilefieldlist().then((res) => {
  1436. res.rows.forEach((item) => {
  1437. item.checked = false;
  1438. item.required = false;
  1439. });
  1440. this.bfPzList = res.rows;
  1441. });
  1442. },
  1443. openThisLiting() {
  1444. var data = JSON.parse(JSON.stringify(this.bfPzList));
  1445. if (this.listData.keyValue.length) {
  1446. for (let j = 0; j < this.listData.keyValue.length; j++) {
  1447. for (let i = 0; i < data.length; i++) {
  1448. if (data[i].fieldKey == this.listData.keyValue[j].fieldKey) {
  1449. data[i].checked = this.listData.keyValue[j].checked;
  1450. data[i].required = this.listData.keyValue[j].required;
  1451. }
  1452. }
  1453. }
  1454. }
  1455. if (this.listData.keyValue2.length) {
  1456. for (let j = 0; j < this.listData.keyValue2.length; j++) {
  1457. for (let i = 0; i < data.length; i++) {
  1458. if (data[i].fieldKey == this.listData.keyValue2[j].fieldKey) {
  1459. data[i].disable = true;
  1460. }
  1461. }
  1462. }
  1463. }
  1464. this.pzList1sss = JSON.parse(JSON.stringify(this.listData.keyValue));
  1465. data = data.filter((item) => {
  1466. return item.fieldKey !== "commitment_seal";
  1467. });
  1468. this.pzList1 = data;
  1469. this.dialogVisibleLitsing1 = true;
  1470. },
  1471. closeLitsing() {
  1472. this.dialogVisibleLitsing1 = false;
  1473. },
  1474. submitLitsing() {
  1475. for (let i = 0; i < this.pzList1sss.length; i++) {
  1476. if (this.pzList1sss[i].fieldKey === "commitment_seal") {
  1477. this.pzList1sss[i].url = "/oss/images/file/20211214.docx";
  1478. }
  1479. }
  1480. this.listData.keyValue = this.pzList1sss;
  1481. this.dialogVisibleLitsing1 = false;
  1482. },
  1483. openThisLitingRight() {
  1484. var data = JSON.parse(JSON.stringify(this.bfPzList));
  1485. if (this.listData.keyValue2.length) {
  1486. for (let j = 0; j < this.listData.keyValue2.length; j++) {
  1487. for (let i = 0; i < data.length; i++) {
  1488. if (data[i].fieldKey == this.listData.keyValue2[j].fieldKey) {
  1489. data[i].checked = this.listData.keyValue2[j].checked;
  1490. data[i].required = this.listData.keyValue2[j].required;
  1491. }
  1492. }
  1493. }
  1494. }
  1495. if (this.listData.keyValue.length) {
  1496. for (let j = 0; j < this.listData.keyValue.length; j++) {
  1497. for (let i = 0; i < data.length; i++) {
  1498. if (data[i].fieldKey == this.listData.keyValue[j].fieldKey) {
  1499. data[i].disable = true;
  1500. }
  1501. }
  1502. }
  1503. }
  1504. this.pzList2sss = JSON.parse(JSON.stringify(this.listData.keyValue2));
  1505. data = data.filter((item) => {
  1506. if (item.fieldKey === "commitment_seal") {
  1507. item.required = true;
  1508. }
  1509. return item.fieldKey === "commitment_seal";
  1510. });
  1511. this.pzList2 = data;
  1512. this.dialogVisibleLitsing2 = true;
  1513. },
  1514. closeLitsing2() {
  1515. this.dialogVisibleLitsing2 = false;
  1516. },
  1517. submitLitsing2() {
  1518. for (let i = 0; i < this.pzList2sss.length; i++) {
  1519. if (this.pzList2sss[i].fieldKey === "commitment_seal") {
  1520. this.pzList2sss[i].url = "/oss/images/file/20211214.docx";
  1521. }
  1522. }
  1523. this.listData.keyValue2 = this.pzList2sss;
  1524. this.dialogVisibleLitsing2 = false;
  1525. },
  1526. getMessage() {
  1527. if (!this.eduType) {
  1528. this.$message.warning("请先选择教育类型");
  1529. }
  1530. },
  1531. changeType() {
  1532. this.changeHeight = !this.changeHeight;
  1533. },
  1534. changeTypes() {
  1535. var arrays = [];
  1536. this.cauType.map((item) => {
  1537. this.courseProjectType.map((items, indexs) => {
  1538. if (items.id === item) {
  1539. arrays.push(items);
  1540. }
  1541. });
  1542. });
  1543. this.zhType = arrays;
  1544. },
  1545. eduChange() {
  1546. var array = [];
  1547. this.options2.map((item) => {
  1548. if (item.educationId === this.eduType) {
  1549. array.push(item);
  1550. }
  1551. });
  1552. this.itemOption2 = array;
  1553. this.handleCheckedCitiesChange();
  1554. },
  1555. initOptions() {
  1556. this.$api.inquireCourseEducationType({ status: 1 }).then((res) => {
  1557. var array = [];
  1558. res.rows.map((item) => {
  1559. array.push({ label: item.educationName, value: item.id });
  1560. });
  1561. this.options1 = array;
  1562. });
  1563. this.$api.inquirebusinessList({ status: 1 }).then((res) => {
  1564. this.courseProjectType = res.rows;
  1565. this.options2 = res.rows;
  1566. });
  1567. },
  1568. editInfo(v) {
  1569. this.addClick(v, 0);
  1570. },
  1571. search(int) {
  1572. this.loading = true;
  1573. if (int === 1) {
  1574. this.formData.pageNum = 1;
  1575. }
  1576. if (int === 2) {
  1577. this.formData = {
  1578. status: "0,1",
  1579. pageSize: 10,
  1580. pageNum: 1,
  1581. };
  1582. }
  1583. this.$api
  1584. .inquirebaseprofiletplist(this.formData)
  1585. .then((res) => {
  1586. this.tableData = res.rows;
  1587. this.total = res.total;
  1588. this.navText.index = res.total;
  1589. this.getActiveList();
  1590. })
  1591. .finally(() => {
  1592. this.loading = false;
  1593. });
  1594. },
  1595. init() {
  1596. this.search(2);
  1597. },
  1598. closeType(id) {
  1599. this.cauType.splice(this.cauType.indexOf(id), 1);
  1600. this.handleCheckedCitiesChange();
  1601. },
  1602. del(v) {
  1603. this.$alert(
  1604. "确定删除此内容?<br />内容删除后将无法恢复,请慎重考虑",
  1605. "提示",
  1606. {
  1607. dangerouslyUseHTMLString: true,
  1608. }
  1609. )
  1610. .then(() => {
  1611. var data = {
  1612. profileTpId: v.profileTpId,
  1613. status: -1,
  1614. };
  1615. this.$api.editbaseprofile(data).then((res) => {
  1616. this.$message.success("删除成功");
  1617. this.search();
  1618. });
  1619. })
  1620. .catch(() => {
  1621. this.$message({
  1622. type: "info",
  1623. message: "已取消删除",
  1624. });
  1625. });
  1626. },
  1627. addClick(v, int) {
  1628. if (v === undefined) {
  1629. this.statusPop = 1;
  1630. this.listData = {
  1631. status: 1,
  1632. keyValue: [],
  1633. keyValue2: [],
  1634. };
  1635. this.eduType = "";
  1636. this.cauType = [];
  1637. this.zhType = [];
  1638. } else {
  1639. this.statusPop = int;
  1640. this.listData = JSON.parse(JSON.stringify(v));
  1641. if (this.listData.keyValue) {
  1642. this.listData.keyValue = JSON.parse(this.listData.keyValue);
  1643. }
  1644. if (this.listData.keyValue2) {
  1645. this.listData.keyValue2 = JSON.parse(this.listData.keyValue2);
  1646. }
  1647. // if (this.listData.userIds) {
  1648. // this.listData.userIds = this.listData.userIds.split(",").map(Number);
  1649. // }
  1650. this.eduType = "";
  1651. var array = [];
  1652. v.businessList.map((items, indexs) => {
  1653. array.push(items.businessId);
  1654. });
  1655. this.cauType = array;
  1656. }
  1657. this.itemOption1 = JSON.parse(JSON.stringify(this.options1));
  1658. this.itemOption2 = JSON.parse(JSON.stringify(this.options2));
  1659. this.$nextTick(() => {
  1660. this.changeHeight = true;
  1661. this.$refs.listData.clearValidate();
  1662. });
  1663. this.dialogVisible = true;
  1664. },
  1665. submit(formName) {
  1666. this.$refs[formName].validate((valid) => {
  1667. if (valid) {
  1668. this.rulesTableSumbit();
  1669. } else {
  1670. return false;
  1671. }
  1672. });
  1673. },
  1674. rulesTableSumbit() {
  1675. this.disabledBtn = true;
  1676. var data = JSON.parse(JSON.stringify(this.listData));
  1677. var pushRays = [];
  1678. this.zhType.map((item) => {
  1679. pushRays.push({
  1680. businessId: item.id,
  1681. educationTypeId: item.educationId,
  1682. projectId: item.projectId,
  1683. });
  1684. });
  1685. data.businessList = pushRays;
  1686. data.keyValue = JSON.stringify(this.listData.keyValue);
  1687. data.keyValue2 = JSON.stringify(this.listData.keyValue2);
  1688. // data.userIds = this.listData.userIds.toString();
  1689. if (this.statusPop === 1) {
  1690. this.$api
  1691. .appbaseprofiletp(data)
  1692. .then((res) => {
  1693. this.$message.success("新增成功");
  1694. this.dialogVisible = false;
  1695. this.search();
  1696. })
  1697. .catch(() => {
  1698. this.disabledBtn = false;
  1699. });
  1700. }
  1701. if (this.statusPop === 0) {
  1702. this.$api
  1703. .editbaseprofile(data)
  1704. .then((res) => {
  1705. this.$message.success("修改成功");
  1706. this.dialogVisible = false;
  1707. this.search();
  1708. })
  1709. .catch(() => {
  1710. this.disabledBtn = false;
  1711. });
  1712. }
  1713. },
  1714. close() {
  1715. this.dialogVisible = false;
  1716. },
  1717. handleSizeChange(v) {
  1718. this.formData.pageSize = v;
  1719. this.formData.pageNum = 1;
  1720. this.search();
  1721. },
  1722. handleCurrentChange(v) {
  1723. this.formData.pageNum = v;
  1724. this.search();
  1725. },
  1726. handleSizeChange5(v) {
  1727. this.formData5.pageSize = v;
  1728. this.formData5.pageNum = 1;
  1729. this.getInfosCX();
  1730. },
  1731. handleCurrentChange5(v) {
  1732. this.formData5.pageNum = v;
  1733. this.getInfosCX();
  1734. },
  1735. },
  1736. };
  1737. </script>
  1738. <style lang="less" scoped>
  1739. .headerStys {
  1740. margin-bottom: 12px;
  1741. font-weight: bold;
  1742. font-size: 21px;
  1743. }
  1744. .bgcFFF {
  1745. background-color: #fff;
  1746. }
  1747. .dis_fls {
  1748. display: flex;
  1749. align-items: center;
  1750. justify-content: space-between;
  1751. }
  1752. .disos {
  1753. display: flex;
  1754. align-items: center;
  1755. justify-content: space-between;
  1756. margin-bottom: 6px;
  1757. }
  1758. .radiosty {
  1759. display: flex;
  1760. width: 16px;
  1761. height: 16px;
  1762. border: 1px solid #eee;
  1763. margin-right: 6px;
  1764. border-radius: 50%;
  1765. align-items: center;
  1766. justify-content: center;
  1767. .activeRadio {
  1768. transition: all 0.3s;
  1769. width: 10px;
  1770. height: 10px;
  1771. border-radius: 50%;
  1772. background-color: #409eff;
  1773. }
  1774. }
  1775. .disChild {
  1776. display: flex;
  1777. cursor: pointer;
  1778. align-items: center;
  1779. }
  1780. .checkSty {
  1781. display: inline-block;
  1782. margin-right: 6px;
  1783. width: 16px;
  1784. height: 16px;
  1785. border-radius: 2px;
  1786. border: 1px solid #eee;
  1787. }
  1788. .disable {
  1789. cursor: no-drop;
  1790. background-color: #f5f7fa !important;
  1791. color: #f5f7fa !important;
  1792. }
  1793. .dis_fs {
  1794. display: flex;
  1795. justify-content: space-between;
  1796. }
  1797. .fengs {
  1798. flex: 1;
  1799. border-left: 1px solid #999;
  1800. }
  1801. .autoFlex {
  1802. display: flex;
  1803. align-items: center;
  1804. justify-content: space-between;
  1805. border: 1px solid #eee;
  1806. padding: 0px 18px;
  1807. margin-bottom: 4px;
  1808. min-height: 50px;
  1809. .required {
  1810. color: brown;
  1811. margin-right: 6px;
  1812. }
  1813. }
  1814. .borstyflex {
  1815. border: 1px solid #eee;
  1816. padding: 0px 18px;
  1817. margin-bottom: 4px;
  1818. .imgs {
  1819. width: 280px;
  1820. height: 190px;
  1821. border: 1px solid #eee;
  1822. margin-bottom: 6px;
  1823. }
  1824. }
  1825. /deep/.el-button {
  1826. border-radius: 8px;
  1827. }
  1828. /deep/.el-dialog {
  1829. border-radius: 8px;
  1830. .el-dialog__header {
  1831. padding: 0;
  1832. .hearders {
  1833. height: 40px;
  1834. display: flex;
  1835. align-items: center;
  1836. justify-content: space-between;
  1837. padding: 0px 18px 0px 20px;
  1838. border-bottom: 1px solid #e2e2e2;
  1839. .leftTitle {
  1840. font-size: 14px;
  1841. font-weight: bold;
  1842. color: #2f4378;
  1843. }
  1844. .rightBoxs {
  1845. display: flex;
  1846. align-items: center;
  1847. img {
  1848. width: 14px;
  1849. height: 14px;
  1850. margin-left: 13px;
  1851. cursor: pointer;
  1852. }
  1853. }
  1854. }
  1855. }
  1856. .el-dialog__footer {
  1857. padding: 0;
  1858. .dialog-footer {
  1859. padding: 0px 40px;
  1860. height: 70px;
  1861. border-top: 1px solid #e2e2e2;
  1862. display: flex;
  1863. align-items: center;
  1864. justify-content: flex-end;
  1865. }
  1866. }
  1867. }
  1868. .imgBox {
  1869. width: 100%;
  1870. // height: 210px;
  1871. border: 1px solid #e2e2e2;
  1872. border-radius: 8px;
  1873. padding: 8px 8px 3px;
  1874. display: flex;
  1875. flex-direction: column;
  1876. align-items: center;
  1877. .imgLabel {
  1878. flex: 1;
  1879. width: 100%;
  1880. border: 1px dotted #e2e2e2;
  1881. color: #999;
  1882. font-size: 14px;
  1883. cursor: pointer;
  1884. border-radius: 8px;
  1885. .msPhoto {
  1886. display: flex;
  1887. justify-content: center;
  1888. align-items: center;
  1889. max-width: 100%;
  1890. max-height: 270px;
  1891. img {
  1892. max-width: 100%;
  1893. max-height: 270px;
  1894. }
  1895. }
  1896. .imgbbx {
  1897. display: flex;
  1898. flex-direction: column;
  1899. align-items: center;
  1900. justify-content: center;
  1901. width: 100%;
  1902. height: 100%;
  1903. i {
  1904. font-weight: bold;
  1905. margin: 14px 0;
  1906. font-size: 24px;
  1907. }
  1908. }
  1909. }
  1910. p {
  1911. margin: 5px 0px;
  1912. }
  1913. }
  1914. .checkboxSty {
  1915. max-height: 210px;
  1916. overflow: auto;
  1917. display: flex;
  1918. flex-direction: column;
  1919. }
  1920. .listBoxStys {
  1921. flex-shrink: 0;
  1922. padding: 0px 10px;
  1923. border-radius: 8px;
  1924. border: 1px solid #eee;
  1925. margin-right: 10px;
  1926. margin-bottom: 6px;
  1927. }
  1928. .closeIcons {
  1929. color: red;
  1930. cursor: pointer;
  1931. margin-left: 6px;
  1932. }
  1933. .ach {
  1934. display: flex;
  1935. align-items: center;
  1936. overflow: hidden;
  1937. }
  1938. .clh {
  1939. display: flex;
  1940. align-items: center;
  1941. flex-wrap: wrap;
  1942. }
  1943. .p_infos {
  1944. color: #999;
  1945. border-bottom: 1px dashed #eee;
  1946. padding-bottom: 6px;
  1947. }
  1948. .poters {
  1949. border-radius: 4px;
  1950. border: 1px solid #666;
  1951. background-color: #eee;
  1952. text-align: center;
  1953. height: 100px;
  1954. line-height: 100px;
  1955. color: #999;
  1956. margin-bottom: 6px;
  1957. }
  1958. </style>