Compare commits

..

2 Commits

2 changed files with 342 additions and 9 deletions

View File

@ -0,0 +1,336 @@
<!--
* @Author: hisense.guoyue
* @LastEditors: hisense.guoyue
* @LastEditTime: 2022-09-27 14:23:29
* @Description: 设备审批
-->
<template>
<el-card shadow="never" class="aui-card--fill" style="position: relative">
<div>
<div
style="
text-align: center;
font-size: 26px;
font-weight: bold;
margin-bottom: 14px;
"
>
累计节省财政资金约{{ saveMoney }}万元
</div>
<div
style="
text-align: center;
font-size: 14px;
font-weight: bold;
margin-bottom: 14px;
"
>
资源参考价格由部门提供或参考市场价格设定
</div>
</div>
<el-form :inline="true">
<el-form-item>
<span>日期</span>
<el-date-picker
v-model="dataList"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
>
</el-date-picker>
</el-form-item>
<!--提供部门-->
<el-form-item>
<span>提供部门</span>
<el-select
v-model="dataForm.offerDepartment"
placeholder="请选择提供部门"
filterable
clearable
>
<el-option label="全部" value=""></el-option>
<el-option
v-for="item in offerDepartSelects"
:key="item.label"
:label="item.label"
:value="item.value"
v-bind="item"
></el-option>
</el-select>
</el-form-item>
<!--申请部门-->
<el-form-item>
<span>申请部门</span>
<el-select
v-model="dataForm.applyDepartment"
placeholder="请选择申请部门"
filterable
clearable
>
<el-option label="全部" value=""></el-option>
<el-option
v-for="item in applyDepartSelects"
:key="item.label"
:label="item.label"
:value="item.value"
v-bind="item"
></el-option>
</el-select>
</el-form-item>
<!--类型-->
<el-form-item>
<span>类型</span>
<el-select
@change="changeIiem"
v-model="dataForm.type"
placeholder="请选择类型"
clearable
>
<el-option label="全部" value=""></el-option>
<el-option
v-for="(item, i) in typeOptions"
:key="`${item.name}${i}`"
:label="item.name"
:value="item.name"
v-bind="item"
>
</el-option>
</el-select>
</el-form-item>
<!--名称-->
<el-form-item>
<span>名称</span>
<el-input
style="width: 80%"
v-model="dataForm.name"
placeholder="请输入资源名称"
clearable
></el-input>
</el-form-item>
</el-form>
<el-form :inline="true" style="margin-right: 40px">
<!--操作按钮查询-->
<el-form-item>
<el-button type="primary" @click="init()">{{
$t("query")
}}</el-button>
</el-form-item>
<!--操作按钮重置-->
<el-form-item>
<el-button type="primary" @click="resetDataList()">{{
$t("reset")
}}</el-button>
</el-form-item>
<!-- 导出 -->
<a
class="export"
:href="
exportExcel +
exportExcelType +
'?' +
exportExcelCondition +
'&token=' +
token
"
>导出全部</a
>
</el-form>
<div class="mod-activiti__process">
<el-table
:data="dataList"
:header-cell-style="{ textAlign: 'center', height: '40px' }"
:cell-style="{ textAlign: 'center' }"
style="width: 100%"
>
<el-table-column
prop="title"
label="序号"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="name"
label="资源名称"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="createDate"
label="类型"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="auditTime"
label="提供部门"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="auditTime"
label="提供部门"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="auditTime"
label="申请部门"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="auditTime"
label="申请时间"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="auditTime"
label="参考价格(元)"
header-align="center"
align="center"
></el-table-column>
</el-table>
<el-pagination
@current-change="handleCurrentChange"
layout="total, prev, pager, next, jumper"
:total="total"
:page-size="pageSize"
:current-page="currentPage"
>
</el-pagination>
</div>
</el-card>
</template>
<script>
import Cookies from 'js-cookie'
export default {
data() {
return {
token: Cookies.get('ucsToken'),
//
exportExcelCondition: '',
exportExcelType: '',
saveMoney: 3243,
offerDepartSelects: [],
applyDepartSelects: [],
typeOptions: [
{ name: "智能算法", value: 1 },
{ name: "图层服务", value: 2 },
{ name: "开发组件", value: 3 },
{ name: "业务组件", value: 4 },
{ name: "应用资源", value: 5 },
], //
dataList: [],
dataForm: {
// date: '',
startDate: "",
endDate: "",
offerDepartment: "",
applyDepartment: "",
type: "",
name: "",
},
currentPage: 1,
pageSize: 10,
total: null,
};
},
methods: {
init() {
if (this.value1 && this.value1.length > 0) {
this.dataForm.startDate = this.value1[0];
this.dataForm.endDate = this.value1[1];
} else {
this.dataForm.startDate = "";
this.dataForm.endDate = "";
}
let params = this.dataForm;
this.$http
.get("/census/center/v3/treeList/", {
params,
})
.then((res) => {
this.tableData = res.data.data;
});
},
handleCurrentChange(val) {
this.currentPage = val;
this.init();
},
resetDataList() {
this.dataList = [];
this.dataForm.startDate = "";
this.dataForm.endDate = "";
this.dataForm.type = "";
this.dataForm.name = "";
this.dataForm.applyDepartment = "";
this.dataForm.offerDepartment = "";
this.currentPage = 1;
this.init();
},
},
mounted() {
this.init();
},
created() {
this.$http.get("/sys/dept/all").then((res) => {
this.applyDepartSelects = [];
this.offerDepartSelects = [];
res.data.data.map((val) => {
this.applyDepartSelects.push({ label: val.name, value: val.id });
this.offerDepartSelects.push({ label: val.name, value: val.id });
});
});
},
};
</script>
<style scoped>
.demand-text {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.area-text {
padding: 0 4px;
}
.tooltip-box {
width: 400px;
}
.export {
margin-top: 6px;
display: inline-block;
width: 80px;
height: 32px;
line-height: 32px;
text-align: center;
border-radius: 2px;
background: #fff;
border: 2px solid #dcdfe6;
color: #000;
color: #fff;
background-color: #0058e1;
border-color: #0058e1;
text-decoration: none;
}
.export:hover {
background: #65a5f9;
border-color: #65a5f9;
color: #fff;
}
</style>

View File

@ -217,8 +217,7 @@ export default defineComponent({
})
const onSelect = async (item, val, child) => {
let res = {}
 mybus.emit('getCameraByParentId', val.id)
let res = {}  
res = await getCameraInfoByAreaId({ areaId: val.id })
treeData.value.map((treeDataItem, index) => {
if (item.id == treeDataItem.id) {
@ -231,12 +230,11 @@ export default defineComponent({
}
})
if (child) {
if(selectId.value===child.id){
selectId.value=''
}else{
selectId.value = child.id
mybus.emit('getCameraByParentId', val.id)
}
}
@ -245,11 +243,8 @@ export default defineComponent({
}
watch(selectId, (newVal) => {
if (newVal == '') {
  mybus.emit('clearLeftSelect')
// mybus.emit('getCameraByParentId', '')
// mybus.emit('getListByParentId', '')
}
})
@ -268,13 +263,15 @@ export default defineComponent({
const showDown = (item, val) => {
selectId.value = val.id
//mybus.emit('getCameraByParentId', val.id)
if (item.children) {
val.show = !val.show
//
if (!val.show) {
selectId.value = ''
// mybus.emit('clearLeftSelect')
}else{
mybus.emit('getCameraByParentId', val.id)
}
}
}