add
This commit is contained in:
parent
48b6a6ee44
commit
81106fe2a9
@ -20,10 +20,12 @@
|
|||||||
import { getUserInfo } from "@/api/user"
|
import { getUserInfo } from "@/api/user"
|
||||||
import useUserStore from '@/stores/modules/user'
|
import useUserStore from '@/stores/modules/user'
|
||||||
import { useWatchRoute } from '@/hooks/useWatchRoute'
|
import { useWatchRoute } from '@/hooks/useWatchRoute'
|
||||||
|
import { useRouter } from "vue-router"
|
||||||
|
|
||||||
const userStore = useUserStore()
|
const userStore = useUserStore()
|
||||||
const menuList = reactive([])
|
const menuList = reactive([])
|
||||||
const menuName = ref('')
|
const menuName = ref('')
|
||||||
|
const router = useRouter()
|
||||||
|
|
||||||
const menuClick = async (item) => {
|
const menuClick = async (item) => {
|
||||||
userStore.getUserInfoByID(item.id)
|
userStore.getUserInfoByID(item.id)
|
||||||
@ -31,6 +33,13 @@ const menuClick = async (item) => {
|
|||||||
await nextTick()
|
await nextTick()
|
||||||
menuName.value = item.name
|
menuName.value = item.name
|
||||||
|
|
||||||
|
|
||||||
|
item.id == 173 ? router.push('/sys/consumer/lists') :
|
||||||
|
router.push('/' + item.paths + '/' + item.children[0].paths)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getUserInfo().then(res => {
|
getUserInfo().then(res => {
|
||||||
|
@ -32,19 +32,9 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
|
||||||
<el-form-item label="业务性质" prop="business_nature">
|
|
||||||
<el-select class="flex-1" v-model="queryParams.business_nature" clearable
|
|
||||||
placeholder="请选择业务性质">
|
|
||||||
<el-option v-for="(
|
|
||||||
item, index
|
|
||||||
) in dictData.cost_consultation_business_nature" :key="index" :label="item.name"
|
|
||||||
:value="parseInt(item.value)" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
|
|
||||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||||
<el-button @click="resetParams">重置</el-button>
|
<el-button @click="resetParams">重置</el-button>
|
||||||
<export-data class="ml-2.5" :fetch-fun="apiCostApprovedProjectLists" :params="queryParams"
|
<export-data class="ml-2.5" :fetch-fun="apiCostApprovedProjectLists" :params="queryParams"
|
||||||
@ -65,8 +55,7 @@
|
|||||||
<el-table-column label="合同类型" prop="contract_type_text" show-overflow-tooltip />
|
<el-table-column label="合同类型" prop="contract_type_text" show-overflow-tooltip />
|
||||||
<el-table-column :render-header="pager.calcWidth" label="甲方单位" prop="part_a_name"
|
<el-table-column :render-header="pager.calcWidth" label="甲方单位" prop="part_a_name"
|
||||||
show-overflow-tooltip />
|
show-overflow-tooltip />
|
||||||
<el-table-column :render-header="pager.calcWidth" label="乙方单位" prop="part_b"
|
<el-table-column :render-header="pager.calcWidth" label="乙方单位" prop="part_b" show-overflow-tooltip />
|
||||||
show-overflow-tooltip />
|
|
||||||
<el-table-column :render-header="pager.calcWidth" label="工程投资" prop="project_money"
|
<el-table-column :render-header="pager.calcWidth" label="工程投资" prop="project_money"
|
||||||
show-overflow-tooltip />
|
show-overflow-tooltip />
|
||||||
<el-table-column :render-header="pager.calcWidth" label="签订金额" prop="signed_amount"
|
<el-table-column :render-header="pager.calcWidth" label="签订金额" prop="signed_amount"
|
||||||
@ -183,24 +172,24 @@ const link = (data: any) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
break
|
break
|
||||||
case '2':
|
case '2':
|
||||||
router.push({
|
router.push({
|
||||||
path: '/management/manage_basic/manage_project',
|
path: '/management/manage_basic/manage_project',
|
||||||
query: {
|
query: {
|
||||||
contractId: data.id,
|
contractId: data.id,
|
||||||
contractName: data.contract_name
|
contractName: data.contract_name
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
break
|
break
|
||||||
case '3':
|
case '3':
|
||||||
router.push({
|
router.push({
|
||||||
path: '/consult/consult_basic/consult_project',
|
path: '/consult/consult_basic/consult_project',
|
||||||
query: {
|
query: {
|
||||||
contractId: data.id,
|
contractId: data.id,
|
||||||
contractName: data.contract_name
|
contractName: data.contract_name
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
break
|
break
|
||||||
case '4':
|
case '4':
|
||||||
router.push({
|
router.push({
|
||||||
path: '/cost_consultation/cost_consultation_project/cost_project',
|
path: '/cost_consultation/cost_consultation_project/cost_project',
|
||||||
|
@ -133,7 +133,6 @@ const getData2 = () => {
|
|||||||
// 清空echarts 数据
|
// 清空echarts 数据
|
||||||
visitorOption.xAxis.data = []
|
visitorOption.xAxis.data = []
|
||||||
visitorOption.series = []
|
visitorOption.series = []
|
||||||
console.log(res)
|
|
||||||
visitorOption.xAxis.data = Object.keys(res[0].value)
|
visitorOption.xAxis.data = Object.keys(res[0].value)
|
||||||
|
|
||||||
res.forEach((item, index) => {
|
res.forEach((item, index) => {
|
||||||
|
@ -6,11 +6,9 @@
|
|||||||
<span class="text-2xl">概况</span>
|
<span class="text-2xl">概况</span>
|
||||||
<div class="flex items-center text-sm">
|
<div class="flex items-center text-sm">
|
||||||
<span class="mr-4">时间筛选: </span>
|
<span class="mr-4">时间筛选: </span>
|
||||||
<el-date-picker v-model="startEndTime2" type="daterange" range-separator="至" start-placeholder="开始日期"
|
<el-date-picker v-model="startEndTime2" type="year" placeholder="2024" @change="getData2" />
|
||||||
end-placeholder="结束日期" unlink-panels @change="getData2" />
|
|
||||||
<el-button type="primary" class="ml-4" @click="getData2">查询</el-button>
|
<el-button type="primary" class="ml-4" @click="getData2">查询</el-button>
|
||||||
<el-button type="primary" class="ml-4"
|
<el-button type="primary" class="ml-4" @click="startEndTime2 = '2024', getData2()">重置</el-button>
|
||||||
@click="startEndTime2 = getLastMonthRange(), getData2()">重置</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex flex-wrap">
|
<div class="flex flex-wrap">
|
||||||
@ -33,7 +31,6 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="mb-6 flex justify-between items-center">
|
<div class="mb-6 flex justify-between items-center">
|
||||||
<span class="text-2xl">趋势</span>
|
<span class="text-2xl">趋势</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<v-charts style="height: 400px" :option="visitorOption" :autoresize="true" />
|
<v-charts style="height: 400px" :option="visitorOption" :autoresize="true" />
|
||||||
</div>
|
</div>
|
||||||
@ -77,7 +74,9 @@ const visitorOption: any = reactive({
|
|||||||
color: 'red'
|
color: 'red'
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'axis'
|
trigger: 'axis',
|
||||||
|
confine: true,
|
||||||
|
|
||||||
},
|
},
|
||||||
series: [
|
series: [
|
||||||
{
|
{
|
||||||
@ -118,12 +117,12 @@ function getLastMonthRange() {
|
|||||||
|
|
||||||
|
|
||||||
const startEndTime = ref([new Date(), new Date()]);
|
const startEndTime = ref([new Date(), new Date()]);
|
||||||
const startEndTime2 = ref(getLastMonthRange());
|
const startEndTime2 = ref();
|
||||||
|
console.log(new Date().getFullYear())
|
||||||
|
|
||||||
const getData2 = () => {
|
const getData2 = () => {
|
||||||
let date = '';
|
let date = '';
|
||||||
if (startEndTime2.value[0] && startEndTime2.value[1]) date = moment(startEndTime2.value[0]).format('YYYY/MM/DD') + '-' + moment(startEndTime2.value[1]).format('YYYY/MM/DD');
|
date = (moment(startEndTime2.value).format('YYYY') + '/01/31') + '-' + (moment(startEndTime2.value).format('YYYY') + '/12/31');
|
||||||
getWorkbench({
|
getWorkbench({
|
||||||
date: date
|
date: date
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user