Commit 7e334859 by lichengming

修改了委托地区查询

parent a05d6042
...@@ -103,7 +103,7 @@ export default { ...@@ -103,7 +103,7 @@ export default {
this.urlData = { this.urlData = {
msg: 'FoodContractAttachment', msg: 'FoodContractAttachment',
pageUrl: '/soil/v1/sample_photo/page', pageUrl: '/soil/v1/sample_photo/page',
deleteUrl: '/meter/v1/entrust_attachment/?ids=', deleteUrl: '/soil/v1/sample_photo/?ids=',
uploadFileUrl: '/soil/v1/sample_photo/upload/', uploadFileUrl: '/soil/v1/sample_photo/upload/',
downloadFileUrl: '/soil/v1/sample_photo/download/', downloadFileUrl: '/soil/v1/sample_photo/download/',
downloadBatch: '/food/v1/contract_attachment/download_batch', downloadBatch: '/food/v1/contract_attachment/download_batch',
......
...@@ -30,6 +30,10 @@ module.exports = { ...@@ -30,6 +30,10 @@ module.exports = {
}, },
{ {
src: 'http://static.patzn.com/thirdparty/layx/layx-2.5.3.min.js' src: 'http://static.patzn.com/thirdparty/layx/layx-2.5.3.min.js'
},
{
src:
'http://api.map.baidu.com/api?v=2.0&ak=o7zOtlrjZq7LTzVTyEiI6VhmRYYPrlKb'
} }
], ],
link: [ link: [
......
...@@ -11,12 +11,9 @@ ...@@ -11,12 +11,9 @@
<Col span="24"> <Col span="24">
<Form id="search-sample-company" v-show="searchOpen" :label-width="90" inline onsubmit="return false"> <Form id="search-sample-company" v-show="searchOpen" :label-width="90" inline onsubmit="return false">
<label class="label-sign"></label> <label class="label-sign"></label>
<Form-item label="检测项目:" class="search-item"> <Form-item label="试验名称:" class="search-item">
<Input v-model="formObj.name" @on-enter="_formSearch" placeholder="请输入检测项目" clearable /> <Input v-model="formObj.name" @on-enter="_formSearch" placeholder="请输入检测项目" clearable />
</Form-item> </Form-item>
<Form-item label="检测依据:" class="search-item">
<Input v-model="formObj.code" @on-enter="_formSearch" placeholder="请输入检测依据" clearable />
</Form-item>
<Form-item class="search-btn"> <Form-item class="search-btn">
<Button @click="_formSearch" type="primary"> <Button @click="_formSearch" type="primary">
搜索 搜索
......
...@@ -11,10 +11,7 @@ ...@@ -11,10 +11,7 @@
<Col span="24"> <Col span="24">
<Form id="search-sample-company" v-show="searchOpen" :label-width="80" inline onsubmit="return false"> <Form id="search-sample-company" v-show="searchOpen" :label-width="80" inline onsubmit="return false">
<label class="label-sign"></label> <label class="label-sign"></label>
<Form-item label="样品名称:" class="search-item"> <Form-item label="试样编号:" class="search-item">
<Input v-model="formObj.name" @on-enter="_formSearch" placeholder="请输入样品名称" clearable />
</Form-item>
<Form-item label="样品编号:" class="search-item">
<Input v-model="formObj.sampleCode" @on-enter="_formSearch" placeholder="请输入样品编号" clearable /> <Input v-model="formObj.sampleCode" @on-enter="_formSearch" placeholder="请输入样品编号" clearable />
</Form-item> </Form-item>
<!-- <Form-item label="制单日期:" style="width: 25%">--> <!-- <Form-item label="制单日期:" style="width: 25%">-->
......
...@@ -47,7 +47,8 @@ ...@@ -47,7 +47,8 @@
</Row> </Row>
</div> </div>
</div> </div>
<PhotoManage ref="FileManage"></PhotoManage> <PhotoManage ref="PhotoManage"></PhotoManage>
<FileManage ref="FileManage"></FileManage>
<Operation ref="operationModal"></Operation> <Operation ref="operationModal"></Operation>
<SamplePreparationEdit ref="editModal" @on-result-change="_formSearch"></SamplePreparationEdit> <SamplePreparationEdit ref="editModal" @on-result-change="_formSearch"></SamplePreparationEdit>
<SoilSampleManage ref="sampleManageModal" @on-result-change="_page"></SoilSampleManage> <SoilSampleManage ref="sampleManageModal" @on-result-change="_page"></SoilSampleManage>
...@@ -197,7 +198,7 @@ export default { ...@@ -197,7 +198,7 @@ export default {
this._sampleManage(data.id) this._sampleManage(data.id)
break break
case '试样照片': case '试样照片':
this._upload(data.id) this._uploadPhoto(data.id)
break break
case '附件': case '附件':
this._upload(data.id) this._upload(data.id)
...@@ -326,8 +327,12 @@ export default { ...@@ -326,8 +327,12 @@ export default {
this.$refs.refModal._open(data) this.$refs.refModal._open(data)
}, },
_uploadPhoto(id) {
// 上传照片文件
this.$refs.PhotoManage._open(id, 'entrustId')
},
_upload(id) { _upload(id) {
// 上传文件 // 上传照片文件
this.$refs.FileManage._open(id, 'entrustId') this.$refs.FileManage._open(id, 'entrustId')
}, },
_exportEntrust(id) { _exportEntrust(id) {
......
...@@ -131,43 +131,13 @@ export default { ...@@ -131,43 +131,13 @@ export default {
type: '', // 判断是企业或政府委托 type: '', // 判断是企业或政府委托
getPage: {}, getPage: {},
pageColumns: [ pageColumns: [
{ title: '产品', key: 'subClass', width: 200, fixed: 'left' }, { title: '试验名称', key: 'name', width: 160 },
{ title: '样品编号', key: 'num', width: 180, detail: true }, { title: '试验项目英文简写', key: 'shortName', width: 140 },
{ title: '样品名称', key: 'sampleName', width: 120 }, { title: '大类', key: 'mainType', width: 140 },
{ title: '样品大类', key: 'firstClass', width: 130 }, { title: '小类', key: 'smallType' },
{ title: '样品细类', key: 'detectType', width: 120 }, { title: '检测依据', key: 'testBasis', width: 180 },
{ title: '抽样单编号', key: 'samplingNum', width: 140 }, { title: '试验方法', key: 'testMethod', width: 180 },
{ title: '检测项目', key: 'name', width: 200 }, { title: '状态', key: 'status', width: 180 }
{ title: '状态', key: 'progress', width: 120, status: true },
{ title: '检测科室', key: 'groupName', width: 130, editCell: true },
{ title: '省局项目ID', key: 'provinceItemId', width: 120 },
{
title: '检测依据简称',
key: 'testBasisSm',
width: 200,
editCell: true
},
{
title: '检测依据',
key: 'testBasisAndName',
width: 300,
editCell: true
},
{ title: '检测方法', key: 'testMethod', width: 200, editCell: true },
{ title: '判定依据', key: 'judgeBasisAndName', width: 300 },
{ title: '检测值', key: 'testValue', width: 120 },
{ title: '单位', key: 'unit', width: 120 },
{ title: '结果判定', key: 'qualified', width: 120 },
{ title: '检出限', key: 'detection', width: 120 },
{ title: '限量', key: 'limitDefault', width: 120 },
{ title: '是否分包', key: 'epibolyItem', width: 120 },
{ title: '接收日期', key: 'receiveDate', width: 120, date: true },
{ title: '抽样日期', key: 'samplingDate', width: 120, date: true },
{ title: '签发人', key: 'issuer', width: 120 },
{ title: '签发日期', key: 'issueDate', width: 120, date: true },
{ title: '下单日期', key: 'ctime', width: 120, date: true },
{ title: '说明', key: 'labRemark', width: 200 },
{ title: '备注', key: 'remark' }
], ],
btn: [ btn: [
// {type: 'primary', id: 'food-sampling-list-item-match', name: '匹配省抽项目'}, // {type: 'primary', id: 'food-sampling-list-item-match', name: '匹配省抽项目'},
......
...@@ -9,11 +9,8 @@ ...@@ -9,11 +9,8 @@
<Col span="24" style="padding-bottom: 5px"> <Col span="24" style="padding-bottom: 5px">
<Form id="search-wait" :label-width="90" v-show="searchOpen" inline onsubmit="return false"> <Form id="search-wait" :label-width="90" v-show="searchOpen" inline onsubmit="return false">
<label class="label-sign"></label> <label class="label-sign"></label>
<Form-item label="样品名称:" class="search-item"> <Form-item label="试样编号:" class="search-item">
<Input @on-enter="_formSearch" v-model="formObj.name" name="name" placeholder="请输入样品名称" clearable></Input> <Input @on-enter="_formSearch" v-model="formObj.sampleCode" name="sampleCode" placeholder="请输入样品编号" clearable></Input>
</Form-item>
<Form-item label="样品编号:" class="search-item">
<Input @on-enter="_formSearch" v-model="formObj.num" name="num" placeholder="请输入样品编号" clearable></Input>
<input name="contractId" type="hidden"> <input name="contractId" type="hidden">
</Form-item> </Form-item>
<Form-item class="search-btn"> <Form-item class="search-btn">
......
<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="委托单位:">
<Input v-model="formObj.client" name="client" placeholder="请输入委托单位" clearable/>
</Form-item>
</Form>
</div>
<div class="clear"></div>
</Col>
<!--内容-->
<Col span="24">
<Row :gutter="16">
<Col span="14">
<ClientLocationSearch ref="clientMap"></ClientLocationSearch>
</Col>
<Col span="10">
<element-table
id="table-year"
ref="pageTable"
:get-page="getPage"
hide-checkbox
>
<el-table-column fixed type="index" label="序号" width="100">
</el-table-column>
<el-table-column
v-for="item in pageColumns"
:key="item.key"
:prop="item.key"
:label="item.title"
:width="item.width"
:min-width="200"
:fixed="item.fixed?item.fixed:undefined"
>
<template slot-scope="scope">
<div v-if="item.detail">
<a @click.stop="_detailModal(scope.row)">{{ scope.row[item.key] }}</a>
</div>
<span v-else>{{ scope.row[item.key] }}</span>
</template>
</el-table-column>
</element-table>
</Col>
</Row>
</Col>
</Row>
</div>
</div>
</div>
</template>
<script>
import ClientLocationSearch from './ClientLocationSearch'
export default {
components: { ClientLocationSearch },
data() {
return {
formObj: {},
getPage: {},
pageColumns: [
{ title: '委托商', key: 'client', width: 200 },
{ title: '委托编号', key: 'entrustCode', width: 120 },
{ title: '委托日期', key: 'entrustDate', width: 120, date: true },
{ title: '钻孔位置', key: 'boreholeLocation', width: 120 }
]
}
},
mounted() {},
methods: {}
}
</script>
<style>
</style>
<template>
<div style="position:relative;">
<div style="margin-top: 6px ;position:relative; ">
<Form id="edit-form11" label-width="50" inline >
<label class="label-sign"></label>
<!-- <Form-item label="人员:" prop="username" >-->
<!-- <Select v-model="formObj.username" @on-change="_chargerChange" :label-in-value="true" style="width: 100px" name="username"-->
<!-- clearable>-->
<!-- <Option v-for="item in userList" :value="item.name" :key="item.name">{{ item.name}}</Option>-->
<!-- </Select>-->
<!-- </Form-item>-->
<!-- <Form-item class="search-item" label="时间:" style="margin-right: 0px">-->
<!-- &lt;!&ndash; <DatePicker v-model="formObj.date" type="datetimerange" placeholder="请选择时间" style="width: 300px"></DatePicker>&ndash;&gt;-->
<!-- <date-picker ref="validDate" @on-change="_outDateChange" type="datetimerange" format="yyyy-MM-dd HH:mm" placeholder="请选择时间"-->
<!-- style="width:260px;"></date-picker>-->
<!-- <input v-model="formObj.sendDateBegin" name="regdateBegin" type="hidden">-->
<!-- <input v-model="formObj.sendDateEnd" name="regdateEnd" type="hidden">-->
<!-- </Form-item>-->
<!-- <Form-item style="position:absolute;left:440px;" >-->
<!-- <Button @click="_formSearch" type="primary">搜索</Button>-->
<!-- </Form-item>-->
</Form>
</div>
<div id="map"></div>
</div>
</template>
<script>
export default {
name: 'PeopleLocationSearchVue',
data() {
return {
regdateBegin: '',
regdateEnd: '',
value: '',
formObj: {
username: '',
sendDateBegin: '',
sendDateEnd: ''
},
userList: [],
locationList: []
}
},
mounted() {
// this._getLocationList()
// this._getUserList()
this.getMapInfo()
},
methods: {
_getUserList() {
// 用户列表
this.$store.dispatch('LmsStaffInfo/list', { status: 1 }).then(() => {
this.userList = this.$store.state.LmsStaffInfo.list
console.log('-------------', this.userList)
})
},
_formSearch() {
this.$store
.dispatch('LmsStaffInfo/getLocationList', this.formObj)
.then(() => {
this.locationList = this.$store.state.LmsStaffInfo.listLocation
this.getMapInfo(this.locationList)
})
},
_getLocationList() {
this.$store
.dispatch('LmsStaffInfo/getLocationList', this.formObj)
.then(() => {
this.locationList = this.$store.state.LmsStaffInfo.listLocation
this.getMapInfo(this.locationList)
// this.getMapInfoPoint(this.locationList);
})
},
getMapInfo(data) {
// 百度地图API功能
// eslint-disable-next-line no-undef
const map = new BMap.Map('map')
map.centerAndZoom('山东', 5)
map.enableScrollWheelZoom()
// 获取JSON数组
const opts = {
width: 250, // 信息窗口宽度
height: 80, // 信息窗口高度
title: '位置信息', // 信息窗口标题
enableMessage: true // 设置允许信息窗发送短息
}
console.log('--data-', data)
// eslint-disable-next-line no-undef
const myIcon = new BMap.Icon(
'http://api.map.baidu.com/img/markers.png',
// eslint-disable-next-line no-undef
new BMap.Size(22, 24),
{
// eslint-disable-next-line no-undef
offset: new BMap.Size(10, 25),
// eslint-disable-next-line no-undef
imageOffset: new BMap.Size(0, 0 - 12 * 25)
}
)
console.log(myIcon)
// for (let i = 0; i < data.length; i++) {
// const location = data[i]
// const objs = location.usersList
// const userName = location.username
//
// console.log('--objs-', objs)
//
// const pois = []
// for (let j = 0; j < objs.length; j++) {
// const obj = objs[j]
// // eslint-disable-next-line no-undef
// pois[j] = new BMap.Point(obj.longitude, obj.latitude)
// // eslint-disable-next-line no-undef
// const marker = new BMap.Marker(
// // eslint-disable-next-line no-undef
// new BMap.Point(obj.longitude, obj.latitude),
// { icon: myIcon }
// ) // 创建标注
// const content =
// '人员:' +
// userName +
// ' </br> ' +
// '时间:' +
// this.$dateformat(obj.sendDate, 'yyyy-mm-dd HH:MM:ss')
// map.addOverlay(marker) // 将标注添加到地图中
// addClickHandler(content, marker)
// }
// console.log('--pois-', pois)
// // eslint-disable-next-line no-undef
// const polyline = new BMap.Polyline(pois, {
// strokeColor: 'blue',
// strokeWeight: 2,
// strokeOpacity: 1
// }) // 创建折线
// map.addOverlay(polyline) // 增加折线
// }
// eslint-disable-next-line no-unused-vars
function addClickHandler(content, marker) {
marker.addEventListener('click', function(e) {
openInfo(content, e)
})
}
function openInfo(content, e) {
const p = e.target
// eslint-disable-next-line no-undef
const point = new BMap.Point(p.getPosition().lng, p.getPosition().lat)
// eslint-disable-next-line no-undef
const infoWindow = new BMap.InfoWindow(content, opts) // 创建信息窗口对象
map.openInfoWindow(infoWindow, point) // 开启信息窗口
}
},
_chargerChange(obj) {
console.log(obj)
this.formObj.username = obj.value
},
_outDateChange(data) {
$('input[name=regdateBegin]').val(data[0])
$('input[name=regdateEnd]').val(data[1])
this.formObj.sendDateBegin = data[0]
this.formObj.sendDateEnd = data[1]
},
_page(formId, uri, extendsData) {
this.loading = true
this.formId = formId
if (extendsData) {
this.extendsData = extendsData
}
this.$store.dispatch(uri, this._searchParams()).then(() => {
console.log('page-------', this._searchParams())
this.loading = false
this.$emit('on-result-change', 'page', '')
})
}
}
}
</script>
<style scoped>
#map {
height: 400px;
margin-top: -9px;
}
</style>
...@@ -26,6 +26,7 @@ import MeterAnnualEntrust from '../pages/soil-statistics/annual-entrust/MeterAnn ...@@ -26,6 +26,7 @@ import MeterAnnualEntrust from '../pages/soil-statistics/annual-entrust/MeterAnn
import ReportAuditIndex from '../pages/soil-report-manage/report-audit/ReportAuditIndex' import ReportAuditIndex from '../pages/soil-report-manage/report-audit/ReportAuditIndex'
import ReportIssueIndex from '../pages/soil-report-manage/report-issue/ReportIssueIndex' import ReportIssueIndex from '../pages/soil-report-manage/report-issue/ReportIssueIndex'
import SampleDisposeIndex from '../pages/soil-sample-manage/sample-dispose/SampleDisposeIndex' import SampleDisposeIndex from '../pages/soil-sample-manage/sample-dispose/SampleDisposeIndex'
import ClientLocationSearch from '../pages/soil-statistics/client_location/ClientLocationIndex'
import Blank from '~/pages/blank' import Blank from '~/pages/blank'
export default [ export default [
{ {
...@@ -181,6 +182,11 @@ export default [ ...@@ -181,6 +182,11 @@ export default [
path: 'personal_task', path: 'personal_task',
component: MeterPersonalTask, component: MeterPersonalTask,
meta: { title: '个人检测任务查询' } meta: { title: '个人检测任务查询' }
},
{
path: 'client_location',
component: ClientLocationSearch,
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