Welcome.vue 50 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657
  1. <template>
  2. <div class="container">
  3. <div class="header">
  4. <div class="title flex-row">
  5. <img src="@/assets/images/bg-1.png" alt/>
  6. <div class="right flex-row">
  7. <div class="circle flex-center">
  8. <i class="el-icon-user-solid"/>
  9. </div>
  10. <div class="go_login" v-if="!userBid" @click="goLogin">去登录</div>
  11. <el-dropdown v-else @command="commandHandle">
  12. <span class="el-dropdown-link flex-row">
  13. <span class="drop-down-content">{{ nickname }}</span>
  14. <i class="el-icon-caret-bottom el-icon--right"></i>
  15. </span>
  16. <el-dropdown-menu class="selectTab" slot="dropdown">
  17. <el-dropdown-item v-show="typeTabShow" command="1" class="custom-dropdown-item">记录查看
  18. </el-dropdown-item>
  19. <el-dropdown-item v-show="typeTabShow" command="2" class="custom-dropdown-item">修改密码
  20. </el-dropdown-item>
  21. <el-dropdown-item v-show="typeTabShow" command="5" class="custom-dropdown-item">
  22. 个人中心
  23. </el-dropdown-item>
  24. <el-dropdown-item command="3">退出</el-dropdown-item>
  25. </el-dropdown-menu>
  26. </el-dropdown>
  27. </div>
  28. </div>
  29. <div v-if="showControlArea" class="control flex-row">
  30. <ul class="menu flex-row">
  31. <li
  32. v-for="(item, index) in menuList"
  33. :class="{ active: num === index }"
  34. :key="item.id"
  35. @click="handleSelect(item.value)"
  36. class="menu-list"
  37. >
  38. {{ item.name }}
  39. <span class="menu-tag" v-show="index === 2 && tagNum > 0">
  40. {{ tagNum }}
  41. </span>
  42. </li>
  43. </ul>
  44. <div class="search-box flex-row" v-show="['show0', 'show1'].includes(searchShowFlag)">
  45. <el-input
  46. v-model="keywords"
  47. :placeholder="searchShowFlag === 'show1' ? '请输入认知任务名称' : '请输入量表名称'"
  48. @clear="searchScale"
  49. @keyup.enter="searchScale"
  50. />
  51. <img src="@/assets/images/icon-search.png" alt="" @click="searchScale"/>
  52. </div>
  53. </div>
  54. </div>
  55. <div class="section" :class="{ 'main-content' : hasWrap, 'top': !showControlArea }">
  56. <router-view ref="Childmain"></router-view>
  57. </div>
  58. <el-dialog
  59. :title="dialogTitle"
  60. :visible.sync="userDialogVisiblephone1"
  61. width="1240px"
  62. top="6vh"
  63. :close-on-click-modal="false"
  64. >
  65. <el-form
  66. :model="userRuleForm"
  67. status-icon
  68. :rules="rules"
  69. ref="ruleForm"
  70. label-width="180px"
  71. class="demo-ruleForm"
  72. >
  73. <el-row :gutter="10">
  74. <el-col :span="12">
  75. <el-form-item label="身份证号:" prop="phone">
  76. <el-input
  77. v-model="userRuleForm.phone"
  78. @change="onCardNoChange"
  79. readonly
  80. placeholder="请输入身份证号"
  81. />
  82. </el-form-item>
  83. </el-col>
  84. <el-col :span="12">
  85. <el-form-item label="姓名:" prop="petName">
  86. <el-input v-model="userRuleForm.petName" placeholder="请输入姓名"/>
  87. </el-form-item>
  88. </el-col>
  89. </el-row>
  90. <el-row :gutter="10">
  91. <el-col :span="12">
  92. <el-form-item label="年龄:" prop="age">
  93. <el-input
  94. type="number"
  95. v-model="userRuleForm.age"
  96. planceholder="请输入年龄"
  97. >
  98. </el-input>
  99. </el-form-item>
  100. </el-col>
  101. <el-col :span="12">
  102. <el-form-item label="性别:" prop="gender">
  103. <el-radio-group v-model="userRuleForm.gender">
  104. <el-radio label="0">男</el-radio>
  105. <el-radio label="1">女</el-radio>
  106. </el-radio-group>
  107. </el-form-item>
  108. </el-col>
  109. </el-row>
  110. <el-row :gutter="10">
  111. <el-col :span="12">
  112. <el-form-item label="生日:" prop="birthday">
  113. <date-select
  114. ref="dateSelect"
  115. :years-model-prants="userRuleForm.birthday"
  116. @dateChange="dateChange"
  117. />
  118. </el-form-item>
  119. </el-col>
  120. <el-col :span="12">
  121. <el-form-item label="军衔:" prop="military">
  122. <el-select v-model="userRuleForm.military" placeholder="请选择军衔">
  123. <el-option
  124. v-for="item in militaries"
  125. :key="item.value"
  126. :label="item.label"
  127. :value="item.value">
  128. </el-option>
  129. </el-select>
  130. </el-form-item>
  131. </el-col>
  132. </el-row>
  133. <el-row :gutter="10">
  134. <el-col :span="12">
  135. <el-form-item label="职务:" prop="profession">
  136. <el-input
  137. type="text"
  138. :maxlength="30"
  139. v-model="userRuleForm.profession"
  140. ></el-input>
  141. </el-form-item>
  142. </el-col>
  143. <el-col :span="12">
  144. <el-form-item label="飞行等级:" prop="fightRegistration">
  145. <el-select v-model="userRuleForm.fightRegistration" placeholder="请选择飞行等级">
  146. <el-option
  147. v-for="item in fightRegistrations"
  148. :key="item.value"
  149. :label="item.label"
  150. :value="item.value">
  151. </el-option>
  152. </el-select>
  153. </el-form-item>
  154. </el-col>
  155. </el-row>
  156. <el-row :gutter="10">
  157. <el-col :span="12">
  158. <el-form-item label="单位:" prop="brigade">
  159. <el-input
  160. v-if="isOtherDepartment"
  161. type="text"
  162. :maxLength="50"
  163. v-model="userRuleForm.brigade"
  164. >
  165. </el-input>
  166. <el-input
  167. v-else
  168. type="number"
  169. :min="1"
  170. :max="100"
  171. v-model.number="userRuleForm.brigade"
  172. >
  173. <template slot="suffix"><span class="suffix">旅</span></template>
  174. </el-input>
  175. </el-form-item>
  176. </el-col>
  177. <el-col :span="3">
  178. <el-form-item prop="" label-width="0">
  179. <el-checkbox v-model="isOtherDepartment" @change="onDepartmentChange">其他单位</el-checkbox>
  180. </el-form-item>
  181. </el-col>
  182. <el-col :span="9">
  183. <el-form-item prop="detachment" label-width="0">
  184. <el-input
  185. type="number"
  186. :min="1"
  187. :max="9999"
  188. v-model.number="userRuleForm.detachment"
  189. >
  190. <template slot="suffix"><span class="suffix">大队</span></template>
  191. </el-input>
  192. </el-form-item>
  193. </el-col>
  194. </el-row>
  195. <el-row :gutter="10">
  196. <el-col :span="12">
  197. <el-form-item label="总飞行时间:" prop="flightDuration">
  198. <el-input
  199. type="number"
  200. :min="1"
  201. :max="9999"
  202. v-model="userRuleForm.flightDuration"
  203. planceholder="请输入总飞行时间"
  204. >
  205. <template slot="suffix"><span class="suffix">小时</span></template>
  206. </el-input>
  207. </el-form-item>
  208. <el-form-item label="飞过机型:" prop="flyingModels">
  209. <el-select
  210. v-model="userRuleForm.flyingModels"
  211. multiple
  212. filterable
  213. allow-create
  214. default-first-option
  215. placeholder="请选择机型,可多选">
  216. <el-option
  217. v-for="item in fightTypes"
  218. :key="item.value"
  219. :label="item.label"
  220. :value="item.value">
  221. </el-option>
  222. </el-select>
  223. </el-form-item>
  224. </el-col>
  225. <el-col :span="12">
  226. <el-form-item label="现机型飞行时间:" prop="currentTypeFlightDuration">
  227. <el-input
  228. type="number"
  229. :min="1"
  230. :max="9999"
  231. v-model="userRuleForm.currentTypeFlightDuration"
  232. planceholder="请输入现机型飞行时间"
  233. >
  234. <template slot="suffix"><span class="suffix">小时</span></template>
  235. </el-input>
  236. </el-form-item>
  237. <el-form-item label="现飞机型:" prop="currentFlyingModels">
  238. <el-select
  239. v-model="userRuleForm.currentFlyingModels"
  240. filterable
  241. allow-create
  242. default-first-option
  243. placeholder="请选择机型">
  244. <el-option
  245. v-for="item in fightTypes"
  246. :key="item.value"
  247. :label="item.label"
  248. :value="item.value">
  249. </el-option>
  250. </el-select>
  251. </el-form-item>
  252. </el-col>
  253. </el-row>
  254. </el-form>
  255. <div slot="footer" class="dialog-footer">
  256. <el-button type="success" size="small" @click="submitUserForm(10)">提交</el-button>
  257. </div>
  258. </el-dialog>
  259. <el-dialog
  260. :title="dialogTitle"
  261. :visible.sync="userDialogVisible"
  262. width="1120px"
  263. top="6vh"
  264. :close-on-click-modal="false"
  265. :before-close="handleClose"
  266. >
  267. <!-- <div v-if="parseInt(userRuleForm.phone1) == 0">
  268. <el-form
  269. :model="userRuleForm"
  270. status-icon
  271. :rules="rules"
  272. ref="ruleForm"
  273. label-width="100px"
  274. class="demo-ruleForm"
  275. >
  276. <el-form-item label="请输入手机号" prop="phone">
  277. <el-input
  278. type="text"
  279. maxlength="11"
  280. v-model="userRuleForm.phone1"
  281. ></el-input>
  282. </el-form-item>
  283. <el-form-item>
  284. <el-button @click="submitUserForm(1)">不再提示</el-button>
  285. <el-button type="primary" @click="submitUserForm">提交 </el-button>
  286. </el-form-item>
  287. </el-form>
  288. </div> -->
  289. <div>
  290. <el-form
  291. :model="userRuleForm"
  292. status-icon
  293. :rules="rules"
  294. ref="ruleForm"
  295. label-width="120px"
  296. class="demo-ruleForm"
  297. >
  298. <el-form-item label="姓名" prop="petName">
  299. <el-input
  300. type="text"
  301. maxlength="11"
  302. v-model="userRuleForm.petName"
  303. />
  304. </el-form-item>
  305. <el-form-item label="性别" prop="gender">
  306. <el-radio-group v-model="userRuleForm.gender">
  307. <el-radio label="0">男</el-radio>
  308. <el-radio label="1">女</el-radio>
  309. </el-radio-group>
  310. </el-form-item>
  311. <el-form-item label="生日" prop="birthday">
  312. <date-select
  313. v-if="yearsModelPrants && yearsModelPrants !== ''"
  314. :yearsModelPrants="yearsModelPrants"
  315. @dateChange="dateChange"
  316. />
  317. </el-form-item>
  318. <el-form-item v-if="systemVersion !== 'lan'" label="职业" prop="profession">
  319. <el-input
  320. v-model="userRuleForm.profession"
  321. placeholder="请输入职业"
  322. />
  323. </el-form-item>
  324. <el-form-item label="请输入手机号" prop="phone">
  325. <el-input
  326. type="text"
  327. maxlength="11"
  328. v-model="userRuleForm.phone"
  329. />
  330. </el-form-item>
  331. <el-form-item>
  332. <!-- <el-button v-if=" parseInt(userRuleForm.phone) == 0" @click="submitUserForm(1)">不再提示</el-button> -->
  333. <el-button type="success" @click="submitUserForm">提交</el-button>
  334. </el-form-item>
  335. </el-form>
  336. </div>
  337. </el-dialog>
  338. <!-- 修改密码弹窗 -->
  339. <el-dialog
  340. title="修改密码"
  341. :visible.sync="dialogVisible"
  342. width="38%"
  343. :close-on-click-modal="false"
  344. >
  345. <el-form
  346. :model="ruleForm"
  347. status-icon
  348. :rules="rules"
  349. ref="ruleForm"
  350. label-width="180px"
  351. class="demo-ruleForm"
  352. >
  353. <el-form-item label="请输入旧密码" prop="oldPassword">
  354. <el-input
  355. type="password"
  356. v-model="ruleForm.oldPassword"
  357. autocomplete="off"
  358. show-password
  359. />
  360. </el-form-item>
  361. <el-form-item label="请输入新密码" prop="pass">
  362. <el-input
  363. type="password"
  364. v-model="ruleForm.pass"
  365. autocomplete="off"
  366. show-password
  367. />
  368. </el-form-item>
  369. <el-form-item label="确认新密码" prop="checkPass">
  370. <el-input
  371. type="password"
  372. v-model="ruleForm.checkPass"
  373. autocomplete="off"
  374. show-password
  375. />
  376. </el-form-item>
  377. <el-form-item>
  378. <el-button type="success" @click="submitForm('ruleForm')">提交</el-button>
  379. <el-button @click="resetForm('ruleForm')">重置</el-button>
  380. </el-form-item>
  381. </el-form>
  382. </el-dialog>
  383. </div>
  384. </template>
  385. <script>
  386. import {oSessionStorage, getInfoFromIdCard, isValidIDCard} from "@/utils/utils";
  387. import screenfull from "screenfull";
  388. import {mapGetters, mapActions} from "vuex";
  389. import DateSelect from "../components/DateSelect.vue";
  390. export default {
  391. components: {DateSelect},
  392. computed: {
  393. ...mapGetters({
  394. num: "tagActive",
  395. }),
  396. },
  397. data() {
  398. let menuList
  399. const systemVersion = process.env.VUE_APP_VERSION
  400. const validatePass = (rule, value, callback) => {
  401. if (value === "") {
  402. callback(new Error("请输入密码"))
  403. } else {
  404. // let juPassword =
  405. // /^(?=.*\d)(?=.*[a-zA-Z])(?=.*[~!@#$%^&*])[\da-zA-Z~!@#$%^&*]{8,16}$/;
  406. // if (!juPassword.test(this.ruleForm.pass)) {
  407. // callback(new Error("格式为数字+英文字母+特殊字符(~!@#$%^&*)8-16位"));
  408. // } else {
  409. // this.$refs.ruleForm.validateField("checkPass");
  410. // }
  411. if (value.length < 6 || value.length > 18) {
  412. callback(new Error("新密码长度需在6~18位之间"))
  413. } else {
  414. this.$refs.ruleForm.validateField("checkPass")
  415. }
  416. callback()
  417. }
  418. }
  419. const validatePass2 = (rule, value, callback) => {
  420. if (value === "") {
  421. callback(new Error("请再次输入密码"))
  422. } else if (value !== this.ruleForm.pass) {
  423. callback(new Error("两次输入密码不一致!"))
  424. } else {
  425. callback()
  426. }
  427. }
  428. const validatePass3 = (rule, value, callback) => {
  429. if (value === "") {
  430. callback(new Error("请输入密码"))
  431. } else {
  432. callback()
  433. }
  434. }
  435. const checkPhone = (rule, value, callback) => {
  436. if (value === "") {
  437. callback(new Error("请输入账号"))
  438. } else {
  439. if (systemVersion === "public") {
  440. if (!/^[1][3,4,5,6,7,8,9][0-9]{9}$/.test(value)) {
  441. callback(new Error("请输入正确的手机号码"))
  442. } else {
  443. callback()
  444. }
  445. } else {
  446. if (3 > value.length || value.length > 18) {
  447. callback(new Error("长度需在3~18位之间"))
  448. } else if (/[^\w\.V]/ig.test(value)) {
  449. callback(new Error("请不要输入中文和空格"))
  450. } else {
  451. callback()
  452. }
  453. }
  454. }
  455. }
  456. const validatePassword = (rule, value, callback) => {
  457. if (
  458. this.userInfo.password === "" ||
  459. this.userInfo.password === null ||
  460. typeof this.userInfo.password === "undefined"
  461. ) {
  462. callback(new Error("请输入密码"))
  463. } else {
  464. // let juPassword =
  465. // /^(?=.*\d)(?=.*[a-zA-Z])(?=.*[~!@#$%^&*])[\da-zA-Z~!@#$%^&*]{8,16}$/;
  466. // if (systemVersion == "lan") {
  467. // if (!/^\d{6}$/.test(this.userInfo.password)) {
  468. // callback(new Error("密码需为6位数字"));
  469. // } else {
  470. // callback();
  471. // }
  472. // }
  473. // if (!juPassword.test(this.userInfo.password)) {
  474. // callback(new Error("格式为数字+英文字母+特殊字符(~!@#$%^&*)8-16位"));
  475. // } else {
  476. // callback();
  477. // }
  478. if (6 > value.length || value.length > 18) {
  479. callback(new Error("密码长度需在6~18位之间"))
  480. } else {
  481. callback()
  482. }
  483. }
  484. }
  485. const validatePasswordCheck = (rule, value, callback) => {
  486. if (
  487. this.userInfo.passwordCheck === "" ||
  488. this.userInfo.passwordCheck === null ||
  489. typeof this.userInfo.passwordCheck === "undefined"
  490. ) {
  491. callback(new Error("请输入确认密码"))
  492. } else {
  493. if (this.userInfo.password !== this.userInfo.passwordCheck) {
  494. callback(new Error("两次密码请保持一致"))
  495. } else {
  496. callback()
  497. }
  498. }
  499. }
  500. const checkBirthday = (rule, value, callback) => {
  501. if (value === "") {
  502. callback(new Error("生日不能为空"))
  503. } else {
  504. if (value.split("-")[0] == 'null' || value.split("-")[1] == 'null' || value.split("-")[2] == 'null') {
  505. callback(new Error("请补全生日"))
  506. } else {
  507. callback()
  508. }
  509. }
  510. }
  511. if (systemVersion === "institution" || systemVersion === "lan") {
  512. menuList = [
  513. {value: 0, name: "量表", tag: 0},
  514. {value: 1, name: "认知任务", tag: 0},
  515. {value: 2, name: "测试计划", tag: 0},
  516. ]
  517. } else {
  518. menuList = [
  519. {value: 0, name: "量表"},
  520. {value: 1, name: "认知任务"}
  521. ]
  522. }
  523. const checkBrigade = (rule, value, callback) => {
  524. if (value) {
  525. if (this.isOtherDepartment) {
  526. if (value.length > 50) {
  527. callback(new Error('单位长度不能超出 50 个字符'))
  528. } else {
  529. callback()
  530. }
  531. } else {
  532. const result = parseInt(value)
  533. if (result < 1 || result > 100) {
  534. callback(new Error('单位数字不能超出 1~100 的范围'))
  535. } else {
  536. callback()
  537. }
  538. }
  539. } else {
  540. callback(new Error("单位( 旅 )不能为空"))
  541. }
  542. }
  543. const checkDetachment = (rule, value, callback) => {
  544. if (value) {
  545. if (value < 1 || value > 9999) {
  546. callback(new Error('大队数字不能超出 1~9999 的范围'))
  547. } else {
  548. callback()
  549. }
  550. } else {
  551. callback(new Error("大队不能为空"))
  552. }
  553. }
  554. const flyingModelsValidator = (rule, value, callback) => {
  555. if (!value.length) {
  556. // 一定要写 callBack() 验证完成时调用的回调函数 https://github.com/yiminghe/async-validator
  557. callback(new Error('请至少选择一种机型!'))
  558. } else {
  559. callback()
  560. }
  561. }
  562. const flightDurationValidator = (rule, value, callback) => {
  563. if (value > 99999 || value < 1) {
  564. callback(new Error('总飞行时间不能超出 1 ~ 99999'));
  565. } else {
  566. callback();
  567. }
  568. }
  569. const currentTypeFlightDurationValidator = (rule, value, callback) => {
  570. if (value > 99999 || value < 1) {
  571. callback(new Error('现机型飞行时间不能超出 1 ~ 99999'));
  572. } else {
  573. callback();
  574. }
  575. }
  576. return {
  577. isOtherDepartment: false, // 是否是其他单位
  578. yearsModelPrants: "",
  579. systemVersion: systemVersion,
  580. menuList: menuList,
  581. // activeIndex: 0,
  582. //搜索框提示语
  583. institutionNo: "",
  584. searchPrompt: "",
  585. tagNum: 0,
  586. subjectInfos: [], //tab展示的数据列表
  587. userNameForShow: "", //用户展示用户名
  588. userBid: "", //用户唯一标识
  589. userId: "",
  590. routerList: ["MainTable", "CognitiveAbility", "TestPlan"],
  591. pageNum: 1,
  592. pageSize: 10,
  593. totalNum: 0,
  594. allPage: 0,
  595. keywords: "",
  596. dialogVisible: false, //弹出窗是否可见
  597. userDialogVisible: false,
  598. userDialogVisiblephone1: false,
  599. userRuleForm: {
  600. birthday: "", //生日
  601. profession: "", //职业
  602. phone: "", //用户唯一标识
  603. petName: "", //用户名
  604. gender: "", //性别
  605. institutionNo: process.env.VUE_APP_INSNO,
  606. userStatus: "1",
  607. additionInfo: "",
  608. vCode: "",
  609. roleType: "1",
  610. brigade: '', // 旅
  611. detachment: '', // 大队
  612. fightRegistration: '', // 飞行等级
  613. flightDuration: '', // 总飞行时间
  614. currentTypeFlightDuration: '', // 现飞行时间
  615. flyingModels: '', // 飞过机型
  616. currentFlyingModels: '', // 现飞机型
  617. age: '',
  618. military: ''
  619. },
  620. dialogTitle: '完善信息',
  621. //修改密码
  622. ruleForm: {
  623. pass: "",
  624. checkPass: "",
  625. oldPassword: "",
  626. },
  627. typeTabShow: true,
  628. rules: {
  629. // tel: [{ required: true, validator: phoneRules, trigger: "blur" }],
  630. phone: [{required: true, validator: checkPhone, trigger: "change"}],
  631. gender: [{required: true, message: "请选择性别", trigger: "change"}],
  632. institutionNo: [
  633. {required: true, message: "机构编号不能为空", trigger: "blur"}
  634. ],
  635. petName: [
  636. {
  637. required: true,
  638. message: "昵称不能为空",
  639. trigger: "blur"
  640. },
  641. {
  642. max: 18,
  643. message: "长度在18位及以内",
  644. trigger: "blur"
  645. }
  646. ],
  647. birthday: [
  648. {
  649. required: true,
  650. validator: checkBirthday,
  651. trigger: "change"
  652. }
  653. ],
  654. profession: [
  655. {
  656. required: true,
  657. message: "职业不能为空",
  658. trigger: "blur"
  659. },
  660. ],
  661. password: [
  662. {required: true, validator: validatePassword, trigger: "blur"}
  663. ],
  664. passwordCheck: [
  665. {
  666. required: true,
  667. validator: validatePasswordCheck,
  668. trigger: "blur"
  669. }
  670. ],
  671. vCode: [
  672. {
  673. required: true,
  674. message: "请输入短信验证码",
  675. trigger: "blur"
  676. }
  677. ],
  678. newPsd: [
  679. {
  680. required: true,
  681. message: "请输入新密码",
  682. // trigger: "blur",
  683. trigger: "change"
  684. }
  685. ],
  686. brigade: [{ required: true, validator: checkBrigade, trigger: "blur" }],
  687. detachment: [{ required: true, validator: checkDetachment, trigger: "blur" }],
  688. fightRegistration: [{ required: true, message: "请选择飞行等级", trigger: "change" }],
  689. flightDuration: [
  690. { required: true, message: "请输入总飞行时间", trigger: "blur" },
  691. { validator: flightDurationValidator, trigger: "change" }
  692. ],
  693. flyingModels: [{ required: true, validator: flyingModelsValidator, trigger: "change" }],
  694. currentTypeFlightDuration: [
  695. { required: true, message: "请输入现机型飞行时间", trigger: "blur" },
  696. { validator: currentTypeFlightDurationValidator, trigger: "change" }
  697. ],
  698. currentFlyingModels: [{ required: true, validator: flyingModelsValidator, trigger: "change" }],
  699. age: [{ required: true, message: "年龄不能为空", trigger: "blur" }],
  700. military: [{ required: true, message: "军衔不能为空", trigger: "blur" }],
  701. },
  702. tabFlag: "",
  703. hasWrap: true,
  704. showControlArea: false, // 是否显示模块切换
  705. userType: "",
  706. nickname: "", //用户昵称
  707. searchShow: true,
  708. searchShowFlag: 'show0',
  709. userStatus: null, //用户状态,
  710. airPlanOptions: [
  711. { label: "A340", value: "A340" },
  712. { label: "B777-200", value: "B777-200" },
  713. { label: "波音767", value: "波音767" }
  714. ],
  715. militaries: [
  716. { label: '未定级', value: '未定级' },
  717. { label: '少尉', value: '少尉' },
  718. { label: '中尉', value: '中尉' },
  719. { label: '上尉', value: '上尉' },
  720. { label: '少校', value: '少校' },
  721. { label: '中校', value: '中校' },
  722. { label: '上校', value: '上校' },
  723. { label: '大校', value: '大校' },
  724. ],
  725. fightRegistrations: [
  726. { label: '特级', value: '特级' },
  727. { label: '1级', value: '1级' },
  728. { label: '2级', value: '2级' },
  729. { label: '3级', value: '3级' },
  730. { label: '未定级', value: '未定级' },
  731. ],
  732. fightTypes: [
  733. { label: 'J-10', value: 'J-10' },
  734. { label: 'J-11', value: 'J-11' },
  735. { label: 'J-16', value: 'J-16' },
  736. { label: 'Su-20', value: 'Su-20' },
  737. { label: 'Su-27', value: 'Su-27' },
  738. { label: 'Su-30', value: 'Su-30' },
  739. { label: 'Su-35', value: 'Su-35' },
  740. ],
  741. }
  742. },
  743. created() {
  744. document.onkeydown = function (e) {
  745. let key = window.event.keyCode;
  746. if (key === 122) {
  747. e.preventDefault();
  748. screenfull.toggle();
  749. }
  750. };
  751. //权限控制
  752. if (
  753. sessionStorage.getItem("b80bb7740288fda1f201890375a60c8f") == null ||
  754. sessionStorage.getItem("b80bb7740288fda1f201890375a60c8f") === ""
  755. ) {
  756. if (this.systemVersion !== "public") {
  757. this.$message.error("请登录!");
  758. this.$router.push({
  759. name: "Login",
  760. });
  761. }
  762. }
  763. let tempSearchShow = sessionStorage.getItem("searchShowFlag");
  764. if (tempSearchShow) {
  765. this.searchShowFlag = tempSearchShow
  766. }
  767. //如果10002机构普通用户并且不是测试账号,则不展示量表和认知任务分类,直接跳转至认知任务列表页面
  768. if (
  769. sessionStorage.getItem("f7a42fe7211f98ac7a60a285ac3a9527") === "10002" &&
  770. sessionStorage.getItem("f7a42fe7211f98ac7a60a285ac3a9528") === "1" && //普通用户
  771. sessionStorage
  772. .getItem("f7a42fe7211f98ac7a60a285ac3a9e87")
  773. .indexOf("10002test") === -1
  774. ) {
  775. // 不是测试账号
  776. this.handleSelect(1);
  777. this.typeTabShow = false;
  778. }
  779. this.showControlArea = (this.$route.path === "/welcome/mainTable" ||
  780. this.$route.path === "/welcome/CognitiveAbility" ||
  781. this.$route.path === "/welcome/TestPlan");
  782. },
  783. // 页面初始化函数
  784. mounted() {
  785. this.institutionNo = sessionStorage.getItem("f7a42fe7211f98ac7a60a285ac3a9527");
  786. // console.log("机构编号为"+this.institutionNo)
  787. this.searchPrompt = "请输入量表名称";
  788. // this.$root.activeIndex = "0";
  789. this.userNameForShow = sessionStorage.getItem("435e0648d634175c46bd40ac366545a8");
  790. this.userId = sessionStorage.getItem("b80bb7740288fda1f201890375a60c8f");
  791. this.userBid = localStorage.getItem("f7a42fe7211f98ac7a60a285ac3a9e87");
  792. this.userType = sessionStorage.getItem("f7a42fe7211f98ac7a60a285ac3a9528");
  793. // 校验用户其他元素信息 先检测用户单位信息 若没有则弹出完善信息框
  794. setTimeout(() => {
  795. this.userRuleForm = JSON.parse(sessionStorage.getItem("user-all-info"))
  796. console.log(' ------------------------------- this.userRuleForm: ', this.userRuleForm)
  797. if (!this.userRuleForm || !this.userRuleForm.brigade || this.userRuleForm.brigade === '') {
  798. this.dialogTitle = "完善信息"
  799. this.userDialogVisiblephone1 = true
  800. } else {
  801. const currentFlyingModels = JSON.parse(this.userRuleForm.currentFlyingModels)
  802. this.userRuleForm.currentFlyingModels = currentFlyingModels.length ? currentFlyingModels[0] : ''
  803. this.userRuleForm.flyingModels = JSON.parse(this.userRuleForm.flyingModels)
  804. }
  805. }, 1100)
  806. // 配合公网版游客模式改造
  807. if (this.userId) {
  808. this.getUserForm();
  809. this.loadData();
  810. }
  811. if (!sessionStorage.getItem('backToIndex')) {
  812. sessionStorage.setItem('backToIndex', '0');
  813. }
  814. },
  815. watch: {
  816. $route(to, from) {
  817. this.searchShow = !(to.path === '/welcome/TestPlan')
  818. // console.log(to, from);
  819. this.hasWrap = !(to.path === "/welcome/testResult" ||
  820. to.path === "/PersionDetail" ||
  821. to.path === "/welcome/scaleResult");
  822. this.showControlArea = (to.path === "/welcome/mainTable" ||
  823. to.path === "/welcome/CognitiveAbility" ||
  824. to.path === "/welcome/TestPlan");
  825. // console.log('this.showControlArea:', this.showControlArea)
  826. },
  827. userDialogVisiblephone1(newVal) {
  828. if(newVal) {
  829. setTimeout(() => {
  830. this.$refs.ruleForm.clearValidate()
  831. }, 120)
  832. }
  833. }
  834. },
  835. methods: {
  836. ...mapActions({
  837. setTagActive: "setTagActive",
  838. }),
  839. onCardNoChange(cardNo) {
  840. if (!isValidIDCard(cardNo)) {
  841. return
  842. }
  843. const idCardInfo = getInfoFromIdCard(cardNo)
  844. if (idCardInfo) {
  845. console.log(idCardInfo)
  846. this.userRuleForm.gender = idCardInfo.gender
  847. this.userRuleForm.birthday = idCardInfo.birthday
  848. this.userRuleForm.age = idCardInfo.age
  849. }
  850. },
  851. onDepartmentChange() {
  852. this.userRuleForm.brigade = ''
  853. },
  854. //个人信息弹窗关闭
  855. handleClose(done) {
  856. //如果用户状态为4,禁止关闭弹窗
  857. if (this.userStatus === 4) {
  858. // return;
  859. this.$confirm('需要您补充完整的用户信息,确定要退出吗?')
  860. .then(_ => {
  861. //退出登陆
  862. this.escape();
  863. // done();
  864. })
  865. .catch(_ => {
  866. });
  867. } else {
  868. done()
  869. }
  870. },
  871. // 选择注册日期
  872. dateChange(obj) {
  873. // this.userRuleForm.birthday = `${obj.year}`;
  874. this.userRuleForm.birthday = `${obj.year}-${obj.month}-${obj.day}`;
  875. },
  876. // 查询量表数据
  877. loadData() {
  878. let _this = this;
  879. this.$http.get(
  880. `/testPlan/user/plan?userId=${this.userId}&status=3&isComplete=0&searchKey=&beginTime=&endTime=&beginNum=1&pageSize=50`,
  881. {},
  882. (response) => {
  883. if (response?.data?.num > 0) {
  884. _this.tagNum = response.data.num;
  885. }
  886. }
  887. );
  888. },
  889. personCenter() {
  890. this.$router.push({
  891. name: "PersonalCenter",
  892. });
  893. },
  894. escape() {
  895. this.$http.post("system/logout", {
  896. institutionNo: this.institutionNo,
  897. phone: this.userBid,
  898. roleType: this.userType,
  899. }, (res) => {
  900. if (res && res.code == 200) {
  901. this.$message({
  902. message: "已成功退出登录",
  903. type: "success",
  904. });
  905. sessionStorage.clear();
  906. localStorage.clear();
  907. this.nickname = "";
  908. this.userBid = "";
  909. this.$router.push({path: "/",});
  910. } else {
  911. this.$message({
  912. message: res.msg,
  913. type: "error",
  914. });
  915. }
  916. });
  917. },
  918. // 任务类型 量表测试-0 认知任务-1
  919. handleSelect(key) {
  920. this.$root.search = "";
  921. this.keywords = "";
  922. oSessionStorage.removeItem("currentPage");
  923. oSessionStorage.removeItem("currentTab");
  924. console.log('key:', key)
  925. if (key == 0) {
  926. this.searchPrompt = "请输入量表名称";
  927. } else {
  928. this.searchPrompt = "请输入认知任务名称";
  929. }
  930. sessionStorage.setItem('backToIndex', key);
  931. //当key等于0时且 this.routerList[key] 等于MainTable 时不进行跳转页面
  932. if (key == "0" || key == "1" || key == "2") {
  933. //当当前页面量表主页面时 直接调用onsearch
  934. //当是量表页面的子页面时 先跳转到量表主页面 认知任务同理
  935. if (key == "0" || key == 0) {
  936. sessionStorage.setItem("searchShowFlag", 'show0')
  937. this.searchShowFlag = 'show0'
  938. let ll = this.$route.name;
  939. if (ll === "MainTable") {
  940. this.$refs["Childmain"].onSearch();
  941. } else {
  942. this.$router.push({
  943. name: "MainTable",
  944. params: {},
  945. });
  946. // this.$router.go();
  947. }
  948. }
  949. if (key == "1") {
  950. sessionStorage.setItem("searchShowFlag", 'show1')
  951. this.searchShowFlag = 'show1'
  952. let ll = this.$route.name;
  953. if (ll === "CognitiveAbility") {
  954. this.$refs["Childmain"].onSearch();
  955. } else {
  956. this.$router.push({
  957. name: "CognitiveAbility",
  958. params: {},
  959. });
  960. }
  961. }
  962. if (key == "2") {
  963. sessionStorage.setItem("searchShowFlag", 'no')
  964. this.searchShowFlag = 'no'
  965. let ll = this.$route.name;
  966. if (ll === "TestPlan") {
  967. // this.$refs["Childmain"].onSearch();
  968. } else {
  969. this.$router
  970. .push({
  971. name: "TestPlan",
  972. params: {},
  973. })
  974. .catch((err) => {
  975. });
  976. }
  977. }
  978. } else {
  979. this.$router.push({
  980. name: this.routerList[key],
  981. params: {},
  982. });
  983. }
  984. // this.tabFlag = key;
  985. },
  986. searchScale() {
  987. //如果10002机构普通用户并且不是测试账号直接返回,不让查询量表数据
  988. if (
  989. sessionStorage.getItem("f7a42fe7211f98ac7a60a285ac3a9527") === "10002" && //10002机构
  990. sessionStorage.getItem("f7a42fe7211f98ac7a60a285ac3a9528") === "1" && //普通用户
  991. sessionStorage
  992. .getItem("f7a42fe7211f98ac7a60a285ac3a9e87")
  993. .indexOf("10002test") === -1
  994. ) {
  995. //不是测试账号
  996. return;
  997. }
  998. this.$root.search = this.keywords;
  999. let ro = this.$route.name;
  1000. //当路由名字是 ScaleTestPage 或者 ScaleDetail 时 需要将标志转到mainTable
  1001. if (ro == "MainTable") {
  1002. this.$refs["Childmain"].onSearch();
  1003. } else if (
  1004. ro == "ScaleDetail" ||
  1005. ro == "ScaleTestPage" ||
  1006. ro == "ScaleResult" ||
  1007. ro == "scaleResultSCl"
  1008. ) {
  1009. // this.$refs["Childmain"].onSearch();
  1010. this.$root.activeIndex = "0";
  1011. this.$router.push({
  1012. name: "MainTable",
  1013. params: {},
  1014. });
  1015. } else if (ro == "CognitiveAbility") {
  1016. this.$refs["Childmain"].onSearch();
  1017. } else {
  1018. this.$root.activeIndex = "1";
  1019. this.$router.push({
  1020. name: "CognitiveAbility",
  1021. params: {},
  1022. });
  1023. }
  1024. },
  1025. changePwd() {
  1026. this.dialogVisible = true;
  1027. },
  1028. resetForm(formName) {
  1029. this.$refs[formName].resetFields();
  1030. let temp = sessionStorage.getItem('user-rule-form')
  1031. if(formName === 'ruleForm' && temp) {
  1032. this.userRuleForm = JSON.parse(sessionStorage.getItem('user-rule-form'))
  1033. }
  1034. // this.dialogVisible = false;
  1035. },
  1036. statusFormat(row) {
  1037. if (row.status == 1) {
  1038. return "手动关闭";
  1039. } else if (row.status == 3) {
  1040. return "正常使用";
  1041. } else {
  1042. return "关闭";
  1043. }
  1044. },
  1045. submitUserForm(v, formName = 'ruleForm') {
  1046. this.$refs[formName].validate((valid) => {
  1047. if (!valid) {
  1048. return false
  1049. } else {
  1050. if (v == 1) {
  1051. this.userRuleForm.phone = 1;
  1052. } else if (v == 10) {
  1053. // this.userRuleForm.phone = this.userRuleForm.phone1;
  1054. // this.userRuleForm.phone || this.userRuleForm.phone1;
  1055. } else {
  1056. if (!this.userRuleForm.petName) {
  1057. this.$message.warning("请输入昵称");
  1058. return;
  1059. }
  1060. if (!this.userRuleForm.gender) {
  1061. this.$message.warning("请选择性别");
  1062. return;
  1063. }
  1064. if (!this.userRuleForm.birthday) {
  1065. this.$message.warning("请选择生日");
  1066. return;
  1067. }
  1068. if (this.userRuleForm.birthday.split("-")[0] == 'null' || this.userRuleForm.birthday.split("-")[1] == 'null' || this.userRuleForm.birthday.split("-")[2] == 'null') {
  1069. this.$message.warning("请补全生日");
  1070. return;
  1071. }
  1072. if (this.systemVersion != 'lan' && !this.userRuleForm.profession) {
  1073. this.$message.warning("请输入职业");
  1074. return;
  1075. }
  1076. }
  1077. // let asd = {
  1078. // institutionNo: this.institutionNo,
  1079. // phone: this.userBid,
  1080. // newModelPhone: this.userRuleForm.phone,
  1081. // petName: this.userRuleForm.petName,
  1082. // gender: this.userRuleForm.gender,
  1083. // birthday: this.userRuleForm.birthday,
  1084. // profession: this.userRuleForm.profession,
  1085. // };
  1086. let params = {
  1087. institutionNo: this.institutionNo,
  1088. phone: this.userBid,
  1089. // newModelPhone: this.userRuleForm.phone,
  1090. petName: this.userRuleForm.petName,
  1091. gender: this.userRuleForm.gender,
  1092. birthday: this.userRuleForm.birthday,
  1093. profession: this.userRuleForm.profession,
  1094. roleType: this.userType,
  1095. brigade: this.userRuleForm.brigade, // 旅
  1096. detachment: this.userRuleForm.detachment, // 大队
  1097. fightRegistration: this.userRuleForm.fightRegistration, // 飞行等级
  1098. flightDuration: this.userRuleForm.flightDuration, // 总飞行时间
  1099. currentTypeFlightDuration: this.userRuleForm.currentTypeFlightDuration, // 现飞行时间
  1100. flyingModels: this.userRuleForm.flyingModels, // 飞过机型
  1101. currentFlyingModels: [this.userRuleForm.currentFlyingModels], // 现飞机型
  1102. age: this.userRuleForm.age,
  1103. military: this.userRuleForm.military
  1104. };
  1105. console.log('提交的参数:', params)
  1106. sessionStorage.setItem('user-rule-form', JSON.stringify(this.userRuleForm))
  1107. this.$http.post("/user/hf/update", params, (res) => {
  1108. if (res && res.code == 200) {
  1109. // this.getUserForm();
  1110. this.$message.success('完善信息成功!');
  1111. sessionStorage.setItem("435e0648d634175c46bd40ac366545a8", this.userRuleForm.petName) // 用户昵称
  1112. localStorage.setItem("f7a42fe7211f98ac7a60a285ac3a9e87", this.userRuleForm.phone) // 用户账号
  1113. sessionStorage.setItem("f7a42fe7211f98ac7a60a285ac3a9e87", this.userRuleForm.phone) // 用户账号
  1114. this.nickname = res.data.userEntity.petName;
  1115. sessionStorage.setItem("user-all-info", JSON.stringify({
  1116. ...res.data.userAttribute,
  1117. ...res.data.userEntity
  1118. }))
  1119. this.userDialogVisiblephone1 = false
  1120. this.resetForm('ruleForm')
  1121. } else {
  1122. this.$message.error(res.msg);
  1123. }
  1124. })
  1125. }
  1126. })
  1127. },
  1128. getUserForm() {
  1129. this.$http.get(
  1130. "/user/getModelPhone?institutionNo=" +
  1131. this.institutionNo +
  1132. "&phone=" +
  1133. this.userBid +
  1134. "&roleType=" +
  1135. this.userType,
  1136. {},
  1137. (res) => {
  1138. console.log("修改后的信息", res);
  1139. if (res && res.code == 200) {
  1140. this.userRuleForm.phone = res.data.phone;
  1141. this.userRuleForm.petName = res.data.petName;
  1142. this.userRuleForm.gender = res.data.gender;
  1143. this.userRuleForm.birthday = res.data.birthday;
  1144. this.userRuleForm.age = res.data.age
  1145. this.userRuleForm.military = res.data.military
  1146. this.isOtherDepartment = Number.isNaN(parseInt(res.data.brigade))
  1147. this.yearsModelPrants = res.data.birthday;
  1148. this.userRuleForm.profession = res.data.profession;
  1149. //用户昵称单独变量处理,防止个人中心修改未提交联动
  1150. this.nickname = res.data.petName;
  1151. //获取用户状态,如果为4强制弹窗要求用户补全信息
  1152. this.userStatus = res.data.userStatus;
  1153. // if (this.userStatus == '4') {
  1154. // this.userDialogVisible = true;
  1155. // } else {
  1156. // this.userDialogVisible = false;
  1157. // }
  1158. // console.log("res登陆",res)
  1159. } else {
  1160. this.$message.error(res.msg);
  1161. }
  1162. }
  1163. );
  1164. },
  1165. submitForm(formName) {
  1166. this.$refs[formName].validate((valid) => {
  1167. if (valid) {
  1168. this.$http.post(
  1169. "system/updatePassword",
  1170. {
  1171. id: this.userId,
  1172. oldPassword: this.$md5(this.ruleForm.oldPassword),
  1173. password: this.$md5(this.ruleForm.checkPass),
  1174. },
  1175. (res) => {
  1176. this.dialogVisible = false;
  1177. this.$message({
  1178. message: "密码修改完成!",
  1179. type: "success",
  1180. });
  1181. sessionStorage.clear();
  1182. this.$router.push({
  1183. path: "/",
  1184. });
  1185. }
  1186. );
  1187. } else {
  1188. console.log("error submit!!");
  1189. return false;
  1190. }
  1191. });
  1192. },
  1193. openTestPlan() {
  1194. this.testPlanDialog = true;
  1195. this.getTestPlanData();
  1196. },
  1197. // getTestPlanData() {
  1198. // if (this.time.length == 0) {
  1199. // this.$http.get(
  1200. // "/testPlan/user/plan?userId=" +
  1201. // this.userId +
  1202. // "&searchKey=" +
  1203. // this.searchKeyForTestPlan +
  1204. // "&beginNum=" +
  1205. // this.currentPageForTestPlan +
  1206. // "&pageSize=" +
  1207. // this.pageSizeForTestPlan +
  1208. // "&beginTime=" +
  1209. // "" +
  1210. // "&endTime=" +
  1211. // "",
  1212. // {},
  1213. // (response) => {
  1214. // // console.log(response);
  1215. // this.totalForTestPlan = response.data.num;
  1216. // this.testPlanData = response.data.testPlanEntities;
  1217. // // console.log(this.tableData)
  1218. // // console.log(response.data.testPlanEntities)
  1219. // console.log(response);
  1220. // }
  1221. // );
  1222. // } else {
  1223. // this.$http.get(
  1224. // "/testPlan/user/plan?userId=" +
  1225. // this.userId +
  1226. // "&searchKey=" +
  1227. // this.searchKeyForTestPlan +
  1228. // "&beginNum=" +
  1229. // this.currentPageForTestPlan +
  1230. // "&pageSize=" +
  1231. // this.pageSizeForTestPlan +
  1232. // "&beginTime=" +
  1233. // this.time[0] +
  1234. // "&endTime=" +
  1235. // this.time[1],
  1236. // {},
  1237. // (response) => {
  1238. // // console.log(response);
  1239. // this.totalForTestPlan = response.data.num;
  1240. // this.testPlanData = response.data.testPlanEntities;
  1241. // // console.log(this.tableData)
  1242. // // console.log(response.data.testPlanEntities)
  1243. // console.log(response);
  1244. // }
  1245. // );
  1246. // }
  1247. // },
  1248. // onSubmit() {
  1249. // this.currentPageForTestPlan = 1;
  1250. // //点击搜索时需要将值赋值给搜索的按钮
  1251. // this.getTestPlanData();
  1252. // },
  1253. // reset() {
  1254. // this.searchKeyForTestPlan = "";
  1255. // this.time = "";
  1256. // this.getTestPlanData();
  1257. // },
  1258. // 下拉菜单回调
  1259. commandHandle(i) {
  1260. if (i == 1) {
  1261. this.searchShow = false;
  1262. // this.setTagActive(3);
  1263. this.personCenter();
  1264. } else if (i == 2) {
  1265. this.changePwd();
  1266. this.searchShow = true;
  1267. } else if (i == 3) {
  1268. // this.setTagActive(0);
  1269. this.searchShow = true;
  1270. this.keywords = "";
  1271. // this.scaleName =""
  1272. this.$root.search = "";
  1273. this.$store.dispatch("setTagNum", 0);
  1274. this.escape();
  1275. } else if (i == 5) {
  1276. this.searchShow = true;
  1277. this.dialogTitle = '个人中心'
  1278. this.userDialogVisiblephone1 = true;
  1279. // this.userRuleForm.phone = sessionStorage.getItem("f7a42fe7211f98ac7a60a285ac3a9e87")
  1280. // if (this.userRuleForm.phone1 == 0) {
  1281. // this.userDialogVisiblephone1 = true;
  1282. // } else {
  1283. // this.userDialogVisible = true;
  1284. // }
  1285. }
  1286. },
  1287. goLogin() {
  1288. this.$router.push(`/login?redirect=${this.$route.fullPath}`);
  1289. },
  1290. },
  1291. };
  1292. </script>
  1293. <style lang="scss" scoped>
  1294. .container {
  1295. width: 100vw;
  1296. height: 100vh;
  1297. padding: 0;
  1298. margin: 0;
  1299. overflow: hidden;
  1300. position: relative;
  1301. background-color: #E9EEF6;
  1302. user-select: none;
  1303. .header {
  1304. width: 100%;
  1305. height: 100%;
  1306. // height: 348px;
  1307. // background: url('~@/assets/images/bg-1.png') no-repeat 0 0 / 100% 338px border-box border-box fixed;
  1308. background: url('~@/assets/images/bg-2.png') no-repeat 0 0 / 100% 100% border-box border-box fixed;
  1309. .title {
  1310. width: 100%;
  1311. height: 70px;
  1312. background-color: rgba(0, 55, 110, 0.5);
  1313. justify-content: space-between;
  1314. background: url('~@/assets/images/bg-1.png') no-repeat 0 0 / 100% 338px border-box border-box fixed;
  1315. img {
  1316. height: 100%;
  1317. width: 100%;
  1318. margin-left: 28px;
  1319. }
  1320. .right {
  1321. margin-right: 72px;
  1322. .circle {
  1323. width: 32px;
  1324. height: 32px;
  1325. background-color: white;
  1326. overflow: hidden;
  1327. border-radius: 50%;
  1328. font-size: 20px;
  1329. color: #ababab;
  1330. }
  1331. .el-dropdown-link {
  1332. font-size: 24px;
  1333. cursor: pointer;
  1334. color: #ffffff;
  1335. margin-left: 24px;
  1336. .drop-down-content {
  1337. max-width: 120px;
  1338. text-align: right;
  1339. overflow: hidden;
  1340. white-space: nowrap;
  1341. text-overflow: ellipsis;
  1342. }
  1343. }
  1344. }
  1345. }
  1346. .control {
  1347. width: 100%;
  1348. margin-top: 30px;
  1349. height: 60px;
  1350. margin-left: 100px;
  1351. position: relative;
  1352. .menu {
  1353. width: 700px;
  1354. height: 60px;
  1355. padding: 5px 10px;
  1356. border-radius: 30px;
  1357. background-color: white;
  1358. justify-content: space-between;
  1359. li {
  1360. width: 168px;
  1361. font-size: 22px;
  1362. color: #555555;
  1363. text-align: center;
  1364. line-height: 50px;
  1365. border-radius: 25px;
  1366. cursor: pointer;
  1367. &.active {
  1368. color: white;
  1369. background-color: #26B600;
  1370. }
  1371. &:not(.active):hover {
  1372. color: white;
  1373. background-color: rgba(78, 175, 48, 0.692);
  1374. }
  1375. }
  1376. }
  1377. .search-box {
  1378. width: 400px;
  1379. height: 60px;
  1380. position: absolute;
  1381. right: 200px;
  1382. top: 0;
  1383. border-radius: 30px;
  1384. background-color: rgba(255, 255, 255, 0.6);
  1385. justify-content: space-around;
  1386. ::v-deep .el-input {
  1387. width: 80%;
  1388. height: 60px;
  1389. .el-input__inner {
  1390. height: 60px;
  1391. line-height: 60px;
  1392. background-color: transparent;
  1393. border: 0;
  1394. color: #26B600;
  1395. font-size: 20px;
  1396. &::placeholder {
  1397. color: #26B600;
  1398. }
  1399. }
  1400. }
  1401. img {
  1402. width: 32px;
  1403. height: 32px;
  1404. margin-right: 10px;
  1405. cursor: pointer;
  1406. }
  1407. }
  1408. }
  1409. }
  1410. .main-content {
  1411. position: absolute;
  1412. left: 100px;
  1413. top: 210px;
  1414. width: calc(100% - 200px);
  1415. height: calc(100% - 230px);
  1416. background-color: transparent;
  1417. overflow: hidden;
  1418. &.top {
  1419. top: 150px !important;
  1420. }
  1421. }
  1422. }
  1423. ::v-deep .el-dialog {
  1424. .el-dialog__body {
  1425. .el-form {
  1426. .el-form-item {
  1427. margin-bottom: 24px;
  1428. .el-select {
  1429. width: 100%;
  1430. }
  1431. }
  1432. }
  1433. }
  1434. }
  1435. .el-menu.el-menu--horizontal {
  1436. border-bottom: 1px solid #e6e6e6 !important;
  1437. }
  1438. a {
  1439. color: #242323;
  1440. }
  1441. .mainbody {
  1442. height: 640px;
  1443. width: 450px;
  1444. }
  1445. .middle {
  1446. top: 50%;
  1447. left: 50%;
  1448. position: absolute;
  1449. transform: translate(-50%, -50%);
  1450. }
  1451. .form-box {
  1452. width: 100%;
  1453. height: 100%;
  1454. margin: auto;
  1455. background: #ffffff;
  1456. border-radius: 20px;
  1457. }
  1458. .input-normal {
  1459. width: 220px;
  1460. height: 30px;
  1461. margin: 20px auto;
  1462. padding: 0;
  1463. text-align: center;
  1464. border-radius: 20px;
  1465. outline: none;
  1466. display: block;
  1467. transition: 0.3s;
  1468. border: 1px solid #e6e6e6;
  1469. }
  1470. .input-normal-data {
  1471. width: 220px;
  1472. height: 30px;
  1473. margin: 20px auto;
  1474. padding: 0;
  1475. text-align: center;
  1476. border-radius: 20px;
  1477. outline: none;
  1478. display: block;
  1479. transition: 0.3s;
  1480. }
  1481. .input-normal-first {
  1482. width: 220px;
  1483. height: 30px;
  1484. margin: 0px auto;
  1485. padding: 0;
  1486. text-align: center;
  1487. border-radius: 20px;
  1488. outline: none;
  1489. display: block;
  1490. transition: 0.3s;
  1491. border: 1px solid #e6e6e6;
  1492. }
  1493. .input-normal-radio {
  1494. width: 100px;
  1495. height: 30px;
  1496. margin: 30px auto;
  1497. padding: 0;
  1498. text-align: center;
  1499. border-radius: 20px;
  1500. outline: none;
  1501. display: block;
  1502. transition: 0.3s;
  1503. border: 1px solid #e6e6e6;
  1504. }
  1505. .loginButtonClass {
  1506. width: 100px;
  1507. height: 36px;
  1508. margin: auto;
  1509. font-size: 18px;
  1510. text-align: center;
  1511. color: white;
  1512. border-radius: 20px;
  1513. display: block;
  1514. background: darkslategrey;
  1515. transition: 0.3s;
  1516. }
  1517. p {
  1518. margin: 15px auto;
  1519. padding: 0;
  1520. font-size: 16px;
  1521. color: white;
  1522. display: block;
  1523. text-align: center;
  1524. }
  1525. a {
  1526. color: aqua;
  1527. cursor: pointer;
  1528. }
  1529. .selectTab {
  1530. min-width: 100px;
  1531. .custom-dropdown-item {
  1532. font-size: 0.083rem;
  1533. }
  1534. }
  1535. .section {
  1536. flex: 1;
  1537. }
  1538. .menu-list {
  1539. position: relative;
  1540. }
  1541. .input-with-selects {
  1542. width: 80%;
  1543. }
  1544. .menu-tag {
  1545. position: absolute;
  1546. top: 12px;
  1547. right: 9px;
  1548. background: red;
  1549. color: #fff;
  1550. padding: 0px 9px;
  1551. height: 25px;
  1552. text-align: center;
  1553. line-height: 25px;
  1554. border-radius: 13px;
  1555. font-size: 12px;
  1556. }
  1557. .search_box_active {
  1558. opacity: 0.01;
  1559. }
  1560. /* 适应pad样式 */
  1561. @media screen and (max-width: 1024px) {
  1562. .search_box {
  1563. margin-left: 10px;
  1564. }
  1565. }
  1566. .go_login {
  1567. font-size: 14px;
  1568. color: #ffffff;
  1569. cursor: pointer;
  1570. }
  1571. .suffix {
  1572. color: #606266;
  1573. }
  1574. </style>