teacherOperation.vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818
  1. <template>
  2. <div class="m-container">
  3. <!-- <h2>
  4. <el-page-header @back="onCancel" :content="'老师' + (pageType == 'create' ? '新增' : '修改')"></el-page-header>
  5. </h2>-->
  6. <div class="infoWrap">
  7. <div class="left">
  8. <h4>基本信息</h4>
  9. <el-form :model="topForm" :rules="rules" ref="form">
  10. <el-row>
  11. <el-col :span="12">
  12. <el-form-item
  13. label="姓名"
  14. prop="realName"
  15. :label-width="formLabelWidth"
  16. >
  17. <el-input v-model.trim="topForm.realName"></el-input>
  18. </el-form-item>
  19. </el-col>
  20. <el-col :span="12">
  21. <el-form-item label="姓名(备注)" :label-width="formLabelWidth">
  22. <el-input v-model.trim="topForm.memo"></el-input>
  23. </el-form-item>
  24. </el-col>
  25. </el-row>
  26. <el-row>
  27. <el-col :span="12">
  28. <el-form-item
  29. label="性别"
  30. prop="gender"
  31. :label-width="formLabelWidth"
  32. >
  33. <el-select v-model.trim="topForm.gender">
  34. <el-option label="男" :value="1"></el-option>
  35. <el-option label="女" :value="0"></el-option>
  36. </el-select>
  37. </el-form-item>
  38. </el-col>
  39. <el-col :span="12">
  40. <el-form-item label="出生日期" :label-width="formLabelWidth">
  41. <el-date-picker
  42. v-model.trim="topForm.birthdate"
  43. type="date"
  44. :picker-options="{
  45. firstDayOfWeek: 1,
  46. }"
  47. value-format="yyyy-MM-dd"
  48. placeholder="出生日期"
  49. ></el-date-picker>
  50. </el-form-item>
  51. </el-col>
  52. </el-row>
  53. <el-row>
  54. <el-col :span="12">
  55. <el-form-item
  56. label="入职日期"
  57. prop="entryDate"
  58. :label-width="formLabelWidth"
  59. >
  60. <el-date-picker
  61. v-model.trim="topForm.entryDate"
  62. type="date"
  63. :picker-options="pickerOptions2"
  64. value-format="yyyy-MM-dd"
  65. placeholder="入职日期"
  66. ></el-date-picker>
  67. </el-form-item>
  68. </el-col>
  69. <el-col :span="12">
  70. <el-form-item
  71. label="工作类型"
  72. prop="jobNature"
  73. :label-width="formLabelWidth"
  74. >
  75. <el-select
  76. v-model.trim="topForm.jobNature"
  77. placeholder="工作类型"
  78. clearable
  79. filterable
  80. >
  81. <el-option
  82. v-for="item in jobNature"
  83. :key="item.value"
  84. :label="item.label"
  85. :value="item.value"
  86. ></el-option>
  87. </el-select>
  88. </el-form-item>
  89. </el-col>
  90. </el-row>
  91. <el-row>
  92. <el-col :span="12">
  93. <el-form-item
  94. label="所属分部"
  95. prop="organId"
  96. :label-width="formLabelWidth"
  97. >
  98. <el-select
  99. v-model.trim="topForm.organId"
  100. filterable
  101. clearable
  102. placeholder="所属分部"
  103. @change="switchOrgan"
  104. >
  105. <el-option
  106. v-for="item in branchList"
  107. :key="item.value"
  108. :label="item.label"
  109. :value="item.value"
  110. ></el-option>
  111. </el-select>
  112. </el-form-item>
  113. </el-col>
  114. <el-col :span="12">
  115. <el-form-item label="流动范围" :label-width="formLabelWidth">
  116. <el-select
  117. v-model.trim="topForm.flowOrganRange"
  118. filterable
  119. clearable
  120. multiple
  121. placeholder="流动范围"
  122. >
  123. <el-option
  124. v-for="item in branchList"
  125. :key="item.value"
  126. :label="item.label"
  127. :value="item.value.toString()"
  128. ></el-option>
  129. </el-select>
  130. </el-form-item>
  131. </el-col>
  132. </el-row>
  133. <el-row>
  134. <el-col :span="12">
  135. <el-form-item
  136. label="员工状态"
  137. prop="isProbationPeriod"
  138. :label-width="formLabelWidth"
  139. >
  140. <el-select
  141. v-model.trim="topForm.isProbationPeriod"
  142. clearable
  143. filterable
  144. placeholder="员工状态"
  145. >
  146. <el-option v-for="item in ProbationPeriodList" :key="item.value" :label="item.label" :value="Number(item.value)"></el-option>
  147. <!-- <el-option label="正式" :value="0"></el-option>
  148. <el-option label="试用" :value="1"></el-option>
  149. <el-option label="实习" :value="3"></el-option> -->
  150. </el-select>
  151. </el-form-item>
  152. </el-col>
  153. <el-col :span="12" v-if="pageType == 'update'">
  154. <el-form-item label="教学点" :label-width="formLabelWidth">
  155. <el-input disabled v-model.trim="teacherSchools"></el-input>
  156. </el-form-item>
  157. </el-col>
  158. </el-row>
  159. <el-row>
  160. <el-col :span="12">
  161. <el-form-item label="老师简介" :label-width="formLabelWidth">
  162. <el-input
  163. type="textarea"
  164. v-model.trim="topForm.introduction"
  165. ></el-input>
  166. </el-form-item>
  167. </el-col>
  168. <el-col :span="12" class="diSpan">
  169. <el-tooltip placement="top" popper-class="mTooltip">
  170. <div slot="content">
  171. 「是」此老师可作为网管课老师;
  172. <br />「否」此老师不可作为网管课老师;
  173. </div>
  174. <!-- <img :src="imageIcon" class="micon el-tooltip" style="width:8px height:8px" alt /> -->
  175. <i
  176. class="el-icon-question micon el-tooltip"
  177. style="font-size: 18px; color: #f56c6c"
  178. ></i>
  179. </el-tooltip>
  180. <el-form-item label="开放陪练" label-width="90px" class="course">
  181. <el-select
  182. v-model.trim="topForm.isSupportExtraPracticeLesson"
  183. clearable
  184. filterable
  185. placeholder="开放陪练"
  186. >
  187. <el-option label="是" :value="true"></el-option>
  188. <el-option label="否" :value="false"></el-option>
  189. </el-select>
  190. </el-form-item>
  191. </el-col>
  192. </el-row>
  193. <h4>资料学历</h4>
  194. <el-row>
  195. <el-col :span="12">
  196. <!-- :rules="[{ required: true, message: '手机号不能为空',trigger: 'blur'},{pattern: /^1[3456789]\d{9}$/, message: '请输入正确的手机号',trigger: 'blur' }]" -->
  197. <el-form-item
  198. label="手机号"
  199. prop="phone"
  200. :label-width="formLabelWidth"
  201. >
  202. <el-input v-model.trim.number="topForm.phone"></el-input>
  203. </el-form-item>
  204. </el-col>
  205. <el-col :span="12">
  206. <el-form-item label="毕业学校" :label-width="formLabelWidth">
  207. <el-input v-model.trim="topForm.graduateSchool"></el-input>
  208. </el-form-item>
  209. </el-col>
  210. </el-row>
  211. <el-row>
  212. <el-col :span="12">
  213. <el-form-item label="电子邮箱" :label-width="formLabelWidth">
  214. <el-input v-model.trim="topForm.email"></el-input>
  215. </el-form-item>
  216. </el-col>
  217. <el-col :span="12">
  218. <el-form-item label="最高学历" :label-width="formLabelWidth">
  219. <!-- <el-input v-model.trim="topForm.educationBackground"></el-input> -->
  220. <el-select
  221. v-model.trim="topForm.educationBackground"
  222. clearable
  223. filterable
  224. placeholder="最高学历"
  225. >
  226. <el-option label="初中" value="初中"></el-option>
  227. <el-option label="高中" value="高中"></el-option>
  228. <el-option label="大专" value="大专"></el-option>
  229. <el-option label="本科" value="本科"></el-option>
  230. <el-option label="硕士" value="硕士"></el-option>
  231. <el-option label="博士" value="博士"></el-option>
  232. </el-select>
  233. </el-form-item>
  234. </el-col>
  235. </el-row>
  236. <el-row>
  237. <el-col :span="12">
  238. <el-form-item
  239. label="专业技能"
  240. :rules="[{ required: true }]"
  241. :label-width="formLabelWidth"
  242. >
  243. <el-select
  244. :disabled="!topForm.organId"
  245. v-model="subjectIds"
  246. clearable
  247. placeholder="专业技能"
  248. multiple
  249. >
  250. <el-option
  251. v-for="item in subjectList"
  252. :key="item.id"
  253. :label="item.name"
  254. :value="item.id"
  255. ></el-option>
  256. </el-select>
  257. </el-form-item>
  258. </el-col>
  259. <el-col :span="12">
  260. <el-form-item label="职称" :label-width="formLabelWidth">
  261. <el-input v-model.trim="topForm.technicalTitles"></el-input>
  262. </el-form-item>
  263. </el-col>
  264. </el-row>
  265. <el-row>
  266. <el-col :span="12">
  267. <el-form-item label="证件类型" :label-width="formLabelWidth">
  268. <el-input v-model.trim="topForm.certificateType"></el-input>
  269. <!-- <el-select v-model.trim="topForm.certificateType" placeholder="证件类型">
  270. <el-option label="身份证" value="身份证"></el-option>
  271. <el-option label="护照" value="护照"></el-option>
  272. <el-option label="港澳通行证" value="港澳通行证"></el-option>
  273. </el-select>-->
  274. </el-form-item>
  275. </el-col>
  276. <el-col :span="12">
  277. <el-form-item label="证件号码" :label-width="formLabelWidth">
  278. <el-input v-model.trim="topForm.certificateNum"></el-input>
  279. </el-form-item>
  280. </el-col>
  281. </el-row>
  282. <el-row>
  283. <el-col :span="12">
  284. <el-form-item label="转正日期" :label-width="formLabelWidth">
  285. <el-date-picker
  286. v-model="topForm.formalStaffDate"
  287. value-format="yyyy-MM-dd"
  288. type="date"
  289. placeholder="选择转正日期"
  290. :picker-options="pickerOptions"
  291. >
  292. </el-date-picker>
  293. </el-form-item>
  294. </el-col>
  295. <el-col :span="12">
  296. <el-form-item label="离职日期" :label-width="formLabelWidth">
  297. <el-date-picker
  298. v-model="topForm.demissionDate"
  299. value-format="yyyy-MM-dd"
  300. type="date"
  301. placeholder="选择离职日期"
  302. >
  303. </el-date-picker>
  304. </el-form-item>
  305. </el-col>
  306. </el-row>
  307. <el-row>
  308. <el-col :span="12">
  309. <el-form-item label :label-width="formLabelWidth">
  310. <!-- <el-input v-model.trim="topForm.certificateType"></el-input> -->
  311. <el-checkbox
  312. v-model.trim="topForm.isSupportCourseScheduleRewardsRules"
  313. >适用VIP分部活动</el-checkbox
  314. >
  315. </el-form-item>
  316. </el-col>
  317. </el-row>
  318. <el-form-item>
  319. <el-button @click="onSubmit('form')" type="primary"
  320. >立即{{ pageType == "create" ? "创建" : "修改" }}</el-button
  321. >
  322. <el-button @click="onReSet('form')">重置</el-button>
  323. </el-form-item>
  324. </el-form>
  325. </div>
  326. <div class="right">
  327. <div class="teacherIcon">
  328. <img v-if="topForm.avatar" key="avatar" :src="topForm.avatar" alt />
  329. <img v-else key="avatar" src="@/assets/images/base/woman.png" alt />
  330. </div>
  331. <el-upload
  332. class="ivu-upload"
  333. :show-upload-list="false"
  334. :show-file-list="false"
  335. :headers="headers"
  336. :on-success="handleSuccess"
  337. accept=".jpg, .jpeg, .png, .gif"
  338. :max-size="2048"
  339. multiple
  340. action="/api-web/uploadFile"
  341. >
  342. <el-button
  343. icon="ios-cloud-upload-outline"
  344. v-if="pageType != 'create'"
  345. v-permission="{
  346. child: 'resetTeacher/uploadFile',
  347. parent: '/teacherUpdate/baseInfo',
  348. }"
  349. >修改头像</el-button
  350. >
  351. <el-button
  352. icon="ios-cloud-upload-outline"
  353. v-if="pageType == 'create'"
  354. v-permission="{
  355. child: 'createTeacher/uploadFile',
  356. parent: '/teacherAdd/baseInfo',
  357. }"
  358. >新增头像</el-button
  359. >
  360. </el-upload>
  361. <p class="iconP">
  362. 推荐图片尺寸:200x200;
  363. <br />支持的格式:jpg,jpeg,png,gif;
  364. <br />*头像修改后,需要点击页面 <br />下方「立即修改」保存生效;
  365. </p>
  366. </div>
  367. </div>
  368. </div>
  369. </template>
  370. <script>
  371. // import { queryByOrganId } from '@/api/systemManage'
  372. import { getToken } from "@/utils/auth";
  373. import { branchQueryPage, subjectListTree } from "@/api/specialSetting";
  374. import { teacherAdd, teacherUpdate, teacherGet } from "@/api/teacherManager";
  375. import { getSubject } from "@/api/buildTeam";
  376. import store from "@/store";
  377. import { permission } from "@/utils/directivePage";
  378. import { jobNature, ProbationPeriodList } from "@/utils/searchArray";
  379. import { isvalidPhone } from "@/utils/validate";
  380. import dayjs from 'dayjs'
  381. let validPhone = (rule, value, callback) => {
  382. if (!value) {
  383. callback(new Error("请输入电话号码"));
  384. } else if (!isvalidPhone(value)) {
  385. callback(new Error("请输入正确的11位手机号码"));
  386. } else {
  387. callback();
  388. }
  389. };
  390. export default {
  391. name: "teacherOperation",
  392. data() {
  393. const that = this
  394. return {
  395. headers: {
  396. Authorization: getToken(),
  397. },
  398. jobNature: jobNature,
  399. ProbationPeriodList: ProbationPeriodList,
  400. organId: null,
  401. pageType: this.$route.query.type,
  402. teacherId: this.$route.query.teacherId,
  403. formLabelWidth: "80px",
  404. branchList: [], // 分部列表
  405. subjectList: [], //声部列表 // 多选声部列表
  406. teacherSchools: null,
  407. topForm: {
  408. realName: null,
  409. gender: null,
  410. birthdate: null,
  411. entryDate: null,
  412. jobNature: null,
  413. organId: null,
  414. flowOrganRange: null,
  415. introduction: null,
  416. phone: null,
  417. avatar: null,
  418. graduateSchool: null,
  419. email: null,
  420. educationBackground: null,
  421. demissionDate:null,
  422. formalStaffDate: null,
  423. isProbationPeriod: null,
  424. technicalTitles: null,
  425. certificateType: null,
  426. certificateNum: null,
  427. isSupportCourseScheduleRewardsRules: true,
  428. isSupportExtraPracticeLesson: null,
  429. memo: null,
  430. },
  431. subjectIds: [],
  432. tenantId: null,
  433. // imageIcon: require("@/assets/images/base/warning.png"),
  434. rules: {
  435. realName: [{ required: true, message: "请输入姓名", trigger: "blur" }],
  436. gender: [{ required: true, message: "请选择性别", trigger: "change" }],
  437. entryDate: [
  438. { required: true, message: "请选择入职日期", trigger: "change" },
  439. ],
  440. jobNature: [
  441. { required: true, message: "请选择工作类型", trigger: "change" },
  442. ],
  443. isProbationPeriod: [
  444. { required: true, message: "请选择员工状态", trigger: "change" },
  445. ],
  446. organId: [
  447. { required: true, message: "请选择所属分部", trigger: "change" },
  448. ],
  449. phone: [{ required: true, validator: validPhone, trigger: "blur" }],
  450. subjectIds: [
  451. {
  452. required: true,
  453. type: "array",
  454. message: "请选择专业技能",
  455. trigger: "change",
  456. },
  457. ],
  458. isAvatar: null,
  459. },
  460. pickerOptions2: {
  461. firstDayOfWeek: 1,
  462. disabledDate(time) {
  463. let date = new Date(dayjs(that.topForm.formalStaffDate).format('YYYY-MM-DD') + ' 00:00:00')
  464. return that.topForm.formalStaffDate ? time.getTime() > date.getTime() : false;
  465. }
  466. },
  467. pickerOptions: {
  468. firstDayOfWeek: 1,
  469. disabledDate(time) {
  470. let date = new Date(dayjs(that.topForm.entryDate).format('YYYY-MM-DD') + ' 00:00:00')
  471. return that.topForm.entryDate ? date.getTime() > time.getTime() : false;
  472. }
  473. }
  474. };
  475. },
  476. created() {},
  477. mounted() {
  478. this.pageType = this.$route.query.type;
  479. this.teacherId = this.$route.query.teacherId;
  480. this.__init();
  481. },
  482. // activated() {
  483. // this.pageType = this.$route.query.type;
  484. // this.teacherId = this.$route.query.teacherId;
  485. // this.__init();
  486. // },
  487. methods: {
  488. __init() {
  489. if (this.$route.query.search) {
  490. this.Fsearch = this.$route.query.search;
  491. }
  492. if (this.$route.query.rules) {
  493. this.Frules = this.$route.query.rules;
  494. }
  495. // isAvatar
  496. branchQueryPage({
  497. // 获取分部
  498. delFlag: 0,
  499. rows: 9999,
  500. }).then((res) => {
  501. if (res.code == 200 && res.data && res.data.rows) {
  502. this.branchList = [];
  503. res.data.rows.forEach((item) => {
  504. this.branchList.push({
  505. label: item.name,
  506. value: item.id,
  507. });
  508. });
  509. }
  510. });
  511. if (this.pageType == "update") {
  512. teacherGet({ teacherId: this.teacherId }).then((res) => {
  513. if (res.code == 200) {
  514. let result = res.data;
  515. this.topForm = {
  516. realName: result.realName,
  517. gender: result.gender,
  518. birthdate: result.birthdate,
  519. entryDate: result.entryDate,
  520. jobNature: result.jobNature,
  521. organId: result.teacherOrganId ? result.teacherOrganId : null,
  522. flowOrganRange: result.flowOrganRangeId
  523. ? result.flowOrganRangeId.split(",")
  524. : null,
  525. introduction: result.introduction,
  526. phone: result.phone,
  527. avatar: result.avatar,
  528. graduateSchool: result.graduateSchool,
  529. email: result.email,
  530. educationBackground: result.educationBackground,
  531. demissionDate:result.demissionDate,
  532. formalStaffDate: result.formalStaffDate,
  533. technicalTitles: result.technicalTitles,
  534. certificateType: result.certificateType,
  535. certificateNum: result.certificateNum,
  536. isProbationPeriod: result.isProbationPeriod,
  537. isSupportCourseScheduleRewardsRules:
  538. result.isSupportCourseScheduleRewardsRules,
  539. isSupportExtraPracticeLesson: result.isSupportExtraPracticeLesson,
  540. memo: result.memo,
  541. };
  542. let sn = [];
  543. result.teacherSchools.forEach((item) => {
  544. sn.push(item.name);
  545. });
  546. if (result.subjectId) {
  547. let arr = result.subjectId.split(",");
  548. this.subjectIds = arr.map((item) => {
  549. return parseInt(item);
  550. });
  551. }
  552. this.teacherSchools = this.joinArray(sn, ","); // 教学点
  553. this.switchOrgan();
  554. }
  555. });
  556. }
  557. },
  558. // pickerOptions() {
  559. // return {
  560. // disabledDate(time) {
  561. // let date = new Date(this.topForm.entryDate)
  562. // return time.getTime() > date.now();
  563. // }
  564. // }
  565. // },
  566. joinArray(value, type) {
  567. if (!type) {
  568. type = " ";
  569. }
  570. if (typeof value == "object" && value != null) {
  571. return value.join(type);
  572. } else {
  573. return value;
  574. }
  575. },
  576. onSubmit(formName) {
  577. this.$refs[formName].validate((valid) => {
  578. if (valid) {
  579. if (this.subjectIds.length <= 0) {
  580. this.$message.error("请选择专业技能");
  581. return;
  582. }
  583. if (this.topForm.flowOrganRange instanceof Array) {
  584. this.topForm.flowOrganRange = this.topForm.flowOrganRange
  585. ? this.topForm.flowOrganRange.join(",")
  586. : null;
  587. }
  588. this.subjectId = this.subjectIds.join(",");
  589. this.topForm.subjectId = this.subjectId;
  590. if (this.pageType == "update") {
  591. this.topForm.id = this.teacherId;
  592. teacherUpdate(this.topForm).then((res) => {
  593. if (res.code == 200) {
  594. // this.$emit('onTeacher')
  595. this.$store.dispatch('delVisitedViews', this.$route)
  596. this.$router.push({
  597. path: "/business/teacherList",
  598. query: { rules: this.Frules, search: this.Fsearch },
  599. });
  600. }
  601. this.messageTips("修改", res);
  602. });
  603. } else if (this.pageType == "create") {
  604. if (this.topForm.id) {
  605. delete this.topForm.id;
  606. }
  607. teacherAdd(this.topForm).then((res) => {
  608. if (res.code == 200) {
  609. // 权限判断,是否有课酬设置
  610. if (permission("/teacherAdd/salarySeting")) {
  611. this.$emit("onTeacher", res.data);
  612. } else {
  613. this.$store.dispatch('delVisitedViews', this.$route)
  614. this.$router.push({
  615. path: "/business/teacherList",
  616. query: { rules: this.Frules, search: this.Fsearch },
  617. });
  618. }
  619. }
  620. this.messageTips("添加", res);
  621. });
  622. }
  623. } else {
  624. this.$nextTick(() => {
  625. let isError = document.getElementsByClassName('is-error')
  626. isError[0].scrollIntoView({
  627. // 滚动到指定节点
  628. // 值有start,center,end,nearest,当前显示在视图区域中间
  629. block: 'center',
  630. // 值有auto、instant,smooth,缓动动画(当前是慢速的)
  631. behavior: 'smooth',
  632. })
  633. })
  634. return false;
  635. }
  636. });
  637. },
  638. messageTips(title, res) {
  639. if (res.code == 200) {
  640. this.$message.success(title + "成功");
  641. } else {
  642. this.topForm.subjectIds = this.topForm.subjectIds.split(",");
  643. this.$message.error(res.msg);
  644. }
  645. },
  646. onReSet(formName) {
  647. this.topForm = {
  648. realName: null,
  649. gender: null,
  650. birthdate: null,
  651. entryDate: null,
  652. jobNature: null,
  653. organId: null,
  654. flowOrganRange: null,
  655. introduction: null,
  656. phone: null,
  657. avatar: null,
  658. graduateSchool: null,
  659. email: null,
  660. educationBackground: null,
  661. demissionDate: null,
  662. formalStaffDate: null,
  663. subjectIds: [],
  664. technicalTitles: null,
  665. certificateType: null,
  666. certificateNum: null,
  667. jobType: "ADVISER",
  668. memo: null
  669. };
  670. this.subjectIds = []
  671. this.$refs[formName].resetFields();
  672. },
  673. onCancel() {
  674. this.$store.dispatch('delVisitedViews', this.$route)
  675. this.$router.push({
  676. path: "/business/teacherList",
  677. query: { rules: this.Frules, search: this.Fsearch },
  678. });
  679. },
  680. handleSuccess(res) {
  681. // 获取富文本组件实例
  682. // let quill = this.editor
  683. // 如果上传成功
  684. if (res.code == 200) {
  685. // 获取光标所在位置
  686. this.topForm.avatar = res.data.url;
  687. }
  688. },
  689. // 选择分部
  690. switchOrgan() {
  691. if (this.topForm.organId == 43) {
  692. this.tenantId = 2;
  693. } else {
  694. this.tenantId = 1;
  695. }
  696. getSubject({ tenantId: this.tenantId }).then((res) => {
  697. if (res.code == 200) {
  698. this.subjectList = res.data;
  699. }
  700. });
  701. },
  702. },
  703. };
  704. </script>
  705. <style lang="scss" scoped>
  706. .atooltip.el-tooltip__popper[x-placement^="top"] .popper__arrow {
  707. border-top-color: #ecf0f0;
  708. color: #666666;
  709. }
  710. .atooltip.el-tooltip__popper[x-placement^="top"] .popper__arrow:after {
  711. border-top-color: #ecf0f0;
  712. color: #666666;
  713. }
  714. .atooltip {
  715. background: #ecf0f0 !important;
  716. color: #666666;
  717. }
  718. .diSpan {
  719. position: relative;
  720. .micon {
  721. position: absolute;
  722. top: 12px;
  723. left: 64px;
  724. }
  725. }
  726. .course {
  727. /deep/.el-form-item__label {
  728. text-align: left !important;
  729. }
  730. }
  731. // /deep/.el-tooltip__popper.is-dark {
  732. // background-color: #ECF0F0!important;
  733. // color: #666!important;
  734. // }
  735. .el-button--primary {
  736. background: #14928a;
  737. border-color: #14928a;
  738. color: #fff;
  739. &:hover,
  740. &:active,
  741. &:focus {
  742. background: #14928a;
  743. border-color: #14928a;
  744. color: #fff;
  745. }
  746. }
  747. /deep/.el-date-editor.el-input,
  748. /deep/.el-select {
  749. width: 100% !important;
  750. }
  751. // .el-row {
  752. // margin-top: 40px;
  753. // }
  754. // .el-col {
  755. // display: flex;
  756. // align-items: center;
  757. // margin-bottom: 20px;
  758. // justify-content: flex-end;
  759. // margin-right: 50%;
  760. // }
  761. // .el-input-group {
  762. // width: 200px;
  763. // margin: 0 20px;
  764. // }
  765. // /deep/.el-tree-node__content {
  766. // height: 40px !important;
  767. // }
  768. /deep/.el-form-item__content {
  769. font-size: 14px !important;
  770. margin-right: 5%;
  771. }
  772. .infoWrap {
  773. margin-top: 20px;
  774. display: flex;
  775. flex-direction: row;
  776. justify-content: flex-start;
  777. .left {
  778. max-width: 1000px;
  779. width: 100%;
  780. h4 {
  781. margin-bottom: 20px;
  782. }
  783. }
  784. .right {
  785. margin-left: 100px;
  786. display: flex;
  787. flex-direction: column;
  788. align-items: center;
  789. .teacherIcon {
  790. width: 150px;
  791. height: 150px;
  792. // border: 1px solid #444;
  793. border-radius: 50%;
  794. overflow: hidden;
  795. margin-bottom: 20px;
  796. img {
  797. width: 150px;
  798. height: 150px;
  799. object-fit: cover;
  800. }
  801. }
  802. }
  803. .iconP {
  804. margin-top: 10px;
  805. font-size: 14px;
  806. color: red;
  807. width: 260px;
  808. text-align: center;
  809. }
  810. }
  811. </style>