index.vue 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029
  1. <template>
  2. <div class="rightBox">
  3. <div class="whiteBg" style="background:unset;padding: 0;">
  4. <div>
  5. <div class="basic_box" style="padding: 0;">
  6. <div class="big_box">
  7. <div class="left_first">
  8. <!-- <div class="c_info_title" style="padding: 0 0 15px;margin: 0 auto 0 0;">设置基础信息</div> -->
  9. <!-- <div>
  10. <div style="width: 100%;">
  11. <div class="course_input_box">
  12. <div class="bb_courseIcon"><img
  13. src="../../../../../assets/icon/new/course.png" />
  14. </div>
  15. <input @input="titleChange" type="text" placeholder="请输入表单名称"
  16. class="binfo_input" v-model="courseName"
  17. style="border: 1.5px solid rgb(202, 209, 220);margin: 0px 10px 0px 0px;border-radius: 5px;font-weight: 600;padding: 12px 14px 12px 71px;" />
  18. <el-switch v-model="isTeacherSee" active-text="允许回答后查看正确答案"
  19. style="justify-content: center;" @change="seeChange"></el-switch>
  20. </div>
  21. </div>
  22. </div> -->
  23. <!-- <div class="typeBox">
  24. <span>权限:</span>
  25. <el-select v-model="sJuri" placeholder="权限" @change="juriChange">
  26. <el-option label="所有人" value="0"></el-option>
  27. <el-option label="老师" value="1"></el-option>
  28. <el-option label="学生" value="2"></el-option>
  29. </el-select>
  30. </div> -->
  31. <!-- <div class="typeBox" style="display: flex;align-items: center;">
  32. <span>教研室权限:</span>
  33. <div class="checkJuri" @click="checkJuri">
  34. <span v-if="!getCName(checkList)" style="color: #c0c4d6;">所有人</span>
  35. <span>{{ getCName(checkList) }}</span>
  36. </div>
  37. </div> -->
  38. <div class="typeBox" v-if="typeArray.length" style="display: flex;flex-direction: column;">
  39. <span style="margin-bottom: 10px;">表单类型:</span>
  40. <!-- <el-select v-model="typeCheck" placeholder="选择类型" clearable @change="typeChange2">
  41. <el-option v-for="(item, index) in typeArray" :key="index" :label="item.name"
  42. :value="item.id"></el-option>
  43. </el-select> -->
  44. <div class="tb_select">
  45. <el-select style="width: calc(50% - 10px);" v-model="type1Value" placeholder="选择类型" clearable @change="type1ValueChange">
  46. <el-option v-for="(item, index) in type1List" :key="index" :label="item.name"
  47. :value="item.id"></el-option>
  48. </el-select>
  49. <el-select style="width: calc(50% - 10px);" v-model="typeCheck" placeholder="选择类型" clearable @change="typeChange2" >
  50. <template v-if="type1Value && type1List.find(i=>i.id==type1Value) && type1List.find(i=>i.id==type1Value).children.length>0" >
  51. <el-option v-for="(item, index) in type1List.find(i=>i.id==type1Value).children" :key="index" :label="item.name"
  52. :value="item.id"></el-option>
  53. </template>
  54. </el-select>
  55. </div>
  56. </div>
  57. <div class="typeBox" style="display: flex;flex-direction: column;">
  58. <span style="margin-bottom: 10px;">截止日期:</span>
  59. <el-date-picker v-model="selectedDate" type="date" :picker-options="pickerOptions"
  60. @change="DateChange" format="yyyy-MM-dd" clearable=""
  61. placeholder="选择截止日期" style="width: 100%;"></el-date-picker>
  62. </div>
  63. <div class="both">
  64. <div class="choose">
  65. <div class="all_choose" v-for="(item, index) in CourseType[0]" :key="index"
  66. @change="typeChange">
  67. <span v-if="CourseTypeJson[item.id].length > 0">{{ item.name }}:</span>
  68. <el-checkbox-group v-model="courseTypeId"
  69. v-if="CourseTypeJson[item.id].length > 0">
  70. <el-checkbox v-for="item1 in CourseTypeJson[item.id]" :key="item1.id"
  71. :label="item1.id">{{
  72. item1.name }}</el-checkbox>
  73. </el-checkbox-group>
  74. </div>
  75. </div>
  76. </div>
  77. <div class="whiteBg" style="border-radius: 0; margin-top: 0px;margin-bottom: 10px;" v-if="teaType.length">
  78. <div class="c_info_title" style="padding: 0 0 15px;margin: 0 auto 0 0;">设置填写范围
  79. <span style="font-weight: 500; color: #7F7979E5;">(符合以下所有条件的教师)</span>
  80. <span style="margin-left: auto; cursor: pointer;" @click="checkTeacher">已选:{{ teacherArray.length }}人</span>
  81. </div>
  82. <div class="typeBox" v-for="item in teaType" :key="item.id" style="margin: 0 0 10px">
  83. <span>{{ item.name + ":" }}</span>
  84. <el-select v-model="item.value" :placeholder="'请选择' + item.name"
  85. @change="Ochange" clearable>
  86. <el-option v-for="i in item.child" :key="i.id" :label="i.name" :value="i.id">
  87. </el-option>
  88. </el-select>
  89. </div>
  90. </div>
  91. <div class="url_box">
  92. <div class="title">
  93. 分享方式
  94. </div>
  95. <div class="url">
  96. <el-tooltip :content="origin" placement="top" effect="dark">
  97. <!-- content to trigger tooltip here -->
  98. <span>{{ origin }}</span>
  99. </el-tooltip>
  100. <span @click="copy" :data-clipboard-text="copyText" class="tag-read">复制链接</span>
  101. </div>
  102. </div>
  103. <div class="qrcode_box">
  104. <div class="qrcode">
  105. <span class="qrcodeUrl" ref="qrCodeUrl"></span>
  106. <span @click="downQr">下载二维码</span>
  107. </div>
  108. </div>
  109. <!-- <div class="whiteBg" style="border-radius: 0; margin-top: 0px">
  110. <div class="c_info_title" style="padding: 0 0 15px;margin: 0 auto 0 0;">表单描述</div>
  111. <div style="width: 100%;box-sizing: border-box;">
  112. <div style="width: calc((100%))">
  113. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols
  114. v-model="courseText" placeholder="表单描述" @change="briefChange"></textarea>
  115. </div>
  116. </div>
  117. </div> -->
  118. </div>
  119. </div>
  120. </div>
  121. </div>
  122. </div>
  123. <el-dialog title="选择权限" :visible.sync="juriDialog" :append-to-body="true" :before-close="handleClose"
  124. class="dialog_diy" width="500px">
  125. <van-divider>
  126. <div class="people_name">
  127. <el-checkbox v-model="checkAll" @change="checkAllChange">全选</el-checkbox>
  128. <el-checkbox v-model="ischeckAll" @change="ischeckAllChange">所有人</el-checkbox>
  129. </div>
  130. <div style="max-height: 300px;overflow: auto;">
  131. <el-checkbox-group v-model="checkList2" class="people_name" @change="pChange">
  132. <el-checkbox v-for="item in classJuri" :key="item.id" :label="item.id">
  133. {{ item.name }}
  134. </el-checkbox>
  135. </el-checkbox-group>
  136. </div>
  137. </van-divider>
  138. <span slot="footer" class="dialog-footer">
  139. <el-button @click="juriDialog = false">取 消</el-button>
  140. <el-button type="primary" @click="confirmCheck">确 定
  141. </el-button>
  142. </span>
  143. </el-dialog>
  144. <el-dialog title="填写返回已选教师" :visible.sync="dialogTeacher" :append-to-body="true" :before-close="handleClose"
  145. class="dialog_diy" width="500px">
  146. <van-divider>
  147. <div style="display: flex;flex-wrap: wrap;line-height: 20px;">
  148. <span style="color: #00000099;">已选教师名单:</span>
  149. <span style="word-break: break-word;" v-for="(item, index) in teacherArray" :key="item.userid">
  150. {{ item.username }}{{ index == teacherArray.length - 1 ? '' : '、' }}
  151. </span>
  152. </div>
  153. </van-divider>
  154. </el-dialog>
  155. </div>
  156. </template>
  157. <script>
  158. import manualCreate from './manualCreated.vue';
  159. import aiCreate from './aiCreate.vue';
  160. import Clipboard from "clipboard";
  161. import QRCode from "qrcodejs2";
  162. export default {
  163. components: {
  164. manualCreate,
  165. aiCreate
  166. },
  167. props: {
  168. oid: {
  169. type: String
  170. },
  171. org: {
  172. type: String
  173. },
  174. title: {
  175. type: String
  176. },
  177. testType: {
  178. type: Array
  179. },
  180. see: {
  181. type: Boolean
  182. },
  183. steps: {
  184. type: Number
  185. },
  186. cJson: {
  187. type: Array
  188. },
  189. typeid: {
  190. type: String
  191. },
  192. brief: {
  193. type: String
  194. },
  195. juri: {
  196. type: String
  197. },
  198. overDate: {
  199. type: String
  200. },
  201. juriList: {
  202. type: Array
  203. },
  204. typeInfo: {
  205. type: Array
  206. },
  207. origin: {
  208. type: String
  209. }
  210. },
  211. data() {
  212. return {
  213. CourseType: [],
  214. courseTypeId: [],
  215. CourseTypeJson: {},
  216. courseName: "",
  217. isTeacherSee: false,
  218. type: 2,
  219. manualJson: [],
  220. aiDialogVisible: false,
  221. typeArray: [],
  222. typeCheck: '',
  223. sJuri: '',
  224. courseText: '',
  225. selectedDate: '',
  226. pickerOptions: {
  227. disabledDate(time) {
  228. return time.getTime() < Date.now(); // 只能选择大于今天的日期
  229. },
  230. },
  231. classJuri: [],
  232. checkList: [],
  233. checkList2: [],
  234. juriDialog: false,
  235. checkAll: false,
  236. ischeckAll: false,
  237. teaType: [],
  238. teacherArray:[],
  239. dialogTeacher: false,
  240. copyText: "",
  241. type1List:[],
  242. type2List:[],
  243. type1Value:"",
  244. type2Value:"",
  245. liYuanOrgList:["3823a6a5-1b6e-11f0-a66a-005056924926",
  246. "292e34dc-1b6e-11f0-a66a-005056924926",
  247. "21d6b367-1b6e-11f0-a66a-005056924926",
  248. "1a1a172d-1b6e-11f0-a66a-005056924926",
  249. "1197f86b-1b6e-11f0-a66a-005056924926",
  250. "f235659b-1b6d-11f0-a66a-005056924926",
  251. "d87b62d3-1b6d-11f0-a66a-005056924926",
  252. "c25ea59b-1b6d-11f0-a66a-005056924926",
  253. ]
  254. }
  255. },
  256. computed: {
  257. getCName() {
  258. return function (clist) {
  259. let _people = [];
  260. let _people2 = [];
  261. let _people3 = [];
  262. if (this.classJuri.length) {
  263. for (var i = 0; i < this.classJuri.length; i++) {
  264. _people2.push(this.classJuri[i].id);
  265. }
  266. for (var i = 0; i < clist.length; i++) {
  267. if (_people2.indexOf(clist[i]) !== -1) {
  268. _people3.push(clist[i]);
  269. }
  270. }
  271. for (var i = 0; i < this.classJuri.length; i++) {
  272. if (_people3.indexOf(this.classJuri[i].id) !== -1) {
  273. _people.push(this.classJuri[i].name);
  274. }
  275. }
  276. }
  277. return this.classJuri.length ? _people.join(',') : "所有人";
  278. };
  279. },
  280. },
  281. directives: {
  282. autoHeight: {
  283. update(el, binding) {
  284. const { value } = binding
  285. if (value && typeof value === 'number') {
  286. el.style.height = `${value}px`
  287. } else {
  288. el.style.height = 'auto'
  289. }
  290. },
  291. componentUpdated(el) {
  292. el.style.height = `${el.scrollHeight + 5}px`
  293. },
  294. },
  295. },
  296. watch: {
  297. teaType: {
  298. immediate: true,
  299. deep: true,
  300. async handler(newValue, oldValue) {
  301. if(newValue.length){
  302. await this.getTestWorkTeacherCount()
  303. }
  304. },
  305. },
  306. origin(){
  307. this.setQr()
  308. },
  309. },
  310. methods: {
  311. async getTestWorkTeacherCount(){
  312. let j3 = []
  313. if(this.teaType.length){
  314. this.teaType.forEach(e => {
  315. j3.push(e.value)
  316. })
  317. }
  318. let params = [{
  319. juri: j3.length ? j3.join(',') : "",
  320. userid: this.$route.query.userid
  321. }]
  322. try {
  323. let res = await this.ajax.post(this.$store.state.api + "getTestWorkTeacherCount", params)
  324. this.teacherArray = res.data[0]
  325. }catch (err) {
  326. this.$message.error("网络不佳");
  327. console.error(err);
  328. }
  329. console.log('11111111111')
  330. },
  331. Ochange() {
  332. this.$forceUpdate()
  333. this.$emit("update:typeInfo", this.teaType)
  334. },
  335. handleClose(done) {
  336. done();
  337. },
  338. selectAllType() {
  339. let params = {
  340. org: this.org && this.org != "" ? this.org : "",
  341. oid: this.oid && this.oid != "" ? this.oid : "",
  342. };
  343. this.ajax
  344. .get(this.$store.state.api + "selectAllTypeT", params)
  345. .then((res) => {
  346. this.CourseType = res.data;
  347. for (var cti = 0; cti < res.data[0].length; cti++) {
  348. if (res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86db5" || res.data[0][cti].id == "34628934-d02f-11ec-8c78-005056b86ac5") {
  349. res.data[0][cti].name = "年级";
  350. } else if (res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86db5" || res.data[0][cti].id == "34629907-d02f-11ec-8c78-005056b86ac5") {
  351. res.data[0][cti].name = "学科";
  352. }
  353. }
  354. let _courseTypeId = [];
  355. for (var i = 0; i < res.data[0].length; i++) {
  356. if (!this.cid) {
  357. this.courseTypeId[res.data[0][i].id] = [];
  358. }
  359. // if (!this.CourseTypeJson[res.data[0][i].id]) {
  360. // }
  361. this.CourseTypeJson[res.data[0][i].id] = [];
  362. if (res.data[2].length == 0 && res.data[3].length == 0) {
  363. for (var j = 0; j < res.data[1].length; j++) {
  364. if (
  365. this.courseTypeId.indexOf(res.data[1][j].id) != -1 &&
  366. _courseTypeId.indexOf(res.data[1][j].id) == -1
  367. ) {
  368. _courseTypeId.push(res.data[1][j].id);
  369. }
  370. if (res.data[0][i].id == res.data[1][j].pid) {
  371. this.CourseTypeJson[res.data[0][i].id].push(res.data[1][j]); // 去除公共分类
  372. }
  373. }
  374. } else {
  375. if (res.data[2].length > 0) {
  376. for (var j = 0; j < res.data[2].length; j++) {
  377. if (
  378. this.courseTypeId.indexOf(res.data[2][j].id) != -1 &&
  379. _courseTypeId.indexOf(res.data[2][j].id) == -1
  380. ) {
  381. _courseTypeId.push(res.data[2][j].id);
  382. }
  383. if (res.data[0][i].id == res.data[2][j].pid) {
  384. this.CourseTypeJson[res.data[0][i].id].push(res.data[2][j]); // 去除公共分类
  385. }
  386. }
  387. }
  388. if (res.data[3].length > 0) {
  389. for (var j = 0; j < res.data[3].length; j++) {
  390. if (
  391. this.courseTypeId.indexOf(res.data[3][j].id) != -1 &&
  392. _courseTypeId.indexOf(res.data[3][j].id) == -1
  393. ) {
  394. _courseTypeId.push(res.data[3][j].id);
  395. }
  396. if (res.data[0][i].id == res.data[3][j].pid) {
  397. this.CourseTypeJson[res.data[0][i].id].push(res.data[3][j]); // 去除公共分类
  398. }
  399. }
  400. }
  401. }
  402. }
  403. this.courseTypeId = _courseTypeId;
  404. })
  405. .catch((err) => {
  406. console.error(err);
  407. });
  408. },
  409. titleChange() {
  410. this.$emit("update:title", this.courseName)
  411. },
  412. typeChange() {
  413. this.$emit("update:testType", this.courseTypeId)
  414. },
  415. seeChange() {
  416. this.$emit("update:see", this.isTeacherSee)
  417. },
  418. typeChange2() {
  419. this.$emit("update:typeid", this.typeCheck)
  420. },
  421. juriChange() {
  422. this.$emit("update:juri", this.sJuri)
  423. },
  424. DateChange() {
  425. this.$emit("update:overDate", this.selectedDate)
  426. },
  427. briefChange() {
  428. this.$emit("update:brief", this.courseText)
  429. },
  430. depthCopy(s) {
  431. return JSON.parse(JSON.stringify(s))
  432. },
  433. openAiCreate() {
  434. this.aiDialogVisible = true
  435. },
  436. nextSteps() {
  437. if (this.type == 2) {
  438. this.$emit("update:cJson", this.manualJson)
  439. }
  440. this.$emit('update:steps', this.steps + 1)
  441. console.log(this.cJson);
  442. console.log(this.manualJson);
  443. },
  444. selectType() {
  445. let params = {
  446. oid: this.oid,
  447. };
  448. let _url = "selectTestType"
  449. if(this.liYuanOrgList.includes(this.org)){
  450. _url = "selectTestType_liYuan"
  451. }
  452. this.ajax
  453. .get(this.$store.state.api + _url, params)
  454. .then((res) => {
  455. this.typeArray = res.data[0];
  456. let _data = res.data[0];
  457. let _type1 = _data.filter(i=>!i.pid);
  458. _type1.forEach(i=>{
  459. let _children = [];
  460. _children = _data.filter(i2=>i2.pid == i.id);
  461. i.children = _children;
  462. })
  463. this.type1List = _type1;
  464. if(this.typeCheck){
  465. _type1.forEach((item,index)=>{
  466. if(item.children.find(i2=>i2.id==this.typeCheck)){
  467. this.type1Value = item.id;
  468. }
  469. })
  470. }else if(this.$route.query.typeId1){
  471. let _rtype1 = this.$route.query.typeId1;
  472. let _type1Index = _type1.findIndex(i=>i.id==_rtype1)
  473. if(_type1Index!=-1){
  474. this.type1Value = _type1[_type1Index].id;
  475. if(_type1[_type1Index].children.length>0){
  476. this.typeCheck = _type1[_type1Index].children[0].id;
  477. }
  478. }
  479. this.typeChange2();
  480. }
  481. console.log("👉6",_type1)
  482. })
  483. .catch((err) => {
  484. console.error(err);
  485. });
  486. },
  487. //获取教研室列表
  488. getClass2() {
  489. let params = {
  490. oid: this.oid,
  491. };
  492. this.ajax
  493. .get(this.$store.state.api + "selectTeacherOfficeBySchool", params)
  494. .then((res) => {
  495. this.classJuri = res.data[0].filter((item) => { return item.parentid == '6' });
  496. })
  497. .catch((err) => {
  498. this.isLoading = false;
  499. console.error(err);
  500. });
  501. },
  502. checkJuri() {
  503. let clist = []
  504. let clist2 = []
  505. for (var i = 0; i < this.classJuri.length; i++) {
  506. clist2.push(this.classJuri[i].id)
  507. }
  508. for (var i = 0; i < this.checkList.length; i++) {
  509. if (clist2.indexOf(this.checkList[i]) !== -1) {
  510. clist.push(this.checkList[i])
  511. }
  512. }
  513. this.checkList2 = JSON.parse(JSON.stringify(clist));
  514. this.checkAll = this.checkList2.length == this.classJuri.length;
  515. this.ischeckAll = !this.checkList2.length;
  516. this.juriDialog = true
  517. },
  518. checkAllChange() {
  519. if (this.checkAll) {
  520. this.checkList2 = []
  521. for (var i = 0; i < this.classJuri.length; i++) {
  522. this.checkList2.push(this.classJuri[i].id)
  523. }
  524. this.ischeckAll = false
  525. } else {
  526. this.checkList2 = []
  527. this.ischeckAll = true
  528. }
  529. },
  530. ischeckAllChange() {
  531. if (this.ischeckAll) {
  532. this.checkAll = false
  533. this.checkList2 = []
  534. } else {
  535. }
  536. this.ischeckAll = !this.checkList2.length;
  537. },
  538. pChange(val) {
  539. if (val.length == this.classJuri.length) {
  540. this.checkAll = true
  541. } else {
  542. this.checkAll = false
  543. }
  544. this.ischeckAll = !this.checkList2.length;
  545. },
  546. confirmCheck() {
  547. this.checkList = JSON.parse(JSON.stringify(this.checkList2));
  548. this.$emit("update:juriList", this.checkList)
  549. this.juriDialog = false
  550. },
  551. checkTeacher(){
  552. this.dialogTeacher = true
  553. },
  554. setQr() {
  555. setTimeout(() => {
  556. this.$refs.qrCodeUrl.innerHTML = "";
  557. var qrcode = new QRCode(this.$refs.qrCodeUrl, {
  558. text: this.origin, // 需要转换为二维码的内容
  559. width: 100,
  560. height: 100,
  561. colorDark: "#000000",
  562. colorLight: "#ffffff",
  563. correctLevel: QRCode.CorrectLevel.H,
  564. });
  565. }, 500);
  566. },
  567. downQr() {
  568. // 创建一个虚拟链接,并将 canvas 转换为图片文件
  569. const link = document.createElement('a');
  570. link.href = this.$refs.qrCodeUrl.querySelector('img').src;
  571. link.download = 'qrcode.png';
  572. // 模拟点击链接进行下载
  573. link.click();
  574. },
  575. copy() {
  576. this.copyText = this.origin;
  577. var clipboard = new Clipboard(".tag-read");
  578. clipboard.on("success", (e) => {
  579. this.$message.success("复制成功");
  580. console.log("复制成功");
  581. clipboard.destroy(); // 释放内存
  582. });
  583. clipboard.on("error", (e) => {
  584. console.log("不支持复制,该浏览器不支持自动复制");
  585. clipboard.destroy(); // 释放内存
  586. });
  587. },
  588. type1ValueChange(){
  589. if(this.type1Value){
  590. if(this.typeCheck){
  591. if(!this.type1List.find(i=>i.id==this.type1Value).children.findIndex(i2=>i2.id==this.typeCheck)!=-1){
  592. this.typeCheck = this.type1List.find(i=>i.id==this.type1Value).children[0].id;
  593. this.typeChange2();
  594. }
  595. }else{
  596. this.typeCheck = this.type1List.find(i=>i.id==this.type1Value).children[0].id;
  597. this.typeChange2();
  598. }
  599. }else{
  600. this.typeCheck = "";
  601. this.typeChange2();
  602. }
  603. }
  604. },
  605. async mounted() {
  606. this.courseTypeId = this.depthCopy(this.testType)
  607. this.courseName = this.depthCopy(this.title)
  608. this.isTeacherSee = this.depthCopy(this.see)
  609. this.manualJson = this.depthCopy(this.cJson)
  610. this.typeCheck = this.depthCopy(this.typeid)
  611. this.courseText = this.depthCopy(this.brief)
  612. this.sJuri = this.depthCopy(this.juri)
  613. this.selectedDate = this.depthCopy(this.overDate)
  614. this.checkList = this.depthCopy(this.juriList)
  615. this.teaType = this.depthCopy(this.typeInfo)
  616. this.$forceUpdate()
  617. // this.selectAllType();
  618. this.selectType();
  619. this.getClass2();
  620. await this.getTestWorkTeacherCount()
  621. console.log('getTestWorkTeacherCount')
  622. this.setQr();
  623. }
  624. }
  625. </script>
  626. <style scoped>
  627. .rightBox {
  628. width: calc(100%);
  629. background: #F0F2F5;
  630. overflow: auto;
  631. height: calc(100%);
  632. margin: 0 auto;
  633. position: relative;
  634. box-sizing: border-box;
  635. overflow: hidden;
  636. }
  637. .whiteBg {
  638. /* background: #fff; */
  639. border-radius: 10px;
  640. }
  641. .basic_box {
  642. margin: 0 auto;
  643. position: relative;
  644. padding: 0 20px 0 20px;
  645. }
  646. .big_box {
  647. /* margin-top: 20px; */
  648. display: flex;
  649. justify-content: space-between;
  650. /* border-bottom: 1px solid #E0E2ED; */
  651. }
  652. .left_first {
  653. display: flex;
  654. flex-direction: column;
  655. flex-wrap: nowrap;
  656. width: calc(100%);
  657. padding: 0;
  658. box-sizing: border-box;
  659. background: #fff;
  660. border-radius: 5px;
  661. }
  662. .course_input_box {
  663. display: flex;
  664. margin-right: 20px;
  665. width: 100%;
  666. align-items: center;
  667. position: relative;
  668. }
  669. .course_input_box>.binfo_input {
  670. width: calc(100% - 290px);
  671. margin: 0 10px;
  672. }
  673. .bb_courseIcon {
  674. width: 57px;
  675. height: 45px;
  676. background: #F0F4FA;
  677. border-radius: 5px 0px 0px 5px;
  678. display: flex;
  679. align-items: center;
  680. justify-content: center;
  681. border-right: 1.5px solid rgb(202, 209, 220);
  682. box-sizing: border-box;
  683. position: absolute;
  684. left: 1.5px
  685. }
  686. .bb_courseIcon>img {
  687. width: 25px;
  688. height: auto
  689. }
  690. .all_choose {
  691. display: flex;
  692. flex-direction: row;
  693. align-items: flex-start;
  694. width: 100%;
  695. }
  696. .all_choose+.all_choose {
  697. /* margin-top: 10px */
  698. }
  699. .all_choose>span {
  700. min-width: fit-content;
  701. display: block;
  702. white-space: nowrap;
  703. overflow: hidden;
  704. text-overflow: ellipsis;
  705. margin-right: 20px;
  706. font-weight: bold;
  707. font-size: 14px;
  708. }
  709. .all_choose>>>.el-checkbox-group {
  710. display: flex;
  711. flex-direction: row;
  712. width: 100%;
  713. flex-wrap: wrap;
  714. align-content: center;
  715. justify-content: flex-start;
  716. align-items: center;
  717. margin-top: 3px;
  718. }
  719. .all_choose>.el-checkbox-group>>>.el-checkbox {
  720. margin-bottom: 10px;
  721. display: flex;
  722. flex-direction: row;
  723. align-items: center;
  724. margin-right: 10px;
  725. }
  726. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label {
  727. min-width: 80px;
  728. overflow: hidden;
  729. width: 80px;
  730. text-overflow: ellipsis;
  731. white-space: nowrap;
  732. }
  733. .all_choose>.el-checkbox-group>.el-checkbox>>>.el-checkbox__label:hover {
  734. width: auto;
  735. }
  736. .choose>div:nth-child(3)>span {
  737. /* letter-spacing: 0 !important; */
  738. }
  739. .choose {
  740. display: flex;
  741. flex-direction: column;
  742. flex-wrap: nowrap;
  743. height: 100%;
  744. justify-content: space-evenly;
  745. align-items: flex-start;
  746. }
  747. .both {
  748. display: flex;
  749. flex-direction: row;
  750. flex-wrap: wrap;
  751. width: 100%;
  752. align-items: center;
  753. justify-content: flex-start;
  754. margin: 15px 0;
  755. }
  756. .binfo_input {
  757. width: 100%;
  758. margin: 0;
  759. padding: 12px 14px;
  760. display: block;
  761. min-width: 0;
  762. outline: none;
  763. box-sizing: border-box;
  764. background: none;
  765. border: none;
  766. border-radius: 4px;
  767. background: #fff;
  768. font-size: 16px;
  769. resize: none;
  770. font-family: 'Microsoft YaHei';
  771. min-height: 48px;
  772. border: 1.5px solid #CAD1DC;
  773. }
  774. .c_info_title {
  775. padding: 15px 0 15px 0;
  776. font-size: 14px;
  777. font-weight: bold;
  778. margin: 0 0 0 20px;
  779. box-sizing: border-box;
  780. display: flex;
  781. align-items: center;
  782. line-height: 20px;
  783. }
  784. /* .c_info_title::before {
  785. content: '';
  786. display: block;
  787. width: 3px;
  788. height: 20px;
  789. background: #0061FF;
  790. border-radius: 3px;
  791. margin: 0 5px 0 0;
  792. } */
  793. .c_info_box {
  794. width: 100%;
  795. }
  796. .c_info_tab {
  797. display: flex;
  798. align-items: center;
  799. justify-content: center;
  800. }
  801. .c_info_tab>span {
  802. cursor: pointer;
  803. padding-bottom: 10px;
  804. font-weight: bold;
  805. }
  806. .c_info_tab>span+span {
  807. margin-left: 20px;
  808. }
  809. .c_info_tab>.active {
  810. color: #3e88f4;
  811. border-bottom: 2px solid #2f80f3;
  812. }
  813. .c_info_tab_box {
  814. overflow: hidden;
  815. }
  816. .skip_btn {
  817. position: absolute;
  818. right: 20px;
  819. }
  820. .typeBox {
  821. margin-top: 20px;
  822. }
  823. .typeBox>span {
  824. font-weight: bold;
  825. font-size: 14px;
  826. }
  827. .binfo_textarea {
  828. border: 1.5px solid #CAD1DC;
  829. font-size: 16px;
  830. resize: none;
  831. /* background: #f6f6f6; */
  832. font-family: 'Microsoft YaHei';
  833. }
  834. .checkJuri {
  835. width: 220px;
  836. height: 40px;
  837. border: 1px solid #DCDFE6;
  838. padding: 0 15px;
  839. display: flex;
  840. align-items: center;
  841. box-sizing: border-box;
  842. margin-left: 5px;
  843. border-radius: 4px;
  844. overflow: hidden;
  845. text-overflow: ellipsis;
  846. white-space: nowrap;
  847. cursor: pointer;
  848. font-size: 14px;
  849. color: #464646;
  850. }
  851. .dialog_diy>>>.el-dialog {
  852. /* height: 100%; */
  853. /* margin: 15vh auto !important; */
  854. }
  855. .dialog_diy>>>.el-dialog__header {
  856. background: #454545 !important;
  857. padding: 15px 20px;
  858. }
  859. .dialog_diy>>>.el-dialog__body {
  860. /* height: calc(100% - 54px); */
  861. box-sizing: border-box;
  862. /* padding: 0px; */
  863. }
  864. .dialog_diy>>>.el-dialog__title {
  865. color: #fff;
  866. }
  867. .dialog_diy>>>.el-dialog__headerbtn {
  868. top: 19px;
  869. }
  870. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close {
  871. color: #fff;
  872. }
  873. .dialog_diy>>>.el-dialog__headerbtn .el-dialog__close:hover {
  874. color: #fff;
  875. }
  876. .dialog_diy>>>.el-dialog__body,
  877. .dialog_diy>>>.el-dialog__footer {
  878. /* background: #e8ebf1; */
  879. overflow: hidden;
  880. }
  881. .people_name>>>.el-checkbox {
  882. width: 100%;
  883. display: flex;
  884. align-items: center;
  885. margin-bottom: 10px;
  886. }
  887. .people_name>>>.el-checkbox__label {
  888. text-overflow: ellipsis;
  889. overflow: hidden;
  890. width: calc(100%);
  891. }
  892. .people_name2>>>.el-checkbox__label {
  893. width: calc(100% - 130px);
  894. }
  895. .url_box {
  896. margin-bottom: 20px;
  897. }
  898. .qrcode_box {
  899. margin-bottom: 20px;
  900. }
  901. .url_box>.url {
  902. width: 100%;
  903. display: flex;
  904. align-items: center;
  905. border: 1px solid #e7e7e7;
  906. border-radius: 4px;
  907. height: 35px;
  908. padding: 0 7px;
  909. box-sizing: border-box;
  910. }
  911. .url_box>.url>span {
  912. font-size: 16px;
  913. color: #000000;
  914. }
  915. .url_box>.url>span:nth-child(1) {
  916. width: 100%;
  917. white-space: nowrap;
  918. overflow: hidden;
  919. text-overflow: ellipsis;
  920. }
  921. .url_box>.url>span:nth-child(2) {
  922. margin-left: auto;
  923. border-left: 1px solid #e7e7e7;
  924. padding-left: 7px;
  925. cursor: pointer;
  926. min-width: fit-content;
  927. }
  928. .url_box>.title,
  929. .qrcode_box>.title {
  930. font-weight: bold;
  931. font-size: 14px;
  932. margin-bottom: 10px;
  933. color:#000;
  934. }
  935. .qrcode_box>.qrcode {
  936. padding: 7px;
  937. border: 1px solid #e7e7e7;
  938. width: fit-content;
  939. border-radius: 4px;
  940. display: flex;
  941. align-items: flex-end;
  942. }
  943. .qrcode_box>.qrcode>span:nth-child(1) {
  944. width: 100px;
  945. display: block;
  946. height: 100px;
  947. }
  948. .qrcode_box>.qrcode>span:nth-child(2) {
  949. background: #f0f2f5;
  950. padding: 7px 15px;
  951. font-size: 16px;
  952. border-radius: 4px;
  953. cursor: pointer;
  954. color: #000;
  955. margin-left: 7px;
  956. }
  957. .tb_select{
  958. display: flex;
  959. justify-content: space-between;
  960. }
  961. </style>