No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.vue 21KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867
  1. <template>
  2. <div class="h5-container">
  3. <van-nav-bar title="事故举报台账" @click-left="onClickLeft" @click-right="handAdd('add','XY')">
  4. <template v-if="false" #right>
  5. <van-icon name="add" size="25" color="#000" />
  6. </template>
  7. </van-nav-bar>
  8. <van-search v-if="false" v-model="query.discovererDesc" show-action placeholder="请输入发现人" @search="onRefresh"
  9. @cancel="handdelect" />
  10. <!-- 项目列表 -->
  11. <van-pull-refresh v-model="isRefreshing" success-text="刷新成功" @refresh="onRefresh">
  12. <van-list v-model:loading="isLoading" :finished="isFinished" finished-text="没有更多了" offset="200" @load="onLoad">
  13. <div v-for="(item, idx) in resultData" :key="item.id">
  14. <van-swipe-cell @open="handleSwipeOpen(item,idx)" @close="handleSwipeClose(item,idx)" title-style="color: #007aff" style="height: 80px;" :ref="el => getSwipeCellRef(el, idx)">
  15. <template #default>
  16. <div class="swipe-cell-default">
  17. <van-cell style="min-height: 100px; padding: 0 0 0 0; display: flex; align-items: flex-start;" @click="handAdd('look',item)">
  18. <template #title>
  19. <div class="cell-title">
  20. {{ item.hdDescription }}
  21. </div>
  22. </template>
  23. <template #label>
  24. <div>事故地点:{{ item.accidentLocation }}</div>
  25. <div>发生时间:{{ item.accidentTime }}</div>
  26. <div>事故类型:{{ item.accidentType }}</div>
  27. <div>事故等级:{{ item.accidentLevel }}</div>
  28. </template>
  29. </van-cell>
  30. <div v-if="false" class="swipe-cell-default-icon">
  31. <van-icon v-if="openStatus[idx]" name="arrow-double-left" @click.stop="openSwipe(idx)" />
  32. <van-icon v-else name="arrow-double-right" @click.stop="closeSwipe(idx)" />
  33. </div>
  34. </div>
  35. </template>
  36. <template v-if="false" #right>
  37. <van-button square class="edit-button" text="编辑" @click="handAdd('edit', item)" />
  38. <van-button square class="delete-button" text="删除" @click="handleDelete(item, idx)" />
  39. </template>
  40. </van-swipe-cell>
  41. </div>
  42. </van-list>
  43. </van-pull-refresh>
  44. <!-- 删除确认弹窗 -->
  45. <van-dialog v-model:show="deleteDialogVisible" show-cancel-button @confirm="confirmDelete">
  46. <template #title>
  47. <div>删除确认</div>
  48. </template>
  49. <div style="padding: 30px;">确定要删除该事故记录吗?</div>
  50. </van-dialog>
  51. </div>
  52. </template>
  53. <script setup>
  54. import { ref, reactive, onMounted, getCurrentInstance, nextTick, toRaw } from 'vue';
  55. import { Dialog, showDialog, showSuccessToast, showToast, Toast } from 'vant';
  56. const { proxy } = getCurrentInstance();
  57. const onClickLeft = () => {
  58. history.back();
  59. };
  60. const headers = ref({
  61. token: localStorage.getItem('token'),
  62. userId: localStorage.getItem('userId'),
  63. dept: JSON.parse(localStorage.getItem('dept'))[0].deptCode
  64. });
  65. const switchIconState = (idx) => {
  66. openStatus.value[idx] = !openStatus.value[idx]
  67. openStatus.value = new Array(resultData.value.length).fill(true);
  68. }
  69. // const onClickRight = () =>{
  70. // searchShow.value = !searchShow.value;
  71. // }
  72. const searchShow = ref(false);
  73. const query = ref({
  74. discovererDesc: '',
  75. hdSelect:'隐患举报'
  76. });
  77. function formatDate(date, format) {
  78. const year = date.getFullYear();
  79. const month = date.getMonth() + 1;
  80. const day = date.getDate();
  81. const hours = date.getHours();
  82. const minutes = date.getMinutes();
  83. const seconds = date.getSeconds();
  84. return format
  85. .replace('yyyy', year)
  86. .replace('MM', month.toString().padStart(2, '0'))
  87. .replace('dd', day.toString().padStart(2, '0'))
  88. .replace('HH', hours.toString().padStart(2, '0'))
  89. .replace('mm', minutes.toString().padStart(2, '0'))
  90. .replace('ss', seconds.toString().padStart(2, '0'));
  91. }
  92. const tableData = ref([]);
  93. const selectedRows = ref([]);
  94. const dialogVisibleLook = ref(false);
  95. const deleteDialogVisible = ref(false);
  96. const currentDeleteItem = ref([]);
  97. const dialogVisible = ref(false);
  98. const dialogVisibleFile = ref(false);
  99. const date = ref(null);
  100. const kz = ref(true);
  101. const handAdd = async (flag,item) => {
  102. if('add'===flag) {
  103. // 将表单数据置空
  104. resetForma();
  105. //todo 编辑页面
  106. proxy.$router.push({
  107. path: '/accidentManager/accidentJuBao/accidentJuBao_edit/index',
  108. query: {
  109. flag:'add'
  110. }
  111. });
  112. }else if('edit'===flag) {
  113. proxy.$router.push({
  114. path: '/accidentManager/accidentJuBao/accidentJuBao_edit/index',
  115. query: {
  116. id:item.id,
  117. flag:'edit'
  118. }
  119. })
  120. }else {
  121. proxy.$router.push({
  122. path: '/accidentManager/accidentJuBao/accidentJuBao_edit/index',
  123. query: {
  124. id:item.id,
  125. flag:'look'
  126. }
  127. })
  128. }
  129. };
  130. // 定义表单数据
  131. const form = ref({
  132. hdPicId: '',
  133. hdId: '',
  134. hdType: '',
  135. discoveryTime: '',
  136. hdSubtype: '',
  137. discoverer: '',
  138. discovererOther: '',
  139. hdDescription: '',
  140. hdLevel: '',
  141. bz: '',
  142. hdLocation: '',
  143. picBefore: '',
  144. equipmentId: '',
  145. hdmanageLevel: '',
  146. handlingProcesses: '',
  147. companyId: '',
  148. repairLeader: '',
  149. repairOther: '',
  150. repairSuggest: '',
  151. repairDdl: '',
  152. repairDept: '',
  153. acceptLeader: '',
  154. acceptOther: '',
  155. picAfter: '',
  156. picTemp: '',
  157. repairDescription: '',
  158. discovererDept: '',
  159. discovererDeptCode: '',
  160. hdLocationCode: '',
  161. hdLocationName: '',
  162. status: '',
  163. hdSelect: '隐患举报',
  164. id: ''
  165. });
  166. const resetForma = () => {
  167. form.value = {
  168. hdPicId: '',
  169. hdId: '',
  170. hdType: '',
  171. discoveryTime: '',
  172. hdSubtype: '',
  173. discoverer: '',
  174. discovererOther: '',
  175. hdDescription: '',
  176. hdLevel: '',
  177. bz: '',
  178. hdLocation: '',
  179. picBefore: '',
  180. equipmentId: '',
  181. hdmanageLevel: '',
  182. handlingProcesses: '',
  183. companyId: '',
  184. repairLeader: '',
  185. repairOther: '',
  186. repairSuggest: '',
  187. repairDdl: '',
  188. repairDept: '',
  189. acceptLeader: '',
  190. acceptOther: '',
  191. picAfter: '',
  192. picTemp: '',
  193. repairDescription: '',
  194. status: '',
  195. discovererDept: '',
  196. discovererDeptCode: '',
  197. hdLocationCode: '',
  198. hdLocationName: '',
  199. hdSelect: '隐患举报',
  200. id: ''
  201. };
  202. };
  203. const isRefreshing = ref(false);
  204. const isLoading = ref(false);
  205. const isFinished = ref(false);
  206. const currentPage = ref(1);
  207. const pageSize = ref(10);
  208. const totalRows = ref(0);
  209. const resultData = ref([]);
  210. const getTableData = async () => {
  211. const url = 'sgsafe/AccidentDirect/query';
  212. const param = {
  213. page: currentPage.value,
  214. rows: pageSize.value,
  215. params: JSON.stringify(query.value)
  216. };
  217. const response = await proxy.$axios.get(url, param);
  218. if (response.data.code === 0) {
  219. tableData.value = response.data.data.records;
  220. totalRows.value = response.data.data.total;
  221. // tableData.value.forEach(item => {
  222. // switch (item.status) {
  223. // case '0':
  224. // item.status = '隐患登记';
  225. // break;
  226. // case '1':
  227. // item.status = '隐患分析确认';
  228. // break;
  229. // case '2':
  230. // item.status = '隐患整改';
  231. // break;
  232. // case '3':
  233. // item.status = '隐患验收';
  234. // break;
  235. // case '4':
  236. // item.status = '隐患销号';
  237. // break;
  238. // case '5':
  239. // item.status = '结束';
  240. // break;
  241. // case '-1':
  242. // item.status = '待提交';
  243. // break;
  244. // }
  245. // });
  246. } else {
  247. showToast({
  248. type: 'error',
  249. message: '操作失败!' + response.data.msg
  250. });
  251. }
  252. };
  253. const onRefresh = () => {
  254. basicReset();
  255. onLoad();
  256. };
  257. const onLoad = async () => {
  258. if (isRefreshing.value) {
  259. resultData.value = [];
  260. currentPage.value = 1;
  261. isRefreshing.value = false;
  262. }
  263. try {
  264. await getTableData();
  265. if (pageSize.value * currentPage.value < totalRows.value) {
  266. resultData.value = [...resultData.value, ...tableData.value];
  267. openStatus.value = new Array(resultData.value.length).fill(true);
  268. currentPage.value++;
  269. } else {
  270. resultData.value = [...resultData.value, ...tableData.value];
  271. openStatus.value = new Array(resultData.value.length).fill(true);
  272. isFinished.value = true;
  273. }
  274. } catch (error) {
  275. console.log(error);
  276. isFinished.value = true;
  277. } finally {
  278. isLoading.value = false;
  279. }
  280. };
  281. /* 通用方法: 重置list数据 */
  282. const basicReset = () => {
  283. isFinished.value = false;
  284. isLoading.value = true;
  285. currentPage.value = 1;
  286. resultData.value = [];
  287. };
  288. /*onMounted(() => {
  289. handleSearch();
  290. });
  291. const handleSearch = () => {
  292. /!* currentPage.value = 1;
  293. isFinished.value = false;
  294. tableData.value = [];*!/
  295. basicReset()
  296. onLoad()
  297. };*/
  298. const handdelect = () => {
  299. query.value.discoverer = '';
  300. onRefresh()
  301. };
  302. const handleDetailLook = (row) => {
  303. form.value = { ...row };
  304. proxy.$router.push({
  305. name: 'taiZhang_detail',
  306. query: {
  307. form: form.value.id
  308. }
  309. });
  310. // dialogVisibleLook.value = true;
  311. };
  312. const deleteId = ref('')
  313. const handleDelete = (item, idx) => {
  314. openStatus.value[idx] = !openStatus.value[idx]
  315. openStatus.value = new Array(resultData.value.length).fill(true);
  316. deleteId.value = item.id
  317. deleteDialogVisible.value = true;
  318. };
  319. const confirmDelete = () => {
  320. var url = 'sgsafe/AccidentDirect/remove';
  321. var param = {
  322. id: deleteId.value
  323. };
  324. proxy.$axios.get(url, param).then(response => {
  325. if (response.data.code == 0) {
  326. showToast({
  327. type: 'success',
  328. message: '删除成功'
  329. });
  330. onRefresh();
  331. } else {
  332. showToast({
  333. type: 'fail',
  334. message: '操作失败!' + response.data.msg
  335. });
  336. }
  337. });
  338. };
  339. const edits = (row) => {
  340. form.value = { ...row };
  341. if (row.workId) {
  342. sessionStorage.setItem('workflowQuery', JSON.stringify({
  343. flowId: row.flowId,
  344. workId: row.workId,
  345. trackId: row.trackId,
  346. // subjectionId: '0703E25C35BD11B2A553E9317BF53B18',
  347. // subjectionId: '0703E25C35BD11B2A553E9317BF53B18',
  348. type: '1',
  349. date: new Date().getTime()
  350. }));
  351. proxy.$router.push({
  352. path: '/yinhuan/JuBaohdLedger_detail'
  353. });
  354. } else {
  355. proxy.$router.push({
  356. path: '/yinhuan/JuBaoregistration_edit/index',
  357. query: {
  358. id: form.value.id
  359. }
  360. });
  361. }
  362. };
  363. const resetForm = () => {
  364. form.value = {
  365. projectName: '',
  366. projectLeader: '',
  367. phone: '',
  368. dept: ''
  369. };
  370. };
  371. const baocun = () => {
  372. nextTick(() => {
  373. if (form.value.hdSelect === '隐患举报') {
  374. form.value.status = '0';
  375. } else if (form.value.hdSelect === '下发隐患') {
  376. form.value.status = '2';
  377. } else {
  378. form.value.status = '-1';
  379. }
  380. });
  381. // 原有保存逻辑保持不变
  382. var url = 'sgsafe/JuBaoHiddendanger/save';
  383. var param = {
  384. json: JSON.stringify(form.value)
  385. };
  386. proxy.$axios.post(url, param).then(response => {
  387. if (response.data.code == '0') {
  388. showSuccessToast('保存成功!');
  389. getTableData();
  390. orJsons();
  391. // clearDeptUsers()
  392. } else {
  393. showToast({
  394. type: 'fail',
  395. message: '操作失败!' + response.data.msg
  396. });
  397. }
  398. });
  399. };
  400. //处理人员code
  401. const repairLL = ref('');
  402. const repairOO = ref('');
  403. const acceptLL = ref('');
  404. const orJsons = () => {
  405. // console.log('forms',form.value)
  406. if (form.value.hdSelect === '隐患举报') {
  407. nextTick(() => {
  408. nextTick(() => {
  409. repairLL.value = qq('repairLL', form.value.discoverer);//隐患发现人
  410. nextTick(() => {
  411. repairOO.value = qq('repairOO', form.value.discovererOther);//其他隐患发现人
  412. nextTick(() => {
  413. acceptLL.value = qq('acceptLL', form.value.discoverer);//隐患销号人
  414. });
  415. });
  416. });
  417. // acceptOO.value = qq('acceptOO', form.value.acceptOther)
  418. });
  419. } else {
  420. // console.log('noiajdoifjpoewjfopjp')
  421. nextTick(() => {
  422. nextTick(() => {
  423. repairLL.value = qq('repairLL', form.value.acceptLeader);//隐患发现人
  424. nextTick(() => {
  425. repairOO.value = qq('repairOO', form.value.acceptOther);//其他隐患发现人
  426. nextTick(() => {
  427. acceptLL.value = qq('acceptLL', form.value.discoverer);//隐患销号人
  428. });
  429. });
  430. });
  431. // acceptOO.value = qq('acceptOO', form.value.acceptOther)
  432. });
  433. }
  434. };
  435. const jsons = ref({});
  436. const qq = (a, val) => {
  437. let aa = '';
  438. var url = 'sgsafe/JuBaoHiddendanger/qqId';
  439. var param = {
  440. params: val
  441. };
  442. proxy.$axios.post(url, param).then(response => {
  443. if (response.data.code == 0) {
  444. aa = response.data.data;
  445. switch (a) {
  446. case 'repairLL':
  447. repairLL.value = response.data.data;
  448. // console.log('repairLL',repairLL.value);
  449. break;
  450. case 'repairOO':
  451. repairOO.value = response.data.data;
  452. // console.log('repairOO',repairLL.value);
  453. break;
  454. case 'acceptLL':
  455. acceptLL.value = response.data.data;
  456. // console.log('acceptLL',repairLL.value);
  457. break;
  458. default:
  459. break;
  460. }
  461. jsons.value = {
  462. hdConfirm: repairLL.value,
  463. hdConfirmO: repairOO.value,
  464. hdCancel: acceptLL.value
  465. };
  466. // 处理函数
  467. function processValue(value) {
  468. // 将逗号替换为分号
  469. const replacedValue = value.replace(/,/g, ';');
  470. // 分割值
  471. const parts = replacedValue.split(';');
  472. // 每个部分前加上 U_
  473. const processedParts = parts.map(part => `U_${part.trim()}`);
  474. // 重新组合
  475. return processedParts.join(';');
  476. }
  477. // 处理整个对象
  478. const processedData = {};
  479. for (const key in jsons.value) {
  480. if (jsons.value.hasOwnProperty(key)) {
  481. processedData[key] = processValue(jsons.value[key]);
  482. }
  483. }
  484. console.log('对象', toRaw(processedData));
  485. let b = {
  486. acceptL: processedData.hdConfirm,
  487. acceptO: processedData.hdConfirmO,
  488. id: form.value.id
  489. };
  490. if (form.value.hdSelect === '即查即改') {
  491. b = {
  492. hdFxr: processedData.hdCancel,
  493. id: form.value.id
  494. };
  495. }
  496. if (form.value.hdSelect === '隐患举报') {
  497. b = {
  498. // hdConfirm: processedData.hdConfirm,
  499. // hdConfirmO: processedData.hdConfirmO,
  500. id: form.value.id
  501. };
  502. }
  503. const aaa = JSON.stringify(toRaw(b));
  504. sessionStorage.setItem('variables', aaa);
  505. console.log('aaa', aaa);
  506. } else {
  507. showToast({
  508. type: 'fail',
  509. message: '操作失败!' + response.data.msg
  510. });
  511. }
  512. });
  513. return aa;
  514. };
  515. const reback = () => {
  516. // 返回逻辑
  517. };
  518. const deleteRow = (row) => {
  519. selectedRows.value = [row];
  520. handleDelete(row);
  521. };
  522. const deleteRowa = (row) => {
  523. deleteRow(row);
  524. };
  525. const bm = (val) => {
  526. // 部门选择逻辑
  527. };
  528. //提交审批流程
  529. import { workflowSubmit, workflowCancel } from '@/tools/workflow.js';
  530. const flowId = ref('');
  531. flowId.value = 'hdRwardReportingId';
  532. const handleSubmit2 = (val, idx) => {
  533. openStatus.value[idx] = !openStatus.value[idx]
  534. openStatus.value = new Array(resultData.value.length).fill(true);
  535. console.log('提交');
  536. console.log('selectedRows', selectedRows.value);
  537. let row = val;
  538. form.value = { ...row }
  539. form.value.workCreate = headers.value.dept;
  540. let b = {
  541. id: form.value.id,
  542. hdConfirm:form.value.hdConfirm
  543. }
  544. const aaa = JSON.stringify(toRaw(b))
  545. sessionStorage.setItem('variables', aaa)
  546. if (form.value.hdSelect === '隐患举报') {
  547. flowId.value = 'hdRwardReportingId'
  548. }
  549. console.log('----');
  550. console.log(flowId.value);
  551. console.log(sessionStorage.getItem('variables'));
  552. console.log(row.workId);
  553. console.log(row.trackId);
  554. let titles = '隐患举报'
  555. showDialog({
  556. title: '提示',
  557. message: '确定提交审批?',
  558. showCancelButton: true,
  559. confirmButtonText: '确定',
  560. type: 'warning',
  561. cancelButtonText: '取消'
  562. }
  563. ).then(() => {
  564. return workflowSubmit(
  565. flowId.value,
  566. '隐患举报',
  567. '初始化提交',
  568. // JSON.stringify({}),
  569. sessionStorage.getItem('variables'),
  570. row.workId,
  571. row.trackId);
  572. }).then((result) => {
  573. if (result.status === 'success') {
  574. // 将结果返回的workId和trackId保存
  575. var url = 'sgsafe/JuBaoHiddendanger/saveProcessInfo';
  576. console.log('id', result, row.id);
  577. var process = {
  578. 'id': form.value.id,
  579. 'workId': result.workId,
  580. 'trackId': result.trackId
  581. };
  582. var param = {
  583. json: JSON.stringify(process)
  584. };
  585. proxy.$axios.post(url, param).then(response => {
  586. if (response.data.code === 0) {
  587. form.value = response.data.data;
  588. console.log('我要进来啦保存成功');
  589. showToast({
  590. type: 'success',
  591. message: '提交审批成功'
  592. });
  593. onRefresh()
  594. }
  595. });
  596. } else {
  597. showToast({
  598. type: 'error',
  599. message: '提交审批失败,' + result.msg
  600. });
  601. }
  602. }).catch(() => {
  603. showToast({
  604. type: 'info',
  605. message: '已取消提交'
  606. });
  607. });
  608. };
  609. const getStatusClass = (status) => {
  610. switch (status) {
  611. case '-1':
  612. return 'status-pending';
  613. case '0':
  614. return 'status-registered';
  615. case '1':
  616. return 'status-analyzing';
  617. case '2':
  618. return 'status-rectifying';
  619. case '3':
  620. return 'status-accepting';
  621. case '4':
  622. return 'status-closed';
  623. case '5':
  624. return 'status-finished';
  625. default:
  626. return 'status-unknown';
  627. }
  628. };
  629. /**
  630. * 按钮实现swipe-cell滑动
  631. */
  632. const openStatus = ref([])
  633. const swipeCellRefs = ref([])
  634. const getSwipeCellRef = (el, index) => {
  635. if (el) {
  636. swipeCellRefs.value[index] = el;
  637. }
  638. }
  639. const openSwipe = (idx) => {
  640. openStatus.value = new Array(resultData.value.length).fill(true);
  641. if (idx >= 0 && idx < swipeCellRefs.value.length) {
  642. openStatus.value[idx] = false
  643. swipeCellRefs.value[idx].open('right')
  644. }
  645. document.addEventListener('click', handleDocumentClick)
  646. }
  647. /**
  648. * 当点击滑动单元格时,开始监听点击事件
  649. */
  650. const handleDocumentClick = (event) => {
  651. openStatus.value = new Array(resultData.value.length).fill(true);
  652. }
  653. const closeSwipe = (idx) => {
  654. if (idx >= 0 && idx < swipeCellRefs.value.length) {
  655. openStatus.value[idx] = true
  656. swipeCellRefs.value[idx].close()
  657. }
  658. }
  659. /**滑动监听**/
  660. const handleSwipeOpen = (item,idx) =>{
  661. console.log('handleSwipeOpen', idx)
  662. console.log('handleSwipeOpen数据', item)
  663. openStatus.value[idx] = false
  664. }
  665. const handleSwipeClose = (item,idx) =>{
  666. openStatus.value[idx] = true
  667. console.log('handleSwipeClose', idx)
  668. console.log('handleSwipeClose数据', item)
  669. }
  670. </script>
  671. <style scoped>
  672. .h5-container {
  673. width: 100%;
  674. padding: 5px;
  675. box-sizing: border-box;
  676. }
  677. .status-pending {
  678. background-color: #fff3cd;
  679. color: #856404;
  680. padding: 2px 4px;
  681. border-radius: 4px;
  682. }
  683. .status-registered {
  684. background-color: #d1ecf1;
  685. color: #0c5460;
  686. padding: 2px 4px;
  687. border-radius: 4px;
  688. }
  689. .status-analyzing {
  690. background-color: #fff8e1;
  691. color: #ff8f00;
  692. padding: 2px 4px;
  693. border-radius: 4px;
  694. }
  695. .status-rectifying {
  696. background-color: #e8f5e9;
  697. color: #2e7d32;
  698. padding: 2px 4px;
  699. border-radius: 4px;
  700. }
  701. .status-accepting {
  702. background-color: #e3f2fd;
  703. color: #1565c0;
  704. padding: 2px 4px;
  705. border-radius: 4px;
  706. }
  707. .status-closed {
  708. background-color: #f8bbd0;
  709. color: #b71c1c;
  710. padding: 2px 4px;
  711. border-radius: 4px;
  712. }
  713. .status-finished {
  714. background-color: #e8eaf6;
  715. color: #311b92;
  716. padding: 2px 4px;
  717. border-radius: 4px;
  718. }
  719. .status-unknown {
  720. background-color: #efebe9;
  721. color: #424242;
  722. padding: 2px 4px;
  723. border-radius: 4px;
  724. }
  725. .cell-title {
  726. display: -webkit-box;
  727. /* 旧版弹性盒子模型 */
  728. -webkit-box-orient: vertical;
  729. /* 内容垂直排列 */
  730. -webkit-line-clamp: 2;
  731. /* 限制显示行数 */
  732. overflow: hidden;
  733. /* 超出隐藏 */
  734. text-overflow: ellipsis;
  735. /* 省略号 */
  736. line-height: 1.5;
  737. /* 可选:设置行高 */
  738. max-height: calc(1.5em * 3);
  739. /* 可选:根据行高限制最大高度 */
  740. font-size: 16px;
  741. font-weight: bold;
  742. color: #333;
  743. /* 字号 */
  744. }
  745. .swipe-cell-default {
  746. display: flex;
  747. background-color: #ffffff;
  748. justify-content: center;
  749. align-items: center;
  750. }
  751. .swipe-cell-default-icon {
  752. width: 60px;
  753. display: flex;
  754. justify-content: center;
  755. }
  756. .delete-button {
  757. height: 100%;
  758. border: none;
  759. color: #ff0000;
  760. background-image: url('@/assets/img/del.png');
  761. background-size: auto 100%;
  762. background-repeat: no-repeat;
  763. }
  764. .edit-button {
  765. height: 100%;
  766. border: none;
  767. color: #F9CC9D;
  768. background-image: url('@/assets/img/edit.png');
  769. background-size: auto 100%;
  770. background-repeat: no-repeat;
  771. }
  772. .submit-button {
  773. height: 100%;
  774. border: none;
  775. color: #07c160;
  776. background-image: url('@/assets/img/sub.png');
  777. background-size: auto 100%;
  778. background-repeat: no-repeat;
  779. }
  780. .subsuccess {
  781. height: 100%;
  782. border: none;
  783. color: #07c160;
  784. background-image: url('@/assets/img/sub1.png');
  785. background-size: auto 100%;
  786. background-repeat: no-repeat;
  787. }
  788. </style>