index.vue 64 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142
  1. <template>
  2. <div id="commodityManageMentEdit">
  3. <h5>商品信息</h5>
  4. <div class="boxsSTTs">
  5. <h5 class="fengs">基本信息</h5>
  6. <el-row :gutter="20">
  7. <el-col :span="12">
  8. <el-form
  9. label-position="right"
  10. label-width="120px"
  11. :model="listData"
  12. :rules="rules"
  13. ref="listData1"
  14. >
  15. <el-form-item label="商品类型" prop="goodsType">
  16. <el-select
  17. v-model="listData.goodsType"
  18. placeholder="请选择商品类型"
  19. >
  20. <el-option
  21. v-for="(item, index) in goodsTypeOptions"
  22. :key="index"
  23. :label="item.label"
  24. :value="item.value"
  25. >
  26. </el-option>
  27. </el-select>
  28. </el-form-item>
  29. <el-form-item label="商品名称" prop="goodsName">
  30. <el-input
  31. style="width: 300px"
  32. v-model="listData.goodsName"
  33. ></el-input>
  34. </el-form-item>
  35. <el-form-item label="学时" prop="classHours">
  36. <el-input
  37. class="numInputs"
  38. type="age"
  39. v-model.number="listData.classHours"
  40. ><template slot="append">分钟</template></el-input
  41. >
  42. </el-form-item>
  43. <el-form-item label="教育类型" prop="educationTypeId">
  44. <el-select
  45. v-model="listData.educationTypeId"
  46. placeholder="请选择教育类型"
  47. @change="changeEducationTypeId"
  48. >
  49. <el-option
  50. v-for="(item, index) in eduTypeOptions"
  51. :key="index"
  52. :label="item.educationName"
  53. :value="item.id"
  54. >
  55. </el-option>
  56. </el-select>
  57. </el-form-item>
  58. <el-form-item label="业务层次" prop="businessId">
  59. <el-select
  60. v-model="listData.businessId"
  61. placeholder="请选择业务层次"
  62. @change="changeBusinessId"
  63. >
  64. <el-option
  65. v-for="(item, index) in newCourTypeOptions"
  66. :key="index"
  67. :label="item.businessName"
  68. :value="item.id"
  69. >
  70. </el-option>
  71. </el-select>
  72. </el-form-item>
  73. <el-form-item
  74. label="院校"
  75. prop="schoolId"
  76. v-if="listData.businessId && avtives()"
  77. >
  78. <el-select v-model="listData.schoolId" placeholder="请选择院校">
  79. <el-option
  80. v-for="(item, index) in newSchoolOption"
  81. :key="index"
  82. :label="item.schoolName"
  83. :value="item.id"
  84. >
  85. </el-option>
  86. </el-select>
  87. </el-form-item>
  88. <el-form-item
  89. label="专业"
  90. prop="majorId"
  91. v-if="listData.businessId && avtivesMajor()"
  92. >
  93. <el-select v-model="listData.majorId" placeholder="请选择专业">
  94. <el-option
  95. v-for="(item, index) in newMajorOption"
  96. :key="index"
  97. :label="item.categoryName"
  98. :value="item.id"
  99. >
  100. </el-option>
  101. </el-select>
  102. </el-form-item>
  103. <!-- <el-form-item
  104. label="科目/类目"
  105. prop="subjectId"
  106. v-if="listData.businessId"
  107. >
  108. <el-select
  109. v-model="listData.subjectId"
  110. placeholder="请选择科目/类目"
  111. >
  112. <el-option
  113. v-for="(item, index) in newSujectOption"
  114. :key="index"
  115. :label="item.subjectName"
  116. :value="item.id"
  117. >
  118. </el-option>
  119. </el-select>
  120. </el-form-item> -->
  121. </el-form>
  122. </el-col>
  123. <el-col :span="12">
  124. <el-form label-position="right" label-width="120px" :model="listData">
  125. <el-form-item label="年份" prop="year">
  126. <el-date-picker
  127. v-model="listData.year"
  128. type="year"
  129. value-format="yyyy"
  130. placeholder="请选择年份"
  131. >
  132. </el-date-picker>
  133. </el-form-item>
  134. <el-form-item label="供应方(服务)" prop="supplyId">
  135. <el-select
  136. v-model="listData.supplyId"
  137. placeholder="请选择供应方(服务)"
  138. >
  139. <el-option
  140. v-for="(item, index) in supplyOption"
  141. :key="index"
  142. :label="item.supplyName"
  143. :value="item.supplyId"
  144. >
  145. </el-option>
  146. </el-select>
  147. </el-form-item>
  148. <el-form-item label="课程封面">
  149. <div class="imgBoxins">
  150. <img
  151. :src="$methodsTools.splitImgHost(listData.coverUrl)"
  152. alt=""
  153. />
  154. <div
  155. class="posimg"
  156. v-if="
  157. listData.coverUrl === null ||
  158. listData.coverUrl === '' ||
  159. listData.coverUrl === undefined
  160. "
  161. >
  162. <label for="uplose">
  163. <i class="el-icon-circle-plus-outline iconStsz"></i
  164. ></label>
  165. <input
  166. ref="file"
  167. type="file"
  168. style="display: none"
  169. id="uplose"
  170. @change="getImgFile"
  171. />
  172. <p>
  173. 注:请上传小于300kb,尺寸为750*440的图片,支持gif、jpg、jpeg、png等类型
  174. </p>
  175. </div>
  176. </div>
  177. <el-button
  178. v-if="
  179. listData.coverUrl !== null &&
  180. listData.coverUrl !== '' &&
  181. listData.coverUrl !== undefined
  182. "
  183. type="danger"
  184. size="mini"
  185. class="margin-top: 20px;"
  186. @click="clearImgs"
  187. >删除</el-button
  188. >
  189. </el-form-item>
  190. </el-form>
  191. </el-col>
  192. </el-row>
  193. <h5 class="fengs">商品价格和有效期</h5>
  194. <el-row :gutter="20">
  195. <el-col :span="12">
  196. <el-form
  197. label-position="right"
  198. label-width="120px"
  199. :model="listData"
  200. :rules="rulesMors"
  201. ref="listData2"
  202. >
  203. <el-form-item label="商品标准价格" prop="standPrice">
  204. <el-input class="numInputs" v-model="listData.standPrice"
  205. ><template slot="append">元</template></el-input
  206. >
  207. </el-form-item>
  208. <el-form-item label="商品最低价格" prop="lowestPrice">
  209. <el-input class="numInputs" v-model="listData.lowestPrice"
  210. ><template slot="append">元</template></el-input
  211. >
  212. </el-form-item>
  213. <el-form-item label="状态" prop="status">
  214. <el-radio-group v-model="listData.status">
  215. <el-radio :label="1">有效</el-radio>
  216. <el-radio :label="0">无效</el-radio>
  217. </el-radio-group>
  218. </el-form-item>
  219. <el-form-item label="商品有效期" prop="timeArrays">
  220. <el-date-picker
  221. v-model="listData.timeArrays"
  222. type="daterange"
  223. value-format="timestamp"
  224. range-separator="至"
  225. start-placeholder="开始日期"
  226. end-placeholder="结束日期"
  227. >
  228. </el-date-picker>
  229. </el-form-item>
  230. </el-form>
  231. </el-col>
  232. <el-col :span="12">
  233. <h5 style="margin-bottom: 10px">
  234. 商品标准价格明细表:
  235. <span class="clickSpan" @click="openBoxs(1)">添加</span>
  236. </h5>
  237. <el-table
  238. :data="listData.standPriceJson"
  239. show-summary
  240. border
  241. :header-cell-style="{
  242. 'background-color': '#eee',
  243. padding: '8px',
  244. color: '#333',
  245. }"
  246. >
  247. <el-table-column
  248. type="index"
  249. label="序号"
  250. width="80"
  251. align="center"
  252. >
  253. </el-table-column>
  254. <template v-for="(item, index) in tableSet">
  255. <el-table-column
  256. :width="item.width"
  257. :key="index"
  258. :label="item.label"
  259. align="center"
  260. :show-overflow-tooltip="true"
  261. header-align="center"
  262. :prop="item.prop"
  263. >
  264. <template slot-scope="scope">
  265. <span
  266. v-if="item.scope === 'editInfo'"
  267. @click="openBoxs(2, scope.row)"
  268. class="clickSpan"
  269. >{{ scope.row[item.prop] }}</span
  270. >
  271. <span v-else>{{ scope.row[item.prop] }}</span></template
  272. >
  273. </el-table-column></template
  274. >
  275. <el-table-column
  276. label="操作"
  277. align="center"
  278. fixed="right"
  279. width="100px"
  280. >
  281. <template slot-scope="scope">
  282. <el-button type="text" @click="delList(scope.row)"
  283. >删除</el-button
  284. >
  285. </template>
  286. </el-table-column>
  287. </el-table>
  288. </el-col>
  289. </el-row>
  290. <div v-if="listData.goodsType === 1">
  291. <h5 class="fengs">课程内容</h5>
  292. <div style="margin-bottom: 20px">
  293. <el-button @click="editAddBoxs" size="small">添加</el-button>
  294. <el-button
  295. @click="openSet"
  296. type="success"
  297. size="small"
  298. v-if="tableData.length"
  299. >试听设置</el-button
  300. >
  301. <el-button type="primary" @click="openJY" size="small"
  302. >关联讲义</el-button
  303. >
  304. </div>
  305. <el-table
  306. :data="tableData"
  307. border
  308. :header-cell-style="{
  309. 'background-color': '#eee',
  310. padding: '8px',
  311. color: '#333',
  312. }"
  313. :default-sort="{ prop: 'sort', order: 'ascending' }"
  314. >
  315. <template v-for="(item, index) in tableSetTSB">
  316. <el-table-column
  317. :width="item.width"
  318. :key="index"
  319. :label="item.label"
  320. align="center"
  321. :show-overflow-tooltip="true"
  322. header-align="center"
  323. :sortable="item.prop === 'sort'"
  324. sort-by="sort"
  325. :prop="item.prop"
  326. >
  327. <template slot-scope="scope">
  328. <span v-if="item.scope === 'types'">{{
  329. scope.row[item.prop] === 1
  330. ? "录播"
  331. : scope.row[item.prop] === 2
  332. ? "直播"
  333. : scope.row[item.prop] === 3
  334. ? "回放"
  335. : "未知"
  336. }}</span>
  337. <span v-else-if="item.scope === 'busin'">
  338. {{ scope.row[item.prop1] + " - " + scope.row[item.prop2] }}
  339. </span>
  340. <span v-else-if="item.scope === 'Status'">
  341. {{
  342. scope.row[item.prop] === 1
  343. ? "发布"
  344. : scope.row[item.prop] === 0
  345. ? "未发布"
  346. : "未知"
  347. }}
  348. </span>
  349. <div v-else-if="item.scope === 'inputs'">
  350. <el-input-number
  351. style="width: 50px"
  352. size="small"
  353. :controls="false"
  354. v-model="scope.row[item.prop]"
  355. controls-position="right"
  356. :min="0"
  357. ></el-input-number>
  358. </div>
  359. <span v-else>{{ scope.row[item.prop] }}</span></template
  360. >
  361. </el-table-column></template
  362. >
  363. <el-table-column
  364. label="操作"
  365. align="center"
  366. fixed="right"
  367. width="100px"
  368. >
  369. <template slot-scope="scope">
  370. <el-button type="text" @click="del(scope.row, scope.$index)"
  371. >删除</el-button
  372. >
  373. </template>
  374. </el-table-column>
  375. </el-table>
  376. </div>
  377. <div v-if="listData.goodsType === 2">
  378. <h5 class="fengs">题卷内容</h5>
  379. <div style="margin-bottom: 20px">
  380. <el-button @click="changeOptionsType2" size="small">添加</el-button>
  381. <el-button
  382. @click="openSetTK"
  383. type="success"
  384. size="small"
  385. v-if="tableData2.length"
  386. >试做设置</el-button
  387. >
  388. </div>
  389. <el-table
  390. :data="tableData2"
  391. border
  392. :header-cell-style="{
  393. 'background-color': '#eee',
  394. padding: '8px',
  395. color: '#333',
  396. }"
  397. :default-sort="{ prop: 'sort', order: 'ascending' }"
  398. >
  399. <template v-for="(item, index) in tableSetTSB2">
  400. <el-table-column
  401. :width="item.width"
  402. :key="index"
  403. :label="item.label"
  404. align="center"
  405. :show-overflow-tooltip="true"
  406. header-align="center"
  407. :sortable="item.prop === 'sort'"
  408. sort-by="sort"
  409. :prop="item.prop"
  410. >
  411. <template slot-scope="scope">
  412. <span v-if="item.scope === 'types'">{{
  413. scope.row[item.prop] === 1
  414. ? "录播"
  415. : scope.row[item.prop] === 2
  416. ? "直播"
  417. : scope.row[item.prop] === 3
  418. ? "回放"
  419. : "未知"
  420. }}</span>
  421. <span v-else-if="item.scope === 'type'">
  422. {{
  423. scope.row[item.prop] === 1
  424. ? "模块卷"
  425. : scope.row[item.prop] === 2
  426. ? "章卷"
  427. : scope.row[item.prop] === 3
  428. ? "试卷"
  429. : "未知"
  430. }}
  431. </span>
  432. <span v-else-if="item.scope === 'busin'">
  433. {{ scope.row[item.prop1] + " - " + scope.row[item.prop2] }}
  434. </span>
  435. <span v-else-if="item.scope === 'Status'">
  436. {{
  437. scope.row[item.prop] === 1
  438. ? "发布"
  439. : scope.row[item.prop] === 0
  440. ? "未发布"
  441. : "未知"
  442. }}
  443. </span>
  444. <div v-else-if="item.scope === 'inputs'">
  445. <el-input-number
  446. style="width: 50px"
  447. size="small"
  448. :controls="false"
  449. v-model="scope.row[item.prop]"
  450. controls-position="right"
  451. :min="0"
  452. ></el-input-number>
  453. </div>
  454. <span v-else>{{ scope.row[item.prop] }}</span></template
  455. >
  456. </el-table-column></template
  457. >
  458. <el-table-column
  459. label="操作"
  460. align="center"
  461. fixed="right"
  462. width="100px"
  463. >
  464. <template slot-scope="scope">
  465. <el-button type="text" @click="del2(scope.row, scope.$index)"
  466. >删除</el-button
  467. >
  468. </template>
  469. </el-table-column>
  470. </el-table>
  471. </div>
  472. <h5 class="fengs">颁发证书</h5>
  473. <div class="dis_fs">
  474. <el-popover placement="bottom" trigger="click">
  475. <el-checkbox-group v-model="listData.certificateIds">
  476. <el-checkbox
  477. v-for="(item, index) in certificateOption"
  478. :key="index"
  479. :label="item.id"
  480. >{{ item.certificateName }}</el-checkbox
  481. >
  482. </el-checkbox-group>
  483. <el-button slot="reference" size="small">选择证书</el-button>
  484. </el-popover>
  485. <ul>
  486. <li
  487. class="boxlefs"
  488. v-for="item in listData.certificateIds"
  489. :key="item"
  490. >
  491. {{ checkListName(item) }}
  492. <i
  493. class="el-icon-error"
  494. style="color: #f56c6c"
  495. @click="clearBtns(item)"
  496. ></i>
  497. </li>
  498. <div style="clear: both"></div>
  499. </ul>
  500. </div>
  501. </div>
  502. <h5>商品包装介绍</h5>
  503. <div class="boxsSTTs">
  504. <el-form
  505. label-position="right"
  506. label-width="70px"
  507. :model="listData"
  508. :rules="rules"
  509. ref="listData"
  510. >
  511. <el-form-item label="商品简介" prop="introduce">
  512. <el-input type="textarea" v-model="listData.introduce"></el-input>
  513. </el-form-item>
  514. <el-form-item label="适合对象" prop="suitableObject">
  515. <el-input
  516. type="textarea"
  517. v-model="listData.suitableObject"
  518. ></el-input>
  519. </el-form-item>
  520. <el-form-item label="购买须知" prop="buyNote">
  521. <el-input type="textarea" v-model="listData.buyNote"></el-input>
  522. </el-form-item>
  523. </el-form>
  524. <div class="courseStyle">
  525. 商品详情<span style="color: #999; margin-left: 6px">支持图文</span>
  526. </div>
  527. <div style="text-align: center; margin-bottom: 10px">
  528. <el-button
  529. size="mini"
  530. :type="active === 1 ? 'success' : ''"
  531. @click="active = 1"
  532. >PC端</el-button
  533. >
  534. <el-button
  535. size="mini"
  536. :type="active === 2 ? 'success' : ''"
  537. @click="active = 2"
  538. >手机端</el-button
  539. >
  540. </div>
  541. <editor
  542. v-show="active === 1"
  543. v-model="listData.pcDetailHtml"
  544. :min-height="300"
  545. :max-height="500"
  546. :uploadStatus="uploadStatus"
  547. />
  548. <editor
  549. v-show="active === 2"
  550. v-model="listData.mobileDetailHtml"
  551. :min-height="300"
  552. :max-height="500"
  553. :uploadStatus="uploadStatus"
  554. />
  555. </div>
  556. <div style="text-align: center; margin-top: 20px">
  557. <el-button @click="backPage" size="mini">取消</el-button>
  558. <el-button type="primary" @click="submit('listData', 1)" size="mini"
  559. >保存</el-button
  560. >
  561. <el-button
  562. v-if="listData.goodsStatus !== 0 || listData.goodsStatus !== 1"
  563. type="primary"
  564. @click="submit('listData', 2)"
  565. size="mini"
  566. >{{
  567. listData.goodsStatus === 0
  568. ? "上架"
  569. : listData.goodsStatus === 1
  570. ? "下架"
  571. : "未知"
  572. }}</el-button
  573. >
  574. </div>
  575. <el-dialog
  576. :title="statusBox === 1 ? '添加' : '编辑'"
  577. :visible.sync="dialogVisible"
  578. width="800px"
  579. >
  580. <el-form
  581. label-position="right"
  582. label-width="110px"
  583. :model="listitemData"
  584. :rules="rulesItem"
  585. ref="listitemData"
  586. >
  587. <el-form-item
  588. v-for="(items, indexs) in listitem"
  589. :key="indexs"
  590. :label="items.label"
  591. :prop="items.prop"
  592. >
  593. <el-select
  594. v-if="items.scope === 'select'"
  595. v-model="listitemData[items.prop]"
  596. placeholder="请选择费用类型"
  597. >
  598. <el-option
  599. v-for="(item, index) in items.options"
  600. :key="index"
  601. :label="item.costName"
  602. :value="item.costId"
  603. >
  604. </el-option>
  605. </el-select>
  606. <el-input v-else v-model="listitemData[items.prop]"></el-input>
  607. </el-form-item>
  608. </el-form>
  609. <span slot="footer" class="dialog-footer">
  610. <el-button @click="dialogVisible = false">取 消</el-button>
  611. <el-button type="primary" @click="submitForm('listitemData')"
  612. >确 定</el-button
  613. >
  614. </span>
  615. </el-dialog>
  616. <el-dialog
  617. title="添加课程"
  618. :visible.sync="dialogVisibleTableBoxs"
  619. width="800px"
  620. >
  621. <el-table
  622. ref="multipleTable"
  623. :data="boxtableData"
  624. border
  625. @select-all="selectAll"
  626. @select="select"
  627. :row-key="getRowKeys"
  628. :header-cell-style="{
  629. 'background-color': '#eee',
  630. padding: '8px',
  631. color: '#333',
  632. }"
  633. >
  634. <el-table-column
  635. align="center"
  636. type="selection"
  637. width="55"
  638. header-align="center"
  639. :selectable="checkboxT"
  640. :reserve-selection="true"
  641. >
  642. </el-table-column>
  643. <template v-for="(item, index) in tableSetTSBBOX">
  644. <el-table-column
  645. v-if="item.scope !== 'inputs'"
  646. :width="item.width"
  647. :key="index"
  648. :label="item.label"
  649. align="center"
  650. :show-overflow-tooltip="true"
  651. header-align="center"
  652. >
  653. <template slot-scope="scope">
  654. <span v-if="item.scope === 'Status'">
  655. {{
  656. scope.row[item.prop] === 1
  657. ? "发布"
  658. : scope.row[item.prop] === 0
  659. ? "未发布"
  660. : "未知"
  661. }}
  662. </span>
  663. <span v-else>{{ scope.row[item.prop] }}</span></template
  664. >
  665. </el-table-column></template
  666. >
  667. </el-table>
  668. <pagination
  669. :total="total"
  670. :pageSize="pageSize"
  671. :currentPage="currentPage"
  672. @handleSizeChange="handleSizeChange"
  673. @handleCurrentChange="handleCurrentChange"
  674. />
  675. <span slot="footer" class="dialog-footer">
  676. <el-button @click="dialogVisibleTableBoxs = false">取 消</el-button>
  677. <el-button
  678. type="primary"
  679. :disabled="activeLists.length === 0"
  680. @click="submitTab"
  681. >确 定</el-button
  682. >
  683. </span>
  684. </el-dialog>
  685. <el-dialog
  686. title="添加题卷"
  687. :visible.sync="dialogVisibleTableBoxs2"
  688. width="800px"
  689. >
  690. <el-select
  691. v-model="optionsNums"
  692. placeholder="请选择类型"
  693. @change="editAddBoxs2"
  694. >
  695. <el-option
  696. v-for="item in optionsType"
  697. :key="item.value"
  698. :label="item.label"
  699. :value="item.value"
  700. >
  701. </el-option>
  702. </el-select>
  703. <el-table
  704. ref="multipleTable2"
  705. :data="boxtableData2"
  706. border
  707. @select-all="selectAll2"
  708. @select="select2"
  709. :row-key="getRowKeys2"
  710. :header-cell-style="{
  711. 'background-color': '#eee',
  712. padding: '8px',
  713. color: '#333',
  714. }"
  715. >
  716. <el-table-column
  717. align="center"
  718. type="selection"
  719. width="55"
  720. header-align="center"
  721. :selectable="checkboxT2"
  722. :reserve-selection="true"
  723. >
  724. </el-table-column>
  725. <template v-for="(item, index) in tableSetTSBBOX2">
  726. <el-table-column
  727. v-if="item.scope !== 'inputs'"
  728. :width="item.width"
  729. :key="index"
  730. :label="item.label"
  731. align="center"
  732. :show-overflow-tooltip="true"
  733. header-align="center"
  734. >
  735. <template slot-scope="scope">
  736. <span v-if="item.scope === 'Status'">
  737. {{
  738. scope.row[item.prop] === 1
  739. ? "发布"
  740. : scope.row[item.prop] === 0
  741. ? "未发布"
  742. : "未知"
  743. }}
  744. </span>
  745. <span v-else-if="item.scope === 'type'">
  746. {{
  747. scope.row[item.prop] === 1
  748. ? "模块卷"
  749. : scope.row[item.prop] === 2
  750. ? "章卷"
  751. : scope.row[item.prop] === 3
  752. ? "试卷"
  753. : "未知"
  754. }}
  755. </span>
  756. <span v-else>{{ scope.row[item.prop] }}</span></template
  757. >
  758. </el-table-column></template
  759. >
  760. </el-table>
  761. <pagination
  762. :total="total2"
  763. :pageSize="pageSize2"
  764. :currentPage="currentPage2"
  765. @handleSizeChange="handleSizeChange2"
  766. @handleCurrentChange="handleCurrentChange2"
  767. />
  768. <span slot="footer" class="dialog-footer">
  769. <el-button @click="dialogVisibleTableBoxs2 = false">取 消</el-button>
  770. <el-button type="primary" @click="submitTab2">确 定</el-button>
  771. </span>
  772. </el-dialog>
  773. <el-dialog title="关联讲义" :visible.sync="aboutJYBox" width="400px">
  774. <el-button @click="openJYActiveBox" size="mini">选择讲义</el-button>
  775. <div v-if="handoutsArray" style="margin: 10px">
  776. {{ handoutsArray.handoutsName }}
  777. <i
  778. class="el-icon-error"
  779. style="color: #f56c6c; cursor: pointer"
  780. @click="delHandouts"
  781. ></i>
  782. </div>
  783. <span slot="footer" class="dialog-footer">
  784. <el-button @click="aboutJYBox = false">取 消</el-button>
  785. <el-button type="primary" @click="submitJYs">确 定</el-button>
  786. </span>
  787. </el-dialog>
  788. <el-dialog
  789. title="关联讲义列表"
  790. :visible.sync="jYactiveBoxs"
  791. width="780px"
  792. append-to-body
  793. >
  794. <el-table
  795. ref="multipleTable"
  796. :data="jYtableData"
  797. border
  798. :header-cell-style="{
  799. 'background-color': '#eee',
  800. padding: '8px',
  801. color: '#333',
  802. }"
  803. >
  804. <el-table-column label="" width="45" align="center">
  805. <template scope="scope">
  806. <el-radio
  807. :label="scope.row.handoutsId"
  808. v-model="templateRadio"
  809. @change.native="getTemplateRow(scope.$index, scope.row)"
  810. >{{ "" }}</el-radio
  811. >
  812. </template>
  813. </el-table-column>
  814. <template v-for="(item, index) in jYtableSet">
  815. <el-table-column
  816. v-if="item.scope !== 'inputs'"
  817. :width="item.width"
  818. :key="index"
  819. :label="item.label"
  820. align="center"
  821. :show-overflow-tooltip="true"
  822. header-align="center"
  823. >
  824. <template slot-scope="scope">
  825. <span v-if="item.scope === 'Status'">
  826. {{
  827. scope.row[item.prop] === 1
  828. ? "发布"
  829. : scope.row[item.prop] === 0
  830. ? "未发布"
  831. : "未知"
  832. }}
  833. </span>
  834. <span v-else>{{ scope.row[item.prop] }}</span></template
  835. >
  836. </el-table-column></template
  837. >
  838. </el-table>
  839. <span slot="footer" class="dialog-footer">
  840. <el-button @click="jYactiveBoxs = false">取 消</el-button>
  841. <el-button type="primary" @click="activejY">确 定</el-button>
  842. </span>
  843. </el-dialog>
  844. <popple-set
  845. :key="Math.random()"
  846. ref="poppleSet"
  847. :tableData="tableData"
  848. :auditionList="auditionList"
  849. @uploadArrays="uploadArrays"
  850. />
  851. <popple-set-tk
  852. :key="Math.random()"
  853. ref="poppleSetTk"
  854. :tableData="tableData2"
  855. :examConfigList="examConfigList"
  856. @uploadArrays="uploadArraysTK"
  857. />
  858. </div>
  859. </template>
  860. <script>
  861. import poppleSet from "../poppleSet.vue";
  862. import poppleSetTk from "../poppleSetTK.vue";
  863. import pagination from "@/components/pagination";
  864. import Editor from "@/components/Editor";
  865. export default {
  866. components: { Editor, pagination, poppleSet, poppleSetTk },
  867. data() {
  868. return {
  869. active: 1,
  870. uploadStatus: 2,
  871. bfImg: "oss/images/avatar/20211013/1634097664410_1397766697",
  872. listData: {
  873. coverUrl: "oss/images/avatar/20211013/1634097664410_1397766697",
  874. educationTypeId: "",
  875. businessId: "",
  876. schoolId: "",
  877. majorId: "",
  878. subjectId: "",
  879. standPriceJson: [],
  880. certificateIds: [],
  881. },
  882. eduTypeOptions: [], //教育类型数据
  883. courTypeOptions: [], //业务层次数据
  884. sujectOption: [], //科目数据
  885. schoolOption: [], //院校数据
  886. majorOption: [], //专业数据
  887. supplyOption: [], //供应方数据
  888. certificateOption: [], //证书数据
  889. goodsTypeOptions: [
  890. {
  891. label: "视频",
  892. value: 1,
  893. },
  894. {
  895. label: "题库",
  896. value: 2,
  897. },
  898. {
  899. label: "面授",
  900. value: 3,
  901. },
  902. {
  903. label: "服务",
  904. value: 4,
  905. },
  906. {
  907. label: "组合",
  908. value: 5,
  909. },
  910. ], //商品类型
  911. newCourTypeOptions: [], //当前业务层次数据
  912. newSujectOption: [], //当前科目数据数据
  913. newSchoolOption: [], //当前院校数据
  914. newMajorOption: [], //当前专业数据
  915. tableSet: [
  916. {
  917. label: "费用类型",
  918. prop: "priceTypeName",
  919. prop1: "priceTypeId",
  920. scope: "editInfo",
  921. },
  922. {
  923. label: "费用金额(元)",
  924. prop: "price",
  925. scope: "price",
  926. },
  927. ],
  928. listitemData: {},
  929. // 弹窗字段
  930. listitem: [
  931. {
  932. label: "费用类型",
  933. prop: "priceTypeId",
  934. scope: "select",
  935. options: [],
  936. },
  937. {
  938. label: "费用金额",
  939. prop: "price",
  940. },
  941. ],
  942. statusBox: 1, //1添加2编辑
  943. dialogVisible: false,
  944. NUMBerS: 0,
  945. rules: {
  946. goodsType: [
  947. {
  948. required: true,
  949. message: "请选择商品类型",
  950. trigger: ["blur", "change"],
  951. },
  952. ],
  953. goodsName: [
  954. {
  955. required: true,
  956. message: "请输入商品名称",
  957. trigger: "change",
  958. },
  959. ],
  960. educationTypeId: [
  961. {
  962. required: true,
  963. message: "请选择教育类型",
  964. trigger: ["blur", "change"],
  965. },
  966. ],
  967. businessId: [
  968. {
  969. required: true,
  970. message: "请选择业务层次",
  971. trigger: ["blur", "change"],
  972. },
  973. ],
  974. schoolId: [
  975. {
  976. required: true,
  977. message: "请选择院校",
  978. trigger: ["blur", "change"],
  979. },
  980. ],
  981. majorId: [
  982. {
  983. required: true,
  984. message: "请选择专业",
  985. trigger: ["blur", "change"],
  986. },
  987. ],
  988. subjectId: [
  989. {
  990. required: true,
  991. message: "请选择科目",
  992. trigger: ["blur", "change"],
  993. },
  994. ],
  995. classHours: [
  996. { required: true, message: "请输入学时", trigger: "blur" },
  997. {
  998. validator(rule, value, callback) {
  999. if (
  1000. Number.isInteger(Number(value)) &&
  1001. Number(value) >= 0 &&
  1002. Number(value) < 9999999
  1003. ) {
  1004. callback();
  1005. } else {
  1006. callback(new Error("请输入正整数"));
  1007. }
  1008. },
  1009. trigger: "blur",
  1010. },
  1011. ],
  1012. },
  1013. rulesMors: {
  1014. timeArrays: [
  1015. {
  1016. required: true,
  1017. message: "请选择有效期",
  1018. trigger: ["blur", "change"],
  1019. },
  1020. ],
  1021. status: [
  1022. {
  1023. required: true,
  1024. message: "请选择状态",
  1025. trigger: ["blur", "change"],
  1026. },
  1027. ],
  1028. standPrice: [
  1029. { required: true, message: "请输入标准价格", trigger: "blur" },
  1030. {
  1031. validator(rule, value, callback) {
  1032. var reg = /(^[1-9]\d*(\.\d{1,2})?$)|(^0(\.\d{1,2})?$)/;
  1033. if (reg.test(value)) {
  1034. callback();
  1035. } else {
  1036. callback(new Error("请输入不超过两位小数点的价格数值"));
  1037. }
  1038. },
  1039. trigger: "blur",
  1040. },
  1041. ],
  1042. lowestPrice: [
  1043. { required: true, message: "请输入最低价格", trigger: "blur" },
  1044. {
  1045. validator(rule, value, callback) {
  1046. var reg = /(^[1-9]\d*(\.\d{1,2})?$)|(^0(\.\d{1,2})?$)/;
  1047. if (reg.test(value)) {
  1048. callback();
  1049. } else {
  1050. callback(new Error("请输入不超过两位小数点的价格数值"));
  1051. }
  1052. },
  1053. trigger: "blur",
  1054. },
  1055. ],
  1056. },
  1057. rulesItem: {
  1058. priceTypeId: [
  1059. {
  1060. required: true,
  1061. message: "请选择费用类型",
  1062. trigger: ["blur", "change"],
  1063. },
  1064. ],
  1065. price: [
  1066. { required: true, message: "请输入费用金额", trigger: "blur" },
  1067. {
  1068. validator(rule, value, callback) {
  1069. var reg = /(^[1-9]\d*(\.\d{1,2})?$)|(^0(\.\d{1,2})?$)/;
  1070. if (reg.test(value)) {
  1071. callback();
  1072. } else {
  1073. callback(new Error("请输入不超过两位小数点的价格数值"));
  1074. }
  1075. },
  1076. trigger: "blur",
  1077. },
  1078. ],
  1079. },
  1080. // 视频商品表格数据------------------------------------------------------------------------start
  1081. tableSetTSB: [
  1082. { label: "排序", prop: "sort", scope: "inputs", width: "100" },
  1083. { label: "科目名称", prop: "code" },
  1084. { label: "课程名称", prop: "prefixName", width: "120" },
  1085. { label: "科目", prop: "subjectName" },
  1086. { label: "专业", prop: "categoryName" },
  1087. { label: "院校", prop: "schoolName" },
  1088. {
  1089. label: "业务层次",
  1090. prop1: "projectName",
  1091. prop2: "businessName",
  1092. scope: "busin",
  1093. },
  1094. { label: "教育类型", prop: "educationName" },
  1095. {
  1096. label: "发布状态",
  1097. prop: "publishStatus",
  1098. scope: "Status",
  1099. width: "120",
  1100. },
  1101. ],
  1102. tableSetTSBBOX: [
  1103. { label: "课程编码", prop: "code" },
  1104. { label: "名称前缀", prop: "prefixName", width: "120" },
  1105. { label: "课程标题", prop: "courseName" },
  1106. {
  1107. label: "发布状态",
  1108. prop: "publishStatus",
  1109. scope: "Status",
  1110. width: "120",
  1111. },
  1112. ],
  1113. total: 0, //一共多少条
  1114. pageSize: 10, //每页多少条数据
  1115. currentPage: 1, //当前页码
  1116. disCheckList: [],
  1117. tableData: [],
  1118. dialogVisibleTableBoxs: false,
  1119. boxtableData: [],
  1120. activeLists: [],
  1121. auditionList: [],
  1122. aboutJYBox: false,
  1123. jYtableSet: [
  1124. { label: "讲义编码", prop: "encoder" },
  1125. { label: "讲义标题", prop: "handoutsName" },
  1126. { label: "发布状态", prop: "status", scope: "Status" },
  1127. ],
  1128. jYtableData: [],
  1129. jYactiveBoxs: false,
  1130. templateRadio: "",
  1131. handoutsArray: undefined,
  1132. handoutsIdTable: "",
  1133. // 视频商品表格数据------------------------------------------------------------------------end
  1134. // 题库商品表格数据------------------------------------------------------------------------start
  1135. tableSetTSB2: [
  1136. { label: "排序", prop: "sort", scope: "inputs", width: "100" },
  1137. { label: "题卷名称", prop: "name", width: "120" },
  1138. { label: "题库类型", prop: "type", scope: "type" },
  1139. // {
  1140. // label: "发布状态",
  1141. // prop: "publishStatus",
  1142. // scope: "Status",
  1143. // width: "120",
  1144. // },
  1145. ],
  1146. tableSetTSBBOX2: [
  1147. { label: "编码", prop: "code" },
  1148. { label: "前缀", prop: "prefixName", width: "120" },
  1149. { label: "名称", prop: "name" },
  1150. { label: "题库类型", prop: "type", scope: "type" },
  1151. {
  1152. label: "发布状态",
  1153. prop: "publishStatus",
  1154. scope: "Status",
  1155. width: "120",
  1156. },
  1157. ],
  1158. total2: 0, //一共多少条
  1159. pageSize2: 10, //每页多少条数据
  1160. currentPage2: 1, //当前页码
  1161. disCheckList2: {
  1162. moduleCheck: [],
  1163. chapterCheck: [],
  1164. examCheck: [],
  1165. },
  1166. tableData2: [],
  1167. dialogVisibleTableBoxs2: false,
  1168. boxtableData2: [],
  1169. activeLists2: {
  1170. moduleCheck: [],
  1171. chapterCheck: [],
  1172. examCheck: [],
  1173. },
  1174. optionsNums: 1,
  1175. optionsType: [
  1176. {
  1177. label: "模块卷",
  1178. value: 1,
  1179. },
  1180. { label: "章卷", value: 2 },
  1181. { label: "试卷", value: 3 },
  1182. ],
  1183. examConfigList: [],
  1184. // 题库商品表格数据------------------------------------------------------------------------end
  1185. };
  1186. },
  1187. created() {
  1188. this.$modal.loading("正在导入数据,请稍后...");
  1189. },
  1190. watch: {
  1191. handoutsIdTable: {
  1192. handler(newValue, oldValue) {
  1193. this.showTitles();
  1194. },
  1195. },
  1196. },
  1197. mounted() {
  1198. this.getDict();
  1199. this.getJyData();
  1200. },
  1201. methods: {
  1202. avtives() {
  1203. if (this.listData.educationTypeId) {
  1204. for (let i = 0; i < this.eduTypeOptions.length; i++) {
  1205. if (this.eduTypeOptions[i].id === this.listData.educationTypeId) {
  1206. return this.eduTypeOptions[i].tireStatus.indexOf("3") != -1;
  1207. }
  1208. }
  1209. }
  1210. },
  1211. avtivesMajor() {
  1212. if (this.listData.educationTypeId) {
  1213. for (let i = 0; i < this.eduTypeOptions.length; i++) {
  1214. if (this.eduTypeOptions[i].id === this.listData.educationTypeId) {
  1215. return this.eduTypeOptions[i].tireStatus.indexOf("4") != -1;
  1216. }
  1217. }
  1218. }
  1219. },
  1220. //根据ID回显讲义标题
  1221. showTitles() {
  1222. const sta = this.jYtableData.some((item) => {
  1223. return item.handoutsId == this.handoutsIdTable;
  1224. });
  1225. if (sta) {
  1226. this.jYtableData.map((item) => {
  1227. if (item.handoutsId == this.handoutsIdTable) {
  1228. this.handoutsArray = item;
  1229. }
  1230. });
  1231. } else {
  1232. this.handoutsArray = undefined;
  1233. }
  1234. },
  1235. //删除讲义
  1236. delHandouts() {
  1237. this.handoutsIdTable = "";
  1238. },
  1239. activejY() {
  1240. this.handoutsIdTable = this.templateRadio;
  1241. this.jYactiveBoxs = false;
  1242. },
  1243. getTemplateRow(index, row) {
  1244. this.templateRadio = row.handoutsId;
  1245. },
  1246. getJyData() {
  1247. this.$api.inquireCourseHandoutsList({ status: "1,0" }).then((res) => {
  1248. this.jYtableData = res.rows;
  1249. });
  1250. },
  1251. //确定讲义ID
  1252. submitJYs() {
  1253. this.listData.handoutsId = this.handoutsIdTable;
  1254. this.aboutJYBox = false;
  1255. },
  1256. openJY() {
  1257. this.aboutJYBox = true;
  1258. this.handoutsIdTable = this.listData.handoutsId;
  1259. },
  1260. openJYActiveBox() {
  1261. this.jYactiveBoxs = true;
  1262. this.templateRadio = this.handoutsIdTable;
  1263. },
  1264. uploadArrays(arrays) {
  1265. this.auditionList = arrays;
  1266. },
  1267. uploadArraysTK(arrays) {
  1268. this.examConfigList = arrays;
  1269. },
  1270. openSet() {
  1271. this.$refs.poppleSet.dialogVisible = true;
  1272. },
  1273. openSetTK() {
  1274. this.$refs.poppleSetTk.dialogVisible = true;
  1275. },
  1276. async getDict() {
  1277. await this.EducationType();
  1278. await this.ProjectType();
  1279. await this.businessList();
  1280. await this.CourseSubject();
  1281. await this.UserSchool();
  1282. await this.CourseMajor();
  1283. await this.supply();
  1284. await this.paycost();
  1285. await this.Certificate();
  1286. this.search();
  1287. },
  1288. EducationType() {
  1289. return new Promise((resolve, reject) => {
  1290. this.$api.inquireCourseEducationType({ status: 1 }).then((res) => {
  1291. this.eduTypeOptions = res.rows;
  1292. resolve();
  1293. });
  1294. });
  1295. },
  1296. ProjectType() {
  1297. return new Promise((resolve, reject) => {
  1298. this.$api.inquireCourseProjectType({ status: 1 }).then((res) => {
  1299. this.projectTypeOptions = res.rows;
  1300. resolve();
  1301. });
  1302. });
  1303. },
  1304. businessList() {
  1305. return new Promise((resolve, reject) => {
  1306. this.$api.inquirebusinessList({ status: 1 }).then((res) => {
  1307. this.courTypeOptions = res.rows;
  1308. this.newCourTypeOptions = res.rows;
  1309. resolve();
  1310. });
  1311. });
  1312. },
  1313. CourseSubject() {
  1314. return new Promise((resolve, reject) => {
  1315. this.$api.inquireCourseSubject({ status: 1 }).then((res) => {
  1316. res.rows.map((item, index) => {
  1317. var array = [];
  1318. item.courseProjectTypes.map((items, indexs) => {
  1319. array.push(items.id);
  1320. });
  1321. item.courseArrays = array;
  1322. });
  1323. this.sujectOption = res.rows;
  1324. resolve();
  1325. });
  1326. });
  1327. },
  1328. UserSchool() {
  1329. return new Promise((resolve, reject) => {
  1330. this.$api.inquireUserSchool({ status: 1 }).then((res) => {
  1331. res.rows.map((item, index) => {
  1332. var array = [];
  1333. item.courseProjectTypes.map((items, indexs) => {
  1334. array.push(items.id);
  1335. });
  1336. item.courseArrays = array;
  1337. });
  1338. this.schoolOption = res.rows;
  1339. resolve();
  1340. });
  1341. });
  1342. },
  1343. CourseMajor() {
  1344. return new Promise((resolve, reject) => {
  1345. this.$api.inquireCourseMajor({ status: 1 }).then((res) => {
  1346. res.rows.map((item, index) => {
  1347. var array = [];
  1348. item.courseProjectTypeVo.map((items, indexs) => {
  1349. array.push(items.id);
  1350. });
  1351. item.courseArrays = array;
  1352. });
  1353. this.majorOption = res.rows;
  1354. resolve();
  1355. });
  1356. });
  1357. },
  1358. supply() {
  1359. return new Promise((resolve, reject) => {
  1360. this.$api.inquirepaysupply({ status: 1 }).then((res) => {
  1361. this.supplyOption = res.rows;
  1362. resolve();
  1363. });
  1364. });
  1365. },
  1366. paycost() {
  1367. return new Promise((resolve, reject) => {
  1368. this.$api.inquirepaycost({ status: 1 }).then((res) => {
  1369. this.listitem[0].options = res.rows;
  1370. resolve();
  1371. });
  1372. });
  1373. },
  1374. Certificate() {
  1375. return new Promise((resolve, reject) => {
  1376. this.$api.inquireBaseCertificate({ status: 1 }).then((res) => {
  1377. this.certificateOption = res.rows;
  1378. resolve();
  1379. });
  1380. });
  1381. },
  1382. search() {
  1383. this.$api.obtainGoods(this.$route.query.id).then((res) => {
  1384. res.data.standPriceJson = JSON.parse(res.data.standPriceJson);
  1385. if (res.data.goodsAuditionConfig && res.data.goodsType == 1) {
  1386. var goodsAuditionConfig = JSON.parse(res.data.goodsAuditionConfig);
  1387. var arrays = [];
  1388. goodsAuditionConfig.map((item) => {
  1389. arrays.push({
  1390. TypeId: "3-" + item.sectionId,
  1391. menuId: item.sectionId,
  1392. courseId: item.courseId,
  1393. auditionMinute: item.auditionMinute,
  1394. });
  1395. });
  1396. this.auditionList = arrays;
  1397. }
  1398. if (res.data.goodsExamConfig && res.data.goodsType == 2) {
  1399. var arrays = [];
  1400. var goodsExamConfig = JSON.parse(res.data.goodsExamConfig);
  1401. goodsExamConfig.map((item) => {
  1402. var ast = {};
  1403. if (item.moduleExamId && item.chapterExamId && item.examId) {
  1404. ast.TypeId =
  1405. "3-" +
  1406. item.moduleExamId +
  1407. "-" +
  1408. item.chapterExamId +
  1409. "-" +
  1410. item.examId;
  1411. ast.moduleExamId = item.moduleExamId;
  1412. ast.chapterExamId = item.chapterExamId;
  1413. }
  1414. if (!item.moduleExamId && item.chapterExamId && item.examId) {
  1415. ast.TypeId = "3-" + item.chapterExamId + "-" + item.examId;
  1416. ast.chapterExamId = item.chapterExamId;
  1417. }
  1418. if (!item.moduleExamId && !item.chapterExamId && item.examId) {
  1419. ast.TypeId = "3-" + item.examId;
  1420. }
  1421. ast.examId = item.examId;
  1422. ast.num = item.num;
  1423. arrays.push(ast);
  1424. });
  1425. this.examConfigList = arrays;
  1426. }
  1427. if (res.data.certificateIds) {
  1428. res.data.certificateIds = res.data.certificateIds
  1429. .split(",")
  1430. .map(Number);
  1431. } else {
  1432. res.data.certificateIds = [];
  1433. }
  1434. res.data.timeArrays = [
  1435. this.$methodsTools.time10to13(res.data.validityStartTime, 2),
  1436. this.$methodsTools.time10to13(res.data.validityEndTime, 2),
  1437. ];
  1438. res.data.year = res.data.year + "";
  1439. this.listData = res.data;
  1440. // //富文本编辑器神坑处理
  1441. // this.$nextTick(function () {
  1442. // let inputDom = document.querySelectorAll(".el-input__inner")[0];
  1443. // inputDom.focus();
  1444. // });
  1445. if (res.data.goodsType) {
  1446. this.getTableInfos(res.data.goodsType);
  1447. }
  1448. this.changeBusiness();
  1449. this.$modal.closeLoading();
  1450. });
  1451. },
  1452. getTableInfos(int) {
  1453. if (int === 1) {
  1454. this.$api.obtainCourseSgoodsId(this.$route.query.id).then((res) => {
  1455. this.tableData = res.rows;
  1456. });
  1457. }
  1458. if (int === 2) {
  1459. this.$api
  1460. .inquireGoodsbanklist({ goodsId: this.$route.query.id })
  1461. .then((res) => {
  1462. res.data.map((item) => {
  1463. if (item.type === 1) {
  1464. item.moduleExamId = item.majorId;
  1465. }
  1466. if (item.type === 2) {
  1467. item.chapterExamId = item.majorId;
  1468. }
  1469. if (item.type === 3) {
  1470. item.examId = item.majorId;
  1471. }
  1472. });
  1473. this.tableData2 = res.data;
  1474. });
  1475. }
  1476. },
  1477. changeBusiness() {
  1478. var arrays = [];
  1479. this.courTypeOptions.map((item) => {
  1480. if (item.educationId === this.listData.educationTypeId) {
  1481. arrays.push(item);
  1482. }
  1483. });
  1484. this.newCourTypeOptions = arrays;
  1485. this.courTypeOptions.map((item) => {
  1486. if (item.id === this.listData.businessId) {
  1487. var newSujectOption = [];
  1488. var newSchoolOption = [];
  1489. var newMajorOption = [];
  1490. this.sujectOption.map((items) => {
  1491. if (items.courseArrays.indexOf(item.projectId) !== -1) {
  1492. newSujectOption.push(items);
  1493. }
  1494. });
  1495. this.schoolOption.map((items) => {
  1496. if (items.courseArrays.indexOf(item.projectId) !== -1) {
  1497. newSchoolOption.push(items);
  1498. }
  1499. });
  1500. this.majorOption.map((items) => {
  1501. if (items.courseArrays.indexOf(item.projectId) !== -1) {
  1502. newMajorOption.push(items);
  1503. }
  1504. });
  1505. this.newSujectOption = newSujectOption;
  1506. this.newSchoolOption = newSchoolOption;
  1507. this.newMajorOption = newMajorOption;
  1508. }
  1509. });
  1510. },
  1511. //改变教育类型
  1512. changeEducationTypeId() {
  1513. var arrays = [];
  1514. this.courTypeOptions.map((item) => {
  1515. if (item.educationId === this.listData.educationTypeId) {
  1516. arrays.push(item);
  1517. }
  1518. });
  1519. this.newCourTypeOptions = arrays;
  1520. this.listData.businessId = "";
  1521. },
  1522. //改变业务层次触发
  1523. changeBusinessId() {
  1524. this.listData.schoolId = "";
  1525. this.listData.majorId = "";
  1526. this.listData.subjectId = "";
  1527. this.courTypeOptions.map((item) => {
  1528. if (item.id === this.listData.businessId) {
  1529. this.listData.educationTypeId = item.educationId;
  1530. var newSujectOption = [];
  1531. var newSchoolOption = [];
  1532. var newMajorOption = [];
  1533. this.sujectOption.map((items) => {
  1534. if (items.courseArrays.indexOf(item.projectId) !== -1) {
  1535. newSujectOption.push(items);
  1536. }
  1537. });
  1538. this.schoolOption.map((items) => {
  1539. if (items.courseArrays.indexOf(item.projectId) !== -1) {
  1540. newSchoolOption.push(items);
  1541. }
  1542. });
  1543. this.majorOption.map((items) => {
  1544. if (items.courseArrays.indexOf(item.projectId) !== -1) {
  1545. newMajorOption.push(items);
  1546. }
  1547. });
  1548. this.newSujectOption = newSujectOption;
  1549. this.newSchoolOption = newSchoolOption;
  1550. this.newMajorOption = newMajorOption;
  1551. }
  1552. });
  1553. },
  1554. getImgFile() {
  1555. var self = this;
  1556. var file = self.$refs.file.files[0];
  1557. if (file === undefined) {
  1558. self.$set(self.listData, "coverUrl", "");
  1559. return;
  1560. }
  1561. if (file.size > 0.3 * 1024 * 1024) {
  1562. self.$message.error("图片不得大于300kb");
  1563. return;
  1564. }
  1565. var type = self.$refs.file.value.toLowerCase().split(".").splice(-1);
  1566. if (
  1567. type[0] != "jpg" &&
  1568. type[0] != "png" &&
  1569. type[0] != "jpeg" &&
  1570. type[0] != "gif"
  1571. ) {
  1572. self.$message.error("上传格式需为:.jpg/.png/.jpeg/gif");
  1573. self.$refs.file.value = "";
  1574. return;
  1575. }
  1576. this.$upload.upload(file, 0).then((res) => {
  1577. self.listData.coverUrl = res;
  1578. });
  1579. },
  1580. clearImgs() {
  1581. this.listData.coverUrl = "";
  1582. },
  1583. async submit(formName, int) {
  1584. //多表单启动验证,这里有四个表单
  1585. let formNameList = ["listData1", "listData2"];
  1586. var result = true;
  1587. for (let index = 0; index < formNameList.length; index++) {
  1588. await this.$refs[formNameList[index]].validate((e) => {
  1589. result = e;
  1590. });
  1591. if (!result) {
  1592. break;
  1593. }
  1594. }
  1595. if (!result) {
  1596. this.$message.error("请填写必填信息");
  1597. return;
  1598. } else {
  1599. if (
  1600. this.listData.coverUrl === "" ||
  1601. this.listData.coverUrl === null ||
  1602. this.listData.coverUrl === undefined
  1603. ) {
  1604. this.$message.error("请上传节封面");
  1605. return false;
  1606. }
  1607. //保存表单
  1608. this.rulesTableSumbit(int);
  1609. }
  1610. },
  1611. rulesTableSumbit(int) {
  1612. var datas = JSON.parse(JSON.stringify(this.listData));
  1613. if (int === 2) {
  1614. if (this.listData.goodsStatus === 1) {
  1615. datas.goodsStatus = 0;
  1616. }
  1617. if (this.listData.goodsStatus === 0) {
  1618. datas.goodsStatus = 1;
  1619. }
  1620. }
  1621. this.courTypeOptions.map((item) => {
  1622. if (item.id === this.listData.businessId) {
  1623. datas.projectId = item.projectId;
  1624. }
  1625. });
  1626. datas.status = 1;
  1627. datas.certificateIds = this.listData.certificateIds.toString();
  1628. datas.validityStartTime = this.$methodsTools.time10to13(
  1629. this.listData.timeArrays[0],
  1630. 1
  1631. );
  1632. datas.validityEndTime = this.$methodsTools.time10to13(
  1633. this.listData.timeArrays[1],
  1634. 1
  1635. );
  1636. datas.standPriceJson = JSON.stringify(this.listData.standPriceJson);
  1637. datas.standPrice = Number(this.listData.standPrice);
  1638. datas.lowestPrice = Number(this.listData.lowestPrice);
  1639. datas.lowestPrice = Number(this.listData.year);
  1640. delete datas.timeArrays;
  1641. if (this.listData.goodsType === 1) {
  1642. var courseIdList = [];
  1643. this.tableData.map((item) => {
  1644. courseIdList.push({
  1645. courseId: item.courseId,
  1646. sort: Number(item.sort),
  1647. });
  1648. });
  1649. var auditionListArray = [];
  1650. this.auditionList.map((item) => {
  1651. auditionListArray.push({
  1652. auditionMinute: item.auditionMinute,
  1653. courseId: item.courseId,
  1654. sectionId: item.menuId,
  1655. });
  1656. });
  1657. datas.auditionList = auditionListArray;
  1658. datas.courseList = courseIdList;
  1659. if (!this.listData.handoutsId) {
  1660. datas.handoutsId = 0;
  1661. }
  1662. this.$api.editGoods(datas).then((res) => {
  1663. this.$message.success("修改成功");
  1664. setTimeout(() => {
  1665. this.$router.go(-1);
  1666. }, 300);
  1667. });
  1668. } else if (this.listData.goodsType === 2) {
  1669. var courseIdList = [];
  1670. this.tableData2.map((item) => {
  1671. if (item.type === 1) {
  1672. courseIdList.push({
  1673. majorId: item.moduleExamId,
  1674. sort: Number(item.sort),
  1675. type: item.type,
  1676. });
  1677. }
  1678. if (item.type === 2) {
  1679. courseIdList.push({
  1680. majorId: item.chapterExamId,
  1681. sort: Number(item.sort),
  1682. type: item.type,
  1683. });
  1684. }
  1685. if (item.type === 3) {
  1686. courseIdList.push({
  1687. majorId: item.examId,
  1688. sort: Number(item.sort),
  1689. type: item.type,
  1690. });
  1691. }
  1692. });
  1693. datas.bankList = courseIdList;
  1694. var examConfigListArray = [];
  1695. this.examConfigList.map((item) => {
  1696. examConfigListArray.push({
  1697. num: item.num,
  1698. chapterExamId: item.chapterExamId,
  1699. examId: item.examId,
  1700. moduleExamId: item.moduleExamId,
  1701. });
  1702. });
  1703. datas.examConfigList = examConfigListArray;
  1704. this.$api.editGoodsbank(datas).then((res) => {
  1705. this.$message.success("修改成功");
  1706. setTimeout(() => {
  1707. this.$router.go(-1);
  1708. }, 300);
  1709. });
  1710. } else {
  1711. this.$message.warning("当前商品类型正在开发中...");
  1712. }
  1713. },
  1714. backPage() {
  1715. this.$router.go(-1);
  1716. },
  1717. openBoxs(int, item) {
  1718. if (int === 1) {
  1719. this.listitemData = {};
  1720. } else {
  1721. this.NUMBerS = this.listData.standPriceJson.indexOf(item);
  1722. this.listitemData = JSON.parse(JSON.stringify(item));
  1723. }
  1724. this.statusBox = int;
  1725. this.dialogVisible = true;
  1726. this.$nextTick(() => {
  1727. this.$refs.listitemData.clearValidate();
  1728. });
  1729. },
  1730. submitForm(formName) {
  1731. this.$refs[formName].validate((valid) => {
  1732. if (valid) {
  1733. this.rulesTable();
  1734. } else {
  1735. return false;
  1736. }
  1737. });
  1738. },
  1739. rulesTable() {
  1740. if (this.statusBox === 2) {
  1741. this.$set(
  1742. this.listData.standPriceJson,
  1743. this.NUMBerS,
  1744. this.listitemData
  1745. );
  1746. // this.listData.standPriceJson[this.NUMBerS] = this.listitemData;
  1747. } else {
  1748. this.listitem[0].options.map((i, k) => {
  1749. if (i.costId === Number(this.listitemData.priceTypeId)) {
  1750. this.listitemData.priceTypeName = i.costName;
  1751. }
  1752. });
  1753. this.listData.standPriceJson.push(this.listitemData);
  1754. }
  1755. this.dialogVisible = false;
  1756. },
  1757. delList(item) {
  1758. this.listData.standPriceJson.splice(
  1759. this.listData.standPriceJson.indexOf(item),
  1760. 1
  1761. );
  1762. },
  1763. checkListName(id) {
  1764. var a = "";
  1765. this.certificateOption.map((item, index) => {
  1766. if (item.id === id) {
  1767. a = item.certificateName;
  1768. }
  1769. });
  1770. return a;
  1771. },
  1772. clearBtns(id) {
  1773. this.listData.certificateIds.map((item, index) => {
  1774. if (item === id) {
  1775. this.listData.certificateIds.splice(index, 1);
  1776. }
  1777. });
  1778. },
  1779. //视频商品表格函数START
  1780. getInfos() {
  1781. this.$api
  1782. .inquireCourseListS({
  1783. status: 1,
  1784. pageNum: this.currentPage,
  1785. pageSize: this.pageSize,
  1786. })
  1787. .then((res) => {
  1788. this.boxtableData = res.rows;
  1789. this.total = res.total;
  1790. });
  1791. },
  1792. editAddBoxs() {
  1793. var self = this;
  1794. this.$api
  1795. .inquireCourseListS({
  1796. status: 1,
  1797. pageNum: this.currentPage,
  1798. pageSize: this.pageSize,
  1799. })
  1800. .then((res) => {
  1801. var aList = [];
  1802. this.tableData.map((item) => {
  1803. aList.push(item.courseId);
  1804. });
  1805. this.disCheckList = aList;
  1806. this.boxtableData = res.rows;
  1807. this.total = res.total;
  1808. this.dialogVisibleTableBoxs = true;
  1809. this.$nextTick(function () {
  1810. self.$refs.multipleTable.clearSelection();
  1811. });
  1812. });
  1813. },
  1814. submitTab() {
  1815. if (this.activeLists.length === 0) {
  1816. this.dialogVisibleTableBoxs = false;
  1817. return;
  1818. }
  1819. this.tableData = this.tableData.concat(this.activeLists);
  1820. this.dialogVisibleTableBoxs = false;
  1821. this.$message.success("添加成功");
  1822. this.activeLists = [];
  1823. },
  1824. del(item, index) {
  1825. this.tableData.splice(index, 1);
  1826. this.$message.success("删除成功");
  1827. },
  1828. selectAll(value) {
  1829. this.activeLists = value;
  1830. },
  1831. select(value) {
  1832. this.activeLists = value;
  1833. },
  1834. checkboxT(row, index) {
  1835. if (this.disCheckList.indexOf(row.courseId) !== -1) {
  1836. return false;
  1837. } else {
  1838. return true;
  1839. }
  1840. },
  1841. getRowKeys(row) {
  1842. return row.courseId;
  1843. },
  1844. handleSizeChange(v) {
  1845. this.pageSize = v;
  1846. this.currentPage = 1;
  1847. this.getInfos();
  1848. },
  1849. handleCurrentChange(v) {
  1850. this.currentPage = v;
  1851. this.getInfos();
  1852. },
  1853. //视频商品表格函数END
  1854. //题库商品表格函数START
  1855. getInfos2() {
  1856. this.$api
  1857. .inquireCourseListS({
  1858. status: 1,
  1859. pageNum: this.currentPage2,
  1860. pageSize: this.pageSize2,
  1861. })
  1862. .then((res) => {
  1863. this.boxtableData = res.rows;
  1864. this.total = res.total;
  1865. });
  1866. },
  1867. changeOptionsType2() {
  1868. this.editAddBoxs2(1);
  1869. },
  1870. editAddBoxs2(int) {
  1871. var self = this;
  1872. if (self.optionsNums === 1) {
  1873. self.$api
  1874. .inquireBankModule({
  1875. status: 1,
  1876. pageNum: self.currentPage2,
  1877. pageSize: self.pageSize2,
  1878. })
  1879. .then((res) => {
  1880. var aList = [];
  1881. self.tableData2.map((item) => {
  1882. if (item.type === 1) {
  1883. aList.push(item.moduleExamId);
  1884. }
  1885. });
  1886. res.rows.forEach((item) => {
  1887. item.ids = 1 + "-" + item.moduleExamId;
  1888. item.type = 1;
  1889. item.name = item.moduleName;
  1890. item.sort = 0;
  1891. });
  1892. self.disCheckList2.moduleCheck = aList;
  1893. self.boxtableData2 = res.rows;
  1894. self.total2 = res.total;
  1895. self.dialogVisibleTableBoxs2 = true;
  1896. if (int === 1) {
  1897. self.$nextTick(function () {
  1898. self.$refs.multipleTable2.clearSelection();
  1899. });
  1900. }
  1901. });
  1902. }
  1903. if (self.optionsNums === 2) {
  1904. self.$api
  1905. .inquirebankchapterList({
  1906. status: 1,
  1907. pageNum: self.currentPage2,
  1908. pageSize: self.pageSize2,
  1909. })
  1910. .then((res) => {
  1911. var aList = [];
  1912. self.tableData2.map((item) => {
  1913. if (item.type === 2) {
  1914. aList.push(item.chapterExamId);
  1915. }
  1916. });
  1917. res.rows.forEach((item) => {
  1918. item.ids = 2 + "-" + item.chapterExamId;
  1919. item.sort = 0;
  1920. item.type = 2;
  1921. });
  1922. self.disCheckList2.chapterCheck = aList;
  1923. self.boxtableData2 = res.rows;
  1924. self.total2 = res.total;
  1925. self.dialogVisibleTableBoxs2 = true;
  1926. if (int === 1) {
  1927. self.$nextTick(function () {
  1928. self.$refs.multipleTable2.clearSelection();
  1929. });
  1930. }
  1931. });
  1932. }
  1933. if (self.optionsNums === 3) {
  1934. self.$api
  1935. .inquirebankexamList({
  1936. status: 1,
  1937. pageNum: self.currentPage2,
  1938. pageSize: self.pageSize2,
  1939. })
  1940. .then((res) => {
  1941. var aList = [];
  1942. self.tableData2.map((item) => {
  1943. if (item.type === 3) {
  1944. aList.push(item.examId);
  1945. }
  1946. });
  1947. res.rows.forEach((item) => {
  1948. item.ids = 3 + "-" + item.examId;
  1949. item.sort = 0;
  1950. item.type = 3;
  1951. item.name = item.examName;
  1952. });
  1953. self.disCheckList2.examCheck = aList;
  1954. self.boxtableData2 = res.rows;
  1955. self.total2 = res.total;
  1956. self.dialogVisibleTableBoxs2 = true;
  1957. if (int === 1) {
  1958. self.$nextTick(function () {
  1959. self.$refs.multipleTable2.clearSelection();
  1960. });
  1961. }
  1962. });
  1963. }
  1964. },
  1965. submitTab2() {
  1966. if (
  1967. this.activeLists2.moduleCheck.length === 0 &&
  1968. this.activeLists2.chapterCheck.length === 0 &&
  1969. this.activeLists2.examCheck.length === 0
  1970. ) {
  1971. this.dialogVisibleTableBoxs2 = false;
  1972. return;
  1973. }
  1974. if (this.activeLists2.moduleCheck.length) {
  1975. this.tableData2 = this.tableData2.concat(this.activeLists2.moduleCheck);
  1976. }
  1977. if (this.activeLists2.chapterCheck.length) {
  1978. this.tableData2 = this.tableData2.concat(
  1979. this.activeLists2.chapterCheck
  1980. );
  1981. }
  1982. if (this.activeLists2.examCheck.length) {
  1983. this.tableData2 = this.tableData2.concat(this.activeLists2.examCheck);
  1984. }
  1985. this.dialogVisibleTableBoxs2 = false;
  1986. this.$message.success("添加成功");
  1987. this.activeLists2 = {
  1988. moduleCheck: [],
  1989. chapterCheck: [],
  1990. examCheck: [],
  1991. };
  1992. },
  1993. del2(item, index) {
  1994. this.tableData2.splice(index, 1);
  1995. this.$message.success("删除成功");
  1996. },
  1997. selectAll2(value) {
  1998. var lis = {
  1999. moduleCheck: [],
  2000. chapterCheck: [],
  2001. examCheck: [],
  2002. };
  2003. value.map((item) => {
  2004. if (item.type === 1) {
  2005. lis.moduleCheck.push(item);
  2006. }
  2007. if (item.type === 2) {
  2008. lis.chapterCheck.push(item);
  2009. }
  2010. if (item.type === 3) {
  2011. lis.examCheck.push(item);
  2012. }
  2013. });
  2014. this.activeLists2 = lis;
  2015. },
  2016. select2(value) {
  2017. var lis = {
  2018. moduleCheck: [],
  2019. chapterCheck: [],
  2020. examCheck: [],
  2021. };
  2022. value.map((item) => {
  2023. if (item.type === 1) {
  2024. lis.moduleCheck.push(item);
  2025. }
  2026. if (item.type === 2) {
  2027. lis.chapterCheck.push(item);
  2028. }
  2029. if (item.type === 3) {
  2030. lis.examCheck.push(item);
  2031. }
  2032. });
  2033. this.activeLists2 = lis;
  2034. },
  2035. checkboxT2(row, index) {
  2036. if (this.optionsNums === 1) {
  2037. if (this.disCheckList2.moduleCheck.indexOf(row.moduleExamId) !== -1) {
  2038. return false;
  2039. } else {
  2040. return true;
  2041. }
  2042. }
  2043. if (this.optionsNums === 2) {
  2044. if (this.disCheckList2.chapterCheck.indexOf(row.chapterExamId) !== -1) {
  2045. return false;
  2046. } else {
  2047. return true;
  2048. }
  2049. }
  2050. if (this.optionsNums === 3) {
  2051. if (this.disCheckList2.examCheck.indexOf(row.examId) !== -1) {
  2052. return false;
  2053. } else {
  2054. return true;
  2055. }
  2056. }
  2057. },
  2058. getRowKeys2(row) {
  2059. return row.ids;
  2060. },
  2061. handleSizeChange2(v) {
  2062. this.pageSize = v;
  2063. this.currentPage = 1;
  2064. this.getInfos2();
  2065. },
  2066. handleCurrentChange2(v) {
  2067. this.currentPage = v;
  2068. this.getInfos2();
  2069. },
  2070. //题库商品表格函数END
  2071. },
  2072. };
  2073. </script>
  2074. <style lang="less" scoped>
  2075. .boxsSTTs {
  2076. margin: 10px 0px;
  2077. border: 1px solid #a4a4a4;
  2078. border-top: 2px solid rgb(179, 204, 255);
  2079. padding: 20px 40px;
  2080. }
  2081. .fengs {
  2082. border-bottom: 1px dashed #a4a4a4;
  2083. color: #a4a4a4;
  2084. padding: 4px 0px;
  2085. margin-bottom: 20px;
  2086. }
  2087. .imgBoxins {
  2088. width: 375px;
  2089. height: 220px;
  2090. text-align: center;
  2091. img {
  2092. height: 100%;
  2093. }
  2094. }
  2095. .iconStsz {
  2096. font-size: 40px;
  2097. color: #67c23a;
  2098. cursor: pointer;
  2099. }
  2100. .numInputs {
  2101. width: 220px;
  2102. }
  2103. /deep/ .el-date-editor .el-range-separator {
  2104. width: 7%;
  2105. }
  2106. .courseStyle {
  2107. margin-top: 20px;
  2108. margin-bottom: 10px;
  2109. font-size: 14px;
  2110. border-bottom: 2px solid rgb(179, 204, 255);
  2111. }
  2112. .clickSpan {
  2113. color: blue;
  2114. cursor: pointer;
  2115. }
  2116. .boxlefs {
  2117. font-size: 14px;
  2118. cursor: pointer;
  2119. border-radius: 8px;
  2120. border: 1px solid #a4a4a4;
  2121. float: left;
  2122. margin: 5px 10px;
  2123. height: 30px;
  2124. line-height: 30px;
  2125. padding: 0px 10px;
  2126. padding-right: 5px;
  2127. margin: 5px 10px;
  2128. }
  2129. .dis_fs {
  2130. display: flex;
  2131. align-items: center;
  2132. }
  2133. </style>