table.vue 59 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167
  1. <template>
  2. <div class="tabbox">
  3. <div class="topbox">
  4. <template>
  5. <div class="topbox_area" style="align-items: center;" v-if="boxType == 0">
  6. <span>{{ lang.ssStuList }}</span>
  7. <span v-if="!ClaEditvisible">{{ activeinfo.name }}</span>
  8. <input
  9. v-if="ClaEditvisible"
  10. ref="claEditInput"
  11. class="claInp"
  12. type="text"
  13. :placeholder="lang.ssEnterClassNamePlc"
  14. v-model.trim="ClaEditInfo.name"
  15. @blur="confirmClaEdit"
  16. @keyup.enter="confirmClaEdit"
  17. />
  18. <el-tooltip :content="lang.edit" placement="top">
  19. <img
  20. :src="editBtnHovered || ClaEditvisible ? eidl : eidh"
  21. alt=""
  22. @click="editCla(activeinfo)"
  23. @mouseover="editBtnHovered = true"
  24. @mouseout="editBtnHovered = false"
  25. class="xk_img"
  26. :class="ClaEditvisible || editBtnHovered ? 'bacl' : ''"
  27. />
  28. </el-tooltip>
  29. <el-tooltip :content="lang.Delete" placement="top">
  30. <img
  31. :src="deleteBtnHovered ? delh : dell"
  32. alt=""
  33. @click="deleteCla(activeId, 1)"
  34. @mouseover="deleteBtnHovered = true"
  35. @mouseout="deleteBtnHovered = false"
  36. class="xk_img xk_img2"
  37. />
  38. </el-tooltip>
  39. </div>
  40. <div class="topbox_area" style="align-items: center;" v-if="boxType == 1">
  41. <span v-if="interestType == 0">{{ lang.ssInterClassList }}</span>
  42. <template v-if="interestType == 1">
  43. <span
  44. style="cursor: pointer;min-width: 35px;"
  45. @click="backInterestCla()"
  46. >{{ activeinfo.name }}</span
  47. >
  48. <i class="el-icon-arrow-right"></i>
  49. <span>{{ lang.ssStuList }}</span>
  50. </template>
  51. </div>
  52. <div class="topbox_area" style="align-items: center;" v-if="boxType == 2">
  53. <span>{{ lang.ssStuList }}</span>
  54. <span>{{ total }}{{ lang.ssPerson }}</span>
  55. </div>
  56. </template>
  57. <!-- 右边区域 -->
  58. <div class="topbox_area">
  59. <el-input
  60. :placeholder="lang.ssSearchStudent"
  61. v-model="inp"
  62. @blur="refresh"
  63. @keyup.enter.native="refresh"
  64. v-if="
  65. boxType == 0 || boxType == 2 || (boxType == 1 && interestType == 1)
  66. "
  67. >
  68. <i
  69. slot="prefix"
  70. @click="refresh"
  71. class="el-input__icon el-icon-search"
  72. ></i>
  73. </el-input>
  74. <template v-if="(boxType == 1 && interestType == 0) || boxType == 2">
  75. <el-popover
  76. placement="bottom"
  77. trigger="hover"
  78. popper-class="topbox_area_popover"
  79. >
  80. <div class="topbox_areaCon">
  81. <div :class="insort == 1 ? 'topbox_areaConBck' : ''">
  82. {{ lang.ssSortEarliest }}
  83. </div>
  84. <div :class="insort == 0 ? 'topbox_areaConBck' : ''">
  85. {{ lang.ssSortLatest }}
  86. </div>
  87. </div>
  88. <img
  89. slot="reference"
  90. class="sortImg"
  91. v-if="insort == 0"
  92. @click="intSort('1')"
  93. src="../../../../assets/stuImg/jiang.svg"
  94. alt=""
  95. />
  96. <img
  97. slot="reference"
  98. class="sortImg"
  99. v-if="insort == 1"
  100. @click="intSort('0')"
  101. src="../../../../assets/stuImg/sheng.svg"
  102. alt=""
  103. />
  104. </el-popover>
  105. </template>
  106. <div @click="refresh" v-if="!selectedData.length" class="action_btn">
  107. <img
  108. src="../../../../assets/stuImg/cz.svg"
  109. alt=""
  110. class="action_img"
  111. />
  112. {{ lang.ssRefresh }}
  113. </div>
  114. <!-- 处理学生相关操作 -->
  115. <div
  116. @click="exportStudent"
  117. class="action_btn"
  118. v-if="boxType == 0 || (boxType == 1 && interestType == 1)"
  119. >
  120. <img
  121. src="../../../../assets/stuImg/share.svg"
  122. :alt="lang.ssExport"
  123. class="action_img"
  124. />
  125. {{ lang.ssExport }}
  126. </div>
  127. <template v-if="boxType == 0">
  128. <template v-if="selectedData.length">
  129. <div
  130. class="action_btn action_btn2 action_btn3"
  131. @click="resetPassword"
  132. >
  133. <i class="el-icon-lock"></i>
  134. {{ lang.ssResetPwd }}
  135. </div>
  136. <div class="action_btn action_btn2 action_btn3" @click="moveSelStu">
  137. <i class="el-icon-rank"></i>
  138. {{ lang.ssMove }}
  139. </div>
  140. <div
  141. class="action_btn action_btn4"
  142. style="background: #ff4d4f; color: #fff"
  143. @click="removeSelStu"
  144. >
  145. <i class="el-icon-remove-outline"></i>
  146. {{ lang.Remove }}
  147. </div>
  148. </template>
  149. </template>
  150. <div
  151. @click="addStudent"
  152. v-if="!selectedData.length && (boxType == 0 || boxType == 2)"
  153. class="action_btn"
  154. >
  155. <i class="el-icon-plus"></i>
  156. {{ lang.AddStudent }}
  157. </div>
  158. <!-- 处理兴趣班相关操作 -->
  159. <div
  160. @click="addInterestCla()"
  161. v-if="boxType == 1 && interestType == 0"
  162. class="action_btn"
  163. >
  164. <i class="el-icon-plus"></i>
  165. {{ lang.ssAddInterCla }}
  166. </div>
  167. <div
  168. @click="addStudent"
  169. v-if="
  170. boxType == 1 &&
  171. interestType == 1 &&
  172. activeinfo.createuserid == userid
  173. "
  174. class="action_btn"
  175. >
  176. <i class="el-icon-plus"></i>
  177. {{ lang.AddStudent }}
  178. </div>
  179. </div>
  180. </div>
  181. <div class="tabList" v-loading="isLoading">
  182. <el-table
  183. :data="tableData"
  184. ref="tableData"
  185. :header-cell-style="{ background: '#E7EAF0' }"
  186. :key="boxType"
  187. height="100%"
  188. class="tableList"
  189. @selection-change="handleSelectionChange"
  190. @row-click="viewStudent"
  191. >
  192. <el-table-column
  193. type="selection"
  194. v-if="boxType == 0 || (boxType == 1 && interestType == 1)"
  195. width="55px"
  196. >
  197. </el-table-column>
  198. <el-table-column
  199. v-for="(item, index) in tableColumns"
  200. :key="index"
  201. :width="item.wid"
  202. show-overflow-tooltip
  203. :label="item.label"
  204. >
  205. <template slot-scope="scope">
  206. <div class="cla_box" v-if="item.label == lang.Class">
  207. <span
  208. class="cla_span"
  209. v-for="(cla, ind) in stuClalist(scope.row.classname, 1)"
  210. :key="ind + 'cla123'"
  211. >
  212. {{ cla }}
  213. </span>
  214. <span v-if="stuClalist(scope.row.classname, 2).length > 0">
  215. <el-popover
  216. placement="bottom"
  217. min-width="80"
  218. trigger="hover"
  219. :visible-arrow="false"
  220. >
  221. <div
  222. class="action_box"
  223. style="display: flex;flex-direction: column;gap: 5px;justify-content: center;align-items: center;"
  224. >
  225. <div
  226. v-for="(cla, ind) in stuClalist(scope.row.classname, 2)"
  227. :key="ind + 'cla'"
  228. >
  229. {{ cla }}
  230. </div>
  231. </div>
  232. <div
  233. slot="reference"
  234. style="display: flex;align-items: center;"
  235. >
  236. <img
  237. src="../../../../assets/stuImg/act.svg"
  238. style="width: 20px; cursor: pointer;"
  239. />
  240. </div>
  241. </el-popover>
  242. </span>
  243. </div>
  244. <div v-else-if="item.label == lang.Account">
  245. <span>{{ scope.row.acc.split("@")[0] }}</span>
  246. </div>
  247. <div v-else>
  248. <span>{{ scope.row[item.prop] }}</span>
  249. </div>
  250. </template>
  251. </el-table-column>
  252. <!-- 操作列 -->
  253. <el-table-column width="200" align="right" label="">
  254. <template slot-scope="scope">
  255. <div>
  256. <el-popover
  257. placement="bottom-end"
  258. width="60"
  259. trigger="hover"
  260. popper-class="student-manage-action-popover"
  261. >
  262. <div class="action_box">
  263. <template
  264. v-if="
  265. boxType == 0 ||
  266. boxType == 2 ||
  267. (boxType == 1 && interestType == 1)
  268. "
  269. >
  270. <div @click="editStudent(scope.row)">{{ lang.edit }}</div>
  271. <div
  272. v-if="boxType == 1 && interestType == 1"
  273. @click="deleteClassStudent(scope.row.userid)"
  274. >
  275. {{ lang.Remove }}
  276. </div>
  277. <div v-else @click="deleteStudentL(scope.row)">
  278. {{ lang.Delete }}
  279. </div>
  280. </template>
  281. <template v-if="boxType == 1 && interestType == 0">
  282. <div @click="editInterestCla(scope.row)">
  283. {{ lang.edit }}
  284. </div>
  285. <div
  286. @click="
  287. deleteCla(scope.row.id, 0, scope.row.createuserid)
  288. "
  289. >
  290. {{ lang.Delete }}
  291. </div>
  292. </template>
  293. </div>
  294. <template v-if="boxType == 1 && interestType == 0">
  295. <img
  296. src="../../../../assets/stuImg/act.svg"
  297. slot="reference"
  298. alt=""
  299. v-if="scope.row.createuserid == userid"
  300. class="action_img"
  301. style="cursor: pointer"
  302. />
  303. </template>
  304. <template v-else>
  305. <img
  306. src="../../../../assets/stuImg/act.svg"
  307. slot="reference"
  308. alt=""
  309. class="action_img"
  310. style="cursor: pointer"
  311. />
  312. </template>
  313. </el-popover>
  314. </div>
  315. </template>
  316. </el-table-column>
  317. </el-table>
  318. <div
  319. class="page_box"
  320. v-if="boxType == 2 || (boxType == 1 && interestType == 0)"
  321. >
  322. <el-pagination
  323. background
  324. @size-change="handleSizeChange"
  325. @current-change="handlePageChange"
  326. :current-page.sync="page"
  327. :page-sizes="[10, 15, 20, 25]"
  328. :page-size="pageSize"
  329. layout="sizes, prev, pager, next"
  330. :total="total"
  331. >
  332. </el-pagination>
  333. </div>
  334. <div
  335. class="page_box"
  336. v-if="
  337. (boxType == 0 || (boxType == 1 && interestType == 1)) &&
  338. selectedData.length
  339. "
  340. >
  341. <div class="page_box_area">
  342. <div style="display: flex; align-items: center; gap: 10px">
  343. <!-- <el-checkbox
  344. @change="handleCheckedAllSelection"
  345. v-model="checkedAllSelection"
  346. ></el-checkbox> -->
  347. <div
  348. class="action_btn"
  349. @click="cancelAllSelection"
  350. v-if="
  351. selectedData.length != 0 &&
  352. selectedData.length == tableData.length
  353. "
  354. >
  355. {{ lang.ssCancelSelAll }}
  356. </div>
  357. <div class="action_btn" @click="allSel" v-else>
  358. {{ lang.SelectAll }}
  359. </div>
  360. </div>
  361. <div
  362. @click="deleteSelectionStudent"
  363. class="action_btn"
  364. v-if="boxType == 0"
  365. style="background: #ff4d4f; color: #fff"
  366. >
  367. {{ lang.Delete }}
  368. </div>
  369. <div
  370. class="action_btn"
  371. style="background: #ff4d4f; color: #fff"
  372. @click="removeSelStu"
  373. v-if="boxType == 1"
  374. >
  375. <i class="el-icon-remove-outline"></i>
  376. {{ lang.Remove }}
  377. </div>
  378. </div>
  379. </div>
  380. </div>
  381. <!-- 添加兴趣班弹框 -->
  382. <el-dialog
  383. :visible.sync="addInterestClaVisible"
  384. height="400px"
  385. width="442px"
  386. >
  387. <template slot="title">
  388. <div class="dia_title_box">
  389. <span>{{ lang.ssAddInterCla }}</span>
  390. </div>
  391. </template>
  392. <div class="dia_box_item2">
  393. <div class="addcla_box_item">
  394. <span>{{ lang.ssInterClaNameColon }}</span>
  395. <el-input
  396. v-model="interestName"
  397. :placeholder="lang.ssEnterInterClaNm"
  398. ></el-input>
  399. </div>
  400. </div>
  401. <div
  402. slot="footer"
  403. class="dialog-footer"
  404. style="display: flex;justify-content: flex-end;gap: 10px;"
  405. >
  406. <div @click="addInterestClaVisible = false">{{ lang.Cancel }}</div>
  407. <div
  408. @click="addInterestClaConfirm"
  409. style="background: #3681FC; color: #E6FFFFFF;"
  410. >
  411. {{ lang.Confirm }}
  412. </div>
  413. </div>
  414. </el-dialog>
  415. <!-- 移动班级学生弹框 -->
  416. <el-dialog :visible.sync="moveClaVisible" width="440px">
  417. <template slot="title">
  418. <div class="dia_title_box">
  419. <span>{{ lang.ssMoveStudent }}</span>
  420. </div>
  421. </template>
  422. <div
  423. style="width: 100%;height: 300px;padding-top: 20px;box-sizing: border-box;"
  424. >
  425. <el-cascader
  426. :options="cascaderData"
  427. v-model="moveClaCascaderDataPath"
  428. @change="handlemoveChangecascader"
  429. popper-class="myCascader2"
  430. style="width: 100%;"
  431. :props="{
  432. label: 'name',
  433. value: 'id',
  434. children: 'children'
  435. }"
  436. >
  437. <template slot-scope="{ data, node }">
  438. <!-- 一级选项(年级) -->
  439. <span v-if="node.level === 1">{{ data.name }}</span>
  440. <!-- 二级选项(班级)- 可以自定义显示 -->
  441. <span v-else-if="node.level === 2" class="cascader-class-item">
  442. <span>{{ data.name }}</span>
  443. </span>
  444. <!-- 其他级别(兜底) -->
  445. <span v-else>{{ data.name }}</span>
  446. </template>
  447. </el-cascader>
  448. </div>
  449. <div slot="footer" class="dialog-footer">
  450. <!-- <el-button @click="moveClaVisible = false">取消</el-button> -->
  451. <div class="kbtn" @click="moveClaVisible = false">
  452. {{ lang.Cancel }}
  453. </div>
  454. <div
  455. class="kbtn"
  456. @click="confirmMoveClaEdit"
  457. style="background: #3681FC; color: #E3EDFF;"
  458. >
  459. {{ lang.Confirm }}
  460. </div>
  461. <!-- <el-button type="primary" @click="confirmMoveClaEdit">确定</el-button> -->
  462. </div>
  463. </el-dialog>
  464. <!-- 编辑信息 -->
  465. <el-dialog :visible.sync="stuEditvisible" width="500px">
  466. <template slot="title">
  467. <div class="dia_title_box">
  468. <span>{{ lang.ssEditInfo }}</span>
  469. <span @click="inPassword">{{ lang.ssResetPwd }}</span>
  470. </div>
  471. </template>
  472. <div class="dia_box_item">
  473. <div class="addcla_box_item">
  474. <span>{{ lang.Name }}{{ lang.ssColon }}</span>
  475. <el-input
  476. v-model="stuEditInfo.username"
  477. :placeholder="lang.ssEnterUserName"
  478. ></el-input>
  479. </div>
  480. <div class="addcla_box_item">
  481. <span>{{ lang.Account }}{{ lang.ssColon }}</span>
  482. <div>{{ stuEditInfo.acc }}</div>
  483. </div>
  484. <div class="addcla_box_item">
  485. <span>{{ lang.Class }}{{ lang.ssColon }}</span>
  486. <el-cascader
  487. :options="cascaderData"
  488. v-model="cascaderDataPath"
  489. @change="handleChangecascader"
  490. popper-class="myCascader"
  491. :props="{
  492. label: 'name',
  493. value: 'id',
  494. children: 'children',
  495. multiple: true
  496. }"
  497. >
  498. <template slot-scope="{ data, node }">
  499. <!-- 一级选项(年级) -->
  500. <span v-if="node.level === 1">{{ data.name }}</span>
  501. <!-- 二级选项(班级)- 可以自定义显示 -->
  502. <span v-else-if="node.level === 2" class="cascader-class-item">
  503. <span>{{ data.name }}</span>
  504. </span>
  505. <!-- 其他级别(兜底) -->
  506. <span v-else>{{ data.name }}</span>
  507. </template>
  508. </el-cascader>
  509. </div>
  510. </div>
  511. <div slot="footer" class="dialog-footer">
  512. <!-- <el-button @click="closeEditStu">取消</el-button> -->
  513. <div class="kbtn" @click="closeEditStu">{{ lang.Cancel }}</div>
  514. <div
  515. class="kbtn"
  516. @click="confirmEditStu"
  517. style="background: #3681FC; color: #E3EDFF;"
  518. >
  519. {{ lang.Confirm }}
  520. </div>
  521. <!-- <el-button type="primary" @click="confirmEditStu">确定</el-button> -->
  522. </div>
  523. </el-dialog>
  524. <!-- 编辑兴趣班 -->
  525. <editInterstcla
  526. ref="editInterstcla"
  527. @getCascaderData="getCascaderData"
  528. :cascaderData="cascaderData"
  529. :interestClaEditInfo="InterestClaEditInfo"
  530. />
  531. <!-- 添加学生 -->
  532. <addStu
  533. ref="addStu"
  534. :boxType="boxType"
  535. :cascaderData="cascaderData"
  536. @getStudent="getStudent"
  537. @getCascaderData="getCascaderData"
  538. />
  539. <!-- 重置密码弹框 -->
  540. <!-- <msgbox ref="msgboxref" infomMsg="infomMsg"></msgbox> -->
  541. <div class="pop-upBox">
  542. <el-dialog :visible.sync="popBoxdia" width="480px" :show-close="false">
  543. <div class="msgCon">
  544. <img
  545. style="width: 20px;"
  546. v-if="deltypy == 7 || deltypy == 8"
  547. src="../../../../assets/stuImg/duil.svg"
  548. alt=""
  549. />
  550. <img
  551. style="width: 20px;"
  552. v-else
  553. src="../../../../assets/stuImg/tishi.svg"
  554. alt=""
  555. />
  556. <div class="msgContxt">
  557. <div v-if="deltypy == 1">
  558. {{ lang.ssConfirmDelStuOne.replace(/\*/g, delStuinfo.username) }}
  559. </div>
  560. <div v-if="deltypy == 2">
  561. {{ lang.ssConfirmDelStuNum.replace(/\*/g, selectedData.length) }}
  562. </div>
  563. <div v-if="deltypy == 3">{{ lang.ssConfirmDelClass }}</div>
  564. <div v-if="deltypy == 4">
  565. {{ lang.ssConfirmRemoveNum.replace(/\*/g, selectedData.length) }}
  566. </div>
  567. <div v-if="deltypy == 5">
  568. {{ lang.ssConfirmResetPwdN.replace(/\*/g, selectedData.length) }}
  569. </div>
  570. <div v-if="deltypy == 6">
  571. {{ lang.ssConfirmResetOne.replace(/\*/g, stuEditInfo.username) }}
  572. </div>
  573. <div v-if="deltypy == 9">{{ lang.ssConfirmMoveCla }}</div>
  574. <div v-if="deltypy == 10">
  575. {{ lang.ssConfirmEditStu.replace(/\*/g, stuEditInfo.username) }}
  576. </div>
  577. </div>
  578. <div class="msgContxt" v-if="deltypy == 7 || deltypy == 8">
  579. <div v-if="deltypy == 7">
  580. {{ lang.ssResetPwdSuccNum.replace(/\*/g, selectedData.length) }}
  581. </div>
  582. <div v-if="deltypy == 8">{{ lang.ssResetPwdSucc }}</div>
  583. <div>
  584. <span>{{ lang.ssDefaultPwdCoco }}</span>
  585. <el-tooltip
  586. class="item"
  587. effect="dark"
  588. :content="lang.Copy"
  589. placement="top"
  590. >
  591. <img
  592. @click="copyText"
  593. class="copyMg"
  594. :src="deleteBtnHovered ? copy1 : copy"
  595. @mouseover="deleteBtnHovered = true"
  596. @mouseout="deleteBtnHovered = false"
  597. alt=""
  598. />
  599. </el-tooltip>
  600. </div>
  601. </div>
  602. </div>
  603. <span slot="footer" class="dialog-footer">
  604. <!-- <el-button @click="closeDia"
  605. v-if="deltypy != 7 && deltypy != 8"
  606. >取 消</el-button
  607. > -->
  608. <div @click="closeDia" v-if="deltypy != 7 && deltypy != 8">
  609. {{ lang.Cancel }}
  610. </div>
  611. <div
  612. @click="confirmDelStu"
  613. style="background: #3681FC; color: #E3EDFF;"
  614. >
  615. {{ lang.Confirm }}
  616. </div>
  617. <!-- <el-button type="primary" @click="confirmDelStu"
  618. >确 认</el-button
  619. > -->
  620. </span>
  621. </el-dialog>
  622. </div>
  623. </div>
  624. </template>
  625. <script>
  626. import editInterstcla from "./editInterstcla.vue";
  627. import addStu from "./addstu.vue";
  628. import { myMixin } from "@/mixins/mixin.js"
  629. // import msgbox from "./msgbox.vue";
  630. export default {
  631. mixins: [ myMixin ],
  632. components: {
  633. editInterstcla,
  634. addStu
  635. },
  636. props: {
  637. GrapTableData: {
  638. type: Array,
  639. default: () => []
  640. },
  641. activeIdL: {
  642. type: String,
  643. default: ""
  644. },
  645. activeinfoData: {
  646. type: Object,
  647. default: () => {}
  648. },
  649. boxType: {
  650. type: Number,
  651. default: 0
  652. }
  653. },
  654. data() {
  655. return {
  656. userid: this.$route.query.userid,
  657. org: this.$route.query.org,
  658. oid: this.$route.query.oid,
  659. role: this.$route.query.role,
  660. activeId: "", // 当前选中的班级id
  661. activeinfo: {}, // 当前选中的班级信息
  662. eidl: require("../../../../assets/stuImg/eidl.svg"),
  663. eidh: require("../../../../assets/stuImg/eidh.svg"),
  664. dell: require("../../../../assets/stuImg/dell.svg"),
  665. delh: require("../../../../assets/stuImg/delh.svg"),
  666. copy1: require("../../../../assets/stuImg/copymsg1.svg"),
  667. copy: require("../../../../assets/stuImg/copymsg.svg"),
  668. popBoxdia: false,
  669. insort: 0,
  670. EditStubox: "",
  671. delClaid: "",
  672. delClaidtype: "",
  673. infomMsg: {}, //消息提示
  674. delStuinfo: {},
  675. deltypy: 1, //1单个删除学生 2批量删除学生 3删除班级
  676. interestName: "", // 兴趣班名称
  677. interestType: 0, // 0 班级 1 班级内学生
  678. InterestClaAddInfo: {}, // 兴趣班添加信息
  679. addInterestClaVisible: false, // 兴趣班添加弹框
  680. InterestClaEditInfo: {}, // 兴趣班编辑信息
  681. cascaderData: [], // 班级级联数据
  682. cascaderDataPath: [], // 班级级联选中数据路径
  683. checkedAllSelection: false, // 全选
  684. stuEditvisible: false,
  685. stuEditInfo: {}, // 学生编辑信息
  686. ClaEditvisible: false, // 班级编辑信息
  687. ClaEditInfo: {}, // 班级编辑信息
  688. editBtnHovered: false, // 编辑按钮hover状态
  689. deleteBtnHovered: false, // 删除按钮hover状态
  690. moveClaVisible: false, // 移动班级学生弹框
  691. moveClaInfo: {}, // 移动班级学生信息
  692. moveClaCascaderDataPath: [], // 移动班级学生级联选中数据路径
  693. tableData: [], //表格数据
  694. selectedData: [], //选中数据
  695. page: 1,
  696. total: 0,
  697. pageSize: 10,
  698. isLoading: false,
  699. inp: "",
  700. tableColumns: []
  701. };
  702. },
  703. created() {
  704. this.tableColumns = this.studentColumns;
  705. },
  706. watch: {
  707. GrapTableData: {
  708. handler(newVal) {
  709. this.cascaderData = newVal;
  710. },
  711. immediate: true
  712. },
  713. activeinfoData: {
  714. handler(newVal) {
  715. this.activeinfo = newVal;
  716. },
  717. immediate: true
  718. },
  719. activeIdL: {
  720. handler(newVal) {
  721. this.activeId = newVal;
  722. this.inp = "";
  723. this.interestType = 0;
  724. this.refresh();
  725. },
  726. immediate: true
  727. }
  728. },
  729. computed: {
  730. studentColumns() {
  731. return [
  732. { label: this.lang.StudentName, prop: "username" },
  733. { label: this.lang.Account, prop: "acc" },
  734. { label: this.lang.Class, prop: "classname", wid: "360" }
  735. ];
  736. },
  737. tableInterestClaColumns() {
  738. return [
  739. { label: this.lang.ClassName, prop: "name" },
  740. { label: this.lang.NumberofStudents, prop: "pnum" },
  741. { label: this.lang.ssTime, prop: "create_at" }
  742. ];
  743. },
  744. stuClalist() {
  745. return function(data, val) {
  746. // console.log(data, "data");
  747. if (data.length == 0) {
  748. return [];
  749. }
  750. let list = JSON.parse(JSON.stringify(data)).split("/");
  751. // console.log(list, "list");
  752. if (list.length > 0 && val == 1) {
  753. // console.log(list.slice(0, 2), "list.slice(0, 2)");
  754. return list.slice(0, 2);
  755. } else if (list.length > 0 && val == 2) {
  756. // console.log(list.slice(2), "list.slice(2)");
  757. return list.slice(2);
  758. }
  759. return [];
  760. };
  761. }
  762. },
  763. methods: {
  764. copyText() {
  765. const text = "Coco1234";
  766. if (navigator.clipboard && navigator.clipboard.writeText) {
  767. navigator.clipboard
  768. .writeText(text)
  769. .then(() => {
  770. this.$message.success(this.lang.ssCopySucc);
  771. })
  772. .catch(() => {
  773. this.fallbackCopy(text);
  774. });
  775. } else {
  776. this.fallbackCopy(text);
  777. }
  778. },
  779. fallbackCopy(text) {
  780. const textarea = document.createElement("textarea");
  781. textarea.value = text;
  782. textarea.style.position = "fixed";
  783. textarea.style.opacity = "0";
  784. document.body.appendChild(textarea);
  785. textarea.select();
  786. try {
  787. document.execCommand("copy");
  788. this.$message.success(this.lang.ssCopySucc);
  789. } catch (err) {
  790. this.$message.error(this.lang.ssCopyFail);
  791. }
  792. document.body.removeChild(textarea);
  793. },
  794. // 年级方法区域
  795. // 打开删除班级弹框
  796. deleteCla(cid, val, uid) {
  797. if (val == 0 && uid != this.userid)
  798. return this.$message.error(this.lang.ssOnlyCreatorDel);
  799. this.delClaidtype = val;
  800. this.delClaid = cid;
  801. this.popBoxdia = true;
  802. this.deltypy = 3;
  803. },
  804. confirmdeleteCla() {
  805. let params = {
  806. id: this.delClaid
  807. };
  808. if (this.time()) {
  809. this.ajax
  810. .get(this.$store.state.api + "deleteClass", params)
  811. .then(res => {
  812. this.$message({
  813. message: this.lang.ssDeleteSucc,
  814. type: "success"
  815. });
  816. this.popBoxdia = false;
  817. this.$emit("getGrade", this.delClaidtype);
  818. this.refresh();
  819. this.delClaid = "";
  820. this.deltypy = 0;
  821. })
  822. .catch(err => {
  823. this.$message.error(this.lang.Deletefailed);
  824. console.error(err);
  825. });
  826. }
  827. },
  828. // 修改班级名称弹框
  829. editCla(row) {
  830. this.ClaEditvisible = !this.ClaEditvisible;
  831. this.ClaEditInfo = JSON.parse(JSON.stringify(row));
  832. // this.ClaEditInfo.name = '';
  833. if (this.ClaEditvisible) {
  834. this.$nextTick(() => {
  835. this.$refs.claEditInput.focus();
  836. });
  837. }
  838. },
  839. // 全选
  840. allSel() {
  841. this.tableData.forEach(row => {
  842. this.$refs.tableData.toggleRowSelection(row, true);
  843. });
  844. },
  845. // 导出学生
  846. exportStudent() {
  847. if (this.selectedData.length == 0) {
  848. this.$message({
  849. message: this.lang.ssSelectStuExp,
  850. type: "error"
  851. });
  852. return;
  853. }
  854. var res = this.selectedData;
  855. //如果value的json字段的key值和想要的headers值不一致时,可做如下更改
  856. //将和下面的Object.fromEntries结合,将json字段的key值改变为要求的excel的header值
  857. var array = [];
  858. for (var i = 0; i < res.length; i++) {
  859. var _json = {};
  860. _json[this.lang.studentinformation] = res[i].username;
  861. _json[this.lang.Account] = res[i].acc;
  862. _json[this.lang.Class] = res[i].classname;
  863. array.push(_json);
  864. }
  865. var XLSX = require("xlsx");
  866. const workbook = XLSX.utils.book_new(); //创建一个新的工作簿对象
  867. let ws = XLSX.utils.json_to_sheet(array); //将json对象数组转化成工作表
  868. ws["!cols"] = [
  869. //设置每一列的宽度
  870. { wch: 20 },
  871. { wch: 20 },
  872. { wch: 20 }
  873. ];
  874. XLSX.utils.book_append_sheet(workbook, ws, "sheet1"); //把sheet添加到workbook里,第三个参数是sheet名
  875. XLSX.writeFile(workbook, this.activeinfo.name + this.lang.ssStuListXlsx);
  876. this.$message({
  877. message: this.lang.Exportsuccessful,
  878. type: "success"
  879. });
  880. this.addOp3('1', "", { type: "student_export" }, "success")
  881. this.cancelAllSelection();
  882. },
  883. // 移动班级学生
  884. moveSelStu() {
  885. console.log("this.selectedData", this.selectedData);
  886. // 先移除班级
  887. let box = this.cascaderData
  888. .flatMap(item => item.children)
  889. .find(item => item.id == this.activeId);
  890. this.moveClaCascaderDataPath = [box.pid, this.activeId];
  891. console.log(this.moveClaCascaderDataPath, "this.moveClaCascaderDataPath");
  892. this.moveClaVisible = true;
  893. },
  894. // 确定移动
  895. confirmMoveClaEdit() {
  896. if (this.moveClaCascaderDataPath.length === 0) {
  897. this.$message({
  898. message: this.lang.SelectClass,
  899. type: "error"
  900. });
  901. return;
  902. }
  903. this.deltypy = 9;
  904. this.popBoxdia = true;
  905. },
  906. confirmMoveClaEditStu() {
  907. // this.$confirm("确定要移动到该班级吗?", "提示", {
  908. // confirmButtonText: "确定",
  909. // cancelButtonText: "取消",
  910. // type: "warning",
  911. // })
  912. // .then(() => {
  913. // 先移出班级
  914. if (this.moveClaCascaderDataPath[1] == this.activeId) {
  915. this.$message({
  916. message: this.lang.ssMoveStuSame,
  917. type: "error"
  918. });
  919. return;
  920. }
  921. const promises = this.selectedData.map(item => {
  922. item.classid = item.classid
  923. .split(",")
  924. .filter(item => item != this.activeId)
  925. .join(",");
  926. return this.deleteClassStudent(item.userid);
  927. });
  928. Promise.all(promises)
  929. .then(() => {
  930. // 再移入班级
  931. const promises2 = this.selectedData.map(item => {
  932. let box = [
  933. ...item.classid.split(","),
  934. this.moveClaCascaderDataPath[1]
  935. ];
  936. box = box.filter(item => item != "");
  937. console.log("box", box);
  938. return this.moveClassStudentPromise(item, box.join(","));
  939. });
  940. Promise.all(promises2)
  941. .then(() => {
  942. this.$message({
  943. message: this.lang.ssMoveStuSucc,
  944. type: "success"
  945. });
  946. this.moveClaVisible = false;
  947. this.moveClaCascaderDataPath = [];
  948. this.popBoxdia = false;
  949. this.$emit("getGrade");
  950. this.refresh();
  951. })
  952. .catch(err => {
  953. console.error(err);
  954. this.$message({
  955. message: this.lang.ssMoveStuFail,
  956. type: "error"
  957. });
  958. });
  959. })
  960. .catch(() => {});
  961. // })
  962. // .catch(() => {});
  963. },
  964. moveClassStudentPromise(item, cid) {
  965. return new Promise((resolve, reject) => {
  966. let params = [
  967. {
  968. userid: item.userid,
  969. username: item.acc,
  970. alias: item.username,
  971. ph: item.phonenumber,
  972. sid: item.studentid,
  973. cid: cid
  974. }
  975. ];
  976. console.log(params);
  977. this.ajax
  978. .post(this.$store.state.api + "updateStudentInfo", params)
  979. .then(res => {
  980. resolve(res);
  981. })
  982. .catch(err => {
  983. console.error(err);
  984. reject(err);
  985. });
  986. });
  987. },
  988. // 批量移除班级学生
  989. removeSelStu() {
  990. this.deltypy = 4;
  991. this.popBoxdia = true;
  992. },
  993. confirmRemove() {
  994. const promises = this.selectedData.map(item => {
  995. return this.deleteClassStudent(item.userid);
  996. });
  997. Promise.all(promises)
  998. .then(() => {
  999. this.$message({
  1000. message: this.lang.ssRemoveStuSucc,
  1001. type: "success"
  1002. });
  1003. this.popBoxdia = false;
  1004. this.refresh();
  1005. this.$emit("getGrade");
  1006. })
  1007. .catch(err => {
  1008. console.error(err);
  1009. this.$message({
  1010. message: this.lang.ssRemoveStuFail,
  1011. type: "error"
  1012. });
  1013. this.refresh();
  1014. });
  1015. },
  1016. // 移除班级学生Promise
  1017. deleteClassStudent(id) {
  1018. return new Promise((resolve, reject) => {
  1019. let params = [{ uid: id, cid: this.activeId }];
  1020. this.ajax
  1021. .post(this.$store.state.api + "deleteClassStudent", params)
  1022. .then(res => {
  1023. console.log("res", res);
  1024. resolve(res);
  1025. })
  1026. .catch(err => {
  1027. console.error(err);
  1028. resolve(err);
  1029. });
  1030. });
  1031. },
  1032. // 批量重置密码
  1033. resetPassword() {
  1034. this.deltypy = 5;
  1035. this.popBoxdia = true;
  1036. // return this.msgbox();
  1037. // this.$confirm(
  1038. // `确定要重置 ${this.selectedData.length} 个学生的密码吗?`,
  1039. // "提示",
  1040. // {
  1041. // confirmButtonText: "确定",
  1042. // cancelButtonText: "取消",
  1043. // type: "warning",
  1044. // }
  1045. // )
  1046. // .then(() => {
  1047. // })
  1048. // .catch(() => {});
  1049. },
  1050. confirmrestpsd() {
  1051. const promises = this.selectedData.map(item => {
  1052. return this.doResetPassword(item.userid);
  1053. });
  1054. Promise.all(promises)
  1055. .then(() => {
  1056. this.popBoxdia = false;
  1057. this.deltypy = 7;
  1058. this.popBoxdia = true;
  1059. })
  1060. .catch(err => {
  1061. console.error(err);
  1062. this.$message({
  1063. message: this.lang.ssResetPwdPartErr,
  1064. type: "error"
  1065. });
  1066. });
  1067. },
  1068. // 执行重置密码操作(返回Promise)
  1069. doResetPassword(id) {
  1070. return new Promise((resolve, reject) => {
  1071. let params = [
  1072. {
  1073. uid: id,
  1074. pa: "Coco1234"
  1075. }
  1076. ];
  1077. this.ajax
  1078. .post(this.$store.state.api + "iniPassword", params)
  1079. .then(res => {
  1080. resolve(res);
  1081. })
  1082. .catch(err => {
  1083. console.error(err);
  1084. reject(err);
  1085. });
  1086. });
  1087. },
  1088. inPassword() {
  1089. this.deltypy = 6;
  1090. this.popBoxdia = true;
  1091. // this.$confirm(
  1092. // `确定要重置 ${this.stuEditInfo.username} 的密码吗?`,
  1093. // "提示",
  1094. // {
  1095. // confirmButtonText: "确定",
  1096. // cancelButtonText: "取消",
  1097. // type: "warning",
  1098. // }
  1099. // )
  1100. // .then(() => {
  1101. // })
  1102. // .catch(() => {});
  1103. },
  1104. confirminPassword() {
  1105. let params = [
  1106. {
  1107. uid: this.stuEditInfo.userid,
  1108. pa: "Coco1234"
  1109. }
  1110. ];
  1111. this.ajax
  1112. .post(this.$store.state.api + "iniPassword", params)
  1113. .then(res => {
  1114. // this.$message({
  1115. // message: "密码重置成功",
  1116. // type: "success",
  1117. // });
  1118. this.popBoxdia = false;
  1119. this.deltypy = 8;
  1120. this.popBoxdia = true;
  1121. // this.$refs.msgboxref.dialogVisible = true;
  1122. })
  1123. .catch(err => {
  1124. this.popBoxdia = false;
  1125. this.$message({
  1126. message: this.lang.ssResetPwdFail,
  1127. type: "error"
  1128. });
  1129. });
  1130. },
  1131. // 打开批量删除弹框
  1132. deleteSelectionStudent() {
  1133. this.deltypy = 2;
  1134. this.popBoxdia = true;
  1135. },
  1136. // 打开单删删除学生弹框
  1137. deleteStudentL(row) {
  1138. this.deltypy = 1;
  1139. this.delStuinfo = row;
  1140. this.popBoxdia = true;
  1141. },
  1142. // 判断使用单删onedelstu ,twodelstu批量删除
  1143. confirmDelStu() {
  1144. if (this.deltypy == 1) {
  1145. this.onedelstu();
  1146. this.addOp3('1', "", { type: "student_delete" }, "success")
  1147. } else if (this.deltypy == 2) {
  1148. this.twodelstu();
  1149. this.addOp3('1', "", { type: "student_delete" }, "success")
  1150. } else if (this.deltypy == 3) {
  1151. this.confirmdeleteCla();
  1152. this.addOp3('1', "", { type: "class_delete" }, "success")
  1153. } else if (this.deltypy == 4) {
  1154. this.confirmRemove();
  1155. this.addOp3('1', "", { type: "student_remove" }, "success")
  1156. } else if (this.deltypy == 5) {
  1157. this.confirmrestpsd();
  1158. this.addOp3('1', "", { type: "student_reset_password" }, "success")
  1159. } else if (this.deltypy == 6) {
  1160. this.confirminPassword();
  1161. this.addOp3('1', "", { type: "student_reset_password" }, "success")
  1162. } else if (this.deltypy == 7) {
  1163. this.cancelAllSelection();
  1164. this.popBoxdia = false;
  1165. } else if (this.deltypy == 8) {
  1166. this.popBoxdia = false;
  1167. } else if (this.deltypy == 9) {
  1168. this.confirmMoveClaEditStu();
  1169. this.addOp3('1', "", { type: "student_move" }, "success")
  1170. } else if (this.deltypy == 10) {
  1171. this.update_Student(this.EditStubox);
  1172. this.addOp3('1', "", { type: "student_edit" }, "success")
  1173. }
  1174. },
  1175. // 删除学生
  1176. onedelstu() {
  1177. let params = [{ uid: this.delStuinfo.userid, state: 0 }];
  1178. this.ajax
  1179. .post(this.$store.state.api + "deleteStudent", params)
  1180. .then(() => {
  1181. // this.getAllStudent();
  1182. this.delStuinfo = {};
  1183. this.popBoxdia = false;
  1184. this.$emit("getGrade");
  1185. this.refresh();
  1186. this.$message({
  1187. message: this.lang.ssDeleteSucc,
  1188. type: "success"
  1189. });
  1190. })
  1191. .catch(err => {
  1192. console.error(err);
  1193. this.popBoxdia = false;
  1194. this.$message({
  1195. message: this.lang.Deletefailed,
  1196. type: "error"
  1197. });
  1198. });
  1199. },
  1200. twodelstu() {
  1201. const promises = this.selectedData.map(item => {
  1202. return this.deleteStudentPromise(item.userid, item.state);
  1203. });
  1204. Promise.all(promises)
  1205. .then(() => {
  1206. this.refresh();
  1207. this.popBoxdia = false;
  1208. this.cancelAllSelection();
  1209. this.$emit("getGrade");
  1210. this.$message({
  1211. message: this.lang.ssDeleteSucc,
  1212. type: "success"
  1213. });
  1214. })
  1215. .catch(err => {
  1216. console.error(err);
  1217. this.$message({
  1218. message: this.lang.ssPartDelFail,
  1219. type: "error"
  1220. });
  1221. });
  1222. },
  1223. // 删除学生Promise
  1224. deleteStudentPromise(id, state) {
  1225. return new Promise((resolve, reject) => {
  1226. state = 0;
  1227. let params = [{ uid: id, state: state }];
  1228. this.ajax
  1229. .post(this.$store.state.api + "deleteStudent", params)
  1230. .then(res => {
  1231. resolve(res);
  1232. })
  1233. .catch(err => {
  1234. console.error(err);
  1235. reject(err);
  1236. });
  1237. });
  1238. },
  1239. // 取消删除
  1240. closeDia() {
  1241. this.delStuinfo = {};
  1242. this.popBoxdia = false;
  1243. },
  1244. // 移动班级学生级联选中数据路径改变
  1245. handlemoveChangecascader(val) {
  1246. console.log(val);
  1247. },
  1248. // 公共方法区域
  1249. // 更新年级列表 (添加,删除学生,编辑兴趣班后需要)
  1250. getCascaderData() {
  1251. this.$emit("getGrade");
  1252. this.refresh();
  1253. },
  1254. // 添加学生
  1255. addStudent() {
  1256. this.$refs.addStu.stardop();
  1257. this.$refs.addStu.classInfo = this.activeinfo;
  1258. },
  1259. // 兴趣班方法区域
  1260. // 兴趣班排序
  1261. intSort(val) {
  1262. this.insort = val;
  1263. if (this.boxType == 1) {
  1264. this.getInterestClass();
  1265. } else if (this.boxType == 2) {
  1266. this.getAllStudent();
  1267. }
  1268. },
  1269. // 编辑兴趣班
  1270. editInterestCla(row) {
  1271. if (row.createuserid != this.userid) {
  1272. return this.$message.error(this.lang.ssOnlyCreatorEdit);
  1273. }
  1274. this.$refs.editInterstcla.InterestClaEditvisible = true;
  1275. this.InterestClaEditInfo = JSON.parse(JSON.stringify(row));
  1276. },
  1277. // 兴趣班级返回到兴趣班列表
  1278. backInterestCla() {
  1279. this.interestType = 0;
  1280. this.tableColumns = this.tableInterestClaColumns;
  1281. this.getInterestClass();
  1282. },
  1283. // 查看兴趣班学生
  1284. viewStudent(row) {
  1285. // console.log('111');
  1286. // console.log(row, column, event);
  1287. if (this.boxType == 1 && this.interestType == 0) {
  1288. this.interestType = 1;
  1289. this.tableColumns = this.studentColumns;
  1290. this.activeId = row.id;
  1291. this.tableData = [];
  1292. this.getStudent();
  1293. this.activeinfo = row;
  1294. }
  1295. },
  1296. // 新增班级
  1297. addInterestClaConfirm() {
  1298. if (!this.interestName) {
  1299. this.$message({
  1300. message: this.lang.ssEnterInterClaNm,
  1301. type: "error"
  1302. });
  1303. return;
  1304. }
  1305. //新增班级
  1306. let params = [
  1307. {
  1308. claName: this.interestName,
  1309. gid: "",
  1310. oid: this.oid,
  1311. uid: this.userid
  1312. }
  1313. ];
  1314. console.log(params);
  1315. this.ajax
  1316. .post(this.$store.state.api + "addClassgra", params)
  1317. .then(res => {
  1318. if (res.data[0] && res.data[0][0].classname == 1) {
  1319. this.$message({
  1320. message: this.lang.Cannotsameothercla,
  1321. type: "error"
  1322. });
  1323. } else {
  1324. this.$message({
  1325. message: this.lang.AddSuccessful,
  1326. type: "success"
  1327. });
  1328. this.addInterestClaVisible = false;
  1329. this.interestName = "";
  1330. this.refresh();
  1331. this.$emit("getGrade");
  1332. }
  1333. })
  1334. .catch(err => {
  1335. this.$message({
  1336. message: this.lang.Additionfailed,
  1337. type: "error"
  1338. });
  1339. console.error(err);
  1340. });
  1341. },
  1342. // 添加兴趣班
  1343. addInterestCla(row) {
  1344. this.addInterestClaVisible = true;
  1345. this.InterestClaAddInfo = row;
  1346. },
  1347. // 移除单个学生
  1348. deleteClassStudent(id) {
  1349. let params = [{ uid: id, cid: this.activeId }];
  1350. this.ajax
  1351. .post(this.$store.state.api + "deleteClassStudent", params)
  1352. .then(res => {
  1353. console.log("res", res);
  1354. this.refresh();
  1355. })
  1356. .catch(err => {
  1357. console.error(err);
  1358. });
  1359. },
  1360. // 修改学生信息
  1361. confirmEditStu() {
  1362. // console.log(this.cascaderDataPath);
  1363. if (this.stuEditInfo.username === "") {
  1364. this.$message({
  1365. message: this.lang.ssEnterUserName,
  1366. type: "error"
  1367. });
  1368. return;
  1369. }
  1370. if (this.cascaderDataPath.length === 0) {
  1371. this.$message({
  1372. message: this.lang.SelectClass,
  1373. type: "error"
  1374. });
  1375. return;
  1376. }
  1377. this.EditStubox = this.cascaderDataPath.map(item => item[1]).join(",");
  1378. // console.log(box);
  1379. // console.log("this.stuEditInfo", this.stuEditInfo);
  1380. this.deltypy = 10;
  1381. this.popBoxdia = true;
  1382. // this.$confirm(
  1383. // `确定要修改 ${this.stuEditInfo.username} 的学生信息吗?`,
  1384. // "提示",
  1385. // {
  1386. // confirmButtonText: "确定",
  1387. // cancelButtonText: "取消",
  1388. // type: "warning",
  1389. // }
  1390. // )
  1391. // .then(() => {
  1392. // this.update_Student(box);
  1393. // })
  1394. // .catch(() => {
  1395. // return;
  1396. // });
  1397. },
  1398. // 修改学生信息
  1399. update_Student(cid) {
  1400. let params = [
  1401. {
  1402. userid: this.stuEditInfo.userid,
  1403. username: this.stuEditInfo.acc,
  1404. alias: this.stuEditInfo.username,
  1405. ph: this.stuEditInfo.phonenumber,
  1406. sid: this.stuEditInfo.studentid,
  1407. cid: cid
  1408. }
  1409. ];
  1410. // return console.log(params);
  1411. this.ajax
  1412. .post(this.$store.state.api + "updateStudentInfo", params)
  1413. .then(res => {
  1414. this.$message({
  1415. message: this.lang.Editsuccessful,
  1416. type: "success"
  1417. });
  1418. this.stuEditvisible = false;
  1419. this.refresh();
  1420. this.popBoxdia = false;
  1421. this.EditStubox = "";
  1422. this.stuEditInfo = {};
  1423. this.cascaderDataPath = [];
  1424. })
  1425. .catch(err => {
  1426. this.isLoading = false;
  1427. this.$message({
  1428. message: this.lang.Modificationfailed,
  1429. type: "error"
  1430. });
  1431. console.error(err);
  1432. });
  1433. },
  1434. // 编辑学生
  1435. editStudent(row) {
  1436. this.stuEditvisible = true;
  1437. this.stuEditInfo = { ...row };
  1438. // 根据 classid 找到对应的路径数组(多选模式需要二维数组)
  1439. this.cascaderDataPath = row.classid
  1440. ? this.findCascaderPath(row.classid, this.cascaderData)
  1441. : [];
  1442. },
  1443. handleChangecascader(val) {
  1444. console.log(val);
  1445. // 更新级联选择器的选中数据路径
  1446. this.cascaderDataPath = val || [];
  1447. },
  1448. findCascaderPath(classid, cascaderData) {
  1449. if (!classid || !cascaderData || cascaderData.length === 0) {
  1450. return [];
  1451. }
  1452. // 解析逗号分隔的 classid 字符串(班级字符串数组)
  1453. const classIds = classid
  1454. .split(",")
  1455. .map(id => id.trim())
  1456. .filter(id => id);
  1457. console.log("classIds", classIds);
  1458. let result = [];
  1459. let box = cascaderData
  1460. .flatMap(item => item.children)
  1461. .filter(item => classIds.includes(item.id));
  1462. console.log(box, "box");
  1463. result = box.map(item => {
  1464. return [!item.pid ? 0 : item.pid, item.id];
  1465. });
  1466. return result;
  1467. },
  1468. // 刷新
  1469. refresh() {
  1470. // 将tab表格页数重置
  1471. this.page = 1;
  1472. this.pageSize = 10;
  1473. this.total = 0;
  1474. // 清除表格数据
  1475. this.tableData = [];
  1476. // 清除选中数据
  1477. this.selectedData = [];
  1478. if (this.boxType == 0) {
  1479. // 清除选中数据
  1480. if (this.selectedData.length > 0) {
  1481. this.cancelAllSelection();
  1482. }
  1483. this.getStudent();
  1484. } else if (this.boxType == 1) {
  1485. if (this.interestType == 0) {
  1486. this.getInterestClass();
  1487. } else if (this.interestType == 1) {
  1488. this.getStudent();
  1489. }
  1490. } else if (this.boxType == 2) {
  1491. this.getAllStudent();
  1492. }
  1493. },
  1494. // 全选
  1495. handleSelectionChange(val) {
  1496. this.selectedData = val;
  1497. // 同步全选复选框状态:当选中数量等于表格数据数量时,全选复选框应该被选中
  1498. this.checkedAllSelection =
  1499. val.length > 0 && val.length === this.tableData.length;
  1500. },
  1501. // 清除多选table数据
  1502. cancelAllSelection() {
  1503. this.$refs.tableData.clearSelection();
  1504. this.selectedData = [];
  1505. this.checkedAllSelection = false;
  1506. },
  1507. closeEditStu() {
  1508. this.stuEditvisible = false;
  1509. this.stuEditInfo = {};
  1510. },
  1511. handlePageChange(val) {
  1512. console.log(`当前页: ${val}`);
  1513. this.page = val;
  1514. if (this.boxType == 0) {
  1515. this.getStudent();
  1516. } else if (this.boxType == 1) {
  1517. this.getInterestClass();
  1518. } else if (this.boxType == 2) {
  1519. this.getAllStudent();
  1520. }
  1521. },
  1522. handleSizeChange(val) {
  1523. console.log(`每页条数: ${val}`);
  1524. this.pageSize = val;
  1525. this.page = 1;
  1526. if (this.boxType == 0) {
  1527. this.getStudent();
  1528. } else if (this.boxType == 1) {
  1529. this.getInterestClass();
  1530. } else if (this.boxType == 2) {
  1531. this.getAllStudent();
  1532. }
  1533. },
  1534. getStudent() {
  1535. this.isLoading = true;
  1536. this.tableColumns = [];
  1537. this.tableColumns = this.studentColumns;
  1538. let params = {
  1539. oid: this.oid,
  1540. claid: this.activeId,
  1541. inp: this.inp
  1542. };
  1543. this.ajax
  1544. .get(this.$store.state.api + "selectclaStu", params)
  1545. .then(res => {
  1546. this.isLoading = false;
  1547. let box1 = res.data[0];
  1548. box1.forEach(e => {
  1549. let kk = [];
  1550. this.cascaderData.forEach(item => {
  1551. item.children.forEach(item2 => {
  1552. if (e.classid && e.classid.indexOf(item2.id) != -1) {
  1553. kk.push(item.name + item2.name);
  1554. } else {
  1555. }
  1556. });
  1557. });
  1558. e.classname = kk.join("/");
  1559. });
  1560. this.tableData = res.data[0];
  1561. console.log(
  1562. JSON.parse(JSON.stringify(this.tableData)),
  1563. "this.tableData"
  1564. );
  1565. })
  1566. .catch(err => {
  1567. this.isLoading = false;
  1568. console.error(err);
  1569. });
  1570. },
  1571. // 获取兴趣班
  1572. getInterestClass() {
  1573. this.isLoading = true;
  1574. this.tableColumns = this.tableInterestClaColumns;
  1575. let params = {
  1576. oid: this.oid,
  1577. inp: this.inp,
  1578. srt: this.insort,
  1579. page: this.page,
  1580. pageSize: this.pageSize
  1581. };
  1582. console.log("params", params);
  1583. this.ajax
  1584. .get(this.$store.state.api + "selectInterestcla", params)
  1585. .then(res => {
  1586. this.isLoading = false;
  1587. this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
  1588. this.tableData = res.data[0];
  1589. })
  1590. .catch(err => {
  1591. this.isLoading = false;
  1592. console.error(err);
  1593. });
  1594. },
  1595. // 学生管理全部学生
  1596. getAllStudent() {
  1597. this.isLoading = true;
  1598. this.cancelAllSelection();
  1599. this.tableColumns = this.studentColumns;
  1600. let params = {
  1601. oid: this.oid,
  1602. cid: "",
  1603. inp: this.inp,
  1604. srt: this.insort,
  1605. page: this.page,
  1606. num: this.pageSize
  1607. };
  1608. this.ajax
  1609. .get(this.$store.state.api + "selectStudentManagesrt", params)
  1610. .then(res => {
  1611. this.isLoading = false;
  1612. this.total = res.data[0].length > 0 ? res.data[0][0].num : 0;
  1613. let box1 = res.data[0];
  1614. box1.forEach(e => {
  1615. let kk = [];
  1616. this.cascaderData.forEach(item => {
  1617. item.children.forEach(item2 => {
  1618. if (e.classid && e.classid.indexOf(item2.id) != -1) {
  1619. kk.push(item.name + item2.name);
  1620. } else {
  1621. }
  1622. });
  1623. });
  1624. e.classname = kk.join("/");
  1625. });
  1626. this.tableData = res.data[0];
  1627. })
  1628. .catch(err => {
  1629. this.isLoading = false;
  1630. console.error(err);
  1631. });
  1632. },
  1633. time() {
  1634. if (!this.now) {
  1635. this.now = new Date().getTime();
  1636. return true;
  1637. } else {
  1638. let time = new Date().getTime();
  1639. if (time - this.now > 3000) {
  1640. this.now = time;
  1641. return true;
  1642. } else {
  1643. return false;
  1644. }
  1645. }
  1646. },
  1647. // 修改班级名称
  1648. confirmClaEdit() {
  1649. if (
  1650. this.ClaEditInfo.name == "" ||
  1651. this.ClaEditInfo.name == this.activeinfo.name
  1652. ) {
  1653. this.ClaEditvisible = false;
  1654. return;
  1655. }
  1656. let params = {
  1657. id: this.ClaEditInfo.id,
  1658. n: this.ClaEditInfo.name,
  1659. oid: this.oid
  1660. };
  1661. this.ajax
  1662. .get(this.$store.state.api + "updateClass", params)
  1663. .then(res => {
  1664. if (res.data[0] && res.data[0][0].classname == 1) {
  1665. this.$message({
  1666. message: this.lang.Cannotsameothercla,
  1667. type: "error"
  1668. });
  1669. this.addOp3('1', "", { type: "class_edit" }, err)
  1670. } else {
  1671. this.$message({
  1672. message: this.lang.Editsuccessful,
  1673. type: "success"
  1674. });
  1675. this.$emit("getGrade");
  1676. this.ClaEditvisible = false;
  1677. this.ClaEditInfo = {};
  1678. this.addOp3('1', "", { type: "class_edit" }, "success")
  1679. }
  1680. })
  1681. .catch(err => {
  1682. this.$message({
  1683. message: this.lang.Modificationfailed,
  1684. type: "error"
  1685. });
  1686. console.error(err);
  1687. this.addOp3('1', "", { type: "class_edit" }, err)
  1688. });
  1689. }
  1690. }
  1691. };
  1692. </script>
  1693. <style>
  1694. /* 学生管理表格操作弹窗样式 - 全局样式(Element UI popover 挂载到 body,需要全局样式) */
  1695. .student-manage-action-popover {
  1696. width: 80px !important;
  1697. min-width: 60px !important;
  1698. padding: 0 !important;
  1699. }
  1700. .student-manage-action-popover .action_box > div {
  1701. padding: 8px 15px;
  1702. cursor: pointer;
  1703. font-size: 14px;
  1704. text-align: center;
  1705. }
  1706. .student-manage-action-popover .action_box > div:hover {
  1707. background: #e8f3ff;
  1708. color: #0052d9;
  1709. }
  1710. .topbox_area_popover {
  1711. width: 152px !important;
  1712. min-width: 60px !important;
  1713. padding: 0 !important;
  1714. }
  1715. /* 学生管理重置密码消息框样式 - 全局样式(Element UI msgbox 挂载到 body,需要全局样式) */
  1716. .student-manage-reset-password-msgbox .el-message-box__status {
  1717. top: 0 !important;
  1718. transform: none !important;
  1719. align-self: flex-start !important;
  1720. }
  1721. .student-manage-reset-password-msgbox .el-message-box__message {
  1722. padding-left: 0 !important;
  1723. display: flex !important;
  1724. align-items: flex-start !important;
  1725. }
  1726. .student-manage-reset-password-msgbox .el-message-box__message > p {
  1727. margin-top: 0 !important;
  1728. }
  1729. .student-manage-reset-password-msgbox .el-message-box__btns {
  1730. text-align: right !important;
  1731. }
  1732. .student-manage-reset-password-msgbox
  1733. .el-message-box__btns
  1734. .el-button--primary {
  1735. background-color: #409eff !important;
  1736. border-color: #409eff !important;
  1737. color: #fff !important;
  1738. }
  1739. .student-manage-reset-password-msgbox
  1740. .el-message-box__btns
  1741. .el-button--primary:hover {
  1742. background-color: #66b1ff !important;
  1743. border-color: #66b1ff !important;
  1744. }
  1745. /* 学生管理删除确认对话框样式 - 按钮右对齐 */
  1746. .student-manage-delete-msgbox .el-message-box__btns {
  1747. text-align: right !important;
  1748. }
  1749. .myCascader
  1750. .el-cascader-panel
  1751. .el-cascader-menu:first-child
  1752. .el-scrollbar__wrap
  1753. ul
  1754. li
  1755. label,
  1756. .myCascader
  1757. .el-cascader-panel
  1758. .el-cascader-menu:first-child
  1759. .el-scrollbar__wrap
  1760. ul
  1761. li
  1762. .el-checkbox {
  1763. display: none !important;
  1764. }
  1765. .myCascader2 .el-cascader {
  1766. /* width: 100% !important; */
  1767. display: block !important;
  1768. }
  1769. .myCascader2 .el-cascader-panel {
  1770. width: 400px !important;
  1771. }
  1772. .myCascader2 .el-cascader-menu__list {
  1773. width: 200px;
  1774. }
  1775. </style>
  1776. <style scoped>
  1777. .sortImg {
  1778. height: 32px;
  1779. background: #f4f4f4;
  1780. padding: 5px;
  1781. box-sizing: border-box;
  1782. border-radius: 8px;
  1783. cursor: pointer;
  1784. }
  1785. .tabbox {
  1786. width: 100%;
  1787. height: 100%;
  1788. display: flex;
  1789. flex-direction: column;
  1790. }
  1791. .topbox {
  1792. background: #fff;
  1793. height: 60px;
  1794. width: 100%;
  1795. background: #ffffff;
  1796. border-radius: 8px 8px 8px 8px;
  1797. padding: 5px 10px;
  1798. box-sizing: border-box;
  1799. display: flex;
  1800. align-items: center;
  1801. justify-content: space-between;
  1802. }
  1803. .topbox_area {
  1804. display: flex;
  1805. /* align-items: center; */
  1806. gap: 10px;
  1807. }
  1808. .topbox_areaCon {
  1809. width: 100%;
  1810. padding: 8px;
  1811. box-sizing: border-box;
  1812. display: flex;
  1813. flex-direction: column;
  1814. gap: 5px;
  1815. align-content: center;
  1816. }
  1817. .topbox_areaCon div {
  1818. padding: 5px 10px;
  1819. box-sizing: border-box;
  1820. text-align: center;
  1821. border-radius: 2px;
  1822. }
  1823. .topbox_areaConBck {
  1824. background: #e8f3ff;
  1825. color: #498dfc;
  1826. }
  1827. .xk_img {
  1828. width: 20px;
  1829. height: 20px;
  1830. padding: 3px;
  1831. cursor: pointer;
  1832. }
  1833. .xk_img2:hover {
  1834. background: #ffdfd5;
  1835. border-radius: 4px;
  1836. }
  1837. .topbox_area >>> .el-input {
  1838. width: 150px;
  1839. }
  1840. .topbox_area >>> .el-input__inner {
  1841. height: 32px;
  1842. line-height: 32px;
  1843. width: 150px;
  1844. }
  1845. .topbox_area >>> .el-input__icon {
  1846. line-height: 30px;
  1847. }
  1848. .tabList {
  1849. flex: 1;
  1850. overflow: auto;
  1851. border-radius: 0 0 8px 8px;
  1852. display: grid;
  1853. flex-direction: column;
  1854. background: #fff;
  1855. }
  1856. .tabList >>> .el-table {
  1857. background: #e7eaf0;
  1858. }
  1859. .tabList >>> .el-table__body-wrapper {
  1860. border-radius: 8px 8px 0 0;
  1861. background: #fff;
  1862. }
  1863. /* 针对整个表格添加圆角 */
  1864. /* .tabList >>> .el-table__body tbody tr:first-child td:first-child {
  1865. border-radius: 8px 8px 0 0;
  1866. } */
  1867. .tableList >>> .has-gutter .gutter {
  1868. background: #e7eaf0 !important;
  1869. }
  1870. .tableList >>> .el-table__header-wrapper .el-checkbox {
  1871. display: none;
  1872. }
  1873. .cla_box {
  1874. display: flex;
  1875. flex-wrap: wrap;
  1876. align-items: center;
  1877. gap: 10px;
  1878. height: 30px;
  1879. line-height: 30px;
  1880. }
  1881. .cla_span {
  1882. background: #e8f3ff;
  1883. color: #0052d9;
  1884. padding: 0px 25px;
  1885. border-radius: 5px;
  1886. box-sizing: border-box;
  1887. }
  1888. .cla_span:nth-child(1) {
  1889. background: #e8f3ff;
  1890. color: #0052d9;
  1891. }
  1892. .cla_span:nth-child(2) {
  1893. background: #fff1d5;
  1894. color: #df8a00;
  1895. }
  1896. .action_btn {
  1897. display: flex;
  1898. align-items: center;
  1899. justify-content: center;
  1900. gap: 5px;
  1901. cursor: pointer;
  1902. background: #f6f6f6;
  1903. padding: 0px 15px;
  1904. height: 32px;
  1905. line-height: 32px;
  1906. box-sizing: border-box;
  1907. font-size: 14px;
  1908. border-radius: 6px;
  1909. }
  1910. .action_btn3:hover {
  1911. background: #1b6df0;
  1912. border-color: #1b6df0;
  1913. color: #fff;
  1914. }
  1915. .action_btn4:hover {
  1916. background: #f57e6b !important;
  1917. border-color: #f57e6b !important;
  1918. color: #fff;
  1919. }
  1920. .action_btn2 {
  1921. background: #3370ff;
  1922. color: #fff;
  1923. }
  1924. .page_box {
  1925. display: flex;
  1926. justify-content: flex-end;
  1927. align-items: center;
  1928. padding: 10px;
  1929. box-sizing: border-box;
  1930. }
  1931. .page_box_area {
  1932. display: flex;
  1933. align-items: center;
  1934. justify-content: space-between;
  1935. width: 100%;
  1936. /* padding: 0 10px; */
  1937. box-sizing: border-box;
  1938. }
  1939. .dia_box_item {
  1940. display: flex;
  1941. flex-direction: column;
  1942. gap: 15px;
  1943. height: 400px;
  1944. padding-left: 4px;
  1945. padding-right: 12px;
  1946. box-sizing: border-box;
  1947. }
  1948. .dia_box_item2 {
  1949. display: flex;
  1950. flex-direction: column;
  1951. gap: 15px;
  1952. /* height: 400px; */
  1953. padding-left: 4px;
  1954. padding-right: 12px;
  1955. box-sizing: border-box;
  1956. }
  1957. .addcla_box_item {
  1958. min-height: 35px;
  1959. /* line-height: 30px; */
  1960. display: flex;
  1961. align-items: center;
  1962. gap: 10px;
  1963. }
  1964. .addcla_box_item >>> .el-cascader {
  1965. width: 100%;
  1966. }
  1967. .addcla_box_item >>> .el-select {
  1968. width: 100%;
  1969. }
  1970. .addcla_box_item >>> .el-input__inner {
  1971. width: 100%;
  1972. }
  1973. .addcla_box_item >>> .el-input__icon {
  1974. width: 100%;
  1975. }
  1976. .addcla_box_item span {
  1977. /* width: 80px; */
  1978. flex-shrink: 0;
  1979. text-align: right;
  1980. }
  1981. .tabbox >>> .el-dialog {
  1982. border-radius: 10px !important;
  1983. }
  1984. .dia_title_box {
  1985. display: flex;
  1986. align-items: center;
  1987. gap: 10px;
  1988. padding-left: 4px;
  1989. align-items: baseline;
  1990. box-sizing: border-box;
  1991. }
  1992. .dia_title_box span:nth-child(1) {
  1993. font-size: 16px;
  1994. }
  1995. .dia_title_box span:nth-child(2) {
  1996. font-size: 12px;
  1997. color: #689ce9;
  1998. cursor: pointer;
  1999. border-bottom: 1px solid #689ce9;
  2000. }
  2001. .cascader-class-item {
  2002. display: flex;
  2003. align-items: center;
  2004. gap: 5px;
  2005. }
  2006. .class-student-count {
  2007. color: #86909c;
  2008. font-size: 12px;
  2009. }
  2010. /* 隐藏一级选项(年级)的多选按钮 */
  2011. .addcla_box_item
  2012. >>> .el-cascader-panel
  2013. .el-cascader-menu
  2014. .el-cascader-menu__wrap
  2015. .el-checkbox {
  2016. display: none !important;
  2017. }
  2018. .addcla_box_item >>> .el-cascader-menu:first-child .el-cascader-menu__item {
  2019. padding-left: 20px !important;
  2020. }
  2021. .selected_stu_box {
  2022. display: flex;
  2023. align-items: center;
  2024. gap: 10px;
  2025. }
  2026. .selected_stu_box_item {
  2027. background: #e8f3ff;
  2028. padding: 5px 10px;
  2029. }
  2030. .tabbox >>> .el-table--enable-row-transition .el-table__body td {
  2031. padding: 12px 30px;
  2032. }
  2033. .tabbox >>> .el-table th {
  2034. /* padding: 12px 20px; */
  2035. padding-left: 30px;
  2036. box-sizing: border-box;
  2037. }
  2038. .claInp {
  2039. border: none;
  2040. outline: none;
  2041. height: 30px;
  2042. line-height: 30px;
  2043. width: 130px;
  2044. font-size: 16px;
  2045. border-bottom: 1px solid #e7e7e7;
  2046. }
  2047. .bacl {
  2048. background: #e8f3ff;
  2049. border-radius: 4px;
  2050. }
  2051. .pop-upBox >>> .el-dialog {
  2052. border-radius: 8px !important;
  2053. margin-top: 30vh !important;
  2054. }
  2055. .pop-upBox >>> .el-dialog__body {
  2056. padding: 12px 23px;
  2057. }
  2058. .msgCon {
  2059. display: flex;
  2060. gap: 10px;
  2061. align-items: flex-start;
  2062. box-sizing: border-box;
  2063. }
  2064. .msgContxt {
  2065. display: flex;
  2066. flex-direction: column;
  2067. gap: 10px;
  2068. font-size: 16px;
  2069. color: #000000;
  2070. }
  2071. .copyMg {
  2072. width: 22px;
  2073. cursor: pointer;
  2074. padding: 2px;
  2075. }
  2076. .copyMg:hover {
  2077. background: #e8f3ff;
  2078. border-radius: 2px;
  2079. }
  2080. .dialog-footer div {
  2081. /* width: 100px; */
  2082. text-align: center;
  2083. padding: 8px 14px;
  2084. cursor: pointer;
  2085. border-radius: 5px;
  2086. box-sizing: border-box;
  2087. font-size: 14px;
  2088. }
  2089. .kbtn {
  2090. text-align: center;
  2091. padding: 8px 14px;
  2092. cursor: pointer;
  2093. border-radius: 3px;
  2094. box-sizing: border-box;
  2095. font-size: 14px;
  2096. }
  2097. .dialog-footer {
  2098. display: flex;
  2099. justify-content: flex-end;
  2100. gap: 10px;
  2101. }
  2102. </style>