|
|
@@ -0,0 +1,576 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <el-breadcrumb class="heading">
|
|
|
+ <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
|
|
|
+ <el-breadcrumb-item :to="{ path: '/annuaudit' }">年审申请表</el-breadcrumb-item>
|
|
|
+ </el-breadcrumb>
|
|
|
+ <el-card class="box-card" style="height: calc(100vh - 115px);">
|
|
|
+ <div slot="header">
|
|
|
+ <span>
|
|
|
+ <i class="icon icon-table2"></i> 年审申请表
|
|
|
+ </span>
|
|
|
+ <span style="float: right;">
|
|
|
+ <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="addaudit">添加
|
|
|
+ </el-button>
|
|
|
+ </span>
|
|
|
+ <el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
|
|
|
+ <el-form-item label="年审日期">
|
|
|
+ <el-date-picker size="mini" style="width: 220px" v-model="CreateOn" type="daterange" range-separator="至"
|
|
|
+ start-placeholder="生成日期" end-placeholder="结束日期"></el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="准入类别">
|
|
|
+ <el-select size="mini" style="width:100px" v-model="searchForm.SupplierTypeName" placeholder="准入类别">
|
|
|
+ <el-option label="物资类" value="01"></el-option>
|
|
|
+ <el-option label="技术服务类" value="03"></el-option>
|
|
|
+ <el-option label="基建类" value="02"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-dropdown split-button type="primary" size="mini" @click="handleSearch" @command="searchCommand">
|
|
|
+ 查询
|
|
|
+ <el-dropdown-menu slot="dropdown">
|
|
|
+ <el-dropdown-item command="search">高级查询</el-dropdown-item>
|
|
|
+ <el-dropdown-item command="clear">查询重置</el-dropdown-item>
|
|
|
+ </el-dropdown-menu>
|
|
|
+ </el-dropdown>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+ <el-table :data="entityList" border height="calc(100vh - 243px)" style="width: 100%" @sort-change="orderby">
|
|
|
+ <el-table-column label="操作" min-width="100" align="center" fixed>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <router-link :to="'/annuaudit/' + scope.row.Id + '/operation'">
|
|
|
+ <el-button type="text" title="编辑" size="small" icon="el-icon-edit"></el-button>
|
|
|
+ </router-link>
|
|
|
+
|
|
|
+ <el-popover placement="top" title="提示" v-model="scope.row.deleteConfirmFlag">
|
|
|
+ <el-alert title="" description="确认要删除吗?" type="warning" :closable="false">
|
|
|
+ </el-alert>
|
|
|
+ <br />
|
|
|
+ <div style="text-align: right; margin: 0">
|
|
|
+ <el-button type="primary" size="mini" @click="deleteEntity(scope.row)">删除</el-button>
|
|
|
+ </div>
|
|
|
+ <el-button slot="reference" type="text" title="删除" style="margin-left:3px" size="small"
|
|
|
+ @click="scope.row.deleteConfirmFlag = true">
|
|
|
+ <i class="el-icon-delete"></i>
|
|
|
+ </el-button>
|
|
|
+ </el-popover>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column v-for="column in tableColumns" :key="column.Id" v-if="column.prop != 'CreateOn'"
|
|
|
+ :prop="column.prop" sortable min-width="100" :label="column.label" align="center" show-overflow-tooltip>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <!--<el-table-column prop="CreateOn" sortable min-width="150" label="生成时间" align="center" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ jstimehandle(scope.row.CreateOn+'') }}
|
|
|
+ </template>
|
|
|
+ </el-table-column>-->
|
|
|
+ </el-table>
|
|
|
+ <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
|
|
|
+ :page-sizes="[10, 15, 20, 25]" :page-size="size" layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :total="currentItemCount">
|
|
|
+ </el-pagination>
|
|
|
+ </el-card>
|
|
|
+
|
|
|
+ <el-dialog title="高级查询" :visible.sync="dialogVisible" width="720px">
|
|
|
+ <el-form ref="advancedsearchForm" label-width="110px">
|
|
|
+ <el-row>
|
|
|
+
|
|
|
+ <!-- <el-col :span="12">
|
|
|
+ <el-form-item label="生成时间">
|
|
|
+ <el-date-picker size="mini" v-model="CreateOn" type="daterange" style="width:100%" range-separator="至"
|
|
|
+ start-placeholder="生成日期" end-placeholder="结束日期"></el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col> -->
|
|
|
+ <!--
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="">
|
|
|
+ <el-input size="mini" v-model="searchForm.Id" style="width:100%" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col> -->
|
|
|
+
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="推荐单位编码">
|
|
|
+ <el-input size="mini" v-model="searchForm.RecUnitId" style="width:100%" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="准入证号">
|
|
|
+ <el-input size="mini" v-model="searchForm.AccessCardNo" style="width:100%" placeholder="请输入">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="准入类别">
|
|
|
+ <el-input size="mini" v-model="searchForm.SupplierTypeName" style="width:100%" placeholder="请输入">
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="企业名称">
|
|
|
+ <el-input size="mini" v-model="searchForm.SupplierName" style="width:100%" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="工程项目名称">
|
|
|
+ <el-input size="mini" v-model="searchForm.ProjectName" style="width:100%" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="履约执行情况">
|
|
|
+ <el-input size="mini" v-model="searchForm.Performance" style="width:100%" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="准入范围">
|
|
|
+ <el-input size="mini" v-model="searchForm.WorkRange" style="width:100%" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="施工队伍名称">
|
|
|
+ <el-input size="mini" v-model="searchForm.ConstructTeam" style="width:100%" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="状态标识">
|
|
|
+ <el-input size="mini" v-model="searchForm.Status" style="width:100%" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="录入员">
|
|
|
+ <el-input size="mini" v-model="searchForm.EnterUserName" style="width:100%" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="年审日期">
|
|
|
+ <el-input size="mini" v-model="searchForm.ApplyTime" style="width:100%" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="审核日期">
|
|
|
+ <el-input size="mini" v-model="searchForm.AuditDate" style="width:100%" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="退回原因">
|
|
|
+ <el-input size="mini" v-model="searchForm.BackReason" style="width:100%" placeholder="请输入"></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button size="mini" @click="dialogVisible = false">取 消</el-button>
|
|
|
+ <el-button size="mini" type="primary" @click="handleSearch">查 询</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+ <el-dialog title="年审申请添加" :visible.sync="addshow" width="360px">
|
|
|
+ <el-form label-width="90px">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="企业名称">
|
|
|
+ <el-select filterable default-first-option ref="supselect" v-model="entityForm.SupplierId"
|
|
|
+ placeholder="请选择" @change="supplierchange" style="width: 100%">
|
|
|
+ <el-option v-for="item in selectsupplierlist" :key="item.Id" :label="item.Realname" :value="item.Id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="准入类别">
|
|
|
+ <el-select filterable default-first-option v-model="entityForm.SupplierTypeName" placeholder="请选择"
|
|
|
+ style="width: 100%">
|
|
|
+ <el-option label="物资类" value="01"></el-option>
|
|
|
+ <el-option label="技术服务类" value="03"></el-option>
|
|
|
+ <el-option label="基建类" value="02"></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <span style="float: right;margin-top:-10px;">
|
|
|
+ <el-button size="small" @click="addUserShow = false">取 消</el-button>
|
|
|
+ <el-button type="primary" size="small" @click="addAnnualAudit()">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ <br>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+ import {
|
|
|
+ mapGetters
|
|
|
+ } from 'vuex';
|
|
|
+ import supplierapi from '@/api/oilsupplier/supplier';
|
|
|
+ import api from '@/api/oilsupplier/annualaudit';
|
|
|
+
|
|
|
+ export default {
|
|
|
+ computed: {
|
|
|
+ ...mapGetters({
|
|
|
+ authUser: 'authUser'
|
|
|
+ })
|
|
|
+ },
|
|
|
+ name: 'annualaudit',
|
|
|
+
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ addshow: false,
|
|
|
+ dialogVisible: false,
|
|
|
+ //列表数据
|
|
|
+ selectsupplierlist: [],
|
|
|
+ entityList: [],
|
|
|
+ //分页参数
|
|
|
+ size: 10,
|
|
|
+ currentPage: 1,
|
|
|
+ currentItemCount: 0,
|
|
|
+ //列表排序
|
|
|
+ Column: {
|
|
|
+ Order: '',
|
|
|
+ Prop: ''
|
|
|
+ },
|
|
|
+ //查询时间
|
|
|
+ CreateOn: [new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()],
|
|
|
+ //查询项
|
|
|
+ searchFormReset: {},
|
|
|
+ entityForm: {
|
|
|
+ Id: '',
|
|
|
+ SupplierName: '',
|
|
|
+ SupplierId: '',
|
|
|
+ SupplierTypeName: '',
|
|
|
+ },
|
|
|
+ searchForm: {
|
|
|
+ Id: '',
|
|
|
+ RecUnitId: '',
|
|
|
+ AccessCardNo: '',
|
|
|
+ SupplierTypeName: '',
|
|
|
+ SupplierName: '',
|
|
|
+ Num: '',
|
|
|
+ ProjectName: '',
|
|
|
+ Performance: '',
|
|
|
+ WorkRange: '',
|
|
|
+ Status: '',
|
|
|
+ BackReason: '',
|
|
|
+ ApplyTime: '',
|
|
|
+ AuditDate: '',
|
|
|
+ EnterUserId: '',
|
|
|
+ EnterUserName: '',
|
|
|
+ EnterUserTel: '',
|
|
|
+ SCR: '',
|
|
|
+ SCRQ: '',
|
|
|
+ SCYJ: '',
|
|
|
+ SCJG: '',
|
|
|
+ SPR: '',
|
|
|
+ SPRQ: '',
|
|
|
+ SPYJ: '',
|
|
|
+ SPJG: '',
|
|
|
+ CreateOn: '',
|
|
|
+ CreateUserId: '',
|
|
|
+ CreateBy: '',
|
|
|
+ ModifiedOn: '',
|
|
|
+ ModifiedUserId: '',
|
|
|
+ ModifiedBy: '',
|
|
|
+
|
|
|
+ },
|
|
|
+ tableColumns: [
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: "RecUnitId",
|
|
|
+ label: '推荐单位编码',
|
|
|
+ width: 100,
|
|
|
+ sort: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: "AccessCardNo",
|
|
|
+ label: '准入证号',
|
|
|
+ width: 100,
|
|
|
+ sort: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: "SupplierTypeName",
|
|
|
+ label: '准入类别',
|
|
|
+ width: 100,
|
|
|
+ sort: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: "SupplierName",
|
|
|
+ label: '企业名称',
|
|
|
+ width: 100,
|
|
|
+ sort: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: "ProjectName",
|
|
|
+ label: '工程项目名称',
|
|
|
+ width: 100,
|
|
|
+ sort: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: "Performance",
|
|
|
+ label: '履约执行情况',
|
|
|
+ width: 100,
|
|
|
+ sort: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: "WorkRange",
|
|
|
+ label: '准入范围',
|
|
|
+ width: 100,
|
|
|
+ sort: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: "Status",
|
|
|
+ label: '状态标识',
|
|
|
+ width: 100,
|
|
|
+ sort: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: "OrganCode",
|
|
|
+ label: '组织机构代码',
|
|
|
+ width: 100,
|
|
|
+ sort: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: "ApplyTime",
|
|
|
+ label: '年审日期',
|
|
|
+ width: 100,
|
|
|
+ sort: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: "AuditDate",
|
|
|
+ label: '审核日期',
|
|
|
+ width: 100,
|
|
|
+ sort: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: "EnterUserName",
|
|
|
+ label: '录入员',
|
|
|
+ width: 100,
|
|
|
+ sort: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: "EnterUserTel",
|
|
|
+ label: '录入员电话',
|
|
|
+ width: 100,
|
|
|
+ sort: true
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ prop: "BackReason",
|
|
|
+ label: '退回原因',
|
|
|
+ width: 100,
|
|
|
+ sort: true
|
|
|
+ }
|
|
|
+
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ //查询条件初始值备份
|
|
|
+ Object.assign(this.searchFormReset, this.searchForm)
|
|
|
+ //查询列表
|
|
|
+ this.initDatas()
|
|
|
+ this.getselectsupplier()
|
|
|
+ //this.getDictOptions()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ initDatas() {
|
|
|
+ //分页及列表条件
|
|
|
+ let params = {
|
|
|
+ _currentPage: this.currentPage,
|
|
|
+ _size: this.size,
|
|
|
+ Order: this.Column.Order,
|
|
|
+ Prop: this.Column.Prop,
|
|
|
+ }
|
|
|
+ let myCreateOn = []
|
|
|
+ // 解析时间
|
|
|
+ if (this.CreateOn.length == 2) {
|
|
|
+ this.CreateOn[1].setHours(23)
|
|
|
+ this.CreateOn[1].setMinutes(59)
|
|
|
+ this.CreateOn[1].setSeconds(59)
|
|
|
+ myCreateOn.push(this.formatDateTime(this.CreateOn[0]))
|
|
|
+ myCreateOn.push(this.formatDateTime(this.CreateOn[1]))
|
|
|
+ }
|
|
|
+ //查询条件
|
|
|
+ Object.assign(params, this.searchForm)
|
|
|
+ //访问接口
|
|
|
+ api.getList(myCreateOn.join(','), params, this.$axios).then(res => {
|
|
|
+ this.entityList = res.data.items
|
|
|
+ this.currentItemCount = res.data.currentItemCount
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ supplierchange(value) {
|
|
|
+ let obj = {};
|
|
|
+ obj = this.selectsupplierlist.find((item) => {
|
|
|
+ return item.Id === value;
|
|
|
+ });
|
|
|
+ this.entityForm.SupplierName = obj.Realname
|
|
|
+ },
|
|
|
+ addAnnualAudit() {
|
|
|
+ console.log("----this.entityForm--", this.entityForm)
|
|
|
+ api.addEntity(this.entityForm, this.$axios).then(res => {
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ console.log("--------res.data----",res.data)
|
|
|
+ //保存成功后,初始化数据,变成修改
|
|
|
+ this.entityForm.Id = res.data.item;
|
|
|
+ this.initDatas();
|
|
|
+ this.addshow = false
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message
|
|
|
+ });
|
|
|
+
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ });
|
|
|
+ },
|
|
|
+ addaudit() {
|
|
|
+ this.addshow = true
|
|
|
+ },
|
|
|
+
|
|
|
+ getselectsupplier() {
|
|
|
+ api.getSupList(this.$axios).then(res => {
|
|
|
+ if (res.data.items.length != 0) {
|
|
|
+ for (var i = 0; i < res.data.items.length; i++) {
|
|
|
+ this.selectsupplierlist.push({
|
|
|
+ Id: res.data.items[i].Id,
|
|
|
+ Realname: res.data.items[i].SupplierName
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ getDictOptions() {
|
|
|
+ api.getDictList(this.$axios).then(res => {
|
|
|
+ //this.dictOptions.customerList = res.data.items['customerList']
|
|
|
+ //this.dictOptions.projectList = res.data.items['projectList']
|
|
|
+
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ searchCommand(command) {
|
|
|
+ if (command == 'search') {
|
|
|
+ this.dialogVisible = true
|
|
|
+ } else if (command == 'clear') {
|
|
|
+ this.clearSearch()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //列表排序功能
|
|
|
+ orderby(column) {
|
|
|
+ if (column.order == 'ascending') {
|
|
|
+ this.Column.Order = 'asc'
|
|
|
+ } else if (column.order == 'descending') {
|
|
|
+ this.Column.Order = 'desc'
|
|
|
+ }
|
|
|
+ this.Column.Prop = column.prop
|
|
|
+ this.initDatas()
|
|
|
+ },
|
|
|
+ clearSearch() {
|
|
|
+ Object.assign(this.searchForm, this.searchFormReset);
|
|
|
+ //this.searchForm = this.searchFormReset;
|
|
|
+ this.CreateOn = ''
|
|
|
+ this.initDatas()
|
|
|
+ },
|
|
|
+ handleSearch() {
|
|
|
+ this.currentPage = 1;
|
|
|
+ this.dialogVisible = false;
|
|
|
+ this.initDatas();
|
|
|
+ },
|
|
|
+ handleCurrentChange(value) {
|
|
|
+ this.currentPage = value
|
|
|
+ this.initDatas()
|
|
|
+ },
|
|
|
+ handleSizeChange(value) {
|
|
|
+ this.size = value
|
|
|
+ this.currentPage = 1
|
|
|
+ this.initDatas()
|
|
|
+ },
|
|
|
+ deleteEntity(row) {
|
|
|
+ row.deleteConfirmFlag = false;
|
|
|
+ api.deleteEntity(row.Id, this.$axios).then(res => {
|
|
|
+ if (res.data.code === 0) {
|
|
|
+ this.initDatas();
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: res.data.message
|
|
|
+ });
|
|
|
+
|
|
|
+ } else {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: res.data.message
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+ jstimehandle(val) {
|
|
|
+ if (val === '') {
|
|
|
+ return '----'
|
|
|
+ } else if (val === '0001-01-01T08:00:00+08:00') {
|
|
|
+ return '----'
|
|
|
+ } else if (val === '5000-01-01T23:59:59+08:00') {
|
|
|
+ return '永久'
|
|
|
+ } else {
|
|
|
+ val = val.replace('T', ' ')
|
|
|
+ return val.substring(0, 10)
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ formatDateTime(date) {
|
|
|
+ var y = date.getFullYear();
|
|
|
+ var m = date.getMonth() + 1;
|
|
|
+ m = m < 10 ? ('0' + m) : m;
|
|
|
+ var d = date.getDate();
|
|
|
+ d = d < 10 ? ('0' + d) : d;
|
|
|
+ var h = date.getHours();
|
|
|
+ var minute = date.getMinutes();
|
|
|
+ minute = minute < 10 ? ('0' + minute) : minute;
|
|
|
+ return y + '-' + m + '-' + d + ' ' + h + ':' + minute;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss">
|
|
|
+
|
|
|
+</style>
|