Merge branch 'master' of http://118.178.224.202:3000/ewide/ewide_core
This commit is contained in:
@@ -398,7 +398,7 @@ namespace Ewide.Application
|
||||
/// 房屋使用状态
|
||||
/// </summary>
|
||||
[Comment("房屋使用状态")]
|
||||
public int? UsedStatus { get; set; }
|
||||
public int? HouseUsedStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 1、待建档(需要建档的数据未暂存未保存的)2、暂存(点击了暂存的数据)3、待提交(点击了保存的数据) 4、退回(审核被退回的数据)5、审核中6、审核通过
|
||||
|
||||
@@ -299,7 +299,7 @@
|
||||
房屋等级 1,2,3,4,C,d
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Ewide.Application.BsHouseInfo.UsedStatus">
|
||||
<member name="P:Ewide.Application.BsHouseInfo.HouseUsedStatus">
|
||||
<summary>
|
||||
房屋使用状态
|
||||
</summary>
|
||||
@@ -920,7 +920,7 @@
|
||||
房屋等级 1,2,3,4,C,d
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:Ewide.Application.HouseInfoInput.UsedStatus">
|
||||
<member name="P:Ewide.Application.HouseInfoInput.HouseUsedStatus">
|
||||
<summary>
|
||||
房屋使用状态
|
||||
</summary>
|
||||
|
||||
@@ -194,7 +194,7 @@ namespace Ewide.Application
|
||||
/// <summary>
|
||||
/// 房屋使用状态
|
||||
/// </summary>
|
||||
public int? UsedStatus { get; set; }
|
||||
public int? HouseUsedStatus { get; set; }
|
||||
#endregion
|
||||
|
||||
#region 图纸资料存档处drawing
|
||||
|
||||
@@ -27,14 +27,16 @@ namespace Ewide.Application.Service.HouseSafety.HouseInfo
|
||||
|
||||
private readonly IRepository<BsHouseCode> _houseCodeRep;
|
||||
private readonly IRepository<BsHouseInfo> _houseInfoRep;
|
||||
private readonly IRepository<BsHouseTask> _houseTaskRep;
|
||||
private readonly IUserManager _userManager;
|
||||
private readonly IDapperRepository _dapperRepository;
|
||||
|
||||
|
||||
public HouseInfoService(IRepository<BsHouseCode> HouseCodeRep,IRepository<BsHouseInfo> HouseInfoRep, IUserManager userManager, IDapperRepository dapperRepository)
|
||||
public HouseInfoService(IRepository<BsHouseCode> HouseCodeRep,IRepository<BsHouseInfo> HouseInfoRep, IRepository<BsHouseTask> HouseTaskRep, IUserManager userManager, IDapperRepository dapperRepository)
|
||||
{
|
||||
_houseCodeRep = HouseCodeRep;
|
||||
_houseInfoRep = HouseInfoRep;
|
||||
_houseTaskRep = HouseTaskRep;
|
||||
_userManager = userManager;
|
||||
_dapperRepository = dapperRepository;
|
||||
}
|
||||
@@ -74,9 +76,8 @@ namespace Ewide.Application.Service.HouseSafety.HouseInfo
|
||||
[AllowAnonymous]
|
||||
public async Task<HouseInfoOutputForDetailPage> GetByTaskId([Required] string taskId)
|
||||
{
|
||||
var houseTaskRep = Db.GetRepository<BsHouseTask>();
|
||||
//获取任务实体
|
||||
var houseTask = await houseTaskRep.DetachedEntities.FirstOrDefaultAsync(t=>t.Id == taskId);
|
||||
var houseTask = await _houseTaskRep.DetachedEntities.FirstOrDefaultAsync(t=>t.Id == taskId);
|
||||
if(houseTask == null) throw Oops.Oh("任务不存在");
|
||||
|
||||
//获取房屋编码信息
|
||||
@@ -102,11 +103,10 @@ WHERE HC.Id=@HouseCodeId", new { houseTask.HouseCodeId }
|
||||
HouseCode = houseCodeOutput
|
||||
};
|
||||
|
||||
houseInfoOutputForDetailPage.PatrolInfo = new HouseTaskOutput
|
||||
{
|
||||
PatrolDate = houseTask.PatrolDate.GetValueOrDefault(DateTime.Now),
|
||||
PatrolUser = String.IsNullOrEmpty(houseTask.PatrolUser) ? currentUser.Name : houseTask.PatrolUser
|
||||
};
|
||||
var taskOutput = houseTask.Adapt<HouseTaskOutput>();
|
||||
taskOutput.PatrolDate = houseTask.PatrolDate.GetValueOrDefault(DateTime.Now);
|
||||
taskOutput.PatrolUser = String.IsNullOrEmpty(houseTask.PatrolUser) ? currentUser.Name : houseTask.PatrolUser;
|
||||
houseInfoOutputForDetailPage.PatrolInfo = taskOutput;
|
||||
|
||||
if (houseInfo == null)
|
||||
{
|
||||
|
||||
@@ -107,7 +107,7 @@ namespace Ewide.Application
|
||||
|
||||
}
|
||||
|
||||
public class EditHouseTaskInput
|
||||
public class EditHouseTaskInput : HouseTaskInput
|
||||
{
|
||||
[Required(ErrorMessage = "任务Id不能为空")]
|
||||
public string Id { get; set; }
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
@import '~ant-design-vue/dist/antd.less';
|
||||
@padding-xxs: 4px;
|
||||
@padding-xl: 32px;
|
||||
body {
|
||||
line-height: 1.42857143;
|
||||
}
|
||||
|
||||
@@ -323,3 +323,47 @@
|
||||
background: none;
|
||||
}
|
||||
}
|
||||
.yo-form-page {
|
||||
.ant-form {
|
||||
.ant-radio-button-wrapper {
|
||||
margin-right: @padding-xs;
|
||||
margin-bottom: @padding-xs;
|
||||
|
||||
border-left: @border-width-base @border-style-base @normal-color;
|
||||
&:not(:first-child) {
|
||||
&::before {
|
||||
content: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.yo-filter-item {
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
|
||||
margin-bottom: 0;
|
||||
.ant-tag-checkable {
|
||||
font-size: @font-size-base;
|
||||
}
|
||||
.ant-radio-button-wrapper {
|
||||
border: 0 !important;
|
||||
background-color: transparent;
|
||||
&:hover {
|
||||
color: @red-6;
|
||||
}
|
||||
}
|
||||
.ant-radio-button-wrapper-checked:not(.ant-radio-button-wrapper-disabled) {
|
||||
border-color: @red-6;
|
||||
background-color: @red-6;
|
||||
&:hover {
|
||||
border-color: @red-5;
|
||||
background-color: @red-5;
|
||||
}
|
||||
&:active {
|
||||
border-color: @red-7;
|
||||
background-color: @red-7;
|
||||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,4 @@
|
||||
@import (reference) '~@/assets/style/extend.less';
|
||||
.ant-radio-button-wrapper {
|
||||
margin-right: @padding-xs;
|
||||
margin-bottom: @padding-xs;
|
||||
|
||||
border-left: @border-width-base @border-style-base @normal-color;
|
||||
&:not(:first-child) {
|
||||
&::before {
|
||||
content: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
.ant-radio-button-wrapper-checked {
|
||||
&:not(.ant-radio-button-wrapper-disabled),
|
||||
&:not(.ant-radio-button-wrapper-disabled):hover {
|
||||
|
||||
@@ -71,7 +71,7 @@ export default {
|
||||
/** 验证格式 */
|
||||
rules: {
|
||||
/* ... */
|
||||
'houseInfo.facadePhoto': [{ required: true, message: '请上传外立面照片' }],
|
||||
// 'houseInfo.facadePhoto': [{ required: true, message: '请上传外立面照片' }],
|
||||
},
|
||||
|
||||
/** 加载异步数据状态 */
|
||||
@@ -135,7 +135,7 @@ export default {
|
||||
|
||||
/** 验证通过后可以对数据进行转换得到想要提交的格式 */
|
||||
/* ... */
|
||||
record.facadePhoto = record.facadePhoto.map((p) => p.response).join(',');
|
||||
record.houseInfo.facadePhoto = record.houseInfo.facadePhoto.map((p) => p.response).join(',');
|
||||
|
||||
reslove(record);
|
||||
} else {
|
||||
|
||||
@@ -93,6 +93,10 @@ export default {
|
||||
await this.onLoadCodes();
|
||||
/** 将默认数据覆盖到form */
|
||||
const record = this.param && this.param.record;
|
||||
record.houseInfo.drawingMaterial = record.houseInfo.drawingMaterial
|
||||
? record.houseInfo.drawingMaterial.split(',')
|
||||
: ['1'];
|
||||
|
||||
const form = this.$_.cloneDeep(defaultForm);
|
||||
|
||||
if (record) {
|
||||
@@ -114,6 +118,7 @@ export default {
|
||||
const record = this.$_.cloneDeep(this.form);
|
||||
|
||||
/** 验证通过后可以对数据进行转换得到想要提交的格式 */
|
||||
record.houseInfo.drawingMaterial = this.form.houseInfo.drawingMaterial.join(',');
|
||||
/* ... */
|
||||
|
||||
reslove(record);
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<a-radio-group button-style="solid" v-model="form.houseInfo.houseUsedStatus">
|
||||
<a-radio-button
|
||||
:key="item.code"
|
||||
:value="item.code"
|
||||
:value="+item.code"
|
||||
v-for="item in codes.houseUsedStatus"
|
||||
>{{ item.value }}</a-radio-button>
|
||||
</a-radio-group>
|
||||
@@ -52,7 +52,7 @@
|
||||
<a-radio-group button-style="solid" v-model="form.houseInfo.houseGrade">
|
||||
<a-radio-button
|
||||
:key="item.code"
|
||||
:value="item.code"
|
||||
:value="+item.code"
|
||||
v-for="item in codes.houseGrade"
|
||||
>{{ item.value }}</a-radio-button>
|
||||
</a-radio-group>
|
||||
@@ -68,8 +68,8 @@ const defaultForm = {
|
||||
/* ... */
|
||||
houseInfo: {
|
||||
// identification: null,
|
||||
houseUsedStatus: null,
|
||||
houseGrade: null,
|
||||
houseUsedStatus: '1',
|
||||
houseGrade: '1',
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -71,18 +71,18 @@ export default {
|
||||
title: '图纸资料存档处',
|
||||
component: () => import('./drawing'),
|
||||
},
|
||||
{
|
||||
title: '相关附件资料',
|
||||
component: () => import('./attachments'),
|
||||
},
|
||||
// {
|
||||
// title: '物业维修资金',
|
||||
// component: () => import('./fund'),
|
||||
// title: '相关附件资料',
|
||||
// component: () => import('./attachments'),
|
||||
// },
|
||||
// // {
|
||||
// // title: '物业维修资金',
|
||||
// // component: () => import('./fund'),
|
||||
// // },
|
||||
// {
|
||||
// title: '建筑概貌',
|
||||
// component: () => import('./aspect'),
|
||||
// },
|
||||
{
|
||||
title: '建筑概貌',
|
||||
component: () => import('./aspect'),
|
||||
},
|
||||
{
|
||||
title: '调查单位',
|
||||
component: () => import('./unit'),
|
||||
@@ -103,10 +103,7 @@ export default {
|
||||
const form = this.$refs.forms[i];
|
||||
try {
|
||||
const data = await form.onGetData();
|
||||
formData = {
|
||||
...formData,
|
||||
...data,
|
||||
};
|
||||
formData = this.$_.defaultsDeep(formData, data);
|
||||
} catch (e) {
|
||||
flag = false;
|
||||
reject(e);
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
<a-radio-group button-style="solid" v-model="form.houseInfo.structuralDismantling">
|
||||
<a-radio-button
|
||||
:key="item.code"
|
||||
:value="item.code"
|
||||
:value="+item.code"
|
||||
v-for="item in codes.houseStructuralDismantling"
|
||||
>{{ item.value }}</a-radio-button>
|
||||
</a-radio-group>
|
||||
@@ -77,7 +77,7 @@
|
||||
<a-radio-group button-style="solid" v-model="form.houseInfo.addingLayer">
|
||||
<a-radio-button
|
||||
:key="item.code"
|
||||
:value="item.code"
|
||||
:value="+item.code"
|
||||
v-for="item in codes.houseAddingLayer"
|
||||
>{{ item.value }}</a-radio-button>
|
||||
</a-radio-group>
|
||||
@@ -133,14 +133,14 @@
|
||||
const defaultForm = {
|
||||
/* ... */
|
||||
houseInfo: {
|
||||
houseSite: null,
|
||||
adjacentConstruction: null,
|
||||
chemicalErosion: null,
|
||||
structuralDismantling: null,
|
||||
addingLayer: null,
|
||||
repairAndReinforce: null,
|
||||
historicalCalamity: null,
|
||||
functionalChange: null,
|
||||
houseSite: ['1'],
|
||||
adjacentConstruction: ['0'],
|
||||
chemicalErosion: ['0'],
|
||||
structuralDismantling: '0',
|
||||
addingLayer: '0',
|
||||
repairAndReinforce: ['0'],
|
||||
historicalCalamity: ['0'],
|
||||
functionalChange: ['0'],
|
||||
otherContents: null,
|
||||
},
|
||||
};
|
||||
@@ -222,6 +222,13 @@ export default {
|
||||
|
||||
/** 将默认数据覆盖到form */
|
||||
const record = this.param && this.param.record;
|
||||
record.houseInfo.houseSite = record.houseInfo.houseSite.split(',');
|
||||
record.houseInfo.adjacentConstruction = record.houseInfo.adjacentConstruction.split(',');
|
||||
record.houseInfo.chemicalErosion = record.houseInfo.chemicalErosion.split(',');
|
||||
record.houseInfo.repairAndReinforce = record.houseInfo.repairAndReinforce.split(',');
|
||||
record.houseInfo.historicalCalamity = record.houseInfo.historicalCalamity.split(',');
|
||||
record.houseInfo.functionalChange = record.houseInfo.functionalChange.split(',');
|
||||
|
||||
const form = this.$_.cloneDeep(defaultForm);
|
||||
|
||||
if (record) {
|
||||
@@ -243,6 +250,12 @@ export default {
|
||||
const record = this.$_.cloneDeep(this.form);
|
||||
|
||||
/** 验证通过后可以对数据进行转换得到想要提交的格式 */
|
||||
record.houseInfo.houseSite = this.form.houseInfo.houseSite.join(',');
|
||||
record.houseInfo.adjacentConstruction = this.form.houseInfo.adjacentConstruction.join(',');
|
||||
record.houseInfo.chemicalErosion = this.form.houseInfo.chemicalErosion.join(',');
|
||||
record.houseInfo.repairAndReinforce = this.form.houseInfo.repairAndReinforce.join(',');
|
||||
record.houseInfo.historicalCalamity = this.form.houseInfo.historicalCalamity.join(',');
|
||||
record.houseInfo.functionalChange = this.form.houseInfo.functionalChange.join(',');
|
||||
/* ... */
|
||||
|
||||
reslove(record);
|
||||
|
||||
@@ -236,14 +236,14 @@ const defaultForm = {
|
||||
/* ... */
|
||||
houseInfo: {
|
||||
propertyRights: null,
|
||||
straightHouseCount: null,
|
||||
selfHouseCount: null,
|
||||
otherCount: null,
|
||||
businessCount: null,
|
||||
changeHouseCount: null,
|
||||
resettlementHouseCount: null,
|
||||
privateHouseCount: null,
|
||||
houseCount: null,
|
||||
straightHouseCount: 0,
|
||||
selfHouseCount: 0,
|
||||
otherCount: 0,
|
||||
businessCount: 0,
|
||||
changeHouseCount: 0,
|
||||
resettlementHouseCount: 0,
|
||||
privateHouseCount: 0,
|
||||
houseCount: 0,
|
||||
propertyUnit: null,
|
||||
propertyUnitUser: null,
|
||||
propertyUnitUserTel: null,
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<a-radio-group button-style="solid" v-model="form.patrolInfo.initGrade">
|
||||
<a-radio-button
|
||||
:key="item.code"
|
||||
:value="item.code"
|
||||
:value="+item.code"
|
||||
v-for="item in codes.houseInitGrade"
|
||||
>{{ item.value }}</a-radio-button>
|
||||
</a-radio-group>
|
||||
@@ -33,7 +33,7 @@
|
||||
<a-radio-group button-style="solid" v-model="form.patrolInfo.damageGrade">
|
||||
<a-radio-button
|
||||
:key="item.code"
|
||||
:value="item.code"
|
||||
:value="+item.code"
|
||||
v-for="item in codes.houseDamageGrade"
|
||||
>{{ item.value }}</a-radio-button>
|
||||
</a-radio-group>
|
||||
@@ -44,7 +44,7 @@
|
||||
<a-radio-group button-style="solid" v-model="form.patrolInfo.comprehensiveGrade">
|
||||
<a-radio-button
|
||||
:key="item.code"
|
||||
:value="item.code"
|
||||
:value="+item.code"
|
||||
v-for="item in codes.houseGrade"
|
||||
>{{ item.value }}</a-radio-button>
|
||||
</a-radio-group>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<a-radio-group button-style="solid" v-model="form.patrolInfo.handlingOpinion">
|
||||
<a-radio-button
|
||||
:key="item.code"
|
||||
:value="item.code"
|
||||
:value="+item.code"
|
||||
v-for="item in codes.handlingOpinion"
|
||||
>{{ item.value }}</a-radio-button>
|
||||
</a-radio-group>
|
||||
@@ -46,7 +46,7 @@
|
||||
<a-radio-group button-style="solid" v-model="form.patrolInfo.rectifyAndReform">
|
||||
<a-radio-button
|
||||
:key="item.code"
|
||||
:value="item.code"
|
||||
:value="+item.code"
|
||||
v-for="item in codes.rectifyAndReform"
|
||||
>{{ item.value }}</a-radio-button>
|
||||
</a-radio-group>
|
||||
|
||||
@@ -52,10 +52,10 @@ export default {
|
||||
title: '巡查基本情况',
|
||||
component: () => import('./base'),
|
||||
},
|
||||
{
|
||||
title: '房屋检查',
|
||||
component: () => import('./inspection'),
|
||||
},
|
||||
// {
|
||||
// title: '房屋检查',
|
||||
// component: () => import('./inspection'),
|
||||
// },
|
||||
{
|
||||
title: '等级划分',
|
||||
component: () => import('./grade'),
|
||||
@@ -84,10 +84,7 @@ export default {
|
||||
const form = this.$refs.forms[i];
|
||||
try {
|
||||
const data = await form.onGetData();
|
||||
formData = {
|
||||
...formData,
|
||||
...data,
|
||||
};
|
||||
formData = this.$_.defaultsDeep(formData, data);
|
||||
} catch (e) {
|
||||
flag = false;
|
||||
reject(e);
|
||||
|
||||
@@ -151,7 +151,7 @@ export default {
|
||||
|
||||
/** 验证通过后可以对数据进行转换得到想要提交的格式 */
|
||||
/* ... */
|
||||
record.facadePhoto = record.facadePhoto.map((p) => p.response).join(',');
|
||||
//record.facadePhoto = record.facadePhoto.map((p) => p.response).join(',');
|
||||
|
||||
reslove(record);
|
||||
} else {
|
||||
|
||||
@@ -20,12 +20,15 @@
|
||||
<a-col :span="24">
|
||||
<a-form-model-item class="ant-row-flex" label="正常与否" prop="patrolInfo.patrolResult">
|
||||
<a-radio-group button-style="solid" v-model="form.patrolInfo.patrolResult">
|
||||
<a-radio-button value="0">正常</a-radio-button>
|
||||
<a-radio-button value="-1">异常</a-radio-button>
|
||||
<a-radio-button
|
||||
:key="item.code"
|
||||
:value="+item.code"
|
||||
v-for="item in codes.patrolResult"
|
||||
>{{ item.value }}</a-radio-button>
|
||||
</a-radio-group>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-col :span="24" v-show="form.patrolInfo.patrolResult == -1">
|
||||
<a-form-model-item
|
||||
class="ant-row-flex"
|
||||
label="异常情况描述"
|
||||
@@ -47,7 +50,7 @@
|
||||
const defaultForm = {
|
||||
/* ... */
|
||||
patrolInfo: {
|
||||
patrolResult: '0',
|
||||
patrolResult: '"0"',
|
||||
patrolResultRemark: null,
|
||||
},
|
||||
};
|
||||
@@ -75,7 +78,12 @@ export default {
|
||||
|
||||
/** 其他成员属性 */
|
||||
/* ... */
|
||||
codes: {},
|
||||
codes: {
|
||||
patrolResult: [
|
||||
{ code: '0', value: '正常' },
|
||||
{ code: '-1', value: '异常' },
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
|
||||
@@ -6,6 +6,20 @@
|
||||
<template v-for="(tab, index) in tabs">
|
||||
<a-tab-pane :force-render="true" :key="index" :tab="tab.title" v-if="tab.show"></a-tab-pane>
|
||||
</template>
|
||||
<a-radio-group
|
||||
:value="tabs.find(p => p.active).type"
|
||||
@change="onStatisticsTypeChange"
|
||||
button-style="solid"
|
||||
class="block mt-xxs mr-md"
|
||||
slot="tabBarExtraContent"
|
||||
>
|
||||
<a-radio-button class="mb-none" value="charts">
|
||||
<a-icon type="bar-chart" />
|
||||
</a-radio-button>
|
||||
<a-radio-button class="mb-none" value="table">
|
||||
<a-icon type="table" />
|
||||
</a-radio-button>
|
||||
</a-radio-group>
|
||||
</a-tabs>
|
||||
<div class="yo-tab-external-mount-content">
|
||||
<template v-for="(tab, index) in tabs">
|
||||
@@ -15,7 +29,14 @@
|
||||
class="yo-tab-external-tabpane"
|
||||
v-if="tab.show"
|
||||
>
|
||||
<p :key="n" v-for="n in 100">{{n}}</p>
|
||||
<component
|
||||
:id="id"
|
||||
:is="tab.component"
|
||||
:param="param"
|
||||
:type="tab.type"
|
||||
ref="forms"
|
||||
v-if="tab.component"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
@@ -25,13 +46,24 @@
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
props: ['id', 'param'],
|
||||
|
||||
data() {
|
||||
return {
|
||||
tabs: [
|
||||
{
|
||||
title: '按房屋等级',
|
||||
component: () => import('./tab1'),
|
||||
active: true,
|
||||
show: true,
|
||||
type: 'charts',
|
||||
},
|
||||
{
|
||||
title: '按房屋结构',
|
||||
component: () => import('./tab2'),
|
||||
active: false,
|
||||
show: true,
|
||||
type: 'charts',
|
||||
},
|
||||
],
|
||||
};
|
||||
@@ -42,6 +74,10 @@ export default {
|
||||
p.active = i === key;
|
||||
});
|
||||
},
|
||||
|
||||
onStatisticsTypeChange(e) {
|
||||
this.tabs.find((p) => p.active).type = e.target.value;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
209
Web/src/pages/business/statistics/summary/tab1/charts.vue
Normal file
209
Web/src/pages/business/statistics/summary/tab1/charts.vue
Normal file
@@ -0,0 +1,209 @@
|
||||
<template>
|
||||
<section>
|
||||
<a-row :gutter="16">
|
||||
<a-col :span="8">
|
||||
<a-card :bordered="false" type="inner">
|
||||
<div :style="{ height: '400px' }" ref="chart-1"></div>
|
||||
</a-card>
|
||||
</a-col>
|
||||
<a-col :span="16">
|
||||
<a-card :bordered="false" type="inner">
|
||||
<div :style="{ height: '400px' }" ref="chart-2"></div>
|
||||
</a-card>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-card :bordered="false" type="inner">
|
||||
<div :style="{ height: '400px' }" ref="chart-3"></div>
|
||||
</a-card>
|
||||
</section>
|
||||
</template>
|
||||
<script>
|
||||
import * as echarts from 'echarts';
|
||||
|
||||
const echartsColors = [
|
||||
{ from: '#14dbff', to: '#007dff' },
|
||||
{ from: '#45f4a6', to: '#3bb27d' },
|
||||
{ from: '#fbb456', to: '#f1961b' },
|
||||
{ from: '#fa7148', to: '#ef5932' },
|
||||
];
|
||||
|
||||
const itemColor = (index) => {
|
||||
return {
|
||||
type: 'linear',
|
||||
x: 0,
|
||||
y: 0,
|
||||
x2: 1,
|
||||
y2: 1,
|
||||
colorStops: [
|
||||
{
|
||||
offset: 0,
|
||||
color: echartsColors[index % echartsColors.length].from,
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: echartsColors[index % echartsColors.length].to,
|
||||
},
|
||||
],
|
||||
};
|
||||
};
|
||||
|
||||
export default {
|
||||
mounted() {
|
||||
this.onInitChart1();
|
||||
this.onInitChart2();
|
||||
this.onInitChart3();
|
||||
},
|
||||
|
||||
methods: {
|
||||
onInitChart1() {
|
||||
const dom = this.$refs['chart-1'],
|
||||
chart = echarts.init(dom);
|
||||
chart.setOption({
|
||||
legend: {
|
||||
top: 'bottom',
|
||||
},
|
||||
tooltip: {
|
||||
formatter: '<b>{b}</b> : {c}幢 ({d}%)',
|
||||
},
|
||||
toolbox: {
|
||||
show: true,
|
||||
feature: {
|
||||
mark: { show: true },
|
||||
restore: { show: true },
|
||||
saveAsImage: { show: true },
|
||||
},
|
||||
},
|
||||
series: [
|
||||
{
|
||||
name: '面积模式',
|
||||
type: 'pie',
|
||||
radius: [50, 150],
|
||||
startAngle: 110,
|
||||
center: ['50%', '50%'],
|
||||
roseType: 'area',
|
||||
label: {
|
||||
formatter: '{d}',
|
||||
},
|
||||
data: [
|
||||
{
|
||||
value: 70,
|
||||
name: 'A级',
|
||||
itemStyle: {
|
||||
color: itemColor(0),
|
||||
},
|
||||
},
|
||||
{
|
||||
value: 38,
|
||||
name: 'B级',
|
||||
itemStyle: {
|
||||
color: itemColor(1),
|
||||
},
|
||||
},
|
||||
{
|
||||
value: 32,
|
||||
name: 'C级',
|
||||
itemStyle: {
|
||||
color: itemColor(2),
|
||||
},
|
||||
},
|
||||
{
|
||||
value: 30,
|
||||
name: 'D级',
|
||||
itemStyle: {
|
||||
color: itemColor(3),
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
});
|
||||
},
|
||||
|
||||
onInitChart2() {
|
||||
const dom = this.$refs['chart-2'],
|
||||
chart = echarts.init(dom);
|
||||
chart.setOption({
|
||||
tooltip: {
|
||||
formatter: '<b>{b}</b> : {c}幢',
|
||||
},
|
||||
toolbox: {
|
||||
show: true,
|
||||
feature: {
|
||||
mark: { show: true },
|
||||
restore: { show: true },
|
||||
saveAsImage: { show: true },
|
||||
},
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['A级', 'B级', 'C级', 'D级'],
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
},
|
||||
series: [
|
||||
{
|
||||
barWidth: 20,
|
||||
itemStyle: {
|
||||
color: itemColor(0),
|
||||
borderRadius: 10,
|
||||
},
|
||||
data: [120, 200, 150, 80],
|
||||
type: 'bar',
|
||||
},
|
||||
],
|
||||
});
|
||||
},
|
||||
|
||||
onInitChart3() {
|
||||
const dom = this.$refs['chart-3'],
|
||||
chart = echarts.init(dom);
|
||||
chart.setOption({
|
||||
tooltip: {
|
||||
formatter: '<b>{b}</b> : {c}幢',
|
||||
},
|
||||
toolbox: {
|
||||
show: true,
|
||||
feature: {
|
||||
mark: { show: true },
|
||||
restore: { show: true },
|
||||
saveAsImage: { show: true },
|
||||
},
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['A级', 'B级', 'C级', 'D级'],
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
},
|
||||
series: [
|
||||
{
|
||||
data: [820, 932, 800, 900],
|
||||
showSymbol: false,
|
||||
lineStyle: {
|
||||
width: 5,
|
||||
shadowBlur: 5,
|
||||
shadowOffsetY: 3,
|
||||
shadowColor: echartsColors[0].from,
|
||||
opacity: 0.5,
|
||||
cap: 'round',
|
||||
},
|
||||
itemStyle: {
|
||||
color: itemColor(0),
|
||||
},
|
||||
type: 'line',
|
||||
smooth: true,
|
||||
},
|
||||
],
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.ant-card {
|
||||
background-color: rgba(255, 255, 255, .8);
|
||||
}
|
||||
|
||||
</style>
|
||||
79
Web/src/pages/business/statistics/summary/tab1/index.vue
Normal file
79
Web/src/pages/business/statistics/summary/tab1/index.vue
Normal file
@@ -0,0 +1,79 @@
|
||||
<template>
|
||||
<container>
|
||||
<br />
|
||||
<a-card :bordered="false" type="inner">
|
||||
<a-form-model :label-col="{ flex: '70px' }" :wrapper-col="{ flex: '1' }">
|
||||
<a-form-model-item class="yo-filter-item" label="房屋性质">
|
||||
<a-radio-group :default-value="''" button-style="solid" size="small">
|
||||
<a-radio-button value>全部</a-radio-button>
|
||||
<a-radio-button value="1">住宅</a-radio-button>
|
||||
<a-radio-button value="2">非住宅</a-radio-button>
|
||||
</a-radio-group>
|
||||
</a-form-model-item>
|
||||
<a-divider class="mt-xs mb-xs" dashed />
|
||||
<a-form-model-item class="yo-filter-item" label="审核状态">
|
||||
<a-radio-group :default-value="''" button-style="solid" size="small">
|
||||
<a-radio-button value>全部</a-radio-button>
|
||||
<a-radio-button value="1">待建档</a-radio-button>
|
||||
<a-radio-button value="2">暂存</a-radio-button>
|
||||
<a-radio-button value="3">待提交</a-radio-button>
|
||||
<a-radio-button value="4">退回</a-radio-button>
|
||||
<a-radio-button value="5">待审核</a-radio-button>
|
||||
<a-radio-button value="6">审核通过</a-radio-button>
|
||||
</a-radio-group>
|
||||
</a-form-model-item>
|
||||
<a-divider class="mt-xs mb-xs" dashed />
|
||||
<a-form-model-item class="yo-filter-item" label="土地性质">
|
||||
<a-radio-group :default-value="''" button-style="solid" size="small">
|
||||
<a-radio-button value>全部</a-radio-button>
|
||||
<a-radio-button value="1">国有土地</a-radio-button>
|
||||
<a-radio-button value="2">集体土地</a-radio-button>
|
||||
</a-radio-group>
|
||||
</a-form-model-item>
|
||||
<a-divider class="mt-xs mb-xs" dashed />
|
||||
<a-form-model-item class="yo-filter-item" label="筛选范围">
|
||||
<a-cascader class="w-400" placeholder="请选择区域" />
|
||||
</a-form-model-item>
|
||||
<a-divider class="mt-xs mb-xs" dashed />
|
||||
<div class="text-center">
|
||||
<a-button class="mr-xs" type="primary">查询</a-button>
|
||||
<a-button>导出Excel</a-button>
|
||||
</div>
|
||||
</a-form-model>
|
||||
</a-card>
|
||||
<StatisticsCharts v-if="renderList.indexOf('charts') > -1" v-show="type === 'charts'" />
|
||||
<StatisticsTable v-if="renderList.indexOf('table') > -1" v-show="type === 'table'" />
|
||||
</container>
|
||||
</template>
|
||||
<script>
|
||||
import StatisticsCharts from './charts';
|
||||
import StatisticsTable from './table';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
StatisticsCharts,
|
||||
StatisticsTable,
|
||||
},
|
||||
|
||||
props: {
|
||||
type: {
|
||||
type: String,
|
||||
default: 'charts',
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
renderList: ['charts'],
|
||||
};
|
||||
},
|
||||
|
||||
watch: {
|
||||
type() {
|
||||
if (this.renderList.indexOf(this.type) === -1) {
|
||||
this.renderList.push(this.type);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
204
Web/src/pages/business/statistics/summary/tab1/table.vue
Normal file
204
Web/src/pages/business/statistics/summary/tab1/table.vue
Normal file
@@ -0,0 +1,204 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
<a-table
|
||||
:columns="columns"
|
||||
:data-source="data"
|
||||
:pagination="false"
|
||||
:scroll="{ x: 'max-content', }"
|
||||
bordered
|
||||
size="middle"
|
||||
/>
|
||||
</a-card>
|
||||
</template>
|
||||
<script>
|
||||
const columns = [
|
||||
{
|
||||
title: '区域',
|
||||
dataIndex: 'area',
|
||||
width: 150,
|
||||
},
|
||||
{
|
||||
title: '总数',
|
||||
children: [
|
||||
{
|
||||
title: '幢数(占比)',
|
||||
dataIndex: 'z',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '建筑面积(占比)',
|
||||
dataIndex: 'j',
|
||||
width: 120,
|
||||
},
|
||||
{
|
||||
title: '户数',
|
||||
dataIndex: 'h',
|
||||
width: 80,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: '房屋等级',
|
||||
children: [
|
||||
{
|
||||
title: '一级',
|
||||
children: [
|
||||
{
|
||||
title: '幢数',
|
||||
dataIndex: 'z1',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '建筑面积',
|
||||
dataIndex: 'j1',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '户数',
|
||||
dataIndex: 'h1',
|
||||
width: 80,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: '二级',
|
||||
children: [
|
||||
{
|
||||
title: '幢数',
|
||||
dataIndex: 'z2',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '建筑面积',
|
||||
dataIndex: 'j2',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '户数',
|
||||
dataIndex: 'h2',
|
||||
width: 80,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: '三级',
|
||||
children: [
|
||||
{
|
||||
title: '幢数',
|
||||
dataIndex: 'z3',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '建筑面积',
|
||||
dataIndex: 'j3',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '户数',
|
||||
dataIndex: 'h3',
|
||||
width: 80,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: '四级',
|
||||
children: [
|
||||
{
|
||||
title: '幢数',
|
||||
dataIndex: 'z4',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '建筑面积',
|
||||
dataIndex: 'j4',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '户数',
|
||||
dataIndex: 'h4',
|
||||
width: 80,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'C级',
|
||||
children: [
|
||||
{
|
||||
title: '幢数',
|
||||
dataIndex: 'zc',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '建筑面积',
|
||||
dataIndex: 'jc',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '户数',
|
||||
dataIndex: 'hc',
|
||||
width: 80,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'D级',
|
||||
children: [
|
||||
{
|
||||
title: '幢数',
|
||||
dataIndex: 'zd',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '建筑面积',
|
||||
dataIndex: 'jd',
|
||||
width: 80,
|
||||
},
|
||||
{
|
||||
title: '户数',
|
||||
dataIndex: 'hd',
|
||||
width: 80,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
const data = [];
|
||||
for (let i = 0; i < 30; i++) {
|
||||
data.push({
|
||||
key: i,
|
||||
area: 'John Brown',
|
||||
z: 100,
|
||||
j: 1222.33,
|
||||
h: 39,
|
||||
z1: 20,
|
||||
j1: 20,
|
||||
h1: 20,
|
||||
z2: 20,
|
||||
j2: 20,
|
||||
h2: 20,
|
||||
z3: 20,
|
||||
j3: 20,
|
||||
h3: 20,
|
||||
z4: 20,
|
||||
j4: 20,
|
||||
h4: 20,
|
||||
zc: 20,
|
||||
jc: 20,
|
||||
hc: 20,
|
||||
zd: 20,
|
||||
jd: 20,
|
||||
hd: 20,
|
||||
});
|
||||
}
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
data,
|
||||
columns,
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -0,0 +1,3 @@
|
||||
<template>
|
||||
<div>页签2 统计图</div>
|
||||
</template>
|
||||
25
Web/src/pages/business/statistics/summary/tab2/index.vue
Normal file
25
Web/src/pages/business/statistics/summary/tab2/index.vue
Normal file
@@ -0,0 +1,25 @@
|
||||
<template>
|
||||
<div>
|
||||
页签2
|
||||
<StatisticsCharts v-show="type === 'charts'" />
|
||||
<StatisticsTable v-show="type === 'table'" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import StatisticsCharts from './charts';
|
||||
import StatisticsTable from './table';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
StatisticsCharts,
|
||||
StatisticsTable,
|
||||
},
|
||||
|
||||
props: {
|
||||
type: {
|
||||
type: String,
|
||||
default: 'charts',
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
3
Web/src/pages/business/statistics/summary/tab2/table.vue
Normal file
3
Web/src/pages/business/statistics/summary/tab2/table.vue
Normal file
@@ -0,0 +1,3 @@
|
||||
<template>
|
||||
<div>页签2 统计表</div>
|
||||
</template>
|
||||
@@ -25,5 +25,7 @@ module.exports = {
|
||||
plugins: [
|
||||
new MonacoWebpackPlugin()
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
productionSourceMap: false
|
||||
}
|
||||
Reference in New Issue
Block a user