|
@@ -4,8 +4,10 @@
|
|
|
<el-card shadow="never">
|
|
|
<el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent inline>
|
|
|
<el-form-item label="来电人身份" prop="IdentityType">
|
|
|
- <el-select v-model="state.queryParams.IdentityType" placeholder="请选择来电人身份" @change="handleQuery" :empty-values="[undefined, null]">
|
|
|
- <el-option v-for="item in identityTypeOptions" :value="item.value" :key="item.value" :label="item.key" />
|
|
|
+ <el-select v-model="state.queryParams.IdentityType" placeholder="请选择来电人身份" @change="handleQuery">
|
|
|
+ <el-option :value="0" label="全部" />
|
|
|
+ <el-option :value="1" label="市民" />
|
|
|
+ <el-option :value="2" label="企业" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="时间段" prop="crTime">
|
|
@@ -34,10 +36,10 @@
|
|
|
<el-card shadow="never">
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :xs="24" :sm="24" :md="24" :lg="18" :xl="18">
|
|
|
- <template v-if="dataTable.length">
|
|
|
- <v-chart class="chart" :option="option" :loading="state.loading" autoresize />
|
|
|
- </template>
|
|
|
- <el-empty v-else/>
|
|
|
+ <template v-if="dataTable.length">
|
|
|
+ <v-chart class="chart" :option="option" :loading="state.loading" autoresize />
|
|
|
+ </template>
|
|
|
+ <el-empty v-else />
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="24" :md="24" :lg="6" :xl="6">
|
|
|
<ProTable
|
|
@@ -50,9 +52,9 @@
|
|
|
border
|
|
|
:tool-button="false"
|
|
|
max-height="60vh"
|
|
|
- :toolButton="['refresh', 'exportAll']"
|
|
|
- :exportMethod="orderSourceExport"
|
|
|
- :exportParams="requestParams"
|
|
|
+ :toolButton="['refresh', 'exportAll']"
|
|
|
+ :exportMethod="orderSourceExport"
|
|
|
+ :exportParams="requestParams"
|
|
|
>
|
|
|
</ProTable>
|
|
|
</el-col>
|
|
@@ -61,7 +63,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script setup lang="tsx" name="statisticsOrderSource">
|
|
|
-import {onMounted, reactive, ref } from "vue";
|
|
|
+import { onMounted, reactive, ref } from 'vue';
|
|
|
import { FormInstance } from 'element-plus';
|
|
|
import { defaultDate, shortcuts } from '@/utils/constants';
|
|
|
import Other from '@/utils/other';
|
|
@@ -80,7 +82,7 @@ const ruleFormRef = ref<RefType>(); // 表单ref
|
|
|
const state = reactive<any>({
|
|
|
queryParams: {
|
|
|
// 查询条件
|
|
|
- IdentityType: '', // 关键词
|
|
|
+ IdentityType: 0, // 关键词
|
|
|
crTime: defaultDate, //
|
|
|
StartTime: null,
|
|
|
EndTime: null,
|
|
@@ -89,11 +91,6 @@ const state = reactive<any>({
|
|
|
loading: false, // 加载
|
|
|
total: 0, // 总数
|
|
|
});
|
|
|
-const identityTypeOptions = [
|
|
|
- { key: '全部', value: '' },
|
|
|
- { key: '市民', value: '1' },
|
|
|
- { key: '企业', value: '2' },
|
|
|
-];
|
|
|
/** 搜索按钮操作 */
|
|
|
const handleQuery = () => {
|
|
|
// state.queryParams.PageIndex = 1;
|
|
@@ -104,9 +101,9 @@ const dataTable = ref([]);
|
|
|
const requestParams = ref({});
|
|
|
const queryList = () => {
|
|
|
state.loading = true;
|
|
|
- requestParams.value = Other.deepClone(state.queryParams);
|
|
|
- requestParams.value.StartTime = state.queryParams.crTime === null ? null : state.queryParams.crTime[0];
|
|
|
- requestParams.value.EndTime = state.queryParams.crTime === null ? null : state.queryParams.crTime[1];
|
|
|
+ requestParams.value = Other.deepClone(state.queryParams);
|
|
|
+ requestParams.value.StartTime = state.queryParams.crTime === null ? null : state.queryParams.crTime[0];
|
|
|
+ requestParams.value.EndTime = state.queryParams.crTime === null ? null : state.queryParams.crTime[1];
|
|
|
Reflect.deleteProperty(requestParams.value, 'crTime');
|
|
|
orderSource(requestParams.value)
|
|
|
.then((res: any) => {
|
|
@@ -116,7 +113,7 @@ const queryList = () => {
|
|
|
return item.source;
|
|
|
})
|
|
|
.filter((item: any) => item !== '合计');
|
|
|
- dataTable.value = state.tableData
|
|
|
+ dataTable.value = state.tableData
|
|
|
.map((item: any) => {
|
|
|
return {
|
|
|
name: item.source,
|
|
@@ -187,7 +184,7 @@ onMounted(() => {
|
|
|
});
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
-.chart{
|
|
|
+.chart {
|
|
|
height: 60vh;
|
|
|
margin-top: 10px;
|
|
|
}
|