| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886 |
- <template>
- <div class="h5-container">
- <van-nav-bar title="事故案例" @click-left="onClickLeft" @click-right="handAdd">
- <template #right>
- <van-icon name="add" size="25" color="#000" />
- </template>
- </van-nav-bar>
- <van-search v-model="query.caseTitle" show-action placeholder="请输入案例标题" @search="onRefresh"
- @cancel="handdelectTitle" />
-
- <!-- 项目列表 -->
- <van-pull-refresh v-model="isRefreshing" success-text="刷新成功" @refresh="onRefresh">
- <van-list v-model:loading="isLoading" :finished="isFinished" finished-text="没有更多了" offset="200" @load="onLoad">
- <div v-for="(item, idx) in resultData" :key="item.id">
- <van-swipe-cell title-style="color: #007aff" style="height: 80px;" :ref="el => getSwipeCellRef(el, idx)">
- <template #default>
- <div class="swipe-cell-default">
- <van-cell style="min-height: 100px; padding: 0 0 0 0; display: flex; align-items: flex-start;" @click="edits(item)">
- <template #title>
- <div class="cell-title">
- {{ item.caseTitle }}
- </div>
- </template>
- <template #label>
- <div>案例编号:{{ item.caseNumber }} </div>
- <div>事故等级:{{ item.accidentLevel }}</div>
- <div> 浏览量:{{item.viewCount}}</div>
-
- <!-- <div style="width: 112px" :class="getStatusClass(item.isFinish)">
- 类型:
- <span v-if="item.isFinish === '待学习'" style="width: 200px">待学习</span>
- <span v-else-if="item.isFinish === '已学习'" style="width: 200px">已学习</span>
- <span v-else-if="item.isFinish === '已扣除'" style="width: 200px">已扣除</span>
- </div>-->
- </template>
- </van-cell>
- <div class="swipe-cell-default-icon">
- <van-icon v-if="openStatus[idx]" name="arrow-double-left" @click.stop="openSwipe(idx)" />
- <van-icon v-else name="arrow-double-right" @click.stop="closeSwipe(idx)" />
- </div>
- </div>
- </template>
-
- <template #right>
- <van-button v-if="item.canDelete" square class="delete-button" text="删除" @click="handleDelete(item)" />
- </template>
- </van-swipe-cell>
- </div>
-
- </van-list>
- </van-pull-refresh>
-
- <!-- 删除确认弹窗 -->
- <van-dialog v-model:show="deleteDialogVisible" show-cancel-button @confirm="confirmDelete">
- <template #title>
- <div>删除确认</div>
- </template>
- <div style="padding: 30px;">确定要删除该项目吗?</div>
- </van-dialog>
-
- </div>
- </template>
-
- <script setup>
- import { ref, reactive, onMounted, getCurrentInstance, nextTick, toRaw } from 'vue';
- import { Dialog, showDialog, showSuccessToast, showToast, Toast } from 'vant';
-
- import tools from '@/tools'
-
- const { proxy } = getCurrentInstance();
-
- const onClickLeft = () => {
- history.back();
- };
- // const headers = ref({
- // token: localStorage.getItem('token'),
- // userId: localStorage.getItem('userId'),
- // dept: JSON.parse(localStorage.getItem('dept'))[0].deptCode
- // });
- const headers = ref({
- token: localStorage.getItem('token') || '',
- userId: localStorage.getItem('userId') || '', // 防止 null/undefined
- dept: JSON.parse(localStorage.getItem('dept'))?.[0]?.deptCode || ''
- });
- const switchIconState = (idx) => {
- openStatus.value[idx] = !openStatus.value[idx]
- openStatus.value = new Array(resultData.value.length).fill(true);
- }
-
- // const onClickRight = () =>{
- // searchShow.value = !searchShow.value;
- // }
-
- const searchShow = ref(false);
- const query = ref({
- caseNumber:'',
- caseTitle:'',
- })
-
-
-
- const tableData = ref([]);
- const selectedRows = ref([]);
- const dialogVisibleLook = ref(false);
- const deleteDialogVisible = ref(false);
- const currentDeleteItem = ref([]);
- const dialogVisible = ref(false);
- const dialogVisibleFile = ref(false);
- const date = ref(null);
-
- const kz = ref(true);
- import { useRouter } from 'vue-router';
- const router = useRouter();
- const handAdd = () => {
-
- router.push({ path: "/accidentList",
- query: {
- mark:-1
- } });
-
- };
- const goaddPeo = (item) => {
- router.push({
- path: '/addPeo',
- query: {
- data: JSON.stringify(item)
- }
- })
- }
-
- const edits = async (row) => {
- const currentUserId = localStorage.getItem('userId');
- const addId = row.addId;
-
- const isOwner = String(addId).trim().toLowerCase() === String(currentUserId).trim().toLowerCase();
-
- // 更新浏览量
- await updateViewCount(row);
-
- kz.value = true;
- form.value = { ...row };
- router.push({ path: "/accidentList",
- query: {
- mark:1,
- data:JSON.stringify(form.value),
- readOnly: !isOwner ? 'true' : undefined
- } });
- };
- const form = ref({
- caseNumber:'',
- caseTitle:'',
- caseSource:'',
- accidentLevel:'',
- accidentDept:'',
- accidentLocation:'',
- accidentTime:'',
- accidentType:'',
- accidentTags:'',
- casualtyCount:'',
- accidentSummary:'',
- preventiveMeasures:'',
- fileId:'',
- viewCount:'',
- downloadCount:''
- });
-
- const updateViewCount = async (item) => {
- try {
- const payload = { ...item };
- // 将浏览量 +1
- payload.viewCount = String((Number(payload.viewCount) || 0) + 1);
-
- const url = '/sgsafe/Manager/saveAccident';
- const param = {
- json: JSON.stringify(payload)
- };
-
- const response = await proxy.$axios.post(url, param);
- if (response.data.code === '0' || response.data.code === 0) {
- // 更新成功后,更新本地列表中的浏览量显示
- const index = resultData.value.findIndex(data => data.id === item.id);
- if (index !== -1) {
- resultData.value[index].viewCount = payload.viewCount;
- }
- }
- } catch (error) {
- console.error('更新浏览量失败:', error);
- // 即使更新失败也不阻塞页面跳转
- }
- };
-
- const isRefreshing = ref(false);
- const isLoading = ref(false);
- const isFinished = ref(false);
- const currentPage = ref(1);
- const pageSize = ref(10);
- const totalRows = ref(0);
- const resultData = ref([]);
-
- const dept=localStorage.getItem("dept")[0].deptCode;
- const currentUserId = String(localStorage.getItem('userId'));
- const getTableData = async () => {
- var url = '/sgsafe/Manager/queryAccident'
- var param = {
- page: currentPage.value,
- rows: pageSize.value,
- params: JSON.stringify(query.value)
- }
- const response = await proxy.$axios.get(url, param);
- if (response.data.code == 0) {
- tableData.value = response.data.data.records.map(item => ({
- ...item,
- canDelete: String(item.addId) === currentUserId
- }));
- console.log('列表数据',tableData.value)
- totalRows.value = response.data.data.total;
- } else {
- showToast({
- type: 'error',
- message: '操作失败!' + response.data.msg
- });
- }
- };
- const ruleIds = ref([]);
-
- const onRefresh = () => {
- basicReset();
- onLoad();
- };
-
- //*************************************
-
-
-
- //定义字典集合
- const dicList = ref([])
-
- const getDicList = () => {
- tools.dic.getDicList([ 'case_type','SEX', 'case_source','accident_level','accident_type','sgsafe_taccidentTags']).then((response => {
- console.log(JSON.stringify(response.data.data))
- dicList.value = response.data.data
-
- }))
- }
-
-
- const onLoad = async () => {
- if (isRefreshing.value) {
- resultData.value = [];
- currentPage.value = 1;
- isRefreshing.value = false;
- }
-
- getDicList()
-
-
- try {
- await getTableData();
-
- if (pageSize.value * currentPage.value < totalRows.value) {
- resultData.value = [...resultData.value, ...tableData.value];
- openStatus.value = new Array(resultData.value.length).fill(true);
- currentPage.value++;
-
- } else {
- resultData.value = [...resultData.value, ...tableData.value];
- openStatus.value = new Array(resultData.value.length).fill(true);
- isFinished.value = true;
- }
-
- console.log('resultData',resultData.value)
- } catch (error) {
- console.log(error);
- isFinished.value = true;
- } finally {
- isLoading.value = false;
- }
- };
- /* 通用方法: 重置list数据 */
- const basicReset = () => {
- isFinished.value = false;
- isLoading.value = true;
- currentPage.value = 1;
- resultData.value = [];
- };
-
- /*onMounted(() => {
- handleSearch();
- });
-
-
- const handleSearch = () => {
- /!* currentPage.value = 1;
- isFinished.value = false;
- tableData.value = [];*!/
- basicReset()
- onLoad()
- };*/
-
- const handdelectNumber = () => {
- query.value.caseNumber = '';
- onRefresh()
- };
-
- const handdelectTitle = () => {
- query.value.caseTitle = '';
- onRefresh()
- };
-
-
-
-
- // 定义生成编号的函数
- const generateCode = () => {
- // 获取当前日期并格式化为 YYYYMMDD
- const now = new Date();
- const year = now.getFullYear();
- const month = String(now.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需加1
- const day = String(now.getDate()).padStart(2, '0');
- const formattedDate = `${year}${month}${day}`;
- // 时间部分:HHmmss
- const hours = String(now.getHours()).padStart(2, '0');
- const minutes = String(now.getMinutes()).padStart(2, '0');
- const seconds = String(now.getSeconds()).padStart(2, '0');
- const formattedTime = `${hours}${minutes}${seconds}`;
-
- // 模拟生成三位流水号(可以根据需要替换为递增逻辑)
- const sequenceNumber = Math.floor(Math.random() * 1000); // 随机生成 0-999
- const paddedSequence = String(sequenceNumber).padStart(3, '0'); // 补零到三位
-
- // 拼接编号
- return `SGAL${formattedDate}${formattedTime}${paddedSequence}`;
- };
-
- // 使用 ref 存储生成的编号
- const generatedCode = ref(generateCode());
-
- // 定义重新生成编号的方法
- const regenerateCode = () => {
- generatedCode.value = generateCode();
- };
-
- const handleDetailLook = (row) => {
-
- form.value = { ...row };
- proxy.$router.push({
- name: 'taiZhang_detail',
- query: {
- form: form.value.id
- }
- });
- // dialogVisibleLook.value = true;
- };
- const deleteData=ref({})
-
- const handleDelete = (item) => {
- const currentUserId = headers.value.userId;
- const addId = item.addId;
-
- if (!currentUserId || !addId || String(addId).trim() !== String(currentUserId).trim()) {
- showToast({
- type: 'warning',
- message: '无权限删除!只能删除自己添加的案例。'
- });
- return;
- }
-
- deleteData.value=item
- const now = new Date();
- const year = now.getFullYear();
- const month = String(now.getMonth() + 1).padStart(2, '0'); // 月份从0开始
- const day = String(now.getDate()).padStart(2, '0');
- const hours = String(now.getHours()).padStart(2, '0');
- const minutes = String(now.getMinutes()).padStart(2, '0');
- const seconds = String(now.getSeconds()).padStart(2, '0');
- deleteData.value.cancelTime = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
-
- deleteData.value.cancelFlag='1'
- var url = '/sgsafe/Manager/saveAccident';
- var param = {
- json: JSON.stringify(deleteData.value)
- };
- proxy.$axios.post(url, param).then(response => {
- if (response.data.code == '0') {
- showSuccessToast("删除成功")
- onRefresh();
-
- } else {
- }
-
- })
- };
-
-
- const confirmDelete = () => {
- for (let item of currentDeleteItem.value) {
- if (item.addId !== headers.value.userId) {
- showToast({
- type: 'warning',
- message: '只能删除自己添加的数据!'
- });
- return;
- }
- }
-
- if (currentDeleteItem.value[0].status !== '0' && currentDeleteItem.value[0].hdSelect !== '下发隐患'
- && currentDeleteItem.value[0].hdSelect !== '即查即改') {
- showToast({
- type: 'fail',
- message: '只有尚未提交流程的记录或回到起点的流程经过作废后才可以删除!'
- });
- return;
- }
- if (currentDeleteItem.value[0].status !== '2' && currentDeleteItem.value[0].hdSelect === '下发隐患'
- && currentDeleteItem.value[0].hdSelect !== '即查即改') {
- showToast({
- type: 'fail',
- message: '只有尚未提交流程的记录或回到起点的流程经过作废后才可以删除!'
- });
- return;
- }
-
- var url = 'sgsafe/Hiddendanger/remove';
- var param = {
- params: JSON.stringify({ ...currentDeleteItem.value.map(x => x.id) })
- };
- proxy.$axios.get(url, param).then(response => {
- if (response.data.code == 0) {
- showToast({
- type: 'success',
- message: '删除成功'
- });
- onRefresh();
- } else {
- showToast({
- type: 'fail',
- message: '操作失败!' + response.data.msg
- });
- }
- });
- };
-
- const resetForm = () => {
- form.value = {
- projectName: '',
- projectLeader: '',
- phone: '',
- dept: ''
- };
- };
-
- const baocun = () => {
- nextTick(() => {
- if (form.value.hdSelect === '正常登记') {
- form.value.status = '0';
- } else if (form.value.hdSelect === '下发隐患') {
- form.value.status = '2';
- } else {
- form.value.status = '-1';
- }
- });
- // 原有保存逻辑保持不变
- var url = 'sgsafe/Hiddendanger/save';
- var param = {
- json: JSON.stringify(form.value)
- };
- proxy.$axios.post(url, param).then(response => {
- if (response.data.code == '0') {
- showSuccessToast('保存成功!');
- getTableData();
- orJsons();
- // clearDeptUsers()
- } else {
- showToast({
- type: 'fail',
- message: '操作失败!' + response.data.msg
- });
- }
- });
- };
-
- //处理人员code
- const repairLL = ref('');
- const repairOO = ref('');
- const acceptLL = ref('');
- const orJsons = () => {
- // console.log('forms',form.value)
- if (form.value.hdSelect === '正常登记') {
- nextTick(() => {
- nextTick(() => {
- repairLL.value = qq('repairLL', form.value.discoverer);//隐患发现人
- nextTick(() => {
- repairOO.value = qq('repairOO', form.value.discovererOther);//其他隐患发现人
- nextTick(() => {
- acceptLL.value = qq('acceptLL', form.value.discoverer);//隐患销号人
- });
- });
- });
-
- // acceptOO.value = qq('acceptOO', form.value.acceptOther)
- });
- } else {
- // console.log('noiajdoifjpoewjfopjp')
- nextTick(() => {
- nextTick(() => {
- repairLL.value = qq('repairLL', form.value.acceptLeader);//隐患发现人
- nextTick(() => {
- repairOO.value = qq('repairOO', form.value.acceptOther);//其他隐患发现人
- nextTick(() => {
- acceptLL.value = qq('acceptLL', form.value.discoverer);//隐患销号人
- });
- });
- });
-
- // acceptOO.value = qq('acceptOO', form.value.acceptOther)
- });
- }
- };
-
- const jsons = ref({});
- const qq = (a, val) => {
- let aa = '';
- var url = 'sgsafe/Hiddendanger/qqId';
- var param = {
- params: val
- };
- proxy.$axios.post(url, param).then(response => {
- if (response.data.code == 0) {
-
- aa = response.data.data;
- switch (a) {
- case 'repairLL':
- repairLL.value = response.data.data;
- // console.log('repairLL',repairLL.value);
- break;
- case 'repairOO':
- repairOO.value = response.data.data;
- // console.log('repairOO',repairLL.value);
- break;
- case 'acceptLL':
- acceptLL.value = response.data.data;
- // console.log('acceptLL',repairLL.value);
- break;
- default:
- break;
- }
- jsons.value = {
- hdConfirm: repairLL.value,
- hdConfirmO: repairOO.value,
- hdCancel: acceptLL.value
- };
-
- // 处理函数
- function processValue(value) {
- // 将逗号替换为分号
- const replacedValue = value.replace(/,/g, ';');
- // 分割值
- const parts = replacedValue.split(';');
- // 每个部分前加上 U_
- const processedParts = parts.map(part => `U_${part.trim()}`);
- // 重新组合
- return processedParts.join(';');
- }
-
- // 处理整个对象
- const processedData = {};
- for (const key in jsons.value) {
- if (jsons.value.hasOwnProperty(key)) {
- processedData[key] = processValue(jsons.value[key]);
- }
- }
-
- console.log('对象', toRaw(processedData));
-
- let b = {
- acceptL: processedData.hdConfirm,
- acceptO: processedData.hdConfirmO,
- id: form.value.id
- };
-
- if (form.value.hdSelect === '即查即改') {
- b = {
- hdFxr: processedData.hdCancel,
- id: form.value.id
- };
- }
-
- if (form.value.hdSelect === '正常登记') {
- b = {
- // hdConfirm: processedData.hdConfirm,
- // hdConfirmO: processedData.hdConfirmO,
- id: form.value.id
- };
- }
-
- const aaa = JSON.stringify(toRaw(b));
- sessionStorage.setItem('variables', aaa);
- console.log('aaa', aaa);
- } else {
- showToast({
- type: 'fail',
- message: '操作失败!' + response.data.msg
- });
- }
- });
- return aa;
- };
-
- const reback = () => {
- // 返回逻辑
- };
-
- const deleteRow = (row) => {
- selectedRows.value = [row];
- handleDelete(row);
- };
-
- const deleteRowa = (row) => {
- deleteRow(row);
- };
-
- const bm = (val) => {
- // 部门选择逻辑
- };
-
- //提交审批流程
- import { workflowSubmit, workflowCancel } from '@/tools/workflow.js';
-
- const flowId = ref('');
- flowId.value = 'hazardManagementFlowId';
- const handleSubmit2 = (val, idx) => {
- openStatus.value[idx] = !openStatus.value[idx]
- openStatus.value = new Array(resultData.value.length).fill(true);
- console.log('提交');
- console.log('selectedRows', selectedRows.value);
- let row = val;
- form.value = { ...row }
- form.value.workCreate = headers.value.dept;
-
- let b = {
- id: form.value.id,
- }
- const aaa = JSON.stringify(toRaw(b))
- sessionStorage.setItem('variables', aaa)
-
- if (form.value.hdSelect === '正常登记') {
- flowId.value = 'hazardManagementFlowId'
- } else if (form.value.hdSelect === '下发隐患') {
- flowId.value = 'hazardImmediatelyCM'
- form.value.status = '2'
- } else {
- flowId.value = 'hazardImmediatelyCMUpdate'
- form.value.status = '-1'
- }
-
- console.log('----');
- console.log(flowId.value);
- console.log(sessionStorage.getItem('variables'));
- console.log(row.workId);
- console.log(row.trackId);
- let titles = '隐患排查治理'
- showDialog({
- title: '提示',
- message: '确定提交审批?',
- showCancelButton: true,
- confirmButtonText: '确定',
- type: 'warning',
- cancelButtonText: '取消'
- }
- ).then(() => {
- return workflowSubmit(
- flowId.value,
- '隐患排查治理',
- '初始化提交',
- // JSON.stringify({}),
- sessionStorage.getItem('variables'),
- row.workId,
- row.trackId);
- }).then((result) => {
- if (result.status === 'success') {
- // 将结果返回的workId和trackId保存
- var url = 'sgsafe/Hiddendanger/saveProcessInfo';
- console.log('id', result, row.id);
- var process = {
- 'id': form.value.id,
- 'workId': result.workId,
- 'trackId': result.trackId
- };
- var param = {
- json: JSON.stringify(process)
- };
- proxy.$axios.post(url, param).then(response => {
- if (response.data.code === 0) {
- form.value = response.data.data;
- console.log('我要进来啦保存成功');
- showToast({
- type: 'success',
- message: '提交审批成功'
- });
- onRefresh()
- }
- });
- } else {
- showToast({
- type: 'error',
- message: '提交审批失败,' + result.msg
- });
- }
- }).catch(() => {
- showToast({
- type: 'info',
- message: '已取消提交'
- });
- });
- };
-
- /**
- * 按钮实现swipe-cell滑动
- */
- const openStatus = ref([])
- const swipeCellRefs = ref([])
- const getSwipeCellRef = (el, index) => {
- if (el) {
- swipeCellRefs.value[index] = el;
- }
- }
- const openSwipe = (idx) => {
- openStatus.value = new Array(resultData.value.length).fill(true);
- if (idx >= 0 && idx < swipeCellRefs.value.length) {
- openStatus.value[idx] = false
- swipeCellRefs.value[idx].open('right')
- }
- document.addEventListener('click', handleDocumentClick)
- }
- /**
- * 当点击滑动单元格时,开始监听点击事件
- */
- const handleDocumentClick = (event) => {
- openStatus.value = new Array(resultData.value.length).fill(true);
- }
-
- const closeSwipe = (idx) => {
- if (idx >= 0 && idx < swipeCellRefs.value.length) {
- openStatus.value[idx] = true
- swipeCellRefs.value[idx].close()
- }
- }
- // *********************************** 事故案例 ************************************************
-
-
-
-
-
- </script>
-
- <style scoped>
- .h5-container {
- width: 100%;
- padding: 5px;
- box-sizing: border-box;
- }
-
- .status-pending {
- background-color: #fff3cd;
- color: #856404;
- padding: 2px 4px;
- border-radius: 4px;
- }
-
- .status-registered {
- background-color: #d1ecf1;
- color: #0c5460;
- padding: 2px 4px;
- border-radius: 4px;
- }
-
- .status-analyzing {
- background-color: #fff8e1;
- color: #ff8f00;
- padding: 2px 4px;
- border-radius: 4px;
- }
-
- .status-rectifying {
- background-color: #e8f5e9;
- color: #2e7d32;
- padding: 2px 4px;
- border-radius: 4px;
- }
-
- .status-accepting {
- background-color: #e3f2fd;
- color: #1565c0;
- padding: 2px 2px;
- border-radius: 2px;
- }
-
- .status-closed {
- background-color: #f8bbd0;
- color: #b71c1c;
- padding: 2px 2px;
- border-radius: 2px;
- }
-
- .status-finished {
- background-color: #e8eaf6;
- color: #311b92;
- padding: 2px 2px;
- border-radius: 2px;
- }
-
- .status-unknown {
- background-color: #efebe9;
- color: #424242;
- padding: 2px 2px;
- border-radius: 2px;
- }
-
- .cell-title {
- display: -webkit-box;
- /* 旧版弹性盒子模型 */
- -webkit-box-orient: vertical;
- /* 内容垂直排列 */
- -webkit-line-clamp: 2;
- /* 限制显示行数 */
- overflow: hidden;
- /* 超出隐藏 */
- text-overflow: ellipsis;
- /* 省略号 */
- line-height: 1.5;
- /* 可选:设置行高 */
- max-height: calc(1.5em * 2);
- /* 可选:根据行高限制最大高度 */
- font-size: 16px;
- font-weight: bold;
- color: #333;
- /* 字号 */
- }
-
- .swipe-cell-default {
- display: flex;
- background-color: #ffffff;
- justify-content: center;
- align-items: center;
- }
-
- .swipe-cell-default-icon {
- width: 60px;
- display: flex;
- justify-content: center;
- }
-
- .delete-button {
- height: 100%;
- border: none;
- color: #ff0000;
- background-image: url('@/assets/img/del.png');
- background-size: auto 100%;
- background-repeat: no-repeat;
- }
-
- .submit-button {
- height: 100%;
- border: none;
- color: #07c160;
- background-image: url('@/assets/img/sub.png');
- background-size: auto 100%;
- background-repeat: no-repeat;
- }
-
- .subsuccess {
- height: 100%;
- border: none;
- color: #07c160;
- background-image: url('@/assets/img/sub1.png');
- background-size: auto 100%;
- background-repeat: no-repeat;
- }
- .single-line-text {
- white-space: nowrap; /* 强制不换行 */
- overflow: hidden; /* 超出部分隐藏 */
- text-overflow: ellipsis; /* 超出显示省略号 ... */
- width: 100%; /* 或指定宽度 */
- box-sizing: border-box;
- }
- </style>
|