|
@@ -1,16 +1,21 @@
|
|
<template>
|
|
<template>
|
|
- <div style="padding-left:5px;">
|
|
|
|
|
|
+ <div style="padding-left: 5px">
|
|
<el-breadcrumb separator=">">
|
|
<el-breadcrumb separator=">">
|
|
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
|
<el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>
|
|
<el-breadcrumb-item>
|
|
<el-breadcrumb-item>
|
|
- <a href="#">系统管理</a>
|
|
|
|
|
|
+ <a href="#">基础信息管理</a>
|
|
</el-breadcrumb-item>
|
|
</el-breadcrumb-item>
|
|
<el-breadcrumb-item>
|
|
<el-breadcrumb-item>
|
|
<a href="/companyInfo">单位管理</a>
|
|
<a href="/companyInfo">单位管理</a>
|
|
</el-breadcrumb-item>
|
|
</el-breadcrumb-item>
|
|
</el-breadcrumb>
|
|
</el-breadcrumb>
|
|
<el-divider></el-divider>
|
|
<el-divider></el-divider>
|
|
- <el-form ref="queryForm" :model="queryModel" inline class="demo-form-inline">
|
|
|
|
|
|
+ <el-form
|
|
|
|
+ ref="queryForm"
|
|
|
|
+ :model="queryModel"
|
|
|
|
+ inline
|
|
|
|
+ class="demo-form-inline"
|
|
|
|
+ >
|
|
<el-form-item label="单位名称" prop="name">
|
|
<el-form-item label="单位名称" prop="name">
|
|
<el-input type="text" size="mini" v-model="queryModel.name"></el-input>
|
|
<el-input type="text" size="mini" v-model="queryModel.name"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -35,9 +40,61 @@
|
|
:options="companyResult"
|
|
:options="companyResult"
|
|
v-model="queryModel.parentId"
|
|
v-model="queryModel.parentId"
|
|
height="200"
|
|
height="200"
|
|
- ></el-select-tree>
|
|
|
|
- <el-checkbox v-model="queryModel.subordinate">是否包含下级单位</el-checkbox>
|
|
|
|
|
|
+ ></el-select-tree
|
|
|
|
+ >
|
|
|
|
+ <el-checkbox v-model="queryModel.subordinate"
|
|
|
|
+ >是否包含下级单位</el-checkbox
|
|
|
|
+ >
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-form-item label="适用场景" prop="sceneId">
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="queryModel.sceneId"
|
|
|
|
+ filterable
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ style="width: 110px"
|
|
|
|
+ size="mini"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="result in sceneData"
|
|
|
|
+ :key="result.id"
|
|
|
|
+ :label="result.sceneName"
|
|
|
|
+ :value="result.id"
|
|
|
|
+ ></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="单位性质" prop="unitType">
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="queryModel.unitType"
|
|
|
|
+ filterable
|
|
|
|
+ clearable
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ style="width: 110px"
|
|
|
|
+ size="mini"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="result in typeData"
|
|
|
|
+ :key="result.id"
|
|
|
|
+ :label="result.name"
|
|
|
|
+ :value="result.value"
|
|
|
|
+ ></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <!-- <el-form-item label="服务场景" prop="type">
|
|
|
|
+ <el-select
|
|
|
|
+ v-model="queryModel.type"
|
|
|
|
+ filterable
|
|
|
|
+ placeholder="请选择"
|
|
|
|
+ style="width: 110px"
|
|
|
|
+ size="mini"
|
|
|
|
+ >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="result in sceneData"
|
|
|
|
+ :key="result.id"
|
|
|
|
+ :label="result.sceneName"
|
|
|
|
+ :value="result.id"
|
|
|
|
+ ></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item> -->
|
|
<el-form-item>
|
|
<el-form-item>
|
|
<el-button
|
|
<el-button
|
|
type="primary"
|
|
type="primary"
|
|
@@ -45,33 +102,44 @@
|
|
icon="ios-search"
|
|
icon="ios-search"
|
|
@click="changePage(1)"
|
|
@click="changePage(1)"
|
|
:loading="loading"
|
|
:loading="loading"
|
|
- >查询</el-button>
|
|
|
|
|
|
+ >查询</el-button
|
|
|
|
+ >
|
|
<el-button
|
|
<el-button
|
|
type="info"
|
|
type="info"
|
|
size="mini"
|
|
size="mini"
|
|
style="margin-left: 8px"
|
|
style="margin-left: 8px"
|
|
@click="handleReset('queryForm')"
|
|
@click="handleReset('queryForm')"
|
|
- >重置</el-button>
|
|
|
|
|
|
+ >重置</el-button
|
|
|
|
+ >
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<el-divider></el-divider>
|
|
<el-divider></el-divider>
|
|
<el-row class="button-group">
|
|
<el-row class="button-group">
|
|
- <el-button type="primary" size="small" plain icon="el-icon-circle-plus" @click="handleAdd">新增</el-button>
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ type="primary"
|
|
|
|
+ size="small"
|
|
|
|
+ plain
|
|
|
|
+ icon="el-icon-circle-plus"
|
|
|
|
+ @click="handleAdd"
|
|
|
|
+ >新增</el-button
|
|
|
|
+ >
|
|
<el-button
|
|
<el-button
|
|
type="primary"
|
|
type="primary"
|
|
size="small"
|
|
size="small"
|
|
plain
|
|
plain
|
|
icon="el-icon-remove"
|
|
icon="el-icon-remove"
|
|
- :disabled="multipleSelection.length==0"
|
|
|
|
|
|
+ :disabled="multipleSelection.length == 0"
|
|
@click="handleBatchDelete"
|
|
@click="handleBatchDelete"
|
|
- >删除选中项</el-button>
|
|
|
|
|
|
+ >删除选中项</el-button
|
|
|
|
+ >
|
|
<el-button
|
|
<el-button
|
|
type="primary"
|
|
type="primary"
|
|
size="small"
|
|
size="small"
|
|
plain
|
|
plain
|
|
icon="el-icon-upload2"
|
|
icon="el-icon-upload2"
|
|
@click="batchImportVisible = true"
|
|
@click="batchImportVisible = true"
|
|
- >导入</el-button>
|
|
|
|
|
|
+ >导入</el-button
|
|
|
|
+ >
|
|
</el-row>
|
|
</el-row>
|
|
<el-table
|
|
<el-table
|
|
ref="formTable"
|
|
ref="formTable"
|
|
@@ -83,20 +151,86 @@
|
|
@selection-change="handleSelectionChange"
|
|
@selection-change="handleSelectionChange"
|
|
>
|
|
>
|
|
<el-table-column type="selection" width="55"></el-table-column>
|
|
<el-table-column type="selection" width="55"></el-table-column>
|
|
- <el-table-column prop="sortNo" label="序号" width="120"></el-table-column>
|
|
|
|
- <el-table-column prop="name" label="单位名称" width="230"></el-table-column>
|
|
|
|
- <el-table-column prop="shortName" label="简称" width="120"></el-table-column>
|
|
|
|
- <el-table-column prop="parentName" label="上级单位" width="230"></el-table-column>
|
|
|
|
- <el-table-column prop="typeN" label="性质" width="80"></el-table-column>
|
|
|
|
- <el-table-column prop="sceneName" label="场景值" width="90"></el-table-column>
|
|
|
|
- <el-table-column prop="remark" sort-by="remark_" width="350" label="备注"></el-table-column>
|
|
|
|
- <el-table-column label="操作" width="350" fixed="right">
|
|
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="parentName"
|
|
|
|
+ label="上级单位"
|
|
|
|
+ width="200"
|
|
|
|
+ ></el-table-column>
|
|
|
|
+ <el-table-column prop="sortNo" label="本级" width="100"></el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="name"
|
|
|
|
+ label="单位名称"
|
|
|
|
+ width="200"
|
|
|
|
+ ></el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="fullName"
|
|
|
|
+ label="全称"
|
|
|
|
+ width="120"
|
|
|
|
+ ></el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="unitTypeName"
|
|
|
|
+ label="单位性质"
|
|
|
|
+ width="120"
|
|
|
|
+ ></el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="sceneName"
|
|
|
|
+ label="场景值"
|
|
|
|
+ width="90"
|
|
|
|
+ ></el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="typeName"
|
|
|
|
+ label="服务场景"
|
|
|
|
+ width="90"
|
|
|
|
+ ></el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="regionName"
|
|
|
|
+ label="地区"
|
|
|
|
+ width="90"
|
|
|
|
+ ></el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="typeName"
|
|
|
|
+ label="单位类别"
|
|
|
|
+ width="90"
|
|
|
|
+ ></el-table-column>
|
|
|
|
+ <el-table-column
|
|
|
|
+ prop="remark"
|
|
|
|
+ sort-by="remark_"
|
|
|
|
+ width="350"
|
|
|
|
+ label="备注"
|
|
|
|
+ ></el-table-column>
|
|
|
|
+ <el-table-column prop="isMobilePayment" label="手机支付" >
|
|
<template slot-scope="{row}">
|
|
<template slot-scope="{row}">
|
|
|
|
+ <el-switch
|
|
|
|
+ v-if="row.isAdmin"
|
|
|
|
+ v-model="row.isMobilePayment"
|
|
|
|
+ active-color="#13ce66"
|
|
|
|
+ inactive-color="#ff4949"
|
|
|
|
+ @change="handlChange(row)">
|
|
|
|
+ </el-switch>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="操作" width="350" fixed="right">
|
|
|
|
+ <template slot-scope="{ row }">
|
|
<el-row>
|
|
<el-row>
|
|
<el-col>
|
|
<el-col>
|
|
- <el-link type="primary" :underline="false" @click="handleEdit(row)">编辑</el-link>-
|
|
|
|
- <el-link type="danger" :underline="false" @click="handleDelete(row)">删除</el-link>-
|
|
|
|
- <el-link type="primary" :underline="false" @click="bindDevice(row)">绑定设备</el-link>-
|
|
|
|
|
|
+ <el-link
|
|
|
|
+ type="primary"
|
|
|
|
+ :underline="false"
|
|
|
|
+ @click="handleEdit(row)"
|
|
|
|
+ >编辑</el-link
|
|
|
|
+ >-
|
|
|
|
+ <el-link
|
|
|
|
+ type="danger"
|
|
|
|
+ :underline="false"
|
|
|
|
+ @click="handleDelete(row)"
|
|
|
|
+ >删除</el-link
|
|
|
|
+ >-
|
|
|
|
+ <el-link
|
|
|
|
+ type="primary"
|
|
|
|
+ :underline="false"
|
|
|
|
+ @click="bindDevice(row)"
|
|
|
|
+ >绑定设备</el-link
|
|
|
|
+ >-
|
|
<el-popover
|
|
<el-popover
|
|
placement="left"
|
|
placement="left"
|
|
width="300"
|
|
width="300"
|
|
@@ -104,11 +238,18 @@
|
|
@show="openQRCode(row)"
|
|
@show="openQRCode(row)"
|
|
@hide="closeQRCode(row)"
|
|
@hide="closeQRCode(row)"
|
|
>
|
|
>
|
|
- <div :ref="'qrcode_' + row.id" style="width:300px;height:300px;"></div>
|
|
|
|
- <el-link type="primary" :underline="false" slot="reference">健康公示二维码</el-link>
|
|
|
|
- </el-popover>-
|
|
|
|
|
|
+ <div
|
|
|
|
+ :ref="'qrcode_' + row.id"
|
|
|
|
+ style="width: 300px; height: 300px"
|
|
|
|
+ ></div>
|
|
|
|
+ <el-link type="primary" :underline="false" slot="reference"
|
|
|
|
+ >健康公示二维码</el-link
|
|
|
|
+ > </el-popover
|
|
|
|
+ >-
|
|
<span v-if="row.type != null && row.type != ''">
|
|
<span v-if="row.type != null && row.type != ''">
|
|
- <el-link type="primary" :underline="false" @click="openDP(row)">大屏网址</el-link>
|
|
|
|
|
|
+ <el-link type="primary" :underline="false" @click="openDP(row)"
|
|
|
|
+ >大屏网址</el-link
|
|
|
|
+ >
|
|
</span>
|
|
</span>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
@@ -138,7 +279,7 @@
|
|
title="导入"
|
|
title="导入"
|
|
:visible.sync="batchImportVisible"
|
|
:visible.sync="batchImportVisible"
|
|
:modal-append-to-body="false"
|
|
:modal-append-to-body="false"
|
|
- style="text-align: left;"
|
|
|
|
|
|
+ style="text-align: left"
|
|
:close-on-click-modal="false"
|
|
:close-on-click-modal="false"
|
|
>
|
|
>
|
|
<el-form label-width="150px">
|
|
<el-form label-width="150px">
|
|
@@ -147,7 +288,8 @@
|
|
href="http://rccs.oss-cn-hangzhou.aliyuncs.com/smart/companyInfo/2020/4/13111357680.xls"
|
|
href="http://rccs.oss-cn-hangzhou.aliyuncs.com/smart/companyInfo/2020/4/13111357680.xls"
|
|
type="primary"
|
|
type="primary"
|
|
target="_blank"
|
|
target="_blank"
|
|
- >点击下载模板</el-link>
|
|
|
|
|
|
+ >点击下载模板</el-link
|
|
|
|
+ >
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="上传文件">
|
|
<el-form-item label="上传文件">
|
|
<el-upload
|
|
<el-upload
|
|
@@ -167,13 +309,19 @@
|
|
:on-success="handleBatchImportSuccess"
|
|
:on-success="handleBatchImportSuccess"
|
|
:file-list="batchImportFileList"
|
|
:file-list="batchImportFileList"
|
|
>
|
|
>
|
|
- <el-button size="small" type="primary" :loading="xlsLoading">点击上传</el-button>
|
|
|
|
- <div slot="tip" class="el-upload__tip">只能上传xls文件,且不超过500kb</div>
|
|
|
|
|
|
+ <el-button size="small" type="primary" :loading="xlsLoading"
|
|
|
|
+ >点击上传</el-button
|
|
|
|
+ >
|
|
|
|
+ <div slot="tip" class="el-upload__tip">
|
|
|
|
+ 只能上传xls文件,且不超过500kb
|
|
|
|
+ </div>
|
|
</el-upload>
|
|
</el-upload>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<div slot="footer" class="dialog-footer">
|
|
- <el-button type="primary" @click="batchImportVisible = false">关 闭</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="batchImportVisible = false"
|
|
|
|
+ >关 闭</el-button
|
|
|
|
+ >
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
<!--批量导入E-->
|
|
<!--批量导入E-->
|
|
@@ -184,6 +332,8 @@ import Constant from "@/constant";
|
|
import companyInfoDetail from "./companyInfo-detail";
|
|
import companyInfoDetail from "./companyInfo-detail";
|
|
import companyDeviceRelationList from "./companyDeviceRelation-list";
|
|
import companyDeviceRelationList from "./companyDeviceRelation-list";
|
|
import companyInfoApi from "@/api/base/companyInfo";
|
|
import companyInfoApi from "@/api/base/companyInfo";
|
|
|
|
+import dataDictionaryApi from "@/api/sys/dataDictionary";
|
|
|
|
+import sceneInfoApi from "@/api/base/sceneInfo";
|
|
import SelectTree from "@/components/SelectTree";
|
|
import SelectTree from "@/components/SelectTree";
|
|
import QRCode from "qrcodejs2";
|
|
import QRCode from "qrcodejs2";
|
|
|
|
|
|
@@ -200,7 +350,10 @@ export default {
|
|
queryModel: {
|
|
queryModel: {
|
|
name: "",
|
|
name: "",
|
|
parentId: "",
|
|
parentId: "",
|
|
- subordinate: false
|
|
|
|
|
|
+ subordinate: false,
|
|
|
|
+ sceneId: "",
|
|
|
|
+ type: "",
|
|
|
|
+ unitType:""
|
|
},
|
|
},
|
|
loading: false,
|
|
loading: false,
|
|
tableData: [],
|
|
tableData: [],
|
|
@@ -225,31 +378,45 @@ export default {
|
|
// 配置项(必选)
|
|
// 配置项(必选)
|
|
value: "id",
|
|
value: "id",
|
|
label: "name",
|
|
label: "name",
|
|
- children: "children"
|
|
|
|
|
|
+ children: "children",
|
|
},
|
|
},
|
|
batchImportVisible: false,
|
|
batchImportVisible: false,
|
|
batchImportFileList: [],
|
|
batchImportFileList: [],
|
|
uploadUrlXls: Constant.serverUrl + "/base/companyInfo/importXls",
|
|
uploadUrlXls: Constant.serverUrl + "/base/companyInfo/importXls",
|
|
uploadXlsData: {
|
|
uploadXlsData: {
|
|
subFolder: "company",
|
|
subFolder: "company",
|
|
- companyId: ""
|
|
|
|
|
|
+ companyId: "",
|
|
},
|
|
},
|
|
headers: {
|
|
headers: {
|
|
- Authorization: getToken()
|
|
|
|
|
|
+ Authorization: getToken(),
|
|
},
|
|
},
|
|
- xlsLoading: false
|
|
|
|
|
|
+ xlsLoading: false,
|
|
|
|
+ sceneData: [],
|
|
|
|
+ typeData:[]
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
var self = this;
|
|
var self = this;
|
|
|
|
|
|
- companyInfoApi.list().then(function(response) {
|
|
|
|
|
|
+ sceneInfoApi.list().then((response) => {
|
|
|
|
+ var jsonData = response.data;
|
|
|
|
+ this.sceneData = jsonData.data;
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ companyInfoApi.treeList().then(function (response) {
|
|
var jsonData = response.data;
|
|
var jsonData = response.data;
|
|
if (jsonData.result) {
|
|
if (jsonData.result) {
|
|
self.companyResult = jsonData.data;
|
|
self.companyResult = jsonData.data;
|
|
}
|
|
}
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ var formData = new FormData();
|
|
|
|
+ formData.append("catalogName", "单位性质");
|
|
|
|
+ dataDictionaryApi.findByCatalogName(formData).then((response) => {
|
|
|
|
+ var jsonData = response.data;
|
|
|
|
+ this.typeData = jsonData.data;
|
|
|
|
+ });
|
|
|
|
+
|
|
this.changePage(1);
|
|
this.changePage(1);
|
|
this.loadTree();
|
|
this.loadTree();
|
|
},
|
|
},
|
|
@@ -258,9 +425,7 @@ export default {
|
|
this.queryModel.parentId = value;
|
|
this.queryModel.parentId = value;
|
|
},
|
|
},
|
|
loadTree() {
|
|
loadTree() {
|
|
- var formData = new FormData();
|
|
|
|
-
|
|
|
|
- companyInfoApi.loadChildren(formData).then(resp => {
|
|
|
|
|
|
+ companyInfoApi.treeList().then((resp) => {
|
|
var jsonData = resp.data;
|
|
var jsonData = resp.data;
|
|
|
|
|
|
if (jsonData.result) {
|
|
if (jsonData.result) {
|
|
@@ -276,7 +441,7 @@ export default {
|
|
var formData = new FormData();
|
|
var formData = new FormData();
|
|
formData.append("parentId", tree.id);
|
|
formData.append("parentId", tree.id);
|
|
|
|
|
|
- companyInfoApi.loadChildren(formData).then(resp => {
|
|
|
|
|
|
+ companyInfoApi.loadChildren(formData).then((resp) => {
|
|
var jsonData = resp.data;
|
|
var jsonData = resp.data;
|
|
|
|
|
|
if (jsonData.result) {
|
|
if (jsonData.result) {
|
|
@@ -297,10 +462,26 @@ export default {
|
|
formData.append("pageIndex", self.pageIndex);
|
|
formData.append("pageIndex", self.pageIndex);
|
|
formData.append("pageSize", self.pageSize);
|
|
formData.append("pageSize", self.pageSize);
|
|
|
|
|
|
- formData.append("name", self.queryModel.name);
|
|
|
|
- formData.append("parentId", self.queryModel.parentId);
|
|
|
|
|
|
+ if (self.queryModel.name != null) {
|
|
|
|
+ formData.append("name", self.queryModel.name);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ if (self.queryModel.parentId != null) {
|
|
|
|
+ formData.append("parentId", self.queryModel.parentId);
|
|
|
|
+ }
|
|
|
|
+
|
|
formData.append("subordinate", self.queryModel.subordinate);
|
|
formData.append("subordinate", self.queryModel.subordinate);
|
|
|
|
|
|
|
|
+ if (self.queryModel.sceneId != null) {
|
|
|
|
+ formData.append("sceneId", self.queryModel.sceneId);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ formData.append("unitType", self.queryModel.unitType);
|
|
|
|
+
|
|
|
|
+ // if (self.queryModel.type != null) {
|
|
|
|
+ // formData.append("type", self.queryModel.type);
|
|
|
|
+ // }
|
|
|
|
+
|
|
if (this.field != null) {
|
|
if (this.field != null) {
|
|
formData.append("field", this.field);
|
|
formData.append("field", this.field);
|
|
}
|
|
}
|
|
@@ -311,7 +492,7 @@ export default {
|
|
|
|
|
|
companyInfoApi
|
|
companyInfoApi
|
|
.pageList(formData)
|
|
.pageList(formData)
|
|
- .then(function(response) {
|
|
|
|
|
|
+ .then(function (response) {
|
|
self.loading = false;
|
|
self.loading = false;
|
|
|
|
|
|
var jsonData = response.data.data;
|
|
var jsonData = response.data.data;
|
|
@@ -322,9 +503,9 @@ export default {
|
|
//45为分页栏的高度
|
|
//45为分页栏的高度
|
|
//页面高度-列表上面的高度-分页栏高度
|
|
//页面高度-列表上面的高度-分页栏高度
|
|
self.tableHeight =
|
|
self.tableHeight =
|
|
- window.innerHeight - self.$refs.formTable.$el.offsetTop - 45;
|
|
|
|
|
|
+ window.innerHeight - self.$refs.formTable.$el.offsetTop - 100;
|
|
})
|
|
})
|
|
- .catch(error => {
|
|
|
|
|
|
+ .catch((error) => {
|
|
self.loading = false;
|
|
self.loading = false;
|
|
// self.$message.error(error + "");
|
|
// self.$message.error(error + "");
|
|
});
|
|
});
|
|
@@ -334,7 +515,7 @@ export default {
|
|
},
|
|
},
|
|
sortChange(data) {
|
|
sortChange(data) {
|
|
this.field = data.column.field;
|
|
this.field = data.column.field;
|
|
- this.direction = data.order;
|
|
|
|
|
|
+ this.direction = data.order == "ascending" ? "asc" : "desc";
|
|
|
|
|
|
this.changePage(this.pageIndex);
|
|
this.changePage(this.pageIndex);
|
|
},
|
|
},
|
|
@@ -361,10 +542,10 @@ export default {
|
|
.$confirm("是否确认删除?", "提示", {
|
|
.$confirm("是否确认删除?", "提示", {
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
- type: "warning"
|
|
|
|
|
|
+ type: "warning",
|
|
})
|
|
})
|
|
.then(() => {
|
|
.then(() => {
|
|
- companyInfoApi.remove(record.id).then(function(response) {
|
|
|
|
|
|
+ companyInfoApi.remove(record.id).then(function (response) {
|
|
var jsonData = response.data;
|
|
var jsonData = response.data;
|
|
|
|
|
|
if (jsonData.result) {
|
|
if (jsonData.result) {
|
|
@@ -374,7 +555,7 @@ export default {
|
|
|
|
|
|
self.$message({
|
|
self.$message({
|
|
type: "success",
|
|
type: "success",
|
|
- message: "删除成功!"
|
|
|
|
|
|
+ message: "删除成功!",
|
|
});
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -383,16 +564,16 @@ export default {
|
|
handleBatchDelete() {
|
|
handleBatchDelete() {
|
|
var self = this;
|
|
var self = this;
|
|
|
|
|
|
- var idList = this.multipleSelection.map(record => {
|
|
|
|
|
|
+ var idList = this.multipleSelection.map((record) => {
|
|
return record.id;
|
|
return record.id;
|
|
});
|
|
});
|
|
|
|
|
|
this.$confirm("是否确认删除选中项?", "提示", {
|
|
this.$confirm("是否确认删除选中项?", "提示", {
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
- type: "warning"
|
|
|
|
|
|
+ type: "warning",
|
|
}).then(() => {
|
|
}).then(() => {
|
|
- companyInfoApi.batchRemove(idList).then(function(response) {
|
|
|
|
|
|
+ companyInfoApi.batchRemove(idList).then(function (response) {
|
|
var jsonData = response.data;
|
|
var jsonData = response.data;
|
|
|
|
|
|
if (jsonData.result) {
|
|
if (jsonData.result) {
|
|
@@ -400,7 +581,7 @@ export default {
|
|
|
|
|
|
self.$message({
|
|
self.$message({
|
|
type: "success",
|
|
type: "success",
|
|
- message: "删除成功!"
|
|
|
|
|
|
+ message: "删除成功!",
|
|
});
|
|
});
|
|
}
|
|
}
|
|
});
|
|
});
|
|
@@ -452,7 +633,7 @@ export default {
|
|
height: 300,
|
|
height: 300,
|
|
colorDark: "#333333", //二维码颜色
|
|
colorDark: "#333333", //二维码颜色
|
|
colorLight: "#ffffff", //二维码背景色
|
|
colorLight: "#ffffff", //二维码背景色
|
|
- correctLevel: QRCode.CorrectLevel.L //容错率,L/M/H
|
|
|
|
|
|
+ correctLevel: QRCode.CorrectLevel.L, //容错率,L/M/H
|
|
});
|
|
});
|
|
},
|
|
},
|
|
closeQRCode(record) {
|
|
closeQRCode(record) {
|
|
@@ -518,7 +699,7 @@ export default {
|
|
message:
|
|
message:
|
|
response.message +
|
|
response.message +
|
|
`,<a href="${response.data}" target="_blank">点击下载未导入的数据报表</a> `,
|
|
`,<a href="${response.data}" target="_blank">点击下载未导入的数据报表</a> `,
|
|
- duration: 30000
|
|
|
|
|
|
+ duration: 30000,
|
|
});
|
|
});
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -538,18 +719,40 @@ export default {
|
|
//批量导入-文件超出个数限制时的钩子
|
|
//批量导入-文件超出个数限制时的钩子
|
|
handleBatchImportExceed(files, fileList) {
|
|
handleBatchImportExceed(files, fileList) {
|
|
this.$message.warning(
|
|
this.$message.warning(
|
|
- `当前限制选择 3 个文件,本次选择了 ${
|
|
|
|
- files.length
|
|
|
|
- } 个文件,共选择了 ${files.length + fileList.length} 个文件`
|
|
|
|
|
|
+ `当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${
|
|
|
|
+ files.length + fileList.length
|
|
|
|
+ } 个文件`
|
|
);
|
|
);
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ handlChange(record){
|
|
|
|
+
|
|
|
|
+ var self = this;
|
|
|
|
+ var formData = new FormData();
|
|
|
|
+ self.loading = true;
|
|
|
|
+
|
|
|
|
+ formData.append("id", record.id);
|
|
|
|
+ formData.append("isMobilePayment", record.isMobilePayment);
|
|
|
|
+
|
|
|
|
+ companyInfoApi.isOpenMobilePayment(formData).then(function (response) {
|
|
|
|
+ var jsonData = response.data;
|
|
|
|
+ self.loading = false;
|
|
|
|
+ if (jsonData.result) {
|
|
|
|
+ self.changePage(self.pageIndex);
|
|
|
|
+ }
|
|
|
|
+ else{
|
|
|
|
+ self.$message.error(jsonData.message + "");
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- mounted: function() {},
|
|
|
|
|
|
+ mounted: function () {},
|
|
components: {
|
|
components: {
|
|
"companyInfo-detail": companyInfoDetail,
|
|
"companyInfo-detail": companyInfoDetail,
|
|
"companyDeviceRelation-list": companyDeviceRelationList,
|
|
"companyDeviceRelation-list": companyDeviceRelationList,
|
|
- "el-select-tree": SelectTree
|
|
|
|
- }
|
|
|
|
|
|
+ "el-select-tree": SelectTree,
|
|
|
|
+ },
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|