searchBoxNew.vue 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073
  1. <template>
  2. <div id="searchBoxNew">
  3. <div class="inputListBox" v-if="topType">
  4. <div class="fon_s">商品类型:</div>
  5. <div>
  6. <el-button
  7. :type="formData.goodsType === item.value ? 'primary' : ''"
  8. :size="size"
  9. v-for="(item, index) in $methodsTools.getGoodsType(false)"
  10. :key="index"
  11. @click="topSearch(item.value)"
  12. >{{ item.label }}</el-button
  13. >
  14. </div>
  15. </div>
  16. <div class="inputListBox" v-if="pendingType">
  17. <div class="fon_s">审核状态:</div>
  18. <div>
  19. <el-button
  20. :type="formData.periodStatus === item.value ? 'primary' : ''"
  21. :size="size"
  22. v-for="(item, index) in pendlists"
  23. :key="index"
  24. @click="topPendingType(item.value)"
  25. >{{ item.label }}</el-button
  26. >
  27. </div>
  28. </div>
  29. <div class="inputListBox" v-if="classStatus">
  30. <div class="fon_s">开班状态:</div>
  31. <div>
  32. <el-button
  33. :type="formData.classStatus === item.value ? 'primary' : ''"
  34. :size="size"
  35. v-for="(item, index) in classType"
  36. :key="index"
  37. @click="topClassType(item.value)"
  38. >{{ item.label }}</el-button
  39. >
  40. </div>
  41. </div>
  42. <div class="inputListBox" v-if="shType">
  43. <div class="fon_s">审核状态:</div>
  44. <div>
  45. <el-button
  46. :type="formData.status === item.value ? 'primary' : ''"
  47. :size="size"
  48. v-for="(item, index) in lists5"
  49. :key="index"
  50. @click="topSearchsh(item.value)"
  51. >{{ item.label }}</el-button
  52. >
  53. </div>
  54. </div>
  55. <div class="inputListBox" v-if="hoursType">
  56. <div class="fon_s">审核状态:</div>
  57. <div>
  58. <el-button
  59. :type="formData.periodStatus === item.value ? 'primary' : ''"
  60. :size="size"
  61. v-for="(item, index) in lists6"
  62. :key="index"
  63. @click="topHoursSearchsh(item.value)"
  64. >{{ item.label }}</el-button
  65. >
  66. </div>
  67. </div>
  68. <!-- <div class="inputListBox" v-if="classType">
  69. <div>
  70. <el-button
  71. :type="formData.goodsType === item.value ? 'primary' : ''"
  72. :size="size"
  73. v-for="(item, index) in classLists"
  74. :key="index"
  75. @click="classSearch(item.value)"
  76. >{{ item.label }}</el-button
  77. >
  78. </div>
  79. </div> -->
  80. <div class="inputListBoxs">
  81. <div class="fon_sIcon" v-if="redIcon">
  82. <el-tooltip
  83. effect="light"
  84. class="item"
  85. content="该页面中的数据查询,针对的是「有效、有课程内容」的视频商品"
  86. placement="bottom-start"
  87. >
  88. <i class="el-icon-warning-outline iconStyS"></i>
  89. </el-tooltip>
  90. </div>
  91. <div
  92. class="fon_s"
  93. style="padding-top: 10px; width: 70px; text-align: end"
  94. v-else-if="!remarkStatus"
  95. >
  96. 筛选:
  97. </div>
  98. <el-form
  99. @submit.native.prevent="() => {}"
  100. :inline="true"
  101. :model="formData"
  102. class="tsxnz demo-form-inline"
  103. >
  104. <el-form-item
  105. v-for="(item, index) in formListComput(formList)"
  106. :key="index"
  107. :label="item.label"
  108. >
  109. <!-- 教育类型 -->
  110. <el-select
  111. v-if="item.scope === 'educationType'"
  112. v-model="formData[item.prop]"
  113. :placeholder="item.placeholder"
  114. :size="size"
  115. @change="changeEducationType"
  116. >
  117. <el-option
  118. v-for="(items, indexs) in educationType"
  119. v-show="
  120. !item.filter ||
  121. (item.filter && items.educationName === '继续教育')
  122. "
  123. :key="indexs"
  124. :label="items.educationName"
  125. :value="items.id"
  126. ></el-option>
  127. </el-select>
  128. <!-- 项目类型 -->
  129. <el-select
  130. v-else-if="item.scope === 'projectLevel'"
  131. v-model="formData[item.prop]"
  132. :placeholder="item.placeholder"
  133. :size="size"
  134. >
  135. <el-option
  136. v-for="(items, indexs) in newProjectLevel"
  137. :key="indexs"
  138. :label="items.projectName"
  139. :value="items.id"
  140. ></el-option>
  141. </el-select>
  142. <!-- 业务层次 -->
  143. <el-select
  144. v-else-if="item.scope === 'businessLevel'"
  145. v-model="formData[item.prop]"
  146. :placeholder="item.placeholder"
  147. :size="size"
  148. @change="changeBusinessLevel($event)"
  149. >
  150. <el-option
  151. v-for="(items, indexs) in newBusinessLevel"
  152. :key="indexs"
  153. v-show="
  154. !item.filter ||
  155. (item.filter &&
  156. (items.projectName === '造价师' ||
  157. items.projectName === '建造师') &&
  158. items.businessName === '二级')
  159. "
  160. :label="items.projectName + '-' + items.businessName"
  161. :value="items.id"
  162. ></el-option>
  163. </el-select>
  164. <!-- 院校 -->
  165. <el-select
  166. v-else-if="item.scope === 'schoolList'"
  167. v-model="formData[item.prop]"
  168. :placeholder="item.placeholder"
  169. :size="size"
  170. >
  171. <el-option
  172. v-for="(items, indexs) in newSchoolList"
  173. :key="indexs"
  174. :label="items.schoolName"
  175. :value="items.id"
  176. ></el-option>
  177. </el-select>
  178. <el-select
  179. v-else-if="item.scope === 'distributionList'"
  180. clearable
  181. v-model="formData[item.prop]"
  182. :placeholder="item.placeholder"
  183. :size="size"
  184. >
  185. <el-option
  186. v-for="(items, indexs) in distributionList"
  187. :key="indexs"
  188. :label="items.name"
  189. :value="items.distributionId"
  190. ></el-option>
  191. </el-select>
  192. <!-- 专业-根据教育类型筛选 -->
  193. <el-select
  194. v-else-if="item.scope === 'Professional'"
  195. v-model="formData[item.prop]"
  196. :placeholder="item.placeholder"
  197. :size="size"
  198. >
  199. <el-option
  200. v-for="(items, indexs) in newProfessional"
  201. :key="indexs"
  202. :label="items.categoryName"
  203. :value="items.id"
  204. ></el-option>
  205. </el-select>
  206. <!-- 专业 -->
  207. <el-select
  208. v-else-if="item.scope === 'ProfessionalList'"
  209. v-model="formData[item.prop]"
  210. :placeholder="item.placeholder"
  211. :size="size"
  212. >
  213. <el-option
  214. v-for="(items, indexs) in Professional"
  215. :key="indexs"
  216. :label="items.categoryName"
  217. :value="items.id"
  218. ></el-option>
  219. </el-select>
  220. <!-- 科目 -->
  221. <el-select
  222. v-else-if="item.scope === 'sujectType'"
  223. v-model="formData[item.prop]"
  224. :placeholder="item.placeholder"
  225. :size="size"
  226. >
  227. <el-option
  228. v-for="(items, indexs) in newSujectType"
  229. :key="indexs"
  230. :label="items.subjectName"
  231. :value="items.id"
  232. ></el-option>
  233. </el-select>
  234. <!-- 题目类型 -->
  235. <el-select
  236. v-else-if="item.scope === 'selectBank'"
  237. v-model="formData[item.prop]"
  238. :placeholder="item.placeholder"
  239. :size="size"
  240. >
  241. <el-option
  242. v-for="(items, indexs) in optionsBank"
  243. :key="indexs"
  244. :label="items.label"
  245. :value="items.value"
  246. ></el-option>
  247. </el-select>
  248. <!-- 试卷类型 -->
  249. <el-select
  250. v-else-if="item.scope === 'paperType'"
  251. v-model="formData[item.prop]"
  252. :placeholder="item.placeholder"
  253. :size="size"
  254. >
  255. <el-option
  256. v-for="(items, indexs) in paperType"
  257. :key="indexs"
  258. :label="items.label"
  259. :value="items.value"
  260. ></el-option>
  261. </el-select>
  262. <!-- 证书类型 -->
  263. <el-select
  264. v-else-if="item.scope === 'certificate'"
  265. v-model="formData[item.prop]"
  266. :placeholder="item.placeholder"
  267. :size="size"
  268. >
  269. <el-option
  270. v-for="(items, indexs) in certificate"
  271. :key="indexs"
  272. :label="items.certificateName"
  273. :value="items.id"
  274. ></el-option>
  275. </el-select>
  276. <!-- 考试标题 -->
  277. <el-select
  278. v-else-if="item.scope === 'examLists'"
  279. v-model="formData[item.prop]"
  280. :placeholder="item.placeholder"
  281. :size="size"
  282. >
  283. <el-option
  284. v-for="(items, indexs) in examLists"
  285. :key="indexs"
  286. :label="items.applyName"
  287. :value="items.applyId"
  288. ></el-option>
  289. </el-select>
  290. <!-- 考试标题:只显示已启用 -->
  291. <el-select
  292. v-else-if="item.scope === 'examList'"
  293. v-model="formData[item.prop]"
  294. :placeholder="item.placeholder"
  295. :size="size"
  296. >
  297. <el-option
  298. v-for="(items, indexs) in examList"
  299. :key="indexs"
  300. :label="items.applyName"
  301. :value="items.applyId"
  302. ></el-option>
  303. </el-select>
  304. <!-- 考试地点 -->
  305. <el-select
  306. v-else-if="item.scope === 'applySiteAddress'"
  307. v-model="formData[item.prop]"
  308. :placeholder="item.placeholder"
  309. :size="size"
  310. >
  311. <el-option
  312. v-for="(items, indexs) in applySiteAddress"
  313. :key="indexs"
  314. :label="items.siteAddress"
  315. :value="item.getType === 1 ? items.siteAddress : items.siteId"
  316. ></el-option>
  317. </el-select>
  318. <!-- 考试地点:手动过滤 -->
  319. <el-select
  320. v-else-if="item.scope === 'applySiteAddressX'"
  321. v-model="formData[item.prop]"
  322. :placeholder="item.placeholder"
  323. :size="size"
  324. >
  325. <el-option
  326. v-for="(items, indexs) in applySiteAddressX"
  327. :key="indexs"
  328. :label="items.siteAddress"
  329. :value="item.getType === 1 ? items.siteAddress : items.siteId"
  330. ></el-option>
  331. </el-select>
  332. <!-- 前培标题:只显示启用 -->
  333. <el-select
  334. v-else-if="item.scope === 'beforeList'"
  335. v-model="formData[item.prop]"
  336. :placeholder="item.placeholder"
  337. :size="size"
  338. >
  339. <el-option
  340. v-for="(items, indexs) in beforeList"
  341. :key="indexs"
  342. :label="items.beforeName"
  343. :value="items.beforeId"
  344. ></el-option>
  345. </el-select>
  346. <!-- 前培标题 -->
  347. <el-select
  348. v-else-if="item.scope === 'beforeLists'"
  349. v-model="formData[item.prop]"
  350. :placeholder="item.placeholder"
  351. :size="size"
  352. >
  353. <el-option
  354. v-for="(items, indexs) in beforeLists"
  355. :key="indexs"
  356. :label="items.beforeName"
  357. :value="items.beforeId"
  358. ></el-option>
  359. </el-select>
  360. <!-- 自定义select -->
  361. <el-select
  362. :clearable="item.noClear === false ? false : true"
  363. v-else-if="item.scope === 'select'"
  364. v-model="formData[item.prop]"
  365. :placeholder="item.placeholder"
  366. :size="size"
  367. >
  368. <el-option
  369. v-for="(items, indexs) in item.options"
  370. :key="indexs"
  371. :label="items.label"
  372. :value="items.value"
  373. :disabled="items.disable"
  374. ></el-option>
  375. </el-select>
  376. <div v-else-if="item.scope === 'numList'">
  377. <el-select
  378. clearable
  379. filterable
  380. style="width: 120px"
  381. v-model="formData[item.prop1]"
  382. :placeholder="item.placeholder1"
  383. >
  384. <el-option
  385. v-for="(items, index) in 101"
  386. :key="index"
  387. :label="index"
  388. :value="index"
  389. :disabled="comNum(index, formData[item.prop2], true)"
  390. >
  391. </el-option>
  392. </el-select>
  393. -
  394. <el-select
  395. clearable
  396. filterable
  397. style="width: 120px"
  398. v-model="formData[item.prop2]"
  399. :placeholder="item.placeholder2"
  400. >
  401. <el-option
  402. v-for="(items, index) in 101"
  403. :key="index"
  404. :label="index"
  405. :value="index"
  406. :disabled="comNum(index, formData[item.prop1])"
  407. >
  408. </el-option>
  409. </el-select>
  410. </div>
  411. <el-input-number
  412. v-else-if="item.scope === 'inputNumber'"
  413. v-model="formData[item.prop]"
  414. controls-position="right"
  415. :min="0"
  416. :max="100"
  417. :size="size"
  418. ></el-input-number>
  419. <el-input
  420. v-else-if="item.scope === 'textarea' && formData[item.prop]"
  421. type="textarea"
  422. :size="size"
  423. readonly
  424. :rows="3"
  425. placeholder="请输入身份证"
  426. v-model="formData[item.prop]"
  427. >
  428. </el-input>
  429. <el-cascader
  430. v-else-if="item.scope === 'cascader'"
  431. v-model="formData[item.prop]"
  432. :options="item.options"
  433. :size="size"
  434. :props="{
  435. label: item.props.label,
  436. value: item.props.value,
  437. checkStrictly: true,
  438. emitPath: false,
  439. }"
  440. ></el-cascader>
  441. <el-cascader
  442. v-else-if="item.scope === 'cascaderDZ'"
  443. v-model="formData[item.prop]"
  444. :options="item.options"
  445. :size="size"
  446. :props="{
  447. label: item.props.label,
  448. value: item.props.value,
  449. checkStrictly: true,
  450. emitPath: false,
  451. }"
  452. clearable
  453. ></el-cascader>
  454. <el-date-picker
  455. v-else-if="item.scope === 'datePicker'"
  456. v-model="formData[item.prop]"
  457. type="datetimerange"
  458. :picker-options="pickerOptions"
  459. range-separator="至"
  460. start-placeholder="开始日期"
  461. end-placeholder="结束日期"
  462. align="right"
  463. :size="size"
  464. value-format="timestamp"
  465. >
  466. </el-date-picker>
  467. <el-date-picker
  468. v-else-if="item.scope === 'datePickerA'"
  469. v-model="formData[item.prop]"
  470. type="datetime"
  471. :size="size"
  472. :placeholder="item.placeholder"
  473. value-format="timestamp"
  474. >
  475. </el-date-picker>
  476. <div v-else-if="item.scope === 'moreDataPicker'">
  477. <el-date-picker
  478. v-model="formData[item.prop1]"
  479. :type="item.Diszing ? 'datetime' : 'date'"
  480. value-format="timestamp"
  481. :size="size"
  482. :placeholder="item.placeholder1"
  483. @change="change1(item.prop1, item.prop2)"
  484. >
  485. </el-date-picker>
  486. <el-date-picker
  487. style="margin-left: 10px"
  488. v-model="formData[item.prop2]"
  489. :type="item.Diszing ? 'datetime' : 'date'"
  490. :size="size"
  491. value-format="timestamp"
  492. :placeholder="item.placeholder2"
  493. @change="change2(item.prop1, item.prop2)"
  494. >
  495. </el-date-picker>
  496. </div>
  497. <slot v-else-if="item.scope === 'slot'" :name="item.slotName"></slot>
  498. <el-input
  499. :style="item.prop === 'searchKey' ? 'width:260px;' : ''"
  500. v-else-if="!item.scope"
  501. clearable
  502. v-model.trim="formData[item.prop]"
  503. :placeholder="item.placeholder"
  504. :size="size"
  505. @keyup.enter.native="search"
  506. ></el-input>
  507. </el-form-item>
  508. <el-form-item>
  509. <el-button
  510. v-if="advanced"
  511. :size="size"
  512. type="success"
  513. @click="emitAdvanced"
  514. >{{ advancedName }}</el-button
  515. >
  516. <el-button :size="size" type="primary" @click="search"
  517. >查询</el-button
  518. >
  519. <el-button :size="size" @click="init">重置</el-button>
  520. <slot name="customize"></slot>
  521. </el-form-item>
  522. </el-form>
  523. </div>
  524. </div>
  525. </template>
  526. <script>
  527. import { mapGetters } from "vuex";
  528. import handout from "../newApi/handout";
  529. export default {
  530. props: [
  531. "formList",
  532. "topType",
  533. "pendingType",
  534. "formData",
  535. "shType",
  536. "hoursType",
  537. "redIcon",
  538. "advanced",
  539. "advancedName",
  540. "classStatus",
  541. "remarkStatus"
  542. ], //参考文档 component.md
  543. data() {
  544. return {
  545. tireStatus: "", //当前选择的教育类型tireStatus
  546. lists: [
  547. {
  548. label: "全部",
  549. value: "",
  550. },
  551. {
  552. label: "视频",
  553. value: 1,
  554. },
  555. {
  556. label: "题库",
  557. value: 2,
  558. },
  559. {
  560. label: "补考",
  561. value: 3,
  562. },
  563. {
  564. label: "前培",
  565. value: 4,
  566. },
  567. ],
  568. classType: [
  569. {
  570. label: "全部",
  571. value: "",
  572. },
  573. {
  574. label: "已开班",
  575. value: 1,
  576. },
  577. {
  578. label: "预报名(未开班)",
  579. value: 0,
  580. },
  581. ],
  582. pendlists: [
  583. {
  584. label: "初审",
  585. value: 0,
  586. },
  587. {
  588. label: "复审",
  589. value: "1,2",
  590. },
  591. {
  592. label: "不通过",
  593. value: "-1,-2",
  594. },
  595. {
  596. label: "已通过",
  597. value: 3,
  598. },
  599. ],
  600. lists5: [
  601. {
  602. label: "全部",
  603. value: "",
  604. },
  605. {
  606. label: "待审核",
  607. value: 2,
  608. },
  609. {
  610. label: "不通过",
  611. value: 3,
  612. },
  613. {
  614. label: "通过",
  615. value: 1,
  616. },
  617. ],
  618. lists6: [
  619. {
  620. label: "待审核",
  621. value: 2,
  622. },
  623. {
  624. label: "审核中",
  625. value: 3,
  626. },
  627. ],
  628. // classLists: [
  629. // {
  630. // label: "全部",
  631. // value: "",
  632. // },
  633. // {
  634. // label: "二建继教",
  635. // value: 1,
  636. // },
  637. // {
  638. // label: "七大员继教",
  639. // value: 2,
  640. // },
  641. // {
  642. // label: "七大员新考",
  643. // value: 3,
  644. // },
  645. // ],
  646. paperType: [
  647. {
  648. label: "发布",
  649. value: 1,
  650. },
  651. {
  652. label: "未发布",
  653. value: 0,
  654. },
  655. ],
  656. optionsBank: [
  657. {
  658. label: "单选题",
  659. value: 1,
  660. },
  661. {
  662. label: "多选题",
  663. value: 2,
  664. },
  665. {
  666. label: "判断题",
  667. value: 3,
  668. },
  669. {
  670. label: "案例题",
  671. value: 4,
  672. },
  673. {
  674. label: "简答题",
  675. value: 5,
  676. },
  677. ], //题目类型
  678. size: "small", //输入框尺寸类型
  679. newProjectLevel: [], //项目类型-筛选后的数据
  680. newBusinessLevel: [], //业务层次-筛选后的数据
  681. newSchoolList: [], //院校-筛选后的数据
  682. newProfessional: [], //专业-筛选后的数据
  683. newSujectType: [], //科目-筛选后的数据
  684. applySiteAddressX: [], //考试地点-根据考试计划过滤而来
  685. pickerOptions: {
  686. //日期选择器近期功能
  687. shortcuts: [
  688. {
  689. text: "最近一周",
  690. onClick(picker) {
  691. const end = new Date();
  692. const start = new Date();
  693. start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
  694. picker.$emit("pick", [start, end]);
  695. },
  696. },
  697. {
  698. text: "最近一个月",
  699. onClick(picker) {
  700. const end = new Date();
  701. const start = new Date();
  702. start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
  703. picker.$emit("pick", [start, end]);
  704. },
  705. },
  706. {
  707. text: "最近三个月",
  708. onClick(picker) {
  709. const end = new Date();
  710. const start = new Date();
  711. start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
  712. picker.$emit("pick", [start, end]);
  713. },
  714. },
  715. ],
  716. },
  717. };
  718. },
  719. computed: {
  720. ...mapGetters([
  721. "educationType",
  722. "Professional",
  723. "examList",
  724. "examLists",
  725. "beforeList",
  726. "beforeLists",
  727. "applySiteAddress",
  728. "certificate",
  729. "distributionList",
  730. ]),
  731. comNum: function () {
  732. return function (index, num, status) {
  733. if (status) {
  734. if (index > num) {
  735. return true;
  736. } else {
  737. return false;
  738. }
  739. } else {
  740. if (index < num) {
  741. return true;
  742. } else {
  743. return false;
  744. }
  745. }
  746. };
  747. },
  748. /**
  749. * @remarks 过滤选择器列表
  750. */
  751. formListComput: function () {
  752. return function (item) {
  753. var newOption = JSON.parse(JSON.stringify(item));
  754. const arrsy = newOption.filter((items) => {
  755. if (
  756. items.scope === "businessLevel" ||
  757. items.scope === "schoolList" ||
  758. items.scope === "Professional" ||
  759. items.scope === "sujectType"
  760. ) {
  761. if (!this.formData[items.edu]) {
  762. } else {
  763. if (this.educationType) {
  764. const indexType = this.educationType.findIndex((its) => {
  765. return its.id === this.formData[items.edu];
  766. });
  767. if (
  768. items.scope === "businessLevel" &&
  769. this.educationType[indexType].tireStatus.indexOf("2") !== -1
  770. ) {
  771. return items;
  772. }
  773. if (
  774. items.scope === "schoolList" &&
  775. this.educationType[indexType].tireStatus.indexOf("3") !==
  776. -1 &&
  777. this.formData["businessId"]
  778. ) {
  779. return items;
  780. }
  781. if (
  782. items.scope === "Professional" &&
  783. this.educationType[indexType].tireStatus.indexOf("4") !==
  784. -1 &&
  785. this.formData["businessId"]
  786. ) {
  787. return items;
  788. }
  789. if (
  790. items.scope === "sujectType" &&
  791. this.formData["businessId"]
  792. ) {
  793. return items;
  794. }
  795. }
  796. }
  797. } else {
  798. if (items.diff === "gfxs") {
  799. if (
  800. this.formData["studyStatus"] == 2 &&
  801. this.formData["periodStatus"] == 1
  802. ) {
  803. return items;
  804. }
  805. } else if (items.diff === "ksdd") {
  806. if (this.formData["applyId"]) {
  807. return items;
  808. }
  809. } else if (items.scope === "projectLevel") {
  810. if (this.formData["educationId"]) {
  811. return items;
  812. }
  813. } else {
  814. return items;
  815. }
  816. }
  817. });
  818. return arrsy;
  819. };
  820. },
  821. },
  822. watch: {
  823. /**
  824. *
  825. * @param {Number} val
  826. * @remards 考试计划监听-获取对应考试地点
  827. */
  828. "formData.applyId"(val) {
  829. const Astatus = this.formList.some((item) => {
  830. return item.scope === "applySiteAddressX";
  831. });
  832. if (Astatus) {
  833. this.getChangeAdress(val);
  834. if (this.formData.applySiteAddress) {
  835. this.formData.applySiteAddress = "";
  836. }
  837. }
  838. },
  839. },
  840. methods: {
  841. /**
  842. * 手动过滤考试地点
  843. */
  844. getChangeAdress(id) {
  845. this.$api
  846. .inquirepayservesiteInfo({
  847. applyId: id,
  848. addressStatus: 1,
  849. })
  850. .then((res) => {
  851. this.applySiteAddressX = res.rows;
  852. });
  853. },
  854. /**
  855. * @remark 高级搜索
  856. */
  857. emitAdvanced() {
  858. this.$emit("Advanced", this.formData);
  859. },
  860. /**
  861. *
  862. * @param {int} data1
  863. * @param {int} data2
  864. * @remark 日期搜索-时间开始选择器触发
  865. */
  866. change1(data1, data2) {
  867. if (this.formData[data1]) {
  868. if (
  869. this.formData[data2] &&
  870. this.formData[data1] > this.formData[data2]
  871. ) {
  872. this.formData[data1] = "";
  873. this.$message.warning("开始时间不能大于结束时间,请重新选择开始时间");
  874. }
  875. }
  876. },
  877. /**
  878. *
  879. * @param {int} data1
  880. * @param {int} data2
  881. * @remark 日期搜索-时间结束选择器触发
  882. */
  883. change2(data1, data2) {
  884. if (this.formData[data2]) {
  885. if (
  886. this.formData[data1] &&
  887. this.formData[data2] < this.formData[data1]
  888. ) {
  889. this.formData[data2] = "";
  890. this.$message.warning("结束时间不能小于开始时间,请重新选择结束时间");
  891. }
  892. }
  893. },
  894. /**
  895. *
  896. * @param {int} status
  897. * @remark 顶部定制按钮-根据商品类型点击快速搜索
  898. */
  899. topSearch(status) {
  900. this.formData.goodsType = status;
  901. this.$emit("search", 3);
  902. },
  903. /**
  904. *
  905. * @param {int} status
  906. * @remark 顶部定制按钮-根据审核状态类型点击快速搜索
  907. */
  908. topPendingType(status) {
  909. this.formData.periodStatus = status;
  910. this.$emit("search", 4);
  911. },
  912. /**
  913. *
  914. * @param {int} status
  915. * @remark 顶部定制按钮-根据审核状态类型点击快速搜索
  916. */
  917. topClassType(status) {
  918. this.formData.classStatus = status;
  919. this.$emit("search", 4);
  920. },
  921. /**
  922. *
  923. * @param {int} status
  924. * @remark 顶部定制按钮-根据审核状态点击快速搜索
  925. */
  926. topSearchsh(types) {
  927. this.formData.status = types;
  928. this.$emit("search", 3);
  929. },
  930. /**
  931. *
  932. * @param {int} status
  933. * @remark 顶部定制按钮-根据学时审核状态点击快速搜索
  934. */
  935. topHoursSearchsh(types) {
  936. this.formData.periodStatus = types;
  937. this.$emit("search", 2);
  938. },
  939. /**
  940. * @remark 搜索
  941. */
  942. search() {
  943. this.$emit("search", 1);
  944. },
  945. /**
  946. * @remark 重置
  947. */
  948. init() {
  949. this.$emit("init");
  950. },
  951. /**
  952. *
  953. * @param {int} id
  954. * @param {bool} status1 //是否不清空业务层级
  955. * @remark 点击教育类型触发事件
  956. */
  957. changeEducationType(id, status1) {
  958. if (!id) {
  959. return;
  960. }
  961. const indexs = this.educationType.findIndex((item) => {
  962. return item.id === id;
  963. });
  964. this.tireStatus = this.educationType[indexs].tireStatus;
  965. if (!status1) {
  966. if (this.formData.projectId) {
  967. this.formData.projectId = "";
  968. }
  969. if (this.formData.businessId) {
  970. this.formData.businessId = "";
  971. }
  972. }
  973. if (this.formData.subjectId) {
  974. this.formData.subjectId = "";
  975. }
  976. this.$api
  977. .inquireCourseProjectType({ status: 1, educationId: id })
  978. .then((res) => {
  979. this.newProjectLevel = res.rows;
  980. });
  981. this.$api
  982. .inquirebusinessList({ status: 1, educationId: id })
  983. .then((res) => {
  984. this.newBusinessLevel = res.rows;
  985. });
  986. if (!status1) {
  987. this.$api
  988. .inquireCourseSubject({ status: 1, educationId: id })
  989. .then((res) => {
  990. this.newSujectType = res.rows;
  991. });
  992. }
  993. },
  994. /**
  995. *
  996. * @param {int} id
  997. * @remark 点击业务层次触发事件
  998. */
  999. changeBusinessLevel(v) {
  1000. if (this.formData.schoolId) {
  1001. this.formData.schoolId = "";
  1002. }
  1003. this.$api.inquireUserSchool({ status: 1, businessId: v }).then((res) => {
  1004. this.newSchoolList = res.rows;
  1005. });
  1006. if (this.formData.majorId) {
  1007. this.formData.majorId = "";
  1008. }
  1009. this.$api.inquireCourseMajor({ status: 1, businessId: v }).then((res) => {
  1010. this.newProfessional = res.rows;
  1011. });
  1012. if (this.formData.subjectId) {
  1013. this.formData.subjectId = "";
  1014. }
  1015. this.$api
  1016. .inquireCourseSubject({ status: 1, businessId: v })
  1017. .then((res) => {
  1018. this.newSujectType = res.rows;
  1019. });
  1020. },
  1021. /**
  1022. * 外部调用-商品新增编辑页
  1023. */
  1024. changeSuject(v) {
  1025. if (v) {
  1026. this.$api
  1027. .inquireCourseSubject({ status: 1, projectId: v })
  1028. .then((res) => {
  1029. this.newSujectType = res.rows;
  1030. });
  1031. } else {
  1032. this.newSujectType = [];
  1033. }
  1034. },
  1035. },
  1036. };
  1037. </script>
  1038. <style lang="less" scoped>
  1039. .fon_s {
  1040. font-size: 14px;
  1041. color: #6b6b6b;
  1042. }
  1043. .fon_sIcon {
  1044. width: 50px;
  1045. display: flex;
  1046. align-items: center;
  1047. justify-content: center;
  1048. }
  1049. .iconStyS {
  1050. font-size: 24px;
  1051. font-weight: bold;
  1052. color: red;
  1053. }
  1054. .inputListBox {
  1055. display: flex;
  1056. align-items: center;
  1057. margin-bottom: 12px;
  1058. }
  1059. .inputListBoxs {
  1060. display: flex;
  1061. margin-bottom: 12px;
  1062. }
  1063. .tsxnz {
  1064. flex: 1;
  1065. /deep/ .el-form-item {
  1066. margin-bottom: 0px;
  1067. }
  1068. }
  1069. </style>