|
|
@@ -3,10 +3,7 @@
|
|
|
<div class="grid-container">
|
|
|
<div class="grid-item-1">
|
|
|
<div>
|
|
|
- <Navbar
|
|
|
- :title="$t('lang.AssetDetailList.assetList')"
|
|
|
- :is-go-back="false"
|
|
|
- />
|
|
|
+ <Navbar :title="$t('lang.AssetDetailList.assetList')" :is-go-back="false" />
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
@@ -15,11 +12,7 @@
|
|
|
<button type="button" class="btn btn-success" @click="getAsset">
|
|
|
{{ $t("lang.AssetDetailList.search") }}
|
|
|
</button>
|
|
|
- <button
|
|
|
- type="button"
|
|
|
- class="btn btn-info"
|
|
|
- @click="openFieldSelectModal"
|
|
|
- >
|
|
|
+ <button type="button" class="btn btn-info" @click="openFieldSelectModal">
|
|
|
{{ $t("lang.AssetDetailList.export") }}
|
|
|
</button>
|
|
|
<button type="button" class="btn btn-danger" @click="clearFilter">
|
|
|
@@ -31,78 +24,51 @@
|
|
|
|
|
|
<div class="grid-item-4">
|
|
|
<div class="panel panel-default m-panel">
|
|
|
- <div
|
|
|
- class="panel-heading"
|
|
|
- @click="type == 1 ? (type = 0) : (type = 1)"
|
|
|
- >
|
|
|
+ <div class="panel-heading" @click="type == 1 ? (type = 0) : (type = 1)">
|
|
|
{{ $t("lang.AssetDetailList.ownerDepartment") }}
|
|
|
</div>
|
|
|
<div v-show="type == 1" class="panel-body">
|
|
|
<div class="m-tree">
|
|
|
- <ClientOrganizationTree
|
|
|
- ref="organization"
|
|
|
- @select-changed="selectChanged"
|
|
|
- />
|
|
|
+ <ClientOrganizationTree ref="organization" @select-changed="selectChanged" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div class="panel panel-default m-panel">
|
|
|
- <div
|
|
|
- class="panel-heading"
|
|
|
- @click="type == 3 ? (type = 0) : (type = 3)"
|
|
|
- >
|
|
|
+ <div class="panel-heading" @click="type == 3 ? (type = 0) : (type = 3)">
|
|
|
{{ $t("lang.AssetDetailList.useDepartment") }}
|
|
|
</div>
|
|
|
<div v-show="type == 3" class="panel-body">
|
|
|
<div class="m-tree">
|
|
|
- <ClientOrganizationTree
|
|
|
- ref="responseOrganization"
|
|
|
- @select-changed="selectChanged"
|
|
|
- />
|
|
|
+ <ClientOrganizationTree ref="responseOrganization" @select-changed="selectChanged" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div class="panel panel-default m-panel">
|
|
|
- <div
|
|
|
- class="panel-heading"
|
|
|
- @click="type == 2 ? (type = 0) : (type = 2)"
|
|
|
- >
|
|
|
+ <div class="panel-heading" @click="type == 2 ? (type = 0) : (type = 2)">
|
|
|
{{ $t("lang.AssetDetailList.assetCategory") }}
|
|
|
</div>
|
|
|
<div v-show="type == 2" class="panel-body">
|
|
|
<div class="m-tree">
|
|
|
- <AssetCategoryTree
|
|
|
- ref="assetCategory"
|
|
|
- @select-changed="selectChanged"
|
|
|
- />
|
|
|
+ <AssetCategoryTree ref="assetCategory" @select-changed="selectChanged" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div class="panel panel-default m-panel">
|
|
|
- <div
|
|
|
- class="panel-heading"
|
|
|
- @click="type == 5 ? (type = 0) : (type = 5)"
|
|
|
- >
|
|
|
+ <div class="panel-heading" @click="type == 5 ? (type = 0) : (type = 5)">
|
|
|
{{ $t("lang.AssetDetailList.projectSelection") }}
|
|
|
</div>
|
|
|
<div v-show="type == 5" class="panel-body">
|
|
|
<div class="m-tree">
|
|
|
- <ProjectItemTree
|
|
|
- ref="projectItem"
|
|
|
- @select-changed="selectChanged"
|
|
|
- />
|
|
|
+ <ProjectItemTree ref="projectItem" @select-changed="selectChanged" />
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
<div class="panel panel-default m-panel">
|
|
|
- <div
|
|
|
- class="panel-heading"
|
|
|
- @click="type == 4 ? (type = 0) : (type = 4)"
|
|
|
- >
|
|
|
+ <div class="panel-heading" @click="type == 4 ? (type = 0) : (type = 4)">
|
|
|
{{ $t("lang.AssetDetailList.other") }}
|
|
|
</div>
|
|
|
<div v-show="type == 4" class="panel-body">
|
|
|
@@ -127,22 +93,12 @@
|
|
|
<div class="form-group">
|
|
|
<label class="control-label">
|
|
|
{{ $t("lang.AssetDetailList.assetNumber") }}</label>
|
|
|
- <input
|
|
|
- v-model="filter.assetNo1"
|
|
|
- autocomplete="off"
|
|
|
- type="text"
|
|
|
- class="form-control"
|
|
|
- />
|
|
|
+ <input v-model="filter.assetNo1" autocomplete="off" type="text" class="form-control" />
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
|
<label class="control-label">~</label>
|
|
|
- <input
|
|
|
- v-model="filter.assetNo2"
|
|
|
- autocomplete="off"
|
|
|
- type="text"
|
|
|
- class="form-control"
|
|
|
- />
|
|
|
+ <input v-model="filter.assetNo2" autocomplete="off" type="text" class="form-control" />
|
|
|
</div>
|
|
|
<!--
|
|
|
<div class="form-group">
|
|
|
@@ -167,22 +123,12 @@
|
|
|
<div class="form-group">
|
|
|
<label class="control-label">
|
|
|
{{ $t("lang.AssetDetailList.originalValue") }}</label>
|
|
|
- <input
|
|
|
- v-model="filter.orginalValue1"
|
|
|
- autocomplete="off"
|
|
|
- type="number"
|
|
|
- class="form-control"
|
|
|
- />
|
|
|
+ <input v-model="filter.orginalValue1" autocomplete="off" type="number" class="form-control" />
|
|
|
</div>
|
|
|
|
|
|
<div class="form-group">
|
|
|
<label class="control-label">~</label>
|
|
|
- <input
|
|
|
- v-model="filter.orginalValue2"
|
|
|
- autocomplete="off"
|
|
|
- type="number"
|
|
|
- class="form-control"
|
|
|
- />
|
|
|
+ <input v-model="filter.orginalValue2" autocomplete="off" type="number" class="form-control" />
|
|
|
</div>
|
|
|
|
|
|
<!-- <div class="form-group">
|
|
|
@@ -261,12 +207,7 @@
|
|
|
|
|
|
<div class="grid-item-5">
|
|
|
<a-table
|
|
|
- :columns="columns"
|
|
|
- :data-source="assets"
|
|
|
- size="small"
|
|
|
- :resizable="true"
|
|
|
- bordered
|
|
|
- :scroll="tableHeight"
|
|
|
+ :columns="columns" :data-source="assets" size="small" :resizable="true" bordered :scroll="tableHeight"
|
|
|
:pagination="pagination"
|
|
|
/>
|
|
|
</div>
|
|
|
@@ -291,14 +232,19 @@
|
|
|
{{ $t("lang.AssetDetailList.selectTheFieldsToExport") }}
|
|
|
</template>
|
|
|
<div class="row">
|
|
|
- <div
|
|
|
- v-for="item in columns"
|
|
|
- :key="item.id"
|
|
|
- class="col-md-4 col-lg-4 col-sm-4 col-xs-6 text"
|
|
|
- >
|
|
|
- <label class="m-label"><input v-model="item.check" autocomplete="off" type="checkbox" /><i>✓</i>{{ item.title }}</label>
|
|
|
+ <div v-for="item in columns" :key="item.id" class="col-md-4 col-lg-4 col-sm-4 col-xs-6 text">
|
|
|
+ <label class="m-label"><input v-model="item.check" autocomplete="off" type="checkbox" /><i>✓</i>{{
|
|
|
+ item.title
|
|
|
+ }}</label>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <template #footer>
|
|
|
+ <div style="float: left;">
|
|
|
+ <a-button v-if="!isSelectAll" type="primary" @click="selectAll">全选</a-button>
|
|
|
+ <a-button v-else type="primary" @click="cancelSelect">取消全选</a-button>
|
|
|
+ <a-button style="margin-left: 5px;" @click="commonUsed">常用</a-button>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
</Modal>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -315,32 +261,20 @@ import ClientOrganizationTree from '../../widget/ClientOrganizationTree.vue';
|
|
|
import ProjectItemTree from '../../widget/ProjectItemTree.vue';
|
|
|
import AssetCategoryTree from '../../widget/AssetCategoryTree.vue';
|
|
|
|
|
|
-import {ref} from 'vue';
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+import { ref } from 'vue';
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
-
|
|
|
-
|
|
|
Date,
|
|
|
Modal,
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
ProjectItemTree,
|
|
|
ClientOrganizationTree,
|
|
|
AssetCategoryTree,
|
|
|
},
|
|
|
|
|
|
- setup(){
|
|
|
+ setup() {
|
|
|
// 设置表格高度
|
|
|
- const tableHeight = ref({ y: document.body.clientHeight - 300});
|
|
|
+ const tableHeight = ref({ y: document.body.clientHeight - 300 });
|
|
|
return {
|
|
|
tableHeight,
|
|
|
};
|
|
|
@@ -379,7 +313,7 @@ export default {
|
|
|
title: this.$t('lang.AssetDetailList.ownerClient'),
|
|
|
width: 200,
|
|
|
align: 'center',
|
|
|
- fixed: 'left',
|
|
|
+ // fixed: 'left',
|
|
|
ellipsis: true,
|
|
|
},
|
|
|
{
|
|
|
@@ -387,7 +321,7 @@ export default {
|
|
|
title: this.$t('lang.AssetDetailList.ownerDepartment'),
|
|
|
width: 200,
|
|
|
align: 'center',
|
|
|
- fixed: 'left',
|
|
|
+ // fixed: 'left',
|
|
|
ellipsis: true,
|
|
|
},
|
|
|
{
|
|
|
@@ -395,7 +329,7 @@ export default {
|
|
|
title: this.$t('lang.AssetDetailList.useClient'),
|
|
|
width: 200,
|
|
|
align: 'center',
|
|
|
- fixed: 'left',
|
|
|
+ // fixed: 'left',
|
|
|
ellipsis: true,
|
|
|
},
|
|
|
{
|
|
|
@@ -749,8 +683,8 @@ export default {
|
|
|
pageSizeOptions: ['20', '50', '100', '150'], // 每页数量选项
|
|
|
showTotal: total => `共计 ${total} 条`, // 显示总数
|
|
|
onShowSizeChange: (current, pageSize) => this.gridSizeSelect(pageSize), // 改变每页数量时更新显示
|
|
|
- onChange:(page,pageSize)=>this.onPageChange(page,pageSize),//点击页码事件
|
|
|
- total:0, //总条数
|
|
|
+ onChange: (page, pageSize) => this.onPageChange(page, pageSize),//点击页码事件
|
|
|
+ total: 0, //总条数
|
|
|
},
|
|
|
totalCount: 0,
|
|
|
assetNoSize: 0,
|
|
|
@@ -760,6 +694,7 @@ export default {
|
|
|
uuid: Uuid.createUUID(),
|
|
|
loading: false,
|
|
|
modal2: false,
|
|
|
+ isSelectAll: false,
|
|
|
};
|
|
|
},
|
|
|
|
|
|
@@ -796,7 +731,7 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
|
|
|
- onPageChange: function(page, pageSize) {
|
|
|
+ onPageChange: function (page, pageSize) {
|
|
|
this.pagination.pageNo = page;
|
|
|
this.getAsset(true);
|
|
|
},
|
|
|
@@ -805,7 +740,30 @@ export default {
|
|
|
var _self = this;
|
|
|
_self.getAsset();
|
|
|
},
|
|
|
-
|
|
|
+ selectAll: function () {
|
|
|
+ this.columns.forEach(item => {
|
|
|
+ item.check = true;
|
|
|
+ });
|
|
|
+ this.isSelectAll = true;
|
|
|
+ },
|
|
|
+ cancelSelect: function () {
|
|
|
+ this.columns.forEach(item => {
|
|
|
+ item.check = false;
|
|
|
+ });
|
|
|
+ this.isSelectAll = false;
|
|
|
+ },
|
|
|
+ commonUsed: function () {
|
|
|
+ this.isSelectAll = false;
|
|
|
+ this.columns.forEach(item => {
|
|
|
+ if (item.dataIndex == 'clientName' || item.dataIndex == 'organizationName' || item.dataIndex == 'responseClientName' ||
|
|
|
+ item.dataIndex == 'responseOrganizationName' || item.dataIndex == 'name' || item.dataIndex == 'assetNo' ||
|
|
|
+ item.dataIndex == 'categoryName' || item.dataIndex == 'orginalValue') {
|
|
|
+ item.check = true;
|
|
|
+ } else {
|
|
|
+ item.check = false;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
/**
|
|
|
* 打开字段选择模态框
|
|
|
*/
|
|
|
@@ -889,7 +847,7 @@ export default {
|
|
|
|
|
|
_self.clearData();
|
|
|
|
|
|
- _self.loading=true;
|
|
|
+ _self.loading = true;
|
|
|
|
|
|
if (_self.filter.orginalValue1 == '') {
|
|
|
_self.filter.orginalValue1 = null;
|
|
|
@@ -934,15 +892,15 @@ export default {
|
|
|
},
|
|
|
success: function (baseObjectResponse) {
|
|
|
console.log('查询结果:' + baseObjectResponse);
|
|
|
- if(baseObjectResponse.errorCode == 0){
|
|
|
+ if (baseObjectResponse.errorCode == 0) {
|
|
|
_self.showAsset(baseObjectResponse.data);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
Notify.error('提示', baseObjectResponse.errorMessage, false);
|
|
|
}
|
|
|
- _self.loading=false;
|
|
|
+ _self.loading = false;
|
|
|
},
|
|
|
error: function (XMLHttpRequest, textStatus, errorThrown) {
|
|
|
- _self.loading=false;
|
|
|
+ _self.loading = false;
|
|
|
Common.processException(XMLHttpRequest, textStatus, errorThrown);
|
|
|
},
|
|
|
});
|
|
|
@@ -1047,8 +1005,9 @@ export default {
|
|
|
) {
|
|
|
this.columns.forEach(function (column) {
|
|
|
oldColumns.forEach(function (oldColumn) {
|
|
|
- if (column.name == oldColumn.name) {
|
|
|
+ if (column.title == oldColumn.title) {
|
|
|
column.width = oldColumn.width;
|
|
|
+ column.check = oldColumn.check;
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
@@ -1076,6 +1035,7 @@ export default {
|
|
|
height: calc(100vh - 85px);
|
|
|
width: 100%;
|
|
|
}
|
|
|
+
|
|
|
.grid-item-1 {
|
|
|
grid-column: 1 / 3;
|
|
|
grid-row: 1 / 2;
|
|
|
@@ -1153,7 +1113,7 @@ input[type="checkbox"] {
|
|
|
display: none;
|
|
|
}
|
|
|
|
|
|
-input[type="checkbox"]:checked + i {
|
|
|
+input[type="checkbox"]:checked+i {
|
|
|
background: #2489c5;
|
|
|
}
|
|
|
</style>
|