|
@@ -28,7 +28,7 @@
|
|
|
:label="company.name"
|
|
|
:value="company.id"
|
|
|
></el-option>
|
|
|
- </el-select> -->
|
|
|
+ </el-select>-->
|
|
|
<el-select-tree
|
|
|
size="mini"
|
|
|
:props="props"
|
|
@@ -36,9 +36,7 @@
|
|
|
:value="queryModel.parentId"
|
|
|
@getValue="getSelectedValue($event)"
|
|
|
height="200"
|
|
|
- >
|
|
|
- </el-select-tree>
|
|
|
-
|
|
|
+ ></el-select-tree>
|
|
|
<el-checkbox v-model="queryModel.subordinate">是否包含下级单位</el-checkbox>
|
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
@@ -76,58 +74,56 @@
|
|
|
@click="batchImportVisible = true"
|
|
|
>导入</el-button>
|
|
|
</el-row>
|
|
|
- <el-row style="padding-left:5px;">
|
|
|
- <el-table
|
|
|
- :data="tableData"
|
|
|
- style="min-height:400px;"
|
|
|
- v-loading="loading"
|
|
|
- stripe
|
|
|
- :height="tableHeight"
|
|
|
- @sort-change="sortChange"
|
|
|
- @selection-change="handleSelectionChange"
|
|
|
- >
|
|
|
- <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="remark" sort-by="remark_" width="350" label="备注"></el-table-column>
|
|
|
- <el-table-column label="操作" width="350" fixed="right">
|
|
|
- <template slot-scope="{row}">
|
|
|
- <el-row>
|
|
|
- <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-popover
|
|
|
- placement="left"
|
|
|
- width="300"
|
|
|
- trigger="click"
|
|
|
- @show="openQRCode(row)"
|
|
|
- @hide="closeQRCode(row)"
|
|
|
- >
|
|
|
- <div :id="row.id" ref="qrCodeDiv"></div>
|
|
|
- <el-link type="primary" :underline="false" slot="reference">健康公示二维码</el-link>
|
|
|
- </el-popover>
|
|
|
- <span v-if="row.type != null && row.type != ''">
|
|
|
- -
|
|
|
- <el-link type="primary" :underline="false" @click="openDP(row)">大屏网址</el-link>
|
|
|
- </span>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- <el-pagination
|
|
|
- :current-page.sync="pageIndex"
|
|
|
- :total="totalElements"
|
|
|
- :page-sizes="pageSizeList"
|
|
|
- @current-change="changePage"
|
|
|
- @size-change="pageSizeChange"
|
|
|
- layout="total, sizes, prev, pager, next, jumper"
|
|
|
- ></el-pagination>
|
|
|
- </el-row>
|
|
|
+ <el-table
|
|
|
+ ref="formTable"
|
|
|
+ :data="tableData"
|
|
|
+ v-loading="loading"
|
|
|
+ stripe
|
|
|
+ :height="tableHeight"
|
|
|
+ @sort-change="sortChange"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ >
|
|
|
+ <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="remark" sort-by="remark_" width="350" label="备注"></el-table-column>
|
|
|
+ <el-table-column label="操作" width="350" fixed="right">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <el-row>
|
|
|
+ <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-popover
|
|
|
+ placement="left"
|
|
|
+ width="300"
|
|
|
+ trigger="click"
|
|
|
+ @show="openQRCode(row)"
|
|
|
+ @hide="closeQRCode(row)"
|
|
|
+ >
|
|
|
+ <div :id="row.id" ref="qrCodeDiv"></div>
|
|
|
+ <el-link type="primary" :underline="false" slot="reference">健康公示二维码</el-link>
|
|
|
+ </el-popover>
|
|
|
+ <span v-if="row.type != null && row.type != ''">
|
|
|
+ -
|
|
|
+ <el-link type="primary" :underline="false" @click="openDP(row)">大屏网址</el-link>
|
|
|
+ </span>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-pagination
|
|
|
+ :current-page.sync="pageIndex"
|
|
|
+ :total="totalElements"
|
|
|
+ :page-sizes="pageSizeList"
|
|
|
+ @current-change="changePage"
|
|
|
+ @size-change="pageSizeChange"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ ></el-pagination>
|
|
|
<companyInfo-detail
|
|
|
v-if="showModal"
|
|
|
:businessKey="businessKey"
|
|
@@ -220,7 +216,7 @@ export default {
|
|
|
showModal: false,
|
|
|
modalTitle: "",
|
|
|
businessKey: "",
|
|
|
- tableHeight: 400,
|
|
|
+ tableHeight: "",
|
|
|
showDeviceModal: false,
|
|
|
companyId: "",
|
|
|
qrCode: "",
|
|
@@ -241,13 +237,10 @@ export default {
|
|
|
headers: {
|
|
|
Authorization: getToken()
|
|
|
},
|
|
|
- xlsLoading:false,
|
|
|
- }
|
|
|
+ xlsLoading: false
|
|
|
+ };
|
|
|
},
|
|
|
created() {
|
|
|
- this.tableHeight = window.innerHeight - 320;
|
|
|
- this.treeHeight = window.innerHeight - 200;
|
|
|
-
|
|
|
var self = this;
|
|
|
|
|
|
companyInfoApi.list().then(function(response) {
|
|
@@ -267,13 +260,12 @@ export default {
|
|
|
loadTree() {
|
|
|
var formData = new FormData();
|
|
|
|
|
|
- companyInfoApi.loadChildren(formData).then((resp)=>{
|
|
|
+ companyInfoApi.loadChildren(formData).then(resp => {
|
|
|
var jsonData = resp.data;
|
|
|
|
|
|
- if(jsonData.result){
|
|
|
+ if (jsonData.result) {
|
|
|
this.treeData = jsonData.data;
|
|
|
- }
|
|
|
- else{
|
|
|
+ } else {
|
|
|
this.$message.error(jsonData.message + "");
|
|
|
}
|
|
|
});
|
|
@@ -284,13 +276,12 @@ export default {
|
|
|
var formData = new FormData();
|
|
|
formData.append("parentId", tree.id);
|
|
|
|
|
|
- companyInfoApi.loadChildren(formData).then((resp)=>{
|
|
|
+ companyInfoApi.loadChildren(formData).then(resp => {
|
|
|
var jsonData = resp.data;
|
|
|
|
|
|
- if(jsonData.result){
|
|
|
+ if (jsonData.result) {
|
|
|
resolve(jsonData.data);
|
|
|
- }
|
|
|
- else{
|
|
|
+ } else {
|
|
|
this.$message.error(jsonData.message + "");
|
|
|
}
|
|
|
});
|
|
@@ -328,8 +319,10 @@ export default {
|
|
|
self.tableData = jsonData.data;
|
|
|
self.totalPages = jsonData.totalPages;
|
|
|
self.totalElements = jsonData.recordsTotal;
|
|
|
-
|
|
|
- //self.tableHeight = window.innerHeight - 280;
|
|
|
+ //45为分页栏的高度
|
|
|
+ //页面高度-列表上面的高度-分页栏高度
|
|
|
+ self.tableHeight =
|
|
|
+ window.innerHeight - self.$refs.formTable.$el.offsetTop - 45;
|
|
|
})
|
|
|
.catch(error => {
|
|
|
self.loading = false;
|
|
@@ -450,11 +443,13 @@ export default {
|
|
|
var companyId = record.id;
|
|
|
var type = record.type;
|
|
|
var dpUrl = record.wallUrl;
|
|
|
- if(dpUrl == "" || dpUrl == null){
|
|
|
+ if (dpUrl == "" || dpUrl == null) {
|
|
|
if ("1" == type) {
|
|
|
//企业版
|
|
|
dpUrl =
|
|
|
- process.env.VUE_APP_COMPANY_HEALTH_QY_URL + "?companyId=" + companyId;
|
|
|
+ process.env.VUE_APP_COMPANY_HEALTH_QY_URL +
|
|
|
+ "?companyId=" +
|
|
|
+ companyId;
|
|
|
} else if ("2" == type) {
|
|
|
//校园版
|
|
|
dpUrl =
|
|
@@ -464,11 +459,13 @@ export default {
|
|
|
} else {
|
|
|
//企业版
|
|
|
dpUrl =
|
|
|
- process.env.VUE_APP_COMPANY_HEALTH_QY_URL + "?companyId=" + companyId;
|
|
|
+ process.env.VUE_APP_COMPANY_HEALTH_QY_URL +
|
|
|
+ "?companyId=" +
|
|
|
+ companyId;
|
|
|
}
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
//填写了固定地址wallUrl
|
|
|
- dpUrl = dpUrl + "?companyId=" + companyId;
|
|
|
+ dpUrl = dpUrl + "?companyId=" + companyId;
|
|
|
}
|
|
|
window.open(dpUrl);
|
|
|
},
|
|
@@ -526,11 +523,9 @@ export default {
|
|
|
files.length
|
|
|
} 个文件,共选择了 ${files.length + fileList.length} 个文件`
|
|
|
);
|
|
|
- },
|
|
|
- },
|
|
|
- mounted: function() {
|
|
|
-
|
|
|
+ }
|
|
|
},
|
|
|
+ mounted: function() {},
|
|
|
components: {
|
|
|
"companyInfo-detail": companyInfoDetail,
|
|
|
"companyDeviceRelation-list": companyDeviceRelationList,
|