Report1.vue 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257
  1. <template>
  2. <div class="out">
  3. <!---lxh-修改密码-->
  4. <div class="dig_update">
  5. <el-dialog
  6. :visible.sync="dialogVisible"
  7. :close-on-click-modal="false"
  8. width="80%"
  9. style="border-radius: 40px"
  10. >
  11. <div slot="title">
  12. <div label-width="150px" class="demo-ruleForm">
  13. <p v-if="isView" class="dig_title">
  14. {{ proDataLin.userName }}的{{ proDataLin.planName }}计划
  15. </p>
  16. <p v-if="!isView" class="dig_title">编辑计划</p>
  17. <div slot=""></div>
  18. <div slot="footer"></div>
  19. <div class="table-content">
  20. <el-table
  21. :data="tableData"
  22. :row-style="{ height: '0px' }"
  23. :cell-style="{ padding: '5px' }"
  24. :header-cell-style="{ background: '#F8F8F8', color: '#606266' }"
  25. >
  26. <el-table-column
  27. show-overflow-tooltip
  28. prop="planName"
  29. label="计划名称"
  30. align="center"
  31. width=""
  32. >
  33. </el-table-column>
  34. <el-table-column
  35. show-overflow-tooltip
  36. prop="planEndTime"
  37. label="计划结束时间"
  38. align="center"
  39. width=""
  40. >
  41. </el-table-column>
  42. <el-table-column label="操作" width="240px" align="center">
  43. <template slot-scope="scope">
  44. <div class="detail_button_out">
  45. <div class="detail_button" @click="radioClickNew(scope.row)">
  46. <img src="../assets/img/table/search.png" />
  47. <span> 个人报告查看 </span>
  48. </div>
  49. </div>
  50. <!-- <div
  51. class="detail_button_out"
  52. v-if="scope.row.hasOwnProperty('contentEntities')"
  53. >
  54. <div v-for="item in scope.row.contentEntities" :key="item.id">
  55. <div
  56. v-if="item.isDisplayed == 1"
  57. style="
  58. color: #00bf78;
  59. display: flex;
  60. justify-content: flex-start;
  61. align-items: center;
  62. cursor: pointer;
  63. "
  64. @click="radioClick(item, scope.row)"
  65. >
  66. <img
  67. style="width: 15px; margin-left: 10px"
  68. src="../assets/img/table/search.png"
  69. />
  70. {{ item.name }}
  71. </div>
  72. </div>
  73. </div> -->
  74. </template>
  75. </el-table-column>
  76. </el-table>
  77. </div>
  78. <!-- <el-pagination
  79. class="pag_class"
  80. background
  81. @size-change="handleSizeChange"
  82. @current-change="handleCurrentChange"
  83. :current-page.sync="pageNum"
  84. layout="total, sizes, prev, pager, next"
  85. :page-size="pageSize"
  86. :page-sizes="[10, 20, 50, 100]"
  87. :total="total"
  88. >
  89. </el-pagination> -->
  90. <div class="dig_button"></div>
  91. </div>
  92. </div>
  93. </el-dialog>
  94. </div>
  95. <div>
  96. <el-dialog
  97. :visible.sync="topicVisible"
  98. :close-on-click-modal="false"
  99. width="40%"
  100. style="border-radius: 40px"
  101. >
  102. <div slot="title">
  103. <div label-width="150px" class="demo-ruleForm">
  104. <p v-if="isView" class="dig_title">查看报告</p>
  105. <div slot=""></div>
  106. <div slot="footer"></div>
  107. <div style="margin-bottom: 20px">量表</div>
  108. <el-button
  109. type="success"
  110. style="border-radius: 20px"
  111. v-for="item in topPicList"
  112. :key="item.name"
  113. @click="radioClick(item)"
  114. >
  115. {{ item.name }}
  116. </el-button>
  117. <div style="margin-bottom: 20px; margin-top: 20px">任务(必选)</div>
  118. <el-button
  119. type="success"
  120. style="border-radius: 20px"
  121. v-for="item in taskList"
  122. :key="item.name"
  123. @click="radioClick(item)"
  124. >
  125. {{ item.name }}
  126. </el-button>
  127. <div style="margin-bottom: 20px; margin-top: 20px">任务(可选)</div>
  128. <div v-show="taskOptionalList.length == 0">无</div>
  129. <el-button
  130. type="success"
  131. style="
  132. border-radius: 20px;
  133. margin-left: 0px;
  134. display: flex;
  135. margin-top: 20px;
  136. "
  137. v-for="item in taskOptionalList"
  138. :key="item.name"
  139. @click="radioClick(item)"
  140. >
  141. {{ item.name }}
  142. </el-button>
  143. <div class="dig_button"></div>
  144. </div>
  145. </div>
  146. </el-dialog>
  147. </div>
  148. <div class="dig_update">
  149. <el-dialog
  150. :visible.sync="userVisible"
  151. append-to-body
  152. width="82%"
  153. style="border-radius: 40px"
  154. >
  155. <div slot="title" style="border-radius: 40px">
  156. <p style="text-align: center; font-weight: 700; font-size: 20px">
  157. {{ proDataLin.userName }}{{ planObj.planName }}的报告
  158. </p>
  159. <div class="kply">
  160. <div class="kply_inner">
  161. <div style="padding: 20px 40px">
  162. <div>
  163. <div class="report_info_out">
  164. <img v-show="gender == '1'" src="../assets/report/man1.png" />
  165. <img v-show="gender == '0'" src="../assets/report/woman1.png" />
  166. <div class="report_info_user">
  167. <span class="info">姓名:&nbsp;&nbsp;{{ proDataLin.userName }}</span>
  168. <span class="info" v-show="proDataLin.planType == '0'"
  169. >学号:&nbsp;&nbsp;{{ proDataLin.userNo }}</span
  170. >
  171. <span class="info" v-show="proDataLin.planType == '1'"
  172. >编号:&nbsp;&nbsp;{{ proDataLin.userNo }}</span
  173. >
  174. <span class="info">测试用时:&nbsp;&nbsp;{{ useTime }}</span>
  175. <span class="info"
  176. >所属组织结构:&nbsp;&nbsp;<span style="">{{
  177. orgName
  178. }}</span></span
  179. >
  180. </div>
  181. </div>
  182. <div class="report_totol_score">
  183. <div class="report_bei">
  184. <img height="200px !impotent" src="../assets/report/bei.png" />
  185. <div class="score" v-if="reportData.length > 0">
  186. {{ reportData[0].dimensionScore }}
  187. </div>
  188. </div>
  189. <div class="totol_result_des" v-if="reportData.length > 0">
  190. <div
  191. v-show="
  192. currentFlag == 'SHAPE_RANDOM' ||
  193. currentFlag == 'ETB01' ||
  194. currentFlag == 'FDOT' ||
  195. currentFlag == 'EMOTION_STROOP'
  196. "
  197. class="progress_out"
  198. :style="{
  199. width:
  200. currentFlag == 'SHAPE_RANDOM' ||
  201. currentFlag == 'ETB01' ||
  202. currentFlag == 'FDOT' ||
  203. currentFlag == 'EMOTION_STROOP'
  204. ? '100%'
  205. : '50%',
  206. }"
  207. style="display: flex; align-items: center"
  208. v-for="(item, index) in echarts_name_list"
  209. :key="index"
  210. >
  211. <span
  212. class="progress_out_name"
  213. style="width: 200px; font-size: 16px; font-weight: 700"
  214. >
  215. {{ item.name }}
  216. </span>
  217. <el-progress
  218. :percentage="echarts_data_list[index]"
  219. style="width: 100%"
  220. :stroke-width="18"
  221. :show-text="false"
  222. :color="colorPro"
  223. />
  224. <span class="progress_out_score">
  225. <span
  226. style="color: #ff1e00; font-size: 14px; font-weight: 700"
  227. >{{ echarts_data_list[index] }}</span
  228. ><span style="color: #000000; font-size: 12px; opacity: 0.4"
  229. >/100</span
  230. ></span
  231. >
  232. </div>
  233. 结论:{{ reportData[0].dimensionSymptom }},{{
  234. reportData[0].dimensionImprovement
  235. }}
  236. </div>
  237. </div>
  238. <div
  239. class="out_p"
  240. v-show="
  241. !(
  242. currentFlag == 'SHAPE_RANDOM' ||
  243. currentFlag == 'ETB01' ||
  244. currentFlag == 'FDOT' ||
  245. currentFlag == 'EMOTION_STROOP'
  246. )
  247. "
  248. >
  249. <div
  250. v-show="
  251. !(
  252. currentFlag == 'SHAPE_RANDOM' ||
  253. currentFlag == 'ETB01' ||
  254. currentFlag == 'FDOT' ||
  255. currentFlag == 'EMOTION_STROOP'
  256. )
  257. "
  258. class="echrts_sty"
  259. ref="echarts_ld"
  260. ></div>
  261. <div class="report_echarts_out">
  262. <div
  263. style="
  264. display: flex;
  265. flex-direction: row;
  266. width: 100%;
  267. flex-wrap: wrap;
  268. padding-top: 40px;
  269. padding-bottom: 40px;
  270. "
  271. >
  272. <div
  273. class="progress_out"
  274. :style="{
  275. width: !(
  276. currentFlag == 'SHAPE_RANDOM' ||
  277. currentFlag == 'ETB01' ||
  278. currentFlag == 'FDOT' ||
  279. currentFlag == 'EMOTION_STROOP'
  280. )
  281. ? '100%'
  282. : '50%',
  283. }"
  284. v-for="(item, index) in echarts_name_list"
  285. :key="index"
  286. >
  287. <span class="progress_out_name" style="width: 150px">
  288. {{ item.name }}
  289. </span>
  290. <el-progress
  291. :percentage="echarts_data_list[index]"
  292. style="width: 100%"
  293. :stroke-width="18"
  294. :show-text="false"
  295. :color="colorPro"
  296. />
  297. <span class="progress_out_score"
  298. >{{ echarts_data_list[index]
  299. }}<span style="color: #000000; font-size: 12px; opacity: 0.4"
  300. >/100</span
  301. ></span
  302. >
  303. </div>
  304. </div>
  305. </div>
  306. </div>
  307. <!-- **********************************开始1 -->
  308. <div
  309. v-show="
  310. !(
  311. currentFlag == 'SHAPE_RANDOM' ||
  312. currentFlag == 'ETB01' ||
  313. currentFlag == 'FDOT' ||
  314. currentFlag == 'EMOTION_STROOP'
  315. )
  316. "
  317. v-for="(item, index) in reportDataAll"
  318. :key="index"
  319. style="padding-top: 20px"
  320. >
  321. <div class="des_zhishu">
  322. {{ item.dimensionName }}
  323. </div>
  324. <div class="report_des_out">
  325. <div class="score">
  326. <div class="score_lin">
  327. <img
  328. src="../assets/img/report/score.png"
  329. style="width: 20px; height: 20px"
  330. alt=""
  331. />
  332. <span class="score_tt">分数:</span>
  333. </div>
  334. <span
  335. v-if="
  336. item.dimensionSymptom == '重度' ||
  337. item.dimensionSymptom == '高风险'
  338. "
  339. style="color: red"
  340. >
  341. {{ item.dimensionScore }}</span
  342. >
  343. <span
  344. v-if="
  345. item.dimensionSymptom == '无症状或轻度' ||
  346. item.dimensionSymptom == '无或轻风险'
  347. "
  348. style="color: #00bf78"
  349. >
  350. {{ item.dimensionScore }}</span
  351. >
  352. <span
  353. v-if="
  354. item.dimensionSymptom == '中度' ||
  355. item.dimensionSymptom == '中风险'
  356. "
  357. style="color: #f0a900"
  358. >
  359. {{ item.dimensionScore }}</span
  360. >
  361. <span
  362. style="
  363. font-size: 16px;
  364. color: rgb(153, 153, 153);
  365. letter-spacing: 0px;
  366. "
  367. >&nbsp;&nbsp;(满分100)</span
  368. >
  369. </div>
  370. <div class="score">
  371. <span class="score_tt">
  372. <div class="score_lin">
  373. <img
  374. src="../assets/img/report/result.png"
  375. style="width: 20px; height: 20px"
  376. alt=""
  377. />
  378. <span class="score_tt">结论:</span>
  379. </div>
  380. </span>
  381. <span
  382. v-if="
  383. item.dimensionSymptom == '重度' ||
  384. item.dimensionSymptom == '高风险'
  385. "
  386. style="color: red"
  387. >
  388. {{ item.dimensionSymptom }}</span
  389. >
  390. <span
  391. v-if="
  392. item.dimensionSymptom == '无症状或轻度' ||
  393. item.dimensionSymptom == '无或轻风险'
  394. "
  395. style="color: #00bf78"
  396. >
  397. {{ item.dimensionSymptom }}</span
  398. >
  399. <span
  400. v-if="
  401. item.dimensionSymptom == '中度' ||
  402. item.dimensionSymptom == '中风险'
  403. "
  404. style="color: #f0a900"
  405. >
  406. {{ item.dimensionSymptom }}</span
  407. >
  408. </div>
  409. <div class="scoreAsy">
  410. <span class="scoreAsyTitle">
  411. <div class="score_lin">
  412. <img
  413. src="../assets/img/report/asy.png"
  414. style="width: 20px; height: 20px"
  415. alt=""
  416. />
  417. <span class="score_tt">分析:</span>
  418. </div> </span
  419. ><span class="scoreAsyDes">{{ item.dimensionImprovement }}</span>
  420. </div>
  421. <!-- <div class="des">{{ item.dimensionImprovement }}</div> -->
  422. <div class="scoreAsy">
  423. <span class="scoreAsyTitle">
  424. <div class="score_lin">
  425. <img
  426. src="../assets/img/report/sm.png"
  427. style="width: 20px; height: 20px"
  428. alt=""
  429. />
  430. <span class="score_tt">说明:</span>
  431. </div> </span
  432. ><span class="scoreAsyDes">{{ item.dimensionDesc }}</span>
  433. </div>
  434. <div class="scoreAsy">
  435. <span class="scoreAsyTitle">
  436. <div class="score_lin">
  437. <img
  438. src="../assets/img/report/sug.png"
  439. style="width: 20px; height: 20px"
  440. alt=""
  441. />
  442. <span class="score_tt">建议:</span>
  443. </div> </span
  444. ><span class="scoreAsyDes">{{ item.dimensionSuggestion }}</span>
  445. </div>
  446. </div>
  447. </div>
  448. </div>
  449. </div>
  450. </div>
  451. </div>
  452. </div>
  453. </el-dialog>
  454. </div>
  455. </div>
  456. </template>
  457. <script>
  458. // import { oSessionStorage } from "../../utils/utils";
  459. import { oSessionStorage } from "../utils/utils";
  460. import * as echarts from "echarts";
  461. import md5 from "md5";
  462. export default {
  463. data() {
  464. return {
  465. topicVisible: false,
  466. //接收所属组织结构的词语
  467. orgName: "",
  468. userVisible: false,
  469. //编辑返回的值
  470. userDetailData: {},
  471. //组织架构名字
  472. groupName: "",
  473. disableFlag: false,
  474. phoneFlag: false,
  475. flag: 3,
  476. dialogVisible: false,
  477. //渠道列表
  478. isView: true,
  479. //当前计划ID
  480. planId: "",
  481. userInfo: {},
  482. proDataLin: [],
  483. total: 0,
  484. pageSize: 10,
  485. pageNum: 1,
  486. tableData: [],
  487. userTotal: 0,
  488. userpageSize: 10,
  489. userPageNum: 1,
  490. userTableData: [],
  491. multipleSelection: [],
  492. //量表题目的选项
  493. topPicList: [],
  494. //认知任务必选的选项
  495. taskList: [],
  496. //认知任务可选的选项
  497. taskOptionalList: [],
  498. //获取报告总数据
  499. reportData: [],
  500. //获取不过滤的数据
  501. reportDataAll: [],
  502. echarts_des_list: ["", "", "", "", "", ""],
  503. echarts_data_list: [10, 20, 30, 40, 0, 0],
  504. echarts_name_list: [
  505. { name: "阳光指数", max: 100 },
  506. { name: "情绪稳定指数", max: 100 },
  507. { name: "社交能力", max: 100 },
  508. { name: "自律能力", max: 100 },
  509. { name: "爱情观", max: 100 },
  510. { name: "人生观", max: 100 },
  511. ],
  512. option: {},
  513. echarts_ld: "",
  514. colorPro: "linear-gradient(to right,#FF4E00 ,#ffffff)",
  515. //该用户的需要做的题目的列表
  516. radio1: "",
  517. currentFlag: "",
  518. useTime: "",
  519. //当前用户选择的测试
  520. planObj: "",
  521. gender: "1",
  522. };
  523. },
  524. mounted() {
  525. this.echarts_ld = this.$refs.echarts_ld;
  526. this.userInfo = JSON.parse(oSessionStorage.getItem("userInfo"));
  527. },
  528. methods: {
  529. isRadioFun(val) {},
  530. forMatCom(val) {
  531. if (val.isComplete == "0") {
  532. return "未完成";
  533. } else {
  534. return "已完成";
  535. }
  536. },
  537. //查询报告 //根据planId 和用户编号
  538. queryRport(val) {
  539. //打印计划信息
  540. //调用接口--根据计划ID查询计划中题目需要显示的个数及名称
  541. let url = `/planContent/findAllByPlanId?planId=${val.id}&userNo=${val.userNo}`;
  542. this.$http.get(url, {}, (res) => {
  543. //查询题目列表
  544. let list = [];
  545. list = res.data;
  546. //过滤一下list
  547. // 量表过滤
  548. this.topPicList = list.filter((item) => {
  549. return (
  550. item.isDisplayed == "1" &&
  551. item.contentType == "0" &&
  552. item.flag != "20210617140713"
  553. );
  554. });
  555. //比作的认知任务
  556. this.taskList = list.filter((item) => {
  557. return (
  558. item.isDisplayed == "1" && item.contentType == "1" && item.isRequired == "1"
  559. );
  560. });
  561. //选做的认知任务
  562. this.taskOptionalList = list.filter((item) => {
  563. return (
  564. item.isDisplayed == "1" && item.contentType == "1" && item.isRequired == "0"
  565. );
  566. });
  567. // topPicList: [],
  568. // //认知任务必选的选项
  569. // taskList:[],
  570. // //认知任务可选的选项
  571. // taskOptionalList:[],
  572. });
  573. //出现选择了几个题目//需要显示--需要出现个弹出框进行选择
  574. this.topicVisible = true;
  575. },
  576. radioClickNew(val) {
  577. this.planObj = val;
  578. this.topicVisible = true;
  579. this.queryRport(val);
  580. },
  581. radioClick(val, planObj) {
  582. //在数组中招待
  583. let params = {
  584. planId: val.planId,
  585. userNo: this.proDataLin.userNo,
  586. flag: val.flag,
  587. };
  588. this.currentFlag = val.flag;
  589. this.userVisible = true;
  590. this.reportDetail(params);
  591. },
  592. reportDetail(params) {
  593. let url = `/userRecordScore/findByFlagAndUserNo?planId=${params.planId}&userNo=${params.userNo}&flag=${params.flag}`;
  594. this.$http.get(url, {}, (res) => {
  595. if (res.code == 200) {
  596. // this.reportData = res.data;
  597. this.gender = res.data.gender;
  598. let listTmp1 = [];
  599. listTmp1 = res.data.dimensionScore.filter((item) => {
  600. return item.dimensionName != "总分";
  601. });
  602. let listTmp2 = [];
  603. listTmp2 = listTmp1.filter((item) => {
  604. return (
  605. item.dimensionName == "压力" ||
  606. item.dimensionName == "焦虑" ||
  607. item.dimensionName == "抑郁"
  608. );
  609. });
  610. let listTmp3 = [];
  611. listTmp3 = listTmp1.filter((item) => {
  612. return !(
  613. item.dimensionName == "压力" ||
  614. item.dimensionName == "焦虑" ||
  615. item.dimensionName == "抑郁"
  616. );
  617. });
  618. this.reportDataAll = listTmp2.concat(listTmp3);
  619. //将数组中的压力---抑郁---焦虑 取出来
  620. //然后将数组中的不是焦虑--抑郁 --压力的 取出来 --进行排序
  621. // this.reportDataAll = res.data.dimensionScore.filter((item) => {
  622. // return item.dimensionName != "总分";
  623. // });
  624. //将三个维度提前
  625. this.useTime = res.data.usedTime;
  626. this.orgName = res.data.dimensionScore[0].orgName;
  627. this.reportData = res.data.dimensionScore;
  628. // let a =[res.data[0].]
  629. //修改文本
  630. let scoreList = [];
  631. let scoreDes = [];
  632. let nameList = [];
  633. for (let i = 0; i < this.reportData.length; i++) {
  634. //
  635. if (this.reportData[i].dimensionName != "总分") {
  636. scoreList.push(parseInt(this.reportData[i].dimensionScore));
  637. scoreDes.push(this.reportData[i].dimensionImprovement);
  638. let ob = { name: this.reportData[i].dimensionName, max: 100 };
  639. nameList.push(ob);
  640. }
  641. }
  642. this.echarts_des_list = scoreDes;
  643. this.echarts_data_list = scoreList;
  644. this.echarts_name_list = nameList;
  645. // currentFlag != 'SHAPE_RANDOM'
  646. if (
  647. !(
  648. this.currentFlag == "SHAPE_RANDOM" ||
  649. this.currentFlag == "ETB01" ||
  650. this.currentFlag == "FDOT" ||
  651. this.currentFlag == "EMOTION_STROOP"
  652. )
  653. ) {
  654. const myChart = echarts.init(this.echarts_ld);
  655. // this.option.series[0].data[0] = a;
  656. this.option.series[0].data[0].value = this.echarts_data_list;
  657. this.option.radar.indicator = this.echarts_name_list; //name
  658. //当是认知任务时---不执行
  659. myChart.setOption(this.option);
  660. }
  661. } else {
  662. this.$message({
  663. type:'error',
  664. message:res.msg
  665. })
  666. }
  667. });
  668. },
  669. deleteUser(val) {
  670. let data = [val.id];
  671. //调用接口开始添加
  672. let url = `/planUser/deletePlanUsers`;
  673. this.$http.post(url, data, (res) => {
  674. if (res && res.code == 200) {
  675. this.searchTarget();
  676. this.tableData = res.data.content;
  677. this.total = res.data.totalElements;
  678. } else {
  679. // this.$toast.fail(res.msg);
  680. this.$message.error(res.msg);
  681. }
  682. });
  683. },
  684. addUser() {
  685. this.userVisible = true;
  686. //调用待添加的用户
  687. this.userSearchTarget();
  688. },
  689. isComUser(val, row) {
  690. //添加已选用户
  691. let data = [];
  692. if (val == 1) {
  693. for (let i = 0; i < this.multipleSelection.length; i++) {
  694. //
  695. let obj = {
  696. orgName: this.multipleSelection[i].orgName,
  697. orgNo: this.multipleSelection[i].orgNo,
  698. planId: this.proDataLin.id,
  699. userName: this.multipleSelection[i].userName,
  700. userNo: this.multipleSelection[i].userNo,
  701. };
  702. data.push(obj);
  703. }
  704. } else {
  705. let obj = {
  706. orgName: row.orgName,
  707. orgNo: row.orgNo,
  708. planId: this.proDataLin.id,
  709. userName: row.userName,
  710. userNo: row.userNo,
  711. };
  712. data.push(obj);
  713. }
  714. //调用接口开始添加
  715. let url = `/planUser/savePlanUsers`;
  716. this.$http.post(url, data, (res) => {
  717. if (res && res.code == 200) {
  718. this.searchTarget();
  719. this.userSearchTarget();
  720. this.tableData = res.data.content;
  721. this.total = res.data.totalElements;
  722. } else {
  723. // this.$toast.fail(res.msg);
  724. this.$message.error(res.msg);
  725. }
  726. });
  727. },
  728. searchTarget() {
  729. this.pageNum = 1;
  730. this.searchList();
  731. },
  732. userSearchTarget() {
  733. this.userPageNum = 1;
  734. this.userSearchList();
  735. },
  736. //进来调用已选列表接口
  737. searchList() {
  738. let url = `/plan/findPlanById?id=${this.proDataLin.planId}`;
  739. this.$http.get(url, {}, (res) => {
  740. if (res && res.code == 200) {
  741. this.tableData = [];
  742. this.tableData.push(res.data);
  743. // this.total = res.data.totalElements;
  744. } else {
  745. // this.$toast.fail(res.msg);
  746. this.$message.error(res.msg);
  747. }
  748. });
  749. },
  750. userSearchList() {
  751. let url = `/plan/planAddUser?pageSize=${this.userpageSize}&pageNum=${this.userPageNum}&planId=${this.proDataLin.id}&orgNo=${this.proDataLin.planOrgNo}`;
  752. this.$http.get(url, {}, (res) => {
  753. if (res && res.code == 200) {
  754. this.userTableData = res.data.content;
  755. this.userTotalotal = res.data.totalElements;
  756. } else {
  757. // this.$toast.fail(res.msg);
  758. this.$message.error(res.msg);
  759. }
  760. });
  761. },
  762. //每页多少条
  763. handleSizeChange(val) {
  764. //将首页重置为1时---且总条数变化
  765. //设置为当前总条数
  766. },
  767. handleCurrentChange(val) {
  768. this.pageNum = val;
  769. this.searchList();
  770. },
  771. //已选选项
  772. handleSelectionChange(val) {
  773. this.multipleSelection = val;
  774. },
  775. resetForm(val) {
  776. this.cancle();
  777. },
  778. formatterTime(val) {
  779. let date = new Date(val);
  780. let year = date.getFullYear();
  781. let month = date.getMonth() + 1;
  782. month = this.formatterMon(month);
  783. let day = date.getDate();
  784. day = this.formatterMon(day);
  785. return year + "-" + month + "-" + day;
  786. },
  787. formatterMon(val) {
  788. if (val < 10) {
  789. return "0" + val;
  790. } else {
  791. return val;
  792. }
  793. },
  794. open(val) {
  795. // debugger;
  796. this.proDataLin = val;
  797. this.dialogVisible = true;
  798. //查询用户下边的计划
  799. //获取渠道信息
  800. // this.option.radar.indicator=[] //name
  801. this.option = {
  802. title: {
  803. // text: 'Basic Radar Chart'
  804. },
  805. legend: {
  806. // data: ['Allocated Budget', 'Actual Spending']
  807. },
  808. radar: {
  809. shape: "square", //设置雷达图形状,值有circle、square,默认为方形
  810. splitNumber: 3, // 雷达图圈数设置
  811. // shape: 'circle',
  812. indicator: this.echarts_name_list,
  813. name: {
  814. //修改indicator文字的颜色
  815. textStyle: {
  816. // color: "#999999",
  817. },
  818. },
  819. },
  820. series: [
  821. {
  822. type: "radar",
  823. symbolSize: 6,
  824. data: [
  825. {
  826. value: this.echarts_data_list,
  827. lineStyle: {
  828. normal: {
  829. color: "#FF1E00",
  830. },
  831. },
  832. //折线拐点颜色
  833. itemStyle: {
  834. normal: {
  835. color: "#FF1E00",
  836. borderWidth: 3, //拐点边框大小
  837. },
  838. // emphasis: {
  839. // color: '#000000'//hover拐点颜色定义
  840. // }
  841. },
  842. // name: 'Actual Spending'
  843. areaStyle: {
  844. //阴影区域背景
  845. // color: 'rgba(255, 228, 52, 0.6)'
  846. color: "#F8B4AB",
  847. },
  848. },
  849. ],
  850. },
  851. ],
  852. };
  853. this.searchTarget();
  854. },
  855. edit(val) {
  856. this.dialogVisible = true;
  857. this.isView = false;
  858. this.userDetailData = val;
  859. //调用查询详情的接口
  860. },
  861. //调用查询详情的接口
  862. disableFlagStatus() {
  863. setTimeout(() => {
  864. this.disableFlag = false;
  865. }, 1500);
  866. },
  867. register() {
  868. let that = this;
  869. this.$http.post(`/plan/addOrUpdate`, {}, (res) => {
  870. this.disableFlagStatus();
  871. // this.disableFlag = false;
  872. if (res && res.code == 200) {
  873. this.dialogVisible = false;
  874. // this.$toast.success({ message: "成功" });
  875. //调用父组件的查询方法
  876. that.$emit("search");
  877. } else {
  878. // this.$toast.fail({ message: res.msg });
  879. this.$message.error(res.msg);
  880. }
  881. //清空缓存
  882. this.cancle();
  883. });
  884. },
  885. },
  886. };
  887. </script>
  888. <style scoped>
  889. .progress_cla >>> .el-progress-bar__inner {
  890. background-color: #00bf78;
  891. }
  892. </style>
  893. <style>
  894. input[aria-hidden="true"] {
  895. display: none !important;
  896. }
  897. .el-radio:focus:not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner {
  898. box-shadow: none;
  899. }
  900. .el-dialog {
  901. border-radius: 20px !important;
  902. /* background-color: #f7f7f7 !important; */
  903. }
  904. </style>
  905. <style lang="less" scoped>
  906. // .out /deep/.el-dialog {
  907. // border-radius: 20px !important;
  908. // // background-color: #f7f7f7 !important;
  909. // }
  910. // .out/deep/ .el-dialog__header {
  911. // padding: 0px 0px 0px !important;
  912. // }
  913. .progress_out/deep/ .el-progress-bar__inner {
  914. background-image: linear-gradient(to right, #ff4e00, #ffffff);
  915. }
  916. .dig_update /deep/.el-cascader {
  917. position: relative;
  918. font-size: 14px;
  919. line-height: 40px;
  920. width: 100%;
  921. }
  922. // .dig_update /deep/.el-dialog {
  923. // border-radius: 20px !important;
  924. // box-shadow: none !important;
  925. // background: transparent !important;
  926. // }
  927. .demo-ruleForm /deep/ .el-form-item {
  928. // margin-right: 10px;
  929. vertical-align: top;
  930. display: flex !important;
  931. flex-direction: column;
  932. }
  933. .demo-ruleForm /deep/.el-form-item__label {
  934. text-align: left;
  935. vertical-align: middle;
  936. float: left;
  937. font-size: 14px;
  938. color: #606266;
  939. line-height: 40px;
  940. padding: 0 12px 0 0;
  941. -webkit-box-sizing: border-box;
  942. box-sizing: border-box;
  943. }
  944. .demo-ruleForm /deep/.el-input {
  945. width: 100% !important;
  946. }
  947. .demo-ruleForm /deep/.el-input__inner {
  948. width: 100% !important;
  949. background-color: #f7f7f7;
  950. border: 0px;
  951. }
  952. .dig_button {
  953. display: flex;
  954. width: 100%;
  955. justify-content: space-around;
  956. }
  957. .demo-ruleForm {
  958. background-color: #ffffff;
  959. // border-radius: 20px;
  960. // margin-right: -10px;
  961. margin-top: -10px;
  962. padding-right: 100px;
  963. padding-left: 100px;
  964. border-radius: 20px;
  965. padding-top: 20px;
  966. padding-bottom: 40px;
  967. .dig_title {
  968. font-size: 20px;
  969. margin-bottom: 30px;
  970. text-align: center;
  971. font-weight: 700;
  972. }
  973. }
  974. .kply {
  975. width: 100%;
  976. margin-top: 20px;
  977. // background-color: #FAFAFA;
  978. .kply_inner {
  979. // padding: 20px 20px;
  980. left: 0;
  981. right: 0;
  982. margin: auto;
  983. width: 1200px;
  984. min-height: 500px;
  985. background-color: #ffffff;
  986. border-radius: 40px;
  987. .report_totol_score {
  988. margin-top: 20px;
  989. display: flex;
  990. flex-direction: row;
  991. // justify-content: space-between;
  992. align-items: center;
  993. .report_bei {
  994. position: relative;
  995. img {
  996. height: 150px !important;
  997. width: 210px !important;
  998. }
  999. // background-color: #111111;
  1000. .score {
  1001. width: 100%;
  1002. height: 40px;
  1003. text-align: center;
  1004. position: absolute;
  1005. left: 0;
  1006. right: 0;
  1007. top: -20px;
  1008. bottom: 0;
  1009. margin: auto;
  1010. color: #ffffff;
  1011. font-size: 30px;
  1012. }
  1013. }
  1014. .totol_result_des {
  1015. font-size: 18px;
  1016. margin-left: 30px;
  1017. letter-spacing: 3px;
  1018. line-height: 30px;
  1019. }
  1020. }
  1021. .des_zhishu {
  1022. color: #222222;
  1023. font-size: 20px;
  1024. background-color: #00bf78;
  1025. letter-spacing: 3px;
  1026. color: #ffffff;
  1027. display: inline-flex;
  1028. border-radius: 26px;
  1029. padding: 5px 20px;
  1030. }
  1031. .report_des_out {
  1032. margin-top: 10px;
  1033. // background-color: #f7f7f7;
  1034. border: 4px solid #f2f2f2;
  1035. padding: 20px 40px;
  1036. border-radius: 40px;
  1037. .score {
  1038. // color: #48d68e;
  1039. font-size: 16px;
  1040. line-height: 30px;
  1041. letter-spacing: 2px;
  1042. margin-bottom: 20px;
  1043. display: flex;
  1044. .score_lin {
  1045. display: flex;
  1046. align-items: center;
  1047. .score_tt {
  1048. font-weight: 700;
  1049. margin-left: 5px;
  1050. }
  1051. }
  1052. }
  1053. .des {
  1054. color: #000000;
  1055. font-size: 18px;
  1056. line-height: 28px;
  1057. letter-spacing: 3px;
  1058. }
  1059. .scoreAsy {
  1060. display: flex;
  1061. flex-direction: row;
  1062. margin-bottom: 20px;
  1063. .scoreAsyTitle {
  1064. // color: #48d68e;
  1065. font-size: 16px;
  1066. line-height: 30px;
  1067. letter-spacing: 2px;
  1068. .score_lin {
  1069. display: flex;
  1070. align-items: center;
  1071. .score_tt {
  1072. font-weight: 700;
  1073. margin-left: 5px;
  1074. }
  1075. }
  1076. }
  1077. .scoreAsyDes {
  1078. flex: 1;
  1079. font-size: 16px;
  1080. line-height: 30px;
  1081. letter-spacing: 2px;
  1082. color: #555555;
  1083. }
  1084. }
  1085. }
  1086. .start_button_out {
  1087. margin-top: 100px;
  1088. margin-bottom: 40px;
  1089. display: flex;
  1090. flex-direction: row;
  1091. justify-content: center;
  1092. .start_button_self {
  1093. cursor: pointer;
  1094. // width: 100px;
  1095. border-radius: 12px;
  1096. border: 3px solid #48d68e;
  1097. color: #ffffff;
  1098. background-color: #000000;
  1099. margin-right: 20px;
  1100. padding: 8px 60px;
  1101. cursor: pointer;
  1102. display: flex;
  1103. align-items: center;
  1104. }
  1105. }
  1106. }
  1107. }
  1108. .report_info_out {
  1109. background-color: #f8f8f8;
  1110. border-radius: 40px;
  1111. padding-top: 40px;
  1112. padding-left: 40px;
  1113. padding-bottom: 40px;
  1114. display: flex;
  1115. align-items: center;
  1116. img {
  1117. width: 100px !important;
  1118. height: 100px !important;
  1119. }
  1120. .report_info_user {
  1121. display: flex;
  1122. flex-direction: column;
  1123. margin-left: 20px;
  1124. justify-content: space-around;
  1125. color: #000000;
  1126. font-size: 20px;
  1127. .info {
  1128. margin-bottom: 10px;
  1129. font-size: 18px;
  1130. color: #333333;
  1131. }
  1132. // font-weight: 700;
  1133. }
  1134. }
  1135. .detail_button_out {
  1136. flex: 1;
  1137. display: flex;
  1138. justify-content: space-around;
  1139. .detail_button {
  1140. display: flex;
  1141. align-items: center;
  1142. cursor: pointer;
  1143. letter-spacing: 2px;
  1144. img {
  1145. width: 15px;
  1146. margin-right: 5px;
  1147. }
  1148. span {
  1149. color: #00bf78;
  1150. // font-weight: 600;
  1151. }
  1152. }
  1153. }
  1154. .out_p {
  1155. display: flex;
  1156. flex: 1;
  1157. width: 100%;
  1158. align-items: center;
  1159. .echrts_sty {
  1160. flex: 6;
  1161. height: 400px;
  1162. }
  1163. .report_echarts_out {
  1164. flex: 4;
  1165. // margin-top: 100px;
  1166. // background-color: #f7f7f7;
  1167. border-radius: 40px;
  1168. display: flex;
  1169. flex-direction: row;
  1170. // justify-content: space-between;
  1171. // height: 200px;
  1172. .progress_out {
  1173. margin-bottom: 40px;
  1174. width: 100%;
  1175. display: flex;
  1176. justify-content: start;
  1177. flex-direction: row;
  1178. // align-items: center;
  1179. // padding-right: 40px;
  1180. .progress_out_name {
  1181. color: #000000;
  1182. font-weight: 600;
  1183. padding-left: 20px;
  1184. }
  1185. .progress_out_score {
  1186. color: #ff1e00;
  1187. font-weight: 600;
  1188. margin-right: 5px;
  1189. margin-left: 15px;
  1190. }
  1191. }
  1192. }
  1193. }
  1194. </style>