evaList.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532
  1. <template>
  2. <div>
  3. <div class="elist_title">
  4. <div style=" display: flex; flex-direction: row;align-items: center; margin: 20px 0; ">
  5. <div class="lineTitle clineTitle">评价设置</div>
  6. <div style="margin-left:auto;display: flex;">
  7. <div class="r_pub_button_op" style="margin-left:10px;"
  8. @contextmenu.prevent="openAiDialog(1)"
  9. @click="openAiDialog(2)">{{ (eList && eList.length) ? '重新生成评价' : '生成评价' }}</div>
  10. </div>
  11. </div>
  12. </div>
  13. <div class="mbCss">
  14. <div class="pjCss" :style="{ width: isEvaFold ? 'calc(100% - 55%)' : 'calc(100% - 120px)', }">
  15. <div v-if="eList && eList.length" class="elist_input">
  16. <div v-for="(eItem, eIndex) in eList" :key="eIndex" class="elist_input_box">
  17. <div class="elist_inptu_text">
  18. <span>素养:</span>
  19. <input type="input" v-model="eItem.target" placeholder="填写目标"
  20. style="width: calc(100% - 280px);" />
  21. <el-switch @change="forceUpdate" class="rateSwitch" style="margin-left: auto;"
  22. v-model="eItem.isai" active-color="#0061FF" active-text="AI评分"
  23. inactive-text="" active-value="1" inactive-value="2">
  24. </el-switch>
  25. </div>
  26. <div class="elist_inptu_text">
  27. <span>评价标准:</span>
  28. <input type="input" v-model="eItem.detail" placeholder="填写评价标准" />
  29. <div class="remove" @click="
  30. deletEList(
  31. eIndex
  32. )
  33. "></div>
  34. </div>
  35. <div class="elist_inptu_text" style="align-items: flex-start;"
  36. v-loading="ruleLoading[itemTaskIndex] && ruleLoading[itemTaskIndex][eIndex]"
  37. element-loading-text="小可正在努力生成中,请稍等...">
  38. <span>评价细则:</span>
  39. <div style="width: calc(100%);">
  40. <div @click="openRule(itemTaskIndex, eIndex)" class="ruleBtn">{{ eItem.isrule ? '收起细则' : '展开细则' }}</div>
  41. <div style="width: calc(100%);" class='op_task_box' v-if="eItem.isrule">
  42. <textarea v-autoHeight="68" rows="2" class="binfo_input binfo_textarea" cols v-model="eItem.rule" placeholder="请输入评价细则"></textarea>
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. </div>
  48. <!-- <div class="eva_btn_box">
  49. <div class="eva_btn_left_box">
  50. <button class="c_pub_button_add pub_btn_eval_img" @click="addEList()">
  51. 添加
  52. </button>
  53. </div>
  54. </div> -->
  55. </div>
  56. </div>
  57. </div>
  58. </template>
  59. <script>
  60. export default {
  61. data() {
  62. return {
  63. eList:[],
  64. isEvaFold: true
  65. }
  66. },
  67. methods: {
  68. openAiDialog() {
  69. },
  70. addEList(){
  71. },
  72. deletEList(){
  73. }
  74. },
  75. }
  76. </script>
  77. <style scoped>
  78. /* 评价样式 */
  79. .elist_css {
  80. padding-bottom: 75px !important;
  81. }
  82. .elist_title {
  83. margin-bottom: 10px;
  84. }
  85. .elist_input {
  86. width: 100%;
  87. }
  88. .elist_input_box {
  89. display: flex;
  90. align-items: center;
  91. flex-wrap: wrap;
  92. }
  93. .elist_input_box+.elist_input_box {
  94. margin-top: 30px;
  95. }
  96. .elist_input .elist_input_box input {
  97. font: inherit;
  98. color: currentColor;
  99. width: 100%;
  100. /* max-width: calc(100% - 385px); */
  101. max-width: calc(100% - 150px);
  102. padding: 8px 14px;
  103. display: block;
  104. min-width: 0;
  105. outline: none;
  106. border: 1px solid rgba(0, 0, 0, 0.23);
  107. border-radius: 4px;
  108. box-sizing: border-box;
  109. background: #fff;
  110. margin: 0 20px 0 0;
  111. }
  112. .elist_input .elist_input_box span {
  113. height: 36px;
  114. line-height: 36px;
  115. color: rgb(82, 82, 82);
  116. min-width: 80px;
  117. }
  118. .elist_input .elist_input_box .remove {
  119. height: 20px;
  120. width: 20px;
  121. min-height: 20px;
  122. min-width: 20px;
  123. background-size: 100% 100%;
  124. background-position: unset;
  125. margin-left: 5px;
  126. }
  127. .elist_input_box>>>.el-rate {
  128. display: flex;
  129. height: 36px;
  130. align-items: center;
  131. }
  132. .elist_input_box .elist_inptu_text {
  133. width: 100%;
  134. display: flex;
  135. align-items: center;
  136. margin-top: 10px;
  137. }
  138. .elist_input_box .elist_inptu_text input {
  139. /* width: 500px; */
  140. width: 100%;
  141. max-width: unset;
  142. }
  143. .elist_input_box>>>.el-rate__icon {
  144. font-size: 24px;
  145. }
  146. .elist_btn {
  147. margin-top: 10px;
  148. }
  149. .lineTitle {
  150. /* margin-top: 15px; */
  151. width: 110px;
  152. font-size: 16px;
  153. display: flex;
  154. align-items: center;
  155. line-height: 20px;
  156. }
  157. .lineTitle::before {
  158. content: "";
  159. display: block;
  160. width: 3px;
  161. height: 20px;
  162. background: #0061ff;
  163. border-radius: 3px;
  164. margin: 0 5px 0 0;
  165. }
  166. .clineTitle::before {
  167. content: "";
  168. display: block;
  169. min-width: 10px;
  170. width: 10px;
  171. height: 10px;
  172. background: #0061ff;
  173. border-radius: 50%;
  174. margin: 0 5px 0 0;
  175. }
  176. .courseTop {
  177. display: flex;
  178. flex-direction: row;
  179. justify-content: space-between;
  180. align-items: center;
  181. width: calc(100% - 40px);
  182. margin: 0 auto;
  183. padding: 10px 0;
  184. }
  185. .stepsNav {
  186. display: flex;
  187. flex-direction: row;
  188. justify-content: flex-start;
  189. align-items: center;
  190. }
  191. .stepsWord {
  192. font-size: 18px;
  193. color: #fff;
  194. font-weight: bold;
  195. margin-left: auto;
  196. background: rgb(15, 126, 255);
  197. border-radius: 5px;
  198. padding: 3px 25px;
  199. box-sizing: border-box;
  200. }
  201. .stepBox {
  202. width: calc(100% - 40px);
  203. height: calc(100% - 50px);
  204. overflow: hidden;
  205. border-radius: 5px;
  206. margin: 0 auto;
  207. }
  208. .rightBox {
  209. width: calc(100%);
  210. background: #f0f2f5;
  211. /* border-radius: 10px; */
  212. overflow: auto;
  213. height: calc(100% - 150px);
  214. margin: 0 auto;
  215. position: relative;
  216. box-sizing: border-box;
  217. }
  218. .e_add_top {
  219. display: flex;
  220. justify-content: space-between;
  221. background: #fff;
  222. position: absolute;
  223. right: 20px;
  224. height: 50px;
  225. align-items: center;
  226. }
  227. .e_add_title2 {
  228. display: flex;
  229. align-items: center;
  230. }
  231. .e_add_title2 span {
  232. width: 40px;
  233. }
  234. .e_add_title {
  235. display: flex;
  236. align-items: center;
  237. color: #b8b8b8;
  238. font-size: 18px;
  239. position: relative;
  240. height: 40px;
  241. }
  242. .e_add_title span {
  243. margin-right: 10px;
  244. }
  245. .e_add_title .el_input {
  246. width: 300px;
  247. }
  248. .e_add_title>>>.el-input__inner {
  249. width: 400px;
  250. }
  251. .e_add_btn {}
  252. .e_add_content {
  253. display: flex;
  254. width: 100%;
  255. }
  256. .e_add_list {
  257. background: #fff;
  258. height: 500px;
  259. width: 210px;
  260. position: relative;
  261. margin: 15px 5px 0 0;
  262. flex-shrink: 0;
  263. display: flex;
  264. flex-direction: column;
  265. }
  266. .e_add_list_title {
  267. font-size: 20px;
  268. width: 100%;
  269. box-sizing: border-box;
  270. padding: 15px 40px;
  271. text-align: center;
  272. border-bottom: 1px solid #eaeaea;
  273. position: relative;
  274. display: flex;
  275. align-items: center;
  276. justify-content: center;
  277. height: 57px;
  278. background: #f6f6f6;
  279. }
  280. .e_add_list_title span {
  281. overflow: hidden;
  282. white-space: nowrap;
  283. text-overflow: ellipsis;
  284. }
  285. .e_add_list_title img {
  286. position: absolute;
  287. right: 15px;
  288. width: 25px;
  289. cursor: pointer;
  290. top: 50%;
  291. transform: translateY(-50%);
  292. }
  293. .e_add_list_body {
  294. height: calc(100% - 187px);
  295. overflow: auto;
  296. }
  297. .e_add_list_child {
  298. width: 100%;
  299. display: flex;
  300. align-items: center;
  301. justify-content: center;
  302. position: relative;
  303. box-sizing: border-box;
  304. padding: 15px 40px;
  305. text-align: center;
  306. }
  307. .e_add_list_child span {
  308. overflow: hidden;
  309. white-space: nowrap;
  310. text-overflow: ellipsis;
  311. cursor: pointer;
  312. }
  313. .e_add_list_child img {
  314. position: absolute;
  315. right: 10px;
  316. width: 21px;
  317. cursor: pointer;
  318. top: 50%;
  319. transform: translateY(-50%);
  320. }
  321. .e_add_list_child+.e_add_list_child {
  322. border-top: 1px solid #eaeaea;
  323. }
  324. .e_add_list_child .active {
  325. color: #409eff;
  326. }
  327. .e_add_list_btn {
  328. position: absolute;
  329. bottom: 0;
  330. height: 50px;
  331. background: rgb(120, 120, 254);
  332. width: 100%;
  333. color: #fff;
  334. font-size: 16px;
  335. text-align: center;
  336. line-height: 50px;
  337. cursor: pointer;
  338. }
  339. .e_add_list_detail {
  340. position: absolute;
  341. bottom: 0;
  342. height: 130px;
  343. background: rgb(120, 120, 254);
  344. width: 100%;
  345. color: #fff;
  346. font-size: 16px;
  347. display: flex;
  348. align-items: center;
  349. justify-content: center;
  350. }
  351. .e_add_list_detail textarea {
  352. height: 90%;
  353. width: 95%;
  354. border: none;
  355. resize: none;
  356. outline: none;
  357. padding: 5px;
  358. box-sizing: border-box;
  359. }
  360. .e_add_list_pbox {
  361. width: 100%;
  362. }
  363. .e_add_list_pbox_title {
  364. height: 50px;
  365. background: #fff;
  366. display: flex;
  367. align-items: center;
  368. width: 100%;
  369. box-sizing: border-box;
  370. padding: 0 20px;
  371. flex-direction: row;
  372. flex-wrap: wrap;
  373. }
  374. .mbCss {
  375. width: 100%;
  376. display: flex;
  377. flex-direction: row;
  378. flex-wrap: nowrap;
  379. align-content: center;
  380. align-items: flex-start;
  381. justify-content: flex-start;
  382. }
  383. .pjCss {
  384. /* width: 42%; */
  385. width: calc(100% - 55%);
  386. display: flex;
  387. flex-direction: column;
  388. flex-wrap: nowrap;
  389. align-items: flex-start;
  390. }
  391. .e_box {
  392. /* display: flex; */
  393. flex-wrap: wrap;
  394. max-height: 500px;
  395. align-items: flex-start;
  396. overflow: auto;
  397. width: 100%;
  398. }
  399. .e_card {
  400. border: 1px solid #ccc;
  401. background: #fff;
  402. margin-right: 20px;
  403. width: 270px;
  404. display: flex;
  405. flex-direction: column;
  406. align-items: center;
  407. border-radius: 5px;
  408. margin-top: 10px;
  409. text-align: center;
  410. }
  411. .e_card_picture {
  412. margin: 10px 0;
  413. }
  414. .e_card_picture>img {
  415. width: 50px;
  416. }
  417. .e_card_name {
  418. width: 100%;
  419. padding: 0 10px;
  420. box-sizing: border-box;
  421. margin-bottom: 10px;
  422. overflow: hidden;
  423. text-overflow: ellipsis;
  424. white-space: nowrap;
  425. }
  426. .e_card_time {
  427. width: 100%;
  428. padding: 0 10px;
  429. box-sizing: border-box;
  430. font-size: 15px;
  431. color: #c3c3c3;
  432. margin-bottom: 10px;
  433. }
  434. .e_card_btn {
  435. height: 40px;
  436. display: flex;
  437. align-items: center;
  438. width: 100%;
  439. background: rgb(244, 244, 244);
  440. }
  441. .e_card_btn:hover {
  442. background: rgb(221 221 221);
  443. }
  444. .e_card_btn span {
  445. flex: 1 1 auto;
  446. text-align: center;
  447. cursor: pointer;
  448. }
  449. .addEva {
  450. border: 1px solid #ccc;
  451. background: #fff;
  452. margin-right: 20px;
  453. width: 270px;
  454. height: 149px;
  455. display: flex;
  456. flex-direction: column;
  457. align-items: center;
  458. border-radius: 5px;
  459. margin-top: 10px;
  460. text-align: center;
  461. cursor: pointer;
  462. justify-content: center;
  463. }
  464. .addEva>img {
  465. width: 50px;
  466. object-fit: cover;
  467. }
  468. </style>