Commit f01b901d by lichengming

添加了新菜单

parent 8630ad26
<template>
<div>
<div class="layout-content-padding">
<div class="layout-content-main">
<Row style="margin-top: 10px;">
<!--查询条件-->
<Col span="24">
<div class="fl">
<Form id="search-form" :label-width="70" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item label="委托日期:">
<el-date-picker
v-model="queryDate"
@change="_dateChange"
type="monthrange"
range-separator="-"
start-placeholder="开始月份"
end-placeholder="结束月份"
size="small"
value-format="yyyy-MM"
>
</el-date-picker>
</Form-item>
<Form-item label="钻孔位置:">
<Input v-model="formObj.location" @on-enter="_search" clearable placeholder="请输入钻孔位置" style="width:100%"/>
</Form-item>
<Form-item class="search-btn">
<Button @click="_getData" type="primary" class="width-80">
搜索
</Button>
</Form-item>
</Form>
</div>
<div class="clear"></div>
</Col>
<!--内容-->
<Col span="24">
<PTVXETable ref="pageTable" :table-height="tableHeight" :form-id="formId" :loading="true"
:get-page="getPage" @on-result-change="_tableResultChange">
<vxe-table-column
v-for="item in pageColumns"
:key="item.key"
:field="item.key"
:title="item.title"
:min-width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined" sortable>
<template slot-scope="scope">
<span v-if="item.date">{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd'):''}}</span>
<div v-else-if="item.status">
<span v-if="scope.row[item.key].display === '委托单评审驳回'" style="color: red;">{{ scope.row[item.key] === undefined ? '': scope.row[item.key].display }}</span>
<span v-else>{{ scope.row[item.key] === undefined ? '': scope.row[item.key].display }}</span>
</div>
<span v-else-if="item.key==='backReasons'" style="color: red">{{scope.row[item.key]}}</span>
<span v-else>{{scope.row[item.key]}}</span>
</template>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</div>
</div>
</template>
<script>
// eslint-disable-next-line import/named
import { soilStatistics } from '../../../api'
export default {
components: {},
data() {
const date = this.$dateformat(new Date(), 'yyyy-mm')
const nextMonth = this.$dateformat(
new Date().setMonth(new Date().getMonth() + 1),
'yyyy-mm'
)
return {
formId: 'AreaSample',
beginDate: new Date(),
endDate: new Date(),
groupId: '',
groupName: '',
tester: '',
testerId: '',
pageColumns: [
{ title: '样品编号', key: 'tester', detail: true, width: 140 },
{ title: '样品名称', key: 'total', width: 100 },
{ title: '钻孔位置', key: 'doingTotal', width: 110 },
{ title: '样品数量', key: 'endTotal', width: 110 }
],
groupData: [],
getPage: {},
tempData: {
groupId: '',
groupName: '',
beginDate: date,
endDate: nextMonth
},
formObj: {
edateBegin: undefined,
edateEnd: undefined
},
testerData: [],
queryDate: [date, nextMonth],
serviceType: '',
serviceTypeList: []
}
},
computed: {
tableHeight: function() {
return this.$tableHeight('search')
}
},
mounted() {
this.$refs.pageTable._hideLoading()
const str = this.tempData.endDate
const arr = str.split('-')
const lastday = this.mGetDate(arr[0], arr[1]).getTime() - 1
this.formObj.edateBegin = this.tempData.beginDate
this.formObj.edateEnd = this.$dateformat(lastday, 'yyyy-mm-dd HH:MM:ss')
this._getData()
},
methods: {
_dateChange(data) {
if (data) {
this.tempData.beginDate = data[0]
this.tempData.endDate = data[1]
this.formObj.edateBegin = data[0]
const str = data[1]
const arr = str.split('-')
const lastday = this.mGetDate(arr[0], arr[1]).getTime() - 1
this.formObj.edateEnd = this.$dateformat(lastday, 'yyyy-mm-dd HH:MM:ss')
} else {
this.tempData.beginDate = ''
this.tempData.endDate = ''
this.formObj.edateBegin = undefined
this.formObj.edateEnd = undefined
}
},
mGetDate(year, month) {
const d = new Date(year, month, 1)
return d
},
// 服务类型
_getData: async function() {
const result = await soilStatistics.pagePersonalTaskStatistics(
this.formObj
)
if (result) {
this.getPage = result
}
},
// 检测项目详情
_contHide() {
this.tempData.beginDate = this.$dateformat(new Date(), 'yyyy-mm')
this.tempData.endDate = this.$dateformat(new Date(), 'yyyy-mm')
},
_formSearch() {
this.$refs.pageTable._pageChange(1)
},
_search() {
this._formSearch()
},
_tableResultChange(msg, data) {
switch (msg) {
case 'changeSize':
this._getData()
break
}
}
// 参数
}
}
</script>
<template>
<div>
<div class="layout-content-padding">
<div class="layout-content-main">
<Row style="margin-top: 10px;">
<!--查询条件-->
<Col span="24">
<div class="fl">
<Form id="search-form" :label-width="70" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item label="委托日期:">
<el-date-picker
v-model="queryDate"
@change="_dateChange"
type="monthrange"
range-separator="-"
start-placeholder="开始月份"
end-placeholder="结束月份"
size="small"
value-format="yyyy-MM"
>
</el-date-picker>
</Form-item>
<Form-item label="工程名称:">
<Input v-model="formObj.projectName" @on-enter="_search" clearable placeholder="请输入钻孔位置" style="width:100%"/>
</Form-item>
<Form-item label="工程类型:">
<Select v-model="formObj.projectType" clearable name="projectType" placeholder="请选择工程类型">
<Option v-for="(item,index) in projectArray" :key="index" :value="item.name">{{item.name}}</Option>
</Select>
</Form-item>
<Form-item class="search-btn">
<Button @click="_getData" type="primary" class="width-80">
搜索
</Button>
</Form-item>
</Form>
</div>
<div class="clear"></div>
</Col>
<!--内容-->
<Col span="24">
<PTVXETable ref="pageTable" :table-height="tableHeight" :form-id="formId" :loading="true"
:get-page="getPage" @on-result-change="_tableResultChange">
<vxe-table-column
v-for="item in pageColumns"
:key="item.key"
:field="item.key"
:title="item.title"
:min-width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined" sortable>
<template slot-scope="scope">
<span v-if="item.date">{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd'):''}}</span>
<div v-else-if="item.status">
<span v-if="scope.row[item.key].display === '委托单评审驳回'" style="color: red;">{{ scope.row[item.key] === undefined ? '': scope.row[item.key].display }}</span>
<span v-else>{{ scope.row[item.key] === undefined ? '': scope.row[item.key].display }}</span>
</div>
<span v-else-if="item.key==='backReasons'" style="color: red">{{scope.row[item.key]}}</span>
<span v-else>{{scope.row[item.key]}}</span>
</template>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</div>
</div>
</template>
<script>
// eslint-disable-next-line import/named
import { soilAptitude, soilStatistics } from '../../../api'
export default {
components: {},
data() {
const date = this.$dateformat(new Date(), 'yyyy-mm')
const nextMonth = this.$dateformat(
new Date().setMonth(new Date().getMonth() + 1),
'yyyy-mm'
)
return {
formId: 'ProjectItem',
beginDate: new Date(),
endDate: new Date(),
groupId: '',
groupName: '',
tester: '',
testerId: '',
pageColumns: [
{ title: '样品编号', key: 'tester', detail: true, width: 140 },
{ title: '样品名称', key: 'total', width: 100 },
{ title: '钻孔位置', key: 'doingTotal', width: 110 },
{ title: '样品数量', key: 'endTotal', width: 110 }
],
groupData: [],
getPage: {},
tempData: {
groupId: '',
groupName: '',
beginDate: date,
endDate: nextMonth
},
formObj: {
edateBegin: undefined,
edateEnd: undefined,
projectType: undefined
},
testerData: [],
queryDate: [date, nextMonth],
serviceType: '',
serviceTypeList: [],
projectArray: []
}
},
computed: {
tableHeight: function() {
return this.$tableHeight('search')
}
},
mounted() {
this.$refs.pageTable._hideLoading()
const str = this.tempData.endDate
const arr = str.split('-')
const lastday = this.mGetDate(arr[0], arr[1]).getTime() - 1
this.formObj.edateBegin = this.tempData.beginDate
this.formObj.edateEnd = this.$dateformat(lastday, 'yyyy-mm-dd HH:MM:ss')
this._getData()
this._getProjectArray()
},
methods: {
_getProjectArray: async function() {
const result = await soilAptitude.getDictInfo({
type: '工程类型',
page: 1,
rows: 50
})
if (result) {
this.projectArray = result.records
}
},
_dateChange(data) {
if (data) {
this.tempData.beginDate = data[0]
this.tempData.endDate = data[1]
this.formObj.edateBegin = data[0]
const str = data[1]
const arr = str.split('-')
const lastday = this.mGetDate(arr[0], arr[1]).getTime() - 1
this.formObj.edateEnd = this.$dateformat(lastday, 'yyyy-mm-dd HH:MM:ss')
} else {
this.tempData.beginDate = ''
this.tempData.endDate = ''
this.formObj.edateBegin = undefined
this.formObj.edateEnd = undefined
}
},
mGetDate(year, month) {
const d = new Date(year, month, 1)
return d
},
// 服务类型
_getData: async function() {
const result = await soilStatistics.pagePersonalTaskStatistics(
this.formObj
)
if (result) {
this.getPage = result
}
},
// 检测项目详情
_contHide() {
this.tempData.beginDate = this.$dateformat(new Date(), 'yyyy-mm')
this.tempData.endDate = this.$dateformat(new Date(), 'yyyy-mm')
},
_formSearch() {
this.$refs.pageTable._pageChange(1)
},
_search() {
this._formSearch()
},
_tableResultChange(msg, data) {
switch (msg) {
case 'changeSize':
this._getData()
break
}
}
// 参数
}
}
</script>
<template>
<div>
<div class="layout-content-padding">
<div class="layout-content-main">
<Row style="margin-top: 10px;">
<!--查询条件-->
<Col span="24">
<div class="fl">
<Form id="search-form" :label-width="100" inline onsubmit="return false">
<label class="label-sign"></label>
<Form-item label="复核通过时间:">
<el-date-picker
v-model="queryDate"
@change="_dateChange"
type="monthrange"
range-separator="-"
start-placeholder="开始月份"
end-placeholder="结束月份"
size="small"
value-format="yyyy-MM"
>
</el-date-picker>
</Form-item>
<Form-item label="检测项目:">
<Input v-model="formObj.itemNames" @on-enter="_search" clearable placeholder="请输入检测项目" style="width:100%"/>
</Form-item>
<Form-item class="search-btn">
<Button @click="_getData" type="primary" class="width-80">
搜索
</Button>
</Form-item>
</Form>
</div>
<div class="clear"></div>
</Col>
<!--内容-->
<Col span="24">
<PTVXETable ref="pageTable" :table-height="tableHeight" :form-id="formId" :loading="true"
:get-page="getPage" @on-result-change="_tableResultChange">
<vxe-table-column
v-for="item in pageColumns"
:key="item.key"
:field="item.key"
:title="item.title"
:min-width="item.width?item.width:200"
:fixed="item.fixed?item.fixed:undefined" sortable>
<template slot-scope="scope">
<span v-if="item.date">{{scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd'):''}}</span>
<div v-else-if="item.status">
<span v-if="scope.row[item.key].display === '委托单评审驳回'" style="color: red;">{{ scope.row[item.key] === undefined ? '': scope.row[item.key].display }}</span>
<span v-else>{{ scope.row[item.key] === undefined ? '': scope.row[item.key].display }}</span>
</div>
<span v-else-if="item.key==='backReasons'" style="color: red">{{scope.row[item.key]}}</span>
<span v-else>{{scope.row[item.key]}}</span>
</template>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</div>
</div>
</template>
<script>
// eslint-disable-next-line import/named
import { soilStatistics } from '../../../api'
export default {
components: {},
data() {
const date = this.$dateformat(new Date(), 'yyyy-mm')
const nextMonth = this.$dateformat(
new Date().setMonth(new Date().getMonth() + 1),
'yyyy-mm'
)
return {
formId: 'TestItem',
beginDate: new Date(),
endDate: new Date(),
groupId: '',
groupName: '',
tester: '',
testerId: '',
pageColumns: [
{ title: '检测项目', key: 'total', width: 100 },
{ title: '数量', key: 'doingTotal', width: 110 }
],
groupData: [],
getPage: {},
tempData: {
groupId: '',
groupName: '',
beginDate: date,
endDate: nextMonth
},
formObj: {
edateBegin: undefined,
edateEnd: undefined
},
testerData: [],
queryDate: [date, nextMonth],
serviceType: '',
serviceTypeList: []
}
},
computed: {
tableHeight: function() {
return this.$tableHeight('search')
}
},
mounted() {
this.$refs.pageTable._hideLoading()
const str = this.tempData.endDate
const arr = str.split('-')
const lastday = this.mGetDate(arr[0], arr[1]).getTime() - 1
this.formObj.edateBegin = this.tempData.beginDate
this.formObj.edateEnd = this.$dateformat(lastday, 'yyyy-mm-dd HH:MM:ss')
this._getData()
},
methods: {
_dateChange(data) {
if (data) {
this.tempData.beginDate = data[0]
this.tempData.endDate = data[1]
this.formObj.edateBegin = data[0]
const str = data[1]
const arr = str.split('-')
const lastday = this.mGetDate(arr[0], arr[1]).getTime() - 1
this.formObj.edateEnd = this.$dateformat(lastday, 'yyyy-mm-dd HH:MM:ss')
} else {
this.tempData.beginDate = ''
this.tempData.endDate = ''
this.formObj.edateBegin = undefined
this.formObj.edateEnd = undefined
}
},
mGetDate(year, month) {
const d = new Date(year, month, 1)
return d
},
// 服务类型
_getData: async function() {
const result = await soilStatistics.pagePersonalTaskStatistics(
this.formObj
)
if (result) {
this.getPage = result
}
},
// 检测项目详情
_contHide() {
this.tempData.beginDate = this.$dateformat(new Date(), 'yyyy-mm')
this.tempData.endDate = this.$dateformat(new Date(), 'yyyy-mm')
},
_formSearch() {
this.$refs.pageTable._pageChange(1)
},
_search() {
this._formSearch()
},
_tableResultChange(msg, data) {
switch (msg) {
case 'changeSize':
this._getData()
break
}
}
// 参数
}
}
</script>
......@@ -53,6 +53,9 @@ import SoilExpReportEndIndex from '../pages/soil-exp-report/report-end/SoilExpRe
import OpenSoilTemplate from '../pages/soil-sample-manage/open-soil-template-manage/OpenSoilTemplate'
import InOutExportTemplate from '../pages/soil-alone-sample/in-out-template-manage/InOutExportTemplate'
import earlyWarningSet from '../pages/meter-aptitude/early-warning/LmsEnvNormalMonitor'
import AreaSample from '../pages/soil-statistics/area-sample/AreaSample'
import TestItem from '../pages/soil-statistics/test-item/TestItem'
import ProjectItem from '../pages/soil-statistics/project-item/ProjectItem'
import Blank from '~/pages/blank'
export default [
{
......@@ -360,6 +363,21 @@ export default [
path: 'client_location',
component: ClientLocationSearch,
meta: { title: '委托地区查询' }
},
{
path: 'area_sample',
component: AreaSample,
meta: { title: '地区样品查询' }
},
{
path: 'test_item',
component: TestItem,
meta: { title: '检测项目查询' }
},
{
path: 'project_item',
component: ProjectItem,
meta: { title: '工程项目查询' }
}
]
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment