1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351 |
- <template>
- <div class="app-container">
- <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px">
- <el-form-item :label="$t('开票日期')" prop="kprq">
- <el-date-picker
- v-model="chooseDate"
- @change="handleQuery"
- type="daterange"
- style="width: 508px"
- align="right"
- unlink-panels
- :range-separator="$t('至')"
- :start-placeholder="$t('开始日期')"
- :end-placeholder="$t('结束日期')"
- value-format="yyyy-MM-dd"
- :picker-options="pickerOptions">
- </el-date-picker>
- </el-form-item>
- <el-form-item :label="$t('签发班组')" prop="qfbz">
- <el-select v-model="queryParams.qfbz" :placeholder="$t('请选择') + $t('签发班组')" clearable size="small"
- @change="handleQuery">
- <el-option
- v-for="dict in qfbzOptions"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- />
- </el-select>
- </el-form-item>
- <!-- <el-form-item :label="$t('新票/续票')" prop="xpxp">
- <el-select v-model="queryParams.xpxp" :placeholder="$t('请选择') + $t('新票/续票')" clearable size="small"
- @change="handleQuery">
- <el-option
- v-for="dict in xpxpOptions"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- />
- </el-select>
- </el-form-item>-->
- <el-form-item label="延期许可证号" prop="yqxkzh">
- <el-input
- v-model="queryParams.yqxkzh"
- placeholder="请输入延期许可证号"
- clearable
- size="small"
- @input="handleQuery"
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="危害工作许可证号" prop="whgzxkzh">
- <el-input
- v-model="queryParams.whgzxkzh"
- placeholder="请输入危害工作许可证号"
- clearable
- size="small" @input="handleQuery"
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="动火作业许可证号" prop="dhzyxkzh">
- <el-input
- v-model="queryParams.dhzyxkzh"
- placeholder="请输入动火作业许可证号"
- clearable
- size="small" @input="handleQuery"
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item :label="$t('火票级别')" prop="hpjb">
- <el-select v-model="queryParams.hpjb" :placeholder="$t('请选择') + $t('火票级别')" clearable size="small"
- @change="handleQuery">
- <el-option
- v-for="dict in hpjbOptions"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="限制空间许可证号" prop="xzkjxkzh">
- <el-input
- v-model="queryParams.xzkjxkzh"
- placeholder="请输入限制空间许可证号"
- clearable
- size="small" @input="handleQuery"
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="盲板作业许可证号" prop="mbzyxkzh">
- <el-input
- v-model="queryParams.mbzyxkzh"
- placeholder="请输入盲板作业许可证号"
- clearable
- size="small" @input="handleQuery"
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="高处作业许可证号" prop="gczyxkzh">
- <el-input
- v-model="queryParams.gczyxkzh"
- placeholder="请输入高处作业许可证号"
- clearable
- size="small" @input="handleQuery"
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="高处作业级别" prop="gczyjb">
- <el-select v-model="queryParams.gczyjb" :placeholder="$t('请选择') + $t('高处作业级别')" clearable size="small"
- @change="handleQuery">
- <el-option
- v-for="dict in gczyjbOptions"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="工作内容" prop="content">
- <el-input
- v-model="queryParams.content"
- placeholder="请输入工作内容"
- clearable
- size="small" @input="handleQuery"
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="BYC负责单位/联系人" prop="byclxr">
- <el-input
- v-model="queryParams.byclxr"
- placeholder="请输入BYC负责单位/联系人"
- clearable
- size="small" @input="handleQuery"
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="施工单位" prop="sgdw">
- <el-input
- v-model="queryParams.sgdw"
- placeholder="请输入施工单位"
- clearable
- size="small" @input="handleQuery"
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="销票时间" prop="xpsj">
- <el-date-picker clearable size="small" style="width: 200px"
- v-model="queryParams.xpsj"
- type="date"
- @change="handleQuery"
- value-format="yyyy-MM-dd"
- :placeholder="$t('请选择') + $t('销票时间')">
- </el-date-picker>
- </el-form-item>
- <el-form-item :label="$t('作业票状态')" prop="zypzt">
- <el-select v-model="queryParams.zypzt" :placeholder="$t('请选择') + $t('作业票状态')" clearable size="small"
- @change="handleQuery">
- <el-option
- v-for="dict in zypztOptions"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- />
- </el-select>
- </el-form-item>
- <el-form-item label="检查/存档人" prop="jccdr">
- <el-input
- v-model="queryParams.jccdr"
- placeholder="请输入检查/存档人"
- clearable
- size="small" @input="handleQuery"
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="未撤销项编号" prop="wcxxbh">
- <el-input
- v-model="queryParams.wcxxbh"
- placeholder="请输入未撤销项编号"
- clearable
- size="small" @input="handleQuery"
- @keyup.enter.native="handleQuery"
- />
- </el-form-item>
- <el-form-item label="未撤销状态" prop="wcxzt">
- <el-select v-model="queryParams.wcxzt" style="width: 200px" :placeholder="$t('请选择') + $t('未撤销状态')"
- @change="handleQuery" clearable>
- <el-option
- v-for="dict in wcxztOptions"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="撤销时间" prop="cxsj">
- <el-date-picker clearable size="small" style="width: 200px"
- v-model="queryParams.cxsj"
- type="date"
- @change="handleQuery"
- value-format="yyyy-MM-dd"
- :placeholder="$t('请选择') + $t('撤销时间')">
- </el-date-picker>
- </el-form-item>
- <el-form-item :label="$t('索引')" prop="tag">
- <el-select v-model="queryParams.tag" :placeholder="$t('请选择') + $t('索引')" filterable clearable size="small"
- @change="handleQuery">
- <el-option
- v-for="dict in tagOptions"
- :key="dict.tag"
- :label="dict.tag"
- :value="dict.tag"
- />
- </el-select>
- </el-form-item>
- <el-form-item>
- <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">{{ $t('搜索') }}</el-button>
- <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">{{ $t('重置') }}</el-button>
- </el-form-item>
- </el-form>
- <el-row :gutter="10" class="mb8">
- <el-col :span="1.5">
- <el-button
- type="primary"
- icon="el-icon-plus"
- size="mini"
- @click="handleAdd"
- v-hasPermi="['ehs:jobticket:add']"
- >{{ $t('新增') }}
- </el-button>
- </el-col>
- <!-- <el-col :span="1.5">
- <el-button
- type="success"
- icon="el-icon-edit"
- size="mini"
- :disabled="single"
- @click="handleUpdate"
- v-hasPermi="['ehs:jobticket:edit']"
- >{{ $t('修改') }}</el-button>
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="danger"
- icon="el-icon-delete"
- size="mini"
- :disabled="multiple"
- @click="handleDelete"
- v-hasPermi="['ehs:jobticket:remove']"
- >{{ $t('删除') }}</el-button>
- </el-col>-->
- <el-col :span="1.5">
- <el-button
- type="warning"
- icon="el-icon-download"
- size="mini"
- @click="handleExport"
- v-hasPermi="['ehs:jobticket:export']"
- >{{ $t('导出') }}
- </el-button>
- </el-col>
- <el-col :span="1.5">
- <el-button
- type="primary"
- icon="el-icon-s-data"
- size="mini"
- @click="handleData"
- >{{ $t('数据分析') }}
- </el-button>
- </el-col>
- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
- </el-row>
- <el-table v-loading="loading" :data="jobticketList"
- :height="clientHeight" border :cell-style="myclass"
- row-key="id"
- :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
- :default-expand-all=true
- >
- <el-table-column :label="$t('开票日期')" align="center" prop="kprq" width="125">
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.kprq, '{y}-{m}-{d}') }}</span>
- </template>
- </el-table-column>
- <el-table-column :label="$t('签发时间')" align="center" prop="qfsj" :show-overflow-tooltip="true"/>
- <el-table-column :label="$t('签发班组')" align="center" prop="qfbz" :formatter="qfbzFormat"/>
- <el-table-column :label="$t('签发人')" align="center" prop="qfr" :show-overflow-tooltip="true"/>
- <el-table-column :label="$t('新票/续票')" align="center" prop="xpxp" width="100" :formatter="xpxpFormat"/>
- <el-table-column :label="$t('延期许可证号')" align="center" prop="yqxkzh" width="100" :show-overflow-tooltip="true"/>
- <el-table-column :label="$t('危害工作许可证号')" align="center" prop="whgzxkzh" width="100"
- :show-overflow-tooltip="true"/>
- <el-table-column :label="$t('动火作业许可证号')" align="center" prop="dhzyxkzh" width="100"
- :show-overflow-tooltip="true"/>
- <el-table-column :label="$t('火票级别')" align="center" prop="hpjb" :formatter="hpjbFormat"/>
- <el-table-column :label="$t('限制空间许可证号')" align="center" prop="xzkjxkzh" :show-overflow-tooltip="true"/>
- <el-table-column label="盲板作业许可证号" align="center" prop="mbzyxkzh" :show-overflow-tooltip="true"/>
- <el-table-column label="高处作业许可证号" align="center" prop="gczyxkzh" :show-overflow-tooltip="true"/>
- <el-table-column label="高处作业级别" align="center" prop="gczyjb" :formatter="gczyjbFormat"/>
- <el-table-column :label="$t('工作内容')" align="center" prop="content" width="300" :show-overflow-tooltip="true"/>
- <el-table-column :label="$t('BYC负责单位/联系人')" align="center" prop="byclxr" width="100"
- :show-overflow-tooltip="true"/>
- <el-table-column :label="$t('施工单位')" align="center" prop="sgdw" :show-overflow-tooltip="true"/>
- <el-table-column :label="$t('联系人')" align="center" prop="lxr" :show-overflow-tooltip="true"/>
- <el-table-column :label="$t('联系电话')" align="center" prop="lxdh" width="100" :show-overflow-tooltip="true"/>
- <el-table-column :label="$t('销票时间')" align="center" prop="xpsj" width="100">
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.xpsj, '{y}-{m}-{d}') }}</span>
- </template>
- </el-table-column>
- <el-table-column :label="$t('作业票状态')" align="center" prop="zypzt" width="200" :formatter="zypztFormat">
- <template slot-scope="scope" v-if="scope.row.zypzt != null">
- <el-dropdown placement="bottom" trigger="click">
- <span class="el-dropdown-link">
- <span style=" font-size: 13px" v-if="scope.row.zypzt==10">{{ "作业票未销" }}</span>
- <span style=" font-size: 13px" v-if="scope.row.zypzt==18">{{ "作业票收回,作业票关闭" }}</span>
- <span style="font-size: 13px" v-if="scope.row.zypzt==16">{{ "作业票延期" }}</span>
- <span style="font-size: 13px" v-if="scope.row.zypzt==20">{{ "作业票作废" }}</span>
- <i class="el-icon-caret-bottom"></i>
- </span>
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item @click.native="statusWX(0, scope.row)">{{ $t('作业票未销') }}</el-dropdown-item>
- <el-dropdown-item @click.native="statusGBSH(0, scope.row)">{{ $t('作业票关闭,作业票收回') }}</el-dropdown-item>
- <el-dropdown-item @click.native="statusYQ(0, scope.row)">{{ $t('作业票延期') }}</el-dropdown-item>
- <el-dropdown-item @click.native="statusZF(0, scope.row)">{{ $t('作业票作废') }}</el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown>
- </template>
- </el-table-column>
- <el-table-column :label="$t('检查/存档人')" align="center" prop="jccdr" :show-overflow-tooltip="true"/>
- <el-table-column :label="$t('未撤销项编号')" align="center" prop="wcxxbh" :show-overflow-tooltip="true"/>
- <el-table-column :label="$t('未撤销状态')" align="center" prop="wcxzt" :formatter="wcxztFormat">
- <template slot-scope="scope" v-if="scope.row.wcxzt != null">
- <el-dropdown placement="bottom" trigger="click">
- <span class="el-dropdown-link">
- <span style=" font-size: 13px" v-if="scope.row.wcxzt==10">{{ "有" }}</span>
- <span style=" font-size: 13px" v-if="scope.row.wcxzt==12">{{ "无" }}</span>
- <i class="el-icon-caret-bottom"></i>
- </span>
- <el-dropdown-menu slot="dropdown">
- <el-dropdown-item @click.native="wcxztYOU(0, scope.row)">{{ $t('有') }}</el-dropdown-item>
- <el-dropdown-item @click.native="wcxztWU(0, scope.row)">{{ $t('无') }}</el-dropdown-item>
- </el-dropdown-menu>
- </el-dropdown>
- </template>
- </el-table-column>
- <el-table-column :label="$t('撤销时间')" align="center" prop="cxsj" width="100">
- <template slot-scope="scope">
- <span>{{ parseTime(scope.row.cxsj, '{y}-{m}-{d}') }}</span>
- </template>
- </el-table-column>
- <el-table-column :label="$t('索引')" align="center" prop="tag" :show-overflow-tooltip="true"/>
- <el-table-column :label="$t('备注')" align="center" prop="remarks" :show-overflow-tooltip="true"/>
- <el-table-column :label="$t('操作')" align="center" fixed="right" width="160"
- class-name="small-padding fixed-width">
- <template slot-scope="scope">
- <el-button
- size="mini"
- type="text"
- icon="el-icon-edit"
- @click="handleUpdate(scope.row)"
- v-hasPermi="['ehs:jobticket:edit']"
- >{{ $t('修改') }}
- </el-button>
- <el-button
- size="mini"
- type="text"
- icon="el-icon-delete"
- @click="handleDelete(scope.row)"
- v-hasPermi="['ehs:jobticket:remove']"
- >{{ $t('删除') }}
- </el-button>
- <el-button
- v-if="scope.row.xpxp=='10'"
- size="mini"
- type="text"
- icon="el-icon-date"
- @click="handlePostpone(scope.row)"
- v-hasPermi="['ehs:jobticket:add']"
- >{{ $t('延期') }}
- </el-button>
- </template>
- </el-table-column>
- </el-table>
- <pagination
- v-show="total>0"
- :total="total"
- :page.sync="queryParams.pageNum"
- :limit.sync="queryParams.pageSize"
- @pagination="getList"
- />
- <!-- 添加或修改工作票对话框 -->
- <el-dialog v-dialogDrag :title="title" :visible.sync="open" width="700px" append-to-body>
- <el-form ref="form" :model="form" :rules="rules" label-width="130px">
- <el-form-item :label="$t('开票日期')" prop="kprq">
- <el-date-picker clearable size="small" style="width: 200px"
- v-model="form.kprq"
- type="date"
- value-format="yyyy-MM-dd"
- :placeholder="$t('请选择') + $t('开票日期')">
- </el-date-picker>
- </el-form-item>
- <el-form-item :label="$t('签发时间')" prop="qfsj">
- <el-input v-model="form.qfsj" :placeholder="$t('请输入') + $t('签发时间')"/>
- </el-form-item>
- <el-form-item :label="$t('签发班组')" prop="qfbz">
- <el-select v-model="form.qfbz" :placeholder="$t('请选择') + $t('签发班组')">
- <el-option
- v-for="dict in qfbzOptions"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item :label="$t('签发人')" prop="qfr">
- <el-input v-model="form.qfr" :placeholder="$t('请输入') + $t('签发人')"/>
- </el-form-item>
- <el-form-item :label="$t('新票/续票')" prop="xpxp" v-if="isxp">
- <el-select v-model="form.xpxp" :placeholder="$t('请选择') + $t('新票/续票')">
- <el-option
- v-for="dict in xpxpOptions"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item :label="$t('延期许可证号')" prop="yqxkzh">
- <el-input v-model="form.yqxkzh" :placeholder="$t('请输入') + $t('延期许可证号')"/>
- </el-form-item>
- <el-form-item :label="$t('危害工作许可证号')" prop="whgzxkzh">
- <el-input v-model="form.whgzxkzh" :placeholder="$t('请输入') + $t('危害工作许可证号')"/>
- </el-form-item>
- <el-form-item :label="$t('动火作业许可证号')" prop="dhzyxkzh">
- <el-input v-model="form.dhzyxkzh" :placeholder="$t('请输入') + $t('动火作业许可证号')"/>
- </el-form-item>
- <el-form-item :label="$t('火票级别')" prop="hpjb">
- <el-select v-model="form.hpjb" :placeholder="$t('请选择') + $t('火票级别')">
- <el-option
- v-for="dict in hpjbOptions"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item :label="$t('限制空间许可证号')" prop="xzkjxkzh">
- <el-input v-model="form.xzkjxkzh" :placeholder="$t('请输入') + $t('限制空间许可证号')"/>
- </el-form-item>
- <el-form-item :label="$t('盲板作业许可证号')" prop="mbzyxkzh">
- <el-input v-model="form.mbzyxkzh" :placeholder="$t('请输入') + $t('盲板作业许可证号')"/>
- </el-form-item>
- <el-form-item :label="$t('高处作业许可证号')" prop="gczyxkzh">
- <el-input v-model="form.gczyxkzh" :placeholder="$t('请输入') + $t('高处作业许可证号')"/>
- </el-form-item>
- <el-form-item :label="$t('高处作业级别')" prop="hpjb">
- <el-select v-model="form.gczyjb" :placeholder="$t('请选择') + $t('高处作业级别')">
- <el-option
- v-for="dict in gczyjbOptions"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item :label="$t('内容')" prop="content">
- <el-input v-model="form.content" :placeholder="$t('请输入') + $t('内容')"/>
- </el-form-item>
- <el-form-item label="用户单位" prop="userUnit">
- <el-select v-model="form.userUnit" placeholder="请选择用户单位"
- @change="checkCategoryPromotionUpdate(form.userUnit)">
- <el-option
- v-for="dict in userUnitOptions"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="parseInt(dict.dictValue)"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="用户主管" prop="userMg">
- <el-select v-model="form.userMg" placeholder="请先选择好用户单位" @change="pick">
- <el-option
- v-for="dict in userMgOptions"
- :key="dict.userId"
- :label="dict.nickName"
- :value="dict.userId"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item :label="$t('施工单位')" prop="sgdw">
- <el-select v-model="form.sgdw" placeholder="请选择施工单位" @change="selectworkUnit(form.sgdw)">
- <el-option
- v-for="dict in sgdwOptions"
- :key="dict.id"
- :label="dict.label"
- :value="dict.label"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item :label="$t('联系人')" prop="lxr">
- <el-input v-model="form.lxr" :placeholder="$t('请输入') + $t('联系人')"/>
- </el-form-item>
- <el-form-item :label="$t('联系电话')" prop="lxdh">
- <el-input v-model="form.lxdh" :placeholder="$t('请输入') + $t('联系电话')"/>
- </el-form-item>
- <el-form-item :label="$t('销票时间')" prop="xpsj">
- <el-date-picker clearable size="small" style="width: 200px"
- v-model="form.xpsj"
- type="date"
- value-format="yyyy-MM-dd"
- :placeholder="$t('请选择') + $t('销票时间')">
- </el-date-picker>
- </el-form-item>
- <el-form-item :label="$t('作业票状态')" prop="zypzt">
- <el-select v-model="form.zypzt" :placeholder="$t('请选择') + $t('作业票状态')">
- <el-option
- v-for="dict in zypztOptions"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item :label="$t('检查/存档人')" prop="jccdr">
- <el-input v-model="form.jccdr" :placeholder="$t('请输入') + $t('检查/存档人')"/>
- </el-form-item>
- <el-form-item :label="$t('未撤销项编号')" prop="wcxxbh">
- <el-input v-model="form.wcxxbh" :placeholder="$t('请输入') + $t('未撤销项编号')"/>
- </el-form-item>
- <el-form-item :label="$t('未撤销状态')" prop="wcxzt">
- <el-select v-model="form.wcxzt" :placeholder="$t('请选择') + $t('未撤销状态')">
- <el-option
- v-for="dict in wcxztOptions"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item :label="$t('撤销时间')" prop="cxsj">
- <el-date-picker clearable size="small" style="width: 200px"
- v-model="form.cxsj"
- type="date"
- value-format="yyyy-MM-dd"
- :placeholder="$t('请选择') + $t('撤销时间')">
- </el-date-picker>
- </el-form-item>
- <el-form-item label="索引" prop="tag">
- <el-select v-model="form.tag" clearable placeholder="请选择索引">
- <el-option
- v-for="dict in tagOptions"
- :key="dict.tag"
- :label="dict.tag"
- :value="dict.tag"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item :label="$t('备注')" prop="remarks">
- <el-input v-model="form.remarks" :placeholder="$t('请输入') + $t('备注')"/>
- </el-form-item>
- <el-form-item :label="$t('归属部门')" prop="deptId">
- <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true"
- :placeholder="$t('请选择') + $t('归属部门')"/>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="submitForm">{{ $t('确 定') }}</el-button>
- <el-button @click="cancel">{{ $t('取 消') }}</el-button>
- </div>
- </el-dialog>
- <!-- 用户导入对话框 -->
- <el-dialog v-dialogDrag :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
- <el-upload
- ref="upload"
- :limit="1"
- accept=".xlsx, .xls"
- :headers="upload.headers"
- :action="upload.url"
- :disabled="upload.isUploading"
- :on-progress="handleFileUploadProgress"
- :on-success="handleFileSuccess"
- :auto-upload="false"
- drag
- >
- <i class="el-icon-upload"></i>
- <div class="el-upload__text">
- {{ $t('将文件拖到此处,或') }}
- <em>{{ $t('点击上传') }}</em>
- </div>
- <div class="el-upload__tip" slot="tip">
- <!--<el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据-->
- <el-link type="info" style="font-size:12px" @click="importTemplate">{{ $t('下载模板') }}</el-link>
- </div>
- <form ref="downloadFileForm" :action="upload.downloadAction" target="FORMSUBMIT">
- <input name="type" :value="upload.type" hidden/>
- </form>
- <div class="el-upload__tip" style="color:red" slot="tip">{{ $t('提示:仅允许导入“xls”或“xlsx”格式文件!') }}</div>
- </el-upload>
- <div slot="footer" class="dialog-footer">
- <el-button type="primary" @click="submitFileForm">{{ $t('确 定') }}</el-button>
- <el-button @click="upload.open = false">{{ $t('取 消') }}</el-button>
- </div>
- </el-dialog>
- <el-drawer
- :title="$t('数据分析')"
- size="600px"
- :visible.sync="drawer"
- :direction="direction">
- <el-row>
- <el-col>
- <el-card class="box-card" shadow="hover">
- <div slot="header" class="clearfix">
- <span>{{ this.$t('火票级别统计') }}</span>
- </div>
- <div class="text item">
- <fire-data></fire-data>
- </div>
- </el-card>
- </el-col>
- </el-row>
- <el-row>
- <el-col>
- <el-card class="box-card" shadow="hover">
- <div slot="header" class="clearfix">
- <span>{{ this.$t('作业票状态统计') }}</span>
- </div>
- <div class="text item">
- <status-data></status-data>
- </div>
- </el-card>
- </el-col>
- </el-row>
- </el-drawer>
- <el-dialog title="延期作业许可" :visible.sync="guanlianVisible" width="30%" center>
- <el-form ref="form" :model="postponeform" :rules="rules1" label-width="80px">
- <el-form-item :label="$t('开票日期')" prop="kprq">
- <el-date-picker clearable size="small" style="width: 200px"
- v-model="postponeform.kprq"
- type="date"
- value-format="yyyy-MM-dd"
- :placeholder="$t('请选择') + $t('开票日期')">
- </el-date-picker>
- </el-form-item>
- <el-form-item :label="$t('签发时间')" prop="qfsj">
- <el-input v-model="postponeform.qfsj" :placeholder="$t('请输入') + $t('签发时间')"/>
- </el-form-item>
- <el-form-item :label="$t('签发班组')" prop="qfbz">
- <el-select v-model="postponeform.qfbz" :placeholder="$t('请选择') + $t('签发班组')">
- <el-option
- v-for="dict in qfbzOptions"
- :key="dict.dictValue"
- :label="dict.dictLabel"
- :value="dict.dictValue"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item :label="$t('签发人')" prop="qfr">
- <el-input v-model="postponeform.qfr" :placeholder="$t('请输入') + $t('签发人')"/>
- </el-form-item>
- <el-form-item :label="$t('延期许可证号')" prop="yqxkzh">
- <el-input v-model="postponeform.yqxkzh" :placeholder="$t('请输入') + $t('延期许可证号')"/>
- </el-form-item>
- </el-form>
- <div slot="footer" class="dialog-footer">
- <el-button @click="guanlianVisible=false">取 消</el-button>
- <el-button type="primary" @click="submitPostpone()">确 定</el-button>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- import {
- listJobticket,
- getJobticket,
- delJobticket,
- addJobticket,
- updateJobticket,
- exportJobticket,
- selectChengbaoshang
- } from "@/api/ehs/jobticket";
- import {listUnit, getUnit, delUnit, addUnit, updateUnit, exportUnit, getUserByUnit} from "@/api/invoice/unit";
- import {treeselect, getDept} from "@/api/system/dept";
- import {getToken} from "@/utils/auth";
- import Treeselect from "@riophae/vue-treeselect";
- import "@riophae/vue-treeselect/dist/vue-treeselect.css";
- import FireData from "./fireData";
- import StatusData from "./statusData";
- import {listTagAll} from "@/api/invoice/tag";
- import base from "@/assets/js/base";
- export default {
- name: "Jobticket",
- components: {FireData, Treeselect,StatusData},
- data() {
- return {
- //新票新增
- isxp: false,
- //延期对话框
- guanlianVisible: false,
- yqzyxkzh: "",
- drawer: false,
- direction: 'rtl',
- // 遮罩层
- loading: true,
- // 选中数组
- ids: [],
- // 非单个禁用
- single: true,
- // 非多个禁用
- multiple: true,
- // 显示搜索条件
- showSearch: false,
- // 总条数
- total: 0,
- // 工作票表格数据
- jobticketList: [],
- // 弹出层标题
- title: "",
- // 部门树选项
- deptOptions: undefined,
- clientHeight: 300,
- // 是否显示弹出层
- open: false,
- // 装置字典
- plantCodeOptions: [],
- // 签发班组字典
- qfbzOptions: [],
- // 新票/续票字典
- xpxpOptions: [],
- // 火票级别字典
- hpjbOptions: [],
- // 作业票状态字典
- zypztOptions: [],
- // 高处作业级别字典
- gczyjbOptions: [],
- //作业票未撤销状态字典
- wcxztOptions: [],
- //施工单位字典
- sgdwOptions: [],
- // 用户单位字典
- userUnitOptions: [],
- // 用户主管字典
- userMgOptions: [],
- tagOptions: [],
- // 用户导入参数
- upload: {
- //下载模板请求地址
- downloadAction: process.env.VUE_APP_BASE_API + '/common/template',
- //下载模板类型
- type: "jobticket",
- // 是否显示弹出层(用户导入)
- open: false,
- // 弹出层标题(用户导入)
- title: "",
- // 是否禁用上传
- isUploading: false,
- // 是否更新已经存在的用户数据
- updateSupport: 0,
- // 设置上传的请求头部
- headers: {Authorization: "Bearer " + getToken()},
- // 上传的地址
- url: process.env.VUE_APP_BASE_API + "/ehs/jobticket/importData"
- },
- // 查询参数
- queryParams: {
- pageNum: 1,
- pageSize: 20,
- plantCode: null,
- kprq: null,
- startDate: null,
- endDate: null,
- qfsj: null,
- qfbz: null,
- qfr: null,
- xpxp: null,
- whgzxkzh: null,
- dhzyxkzh: null,
- hpjb: null,
- xzkjxkzh: null,
- content: null,
- byclxr: null,
- sgdw: null,
- lxr: null,
- lxdh: null,
- xpsj: null,
- zypzt: null,
- jccdr: null,
- wcxxbh: null,
- wcxzt: null,
- cxsj: null,
- tag: null
- },
- //日期快速选择
- pickerOptions: {
- shortcuts: [{
- text: this.$t('最近一周'),
- onClick(picker) {
- const end = new Date();
- const start = new Date();
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
- picker.$emit('pick', [start, end]);
- }
- }, {
- text: this.$t('最近一个月'),
- onClick(picker) {
- const end = new Date();
- const start = new Date();
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
- picker.$emit('pick', [start, end]);
- }
- }, {
- text: this.$t('最近三个月'),
- onClick(picker) {
- const end = new Date();
- const start = new Date();
- start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
- picker.$emit('pick', [start, end]);
- }
- }]
- },
- //日期选择器
- chooseDate: [],
- // 表单参数
- form: {},
- //延期参数
- postponeParams: {},
- //延期表单
- postponeform: {},
- // 表单校验
- rules: {
- plantCode: [
- {required: true, message: this.$t('装置') + this.$t('不能为空'), trigger: "change"}
- ],
- deptId: [
- {required: true, message: this.$t('部门编号') + this.$t('不能为空'), trigger: "blur"}
- ],
- xpxp: [
- {required: true, message: this.$t('手动新增只能为新票'), trigger: "blur"},
- {validator: this.xpxp, trigger: 'blur'}
- ]
- },
- rules1: {
- yqxkzh: [
- {required: true, message: this.$t('当前续票必填'), trigger: "blur"}
- ],
- }
- };
- },
- watch: {
- // 根据名称筛选部门树
- deptName(val) {
- this.$refs.tree.filter(val);
- }
- },
- created() {
- //设置表格高度对应屏幕高度
- this.$nextTick(() => {
- this.clientHeight = (document.body.clientHeight - 80) * 0.8
- })
- this.getList();
- this.getTreeselect();
- this.getChengbaoshang();
- this.getTagList()
- this.getDicts("PLANT_DIVIDE").then(response => {
- this.plantCodeOptions = response.data;
- });
- this.getDicts("QFBZ").then(response => {
- this.qfbzOptions = response.data;
- });
- this.getDicts("XPXP").then(response => {
- this.xpxpOptions = response.data;
- });
- this.getDicts("HPJB").then(response => {
- this.hpjbOptions = response.data;
- });
- this.getDicts("ZYPZT").then(response => {
- this.zypztOptions = response.data;
- });
- //高处作业级别
- this.getDicts("GCZYJB").then(response => {
- this.gczyjbOptions = response.data;
- });
- this.getDicts("TICKED_WCXZT").then(response => {
- this.wcxztOptions = response.data;
- });
- this.getDicts("book_user_unit").then(response => {
- this.userUnitOptions = response.data;
- });
- },
- methods: {
- //当前时间
- getNowFormatDate() {
- var date = new Date();
- var seperator1 = "-";
- var year = date.getFullYear();
- var month = date.getMonth() + 1;
- var strDate = date.getDate();
- if (month >= 1 && month <= 9) {
- month = "0" + month;
- }
- if (strDate >= 0 && strDate <= 9) {
- strDate = "0" + strDate;
- }
- var currentdate = year + seperator1 + month + seperator1 + strDate;
- return currentdate;
- },
- //根据用户单位 查询对应选择的用户主管 根据用户单位 字段 查找对应的多个主管 返回 Sysuser的集合(id,name)
- checkCategoryPromotion(oneId) {
- getUserByUnit(oneId).then(response => {
- // this.form.userMg=null;
- this.userMgOptions = response.data;
- // let arr= response.data.userIds.split(',');
- });
- },
- //修改用户单位时,级联的用户主管下拉数据应清空,否则会造成用户修改了用户单位,但未重新选择相应的用户主管
- checkCategoryPromotionUpdate(oneId) {
- this.form.userMg = null;
- getUserByUnit(oneId).then(response => {
- // this.form.userMg=null;
- this.userMgOptions = response.data;
- // let arr= response.data.userIds.split(',');
- });
- },
- //修改延期时的用户单位
- checkCategoryPromotionRenew(oneId) {
- this.postponeform.userMg = null;
- getUserByUnit(oneId).then(response => {
- this.userMgOptions = response.data;
- });
- },
- //主管下拉框变动重新刷新赋值
- pick() {
- this.$forceUpdate()
- },
- //查找施工单位
- selectworkUnit(oneId) {
- //选中的数据和options进行匹配
- var obj = {}
- obj = this.sgdwOptions.find(function (i) {
- return i.label === oneId
- });
- getDept(obj.id).then(response => {
- this.form.lxr = response.data.leader;
- this.form.lxdh = response.data.phone
- });
- },
- //查找承包商列表
- getChengbaoshang() {
- treeselect().then(response => {
- this.sgdwOptions = response.data[1].children;
- });
- },
- //得到索引下拉框
- getTagList() {
- listTagAll().then(response => {
- this.tagOptions = response
- });
- },
- //延期 即新增一条 改为续票
- handlePostpone(row) {
- this.guanlianVisible = true
- const id = row.id || this.ids
- getJobticket(id).then(response => {
- this.postponeform = response.data;
- // this.checkCategoryPromotion(response.data.userUnit);
- });
- this.postponeParams = base.deepClone(row)
- },
- //新的 续票 构造票号 最多五次
- submitPostpone() {
- this.guanlianVisible = false
- //保留新票的参数 用来修改新票
- const id = this.postponeParams.id
- const postponeNumber = this.postponeParams.postponeNumber + 1;
- const yqxkzh = this.postponeform.yqxkzh
- //续票的参数
- this.postponeParams.id = null
- this.postponeParams.yqxkzh = this.postponeform.yqxkzh
- this.postponeParams.xpxp = "12"
- this.postponeParams.zypzt = "10"
- this.postponeParams.kprq = this.postponeform.kprq
- this.postponeParams.qfsj = this.postponeform.qfsj
- this.postponeParams.qfbz = this.postponeform.qfbz
- this.postponeParams.qfr = this.postponeform.qfr
- if (postponeNumber > 15) {
- return this.msgError("当前作业票最多可以延期十五次,请重新开票");
- } else {
- if (this.postponeParams.yqxkzh.endsWith('-6')) {
- this.msgError("每张续票最多可以延期五次,请重新命名生成新的续票");
- this.getList();
- } else {
- //若果是第一次延期 延期许可证取输入的 后续的都是原来
- let putData = {}
- putData.id = id
- putData.postponeNumber = postponeNumber
- if (putData.postponeNumber == 1) {
- putData.yqxkzh = yqxkzh.substring(0, yqxkzh.indexOf("-"));
- updateJobticket(putData).then(response => {
- });
- } else {
- putData.yqxkzh = yqxkzh
- }
- addJobticket(this.postponeParams).then(response => {
- this.msgSuccess(this.$t('延期成功,请查看新的续票'));
- this.open = false;
- this.getList();
- });
- }
- }
- },
- //修改单元格样式的方法
- myclass({row, column, rowIndex, columnIndex}) {
- if (row.zypzt == 10) {
- return "background-color:rgba(255, 68,68, 0.5);"
- }
- if (row.zypzt == 18 || row.zypzt == 14) {
- return "background-color:rgba(21,180,51, 0.5);"
- }
- if (row.zypzt == 16) {
- return "background-color:rgba(221,248,9, 0.5);"
- }
- if (row.zypzt == 20) {
- return "background-color:rgba(163, 150,150, 0.5);"
- }
- },
- /** 查询工作票列表 */
- getList() {
- this.loading = true;
- listJobticket(this.queryParams).then(response => {
- this.jobticketList=[]
- this.jobticketList = response.rows;
- this.total = response.total;
- this.loading = false;
- });
- },
- /** 查询部门下拉树结构 */
- getTreeselect() {
- treeselect().then(response => {
- this.deptOptions = response.data;
- });
- },
- // 装置字典翻译
- plantCodeFormat(row, column) {
- return this.selectDictLabel(this.plantCodeOptions, row.plantCode);
- },
- // 签发班组字典翻译
- qfbzFormat(row, column) {
- return this.selectDictLabel(this.qfbzOptions, row.qfbz);
- },
- // 新票/续票字典翻译
- xpxpFormat(row, column) {
- return this.selectDictLabel(this.xpxpOptions, row.xpxp);
- },
- // 火票级别字典翻译
- hpjbFormat(row, column) {
- return this.selectDictLabel(this.hpjbOptions, row.hpjb);
- },
- // 作业票状态字典翻译
- zypztFormat(row, column) {
- return this.selectDictLabel(this.zypztOptions, row.zypzt);
- },
- // 高处作业级别字典翻译
- gczyjbFormat(row, column) {
- return this.selectDictLabel(this.gczyjbOptions, row.gczyjb);
- },
- wcxztFormat(row, column) {
- return this.selectDictLabel(this.wcxztOptions, row.wcxzt);
- },
- // 取消按钮
- cancel() {
- this.open = false;
- this.reset();
- },
- //变换作业票状态
- statusWX(index, row) {
- this.form = row;
- row.zypzt = 10;
- this.form.zypzt = 10;
- updateJobticket(this.form).then(response => {
- this.msgSuccess(this.$t('修改成功'));
- this.open = false;
- this.getList();
- });
- },
- statusGBSH(index, row) {
- this.form = row;
- this.form.zypzt = 18;
- updateJobticket(this.form).then(response => {
- this.msgSuccess(this.$t('修改成功'));
- this.open = false;
- this.getList();
- });
- },
- statusYQ(index, row) {
- this.form = row;
- this.form.zypzt = 16;
- updateJobticket(this.form).then(response => {
- this.msgSuccess(this.$t('修改成功'));
- this.open = false;
- this.getList();
- });
- },
- statusZF(index, row) {
- this.form = row;
- this.form.zypzt = 20;
- updateJobticket(this.form).then(response => {
- this.msgSuccess(this.$t('修改成功'));
- this.open = false;
- this.getList();
- });
- },
- wcxztYOU(index, row) {
- this.form = row;
- this.form.wcxzt = 10;
- updateJobticket(this.form).then(response => {
- this.msgSuccess(this.$t('修改成功'));
- this.open = false;
- this.getList();
- });
- },
- wcxztWU(index, row) {
- this.form = row;
- this.form.wcxzt = 12;
- updateJobticket(this.form).then(response => {
- this.msgSuccess(this.$t('修改成功'));
- this.open = false;
- this.getList();
- });
- },
- // 表单重置
- reset() {
- this.form = {
- id: null,
- plantCode: null,
- kprq: null,
- startDate: null,
- endDate: null,
- qfsj: null,
- qfbz: null,
- qfr: null,
- xpxp: null,
- yqxkzh: null,
- whgzxkzh: null,
- dhzyxkzh: null,
- hpjb: null,
- xzkjxkzh: null,
- content: null,
- byclxr: null,
- sgdw: null,
- lxr: null,
- lxdh: null,
- xpsj: null,
- zypzt: null,
- jccdr: null,
- wcxxbh: null,
- wcxzt: null,
- cxsj: null,
- delFlag: null,
- createrCode: null,
- createdate: null,
- updaterCode: null,
- updatedate: null,
- deptId: null,
- remarks: null
- };
- this.resetForm("form");
- },
- /** 搜索按钮操作 */
- handleQuery() {
- console.log(this.queryParams)
- this.queryParams.pageNum = 1
- if (this.chooseDate == null) {
- this.chooseDate = []
- }
- this.queryParams.startDate = this.chooseDate[0]
- this.queryParams.endDate = this.chooseDate[1]
- this.getList();
- },
- /** 重置按钮操作 */
- resetQuery() {
- this.resetForm("queryForm");
- this.chooseDate = "";
- this.handleQuery();
- },
- // 多选框选中数据
- handleSelectionChange(selection) {
- this.ids = selection.map(item => item.id)
- this.single = selection.length !== 1
- this.multiple = !selection.length
- },
- /** 新增按钮操作 */
- handleAdd() {
- this.reset();
- this.open = true;
- this.title = this.$t('新增') + " " + this.$t('工作票');
- this.form.kprq = this.getNowFormatDate()
- this.form.qfsj = '8:30'
- this.form.zypzt = "10"
- this.form.xpxp = "10"
- this.isxp = false
- },
- /** 修改按钮操作 */
- handleUpdate(row) {
- this.isxp = true
- this.reset();
- const id = row.id || this.ids
- getJobticket(id).then(response => {
- this.form = response.data;
- this.checkCategoryPromotion(this.form.userUnit);
- this.open = true;
- this.title = this.$t('修改') + this.$t('工作票');
- });
- },
- /** 提交按钮 */
- submitForm() {
- this.$refs["form"].validate(valid => {
- if (valid) {
- if (this.form.id != null) {
- updateJobticket(this.form).then(response => {
- this.msgSuccess(this.$t('修改成功'));
- this.open = false;
- this.getList();
- });
- } else {
- addJobticket(this.form).then(response => {
- this.msgSuccess(this.$t('新增成功'));
- this.open = false;
- this.getList();
- });
- }
- }
- });
- },
- /** 删除按钮操作 */
- handleDelete(row) {
- if (row.children != null && row.children.length > 0) {
- this.msgError('存在续票,无法删除主票')
- return
- }
- const ids = row.id || this.ids;
- this.$confirm(this.$t('是否确认删除?'), this.$t('警告'), {
- confirmButtonText: this.$t('确定'),
- cancelButtonText: this.$t('取消'),
- type: "warning"
- }).then(function () {
- return delJobticket(ids);
- }).then(() => {
- this.getList();
- this.msgSuccess(this.$t('删除成功'));
- })
- },
- /** 导出按钮操作 */
- handleExport() {
- const queryParams = this.queryParams;
- this.$confirm(this.$t('是否确认导出所有工作票数据项?'), this.$t('警告'), {
- confirmButtonText: this.$t('确定'),
- cancelButtonText: this.$t('取消'),
- type: "warning"
- }).then(function () {
- return exportJobticket(queryParams);
- }).then(response => {
- this.download(response.msg);
- })
- },
- /** 导入按钮操作 */
- handleImport() {
- this.upload.title = this.$t('用户导入');
- this.upload.open = true;
- },
- /** 下载模板操作 */
- importTemplate() {
- this.$refs['downloadFileForm'].submit()
- },
- // 文件上传中处理
- handleFileUploadProgress(event, file, fileList) {
- this.upload.isUploading = true;
- },
- // 文件上传成功处理
- handleFileSuccess(response, file, fileList) {
- this.upload.open = false;
- this.upload.isUploading = false;
- this.$refs.upload.clearFiles();
- if (response.data[0] != null) {
- this.$alert(this.$t('成功导入') + response.msg + this.$t('条数据') + "," + this.$t('第') + response.data + this.$t('行数据出现错误导入失败') + "。", this.$t('导入结果'), {dangerouslyUseHTMLString: true});
- } else {
- this.$alert(this.$t('成功导入') + response.msg + this.$t('条数据'), this.$t('导入结果'), {dangerouslyUseHTMLString: true});
- }
- this.getList();
- },
- // 提交上传文件
- submitFileForm() {
- this.$refs.upload.submit();
- },
- //数据分析
- handleData() {
- this.drawer = true
- }
- }
- };
- </script>
- <style>
- .text {
- font-size: 14px;
- }
- .item {
- margin-bottom: 18px;
- }
- .clearfix {
- color: #1e1e1e;
- }
- .clearfix:before,
- .clearfix:after {
- display: table;
- content: "";
- }
- .clearfix:after {
- clear: both
- }
- .box-card {
- width: 100%;
- }
- .el-drawer__body {
- overflow: auto;
- }
- .el-drawer__container ::-webkit-scrollbar {
- display: none;
- }
- </style>
|