|
|
@ -11,8 +11,8 @@ |
|
|
|
|
|
|
|
<el-form-item label="服务分类" |
|
|
|
label-width="150px" |
|
|
|
prop="serviceCategoryId"> |
|
|
|
<el-select v-model="formData.serviceCategoryId" |
|
|
|
prop="serviceCategoryKey"> |
|
|
|
<el-select v-model="formData.serviceCategoryKey" |
|
|
|
placeholder="请选择" |
|
|
|
clearable |
|
|
|
class="item_width_1"> |
|
|
@ -85,12 +85,12 @@ |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="联系方式" |
|
|
|
prop="principalConcat" |
|
|
|
prop="principalContact" |
|
|
|
label-width="150px" |
|
|
|
style="display: block"> |
|
|
|
<el-input class="item_width_1" |
|
|
|
placeholder="请输入联系人电话" |
|
|
|
v-model="formData.principalConcat"> |
|
|
|
v-model="formData.principalContact"> |
|
|
|
</el-input> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
@ -101,7 +101,7 @@ |
|
|
|
:picker-options="startPickerOptions" |
|
|
|
class="item_width_2" |
|
|
|
type="date" |
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" |
|
|
|
value="yyyy-MM-dd" |
|
|
|
placeholder="开始时间"> |
|
|
|
</el-date-picker> |
|
|
@ -110,7 +110,7 @@ |
|
|
|
:picker-options="endPickerOptions" |
|
|
|
class="item_width_2 data-tag" |
|
|
|
type="date" |
|
|
|
value-format="yyyy-MM-dd" |
|
|
|
value-format="yyyy-MM-dd HH:mm:ss" |
|
|
|
value="yyyy-MM-dd" |
|
|
|
placeholder="结束时间"> |
|
|
|
</el-date-picker> |
|
|
@ -196,7 +196,8 @@ |
|
|
|
<el-form-item label="服务状态" |
|
|
|
label-width="150px" |
|
|
|
prop="serviceStatus"> |
|
|
|
<el-select class="item_width_1" |
|
|
|
<span>已完成</span> |
|
|
|
<!-- <el-select class="item_width_1" |
|
|
|
v-model="feedbackFormData.serviceStatus" |
|
|
|
placeholder="全部" |
|
|
|
clearable> |
|
|
@ -205,7 +206,7 @@ |
|
|
|
:label="item.label" |
|
|
|
:value="item.value"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-select> --> |
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="满意度" |
|
|
@ -261,17 +262,17 @@ |
|
|
|
prop="attach"> |
|
|
|
<el-upload class="upload-demo" |
|
|
|
:action="uploadUlr" |
|
|
|
accept=".doc,.pdf,.xls,.docx,.xlsx" |
|
|
|
accept=".doc,.pdf,.xls,.docx,.xlsx,.jpg,.png,.jpeg,.bmp,.mp4,.wma,.m4a,.mp3" |
|
|
|
:on-success="handleFileSuccess" |
|
|
|
:on-remove="handleFileRemove" |
|
|
|
:on-preview="handleFileDownload" |
|
|
|
:limit="3" |
|
|
|
:before-upload="beforeUpload" |
|
|
|
:file-list="fileList"> |
|
|
|
<el-button size="small" |
|
|
|
:disabled="fileList.length===3" |
|
|
|
type="primary">点击上传</el-button> |
|
|
|
<div slot="tip" |
|
|
|
class="el-upload__tip">只能上传word、excel、pdf文件</div> |
|
|
|
class="el-upload__tip">支持图片、word、pdf</div> |
|
|
|
</el-upload> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
@ -336,12 +337,12 @@ export default { |
|
|
|
|
|
|
|
keyWords: '', |
|
|
|
formData: { |
|
|
|
serviceCategoryId: '',//服务分类id |
|
|
|
serviceCategoryKey: '',//服务分类id |
|
|
|
serviceProjectId: '',//服务项目id |
|
|
|
serviceOrgId: '',//服务组织id |
|
|
|
serviceScope: [],// |
|
|
|
principalName: '',//经办人(责任人)姓名 |
|
|
|
principalConcat: '',//经办人联系方式 |
|
|
|
principalContact: '',//经办人联系方式 |
|
|
|
serviceTimeStart: '',//服务起始时间yyyy-MM-dd |
|
|
|
serviceTimeEnd: '',//服务截止时间yyyy-MM-dd |
|
|
|
remark: '',// |
|
|
@ -354,13 +355,48 @@ export default { |
|
|
|
serviceGoal: '',// 服务目标 |
|
|
|
serviceEffect: '',// 服务效果 |
|
|
|
servicePeopleNumber: null,// 服务人数 |
|
|
|
serviceStatus: '',// 服务状态。in_service服务中;completed:已完成 |
|
|
|
serviceStatus: 'completed',// 服务状态。in_service服务中;completed:已完成 |
|
|
|
satisfaction: '',//满意度。不满意:bad、基本满意:good、非常满意:perfect |
|
|
|
longitude: '',// 经度 |
|
|
|
latitude: '',// 维度 |
|
|
|
address: '', |
|
|
|
attachmentList: [],// 附件列表 |
|
|
|
}, |
|
|
|
formDataTemp: { |
|
|
|
principalContact: "15111111111", |
|
|
|
principalName: "31231", |
|
|
|
remark: "4234234", |
|
|
|
serviceCategoryKey: "01", |
|
|
|
serviceOrgId: "1531105677127692289", |
|
|
|
serviceProjectId: "1531514265581076482", |
|
|
|
serviceScope: [ |
|
|
|
{ |
|
|
|
objectId: "1479033225060757506", |
|
|
|
objectName: "合肥路街道", |
|
|
|
objectType: "street", |
|
|
|
}, |
|
|
|
{ |
|
|
|
objectId: "1514064686570147842", |
|
|
|
objectName: "ss", |
|
|
|
objectType: "street", |
|
|
|
} |
|
|
|
], |
|
|
|
serviceTimeEnd: "", |
|
|
|
serviceTimeStart: "", |
|
|
|
|
|
|
|
feedback: { |
|
|
|
address: "山东省青岛市市南区南京路73号", |
|
|
|
latitude: 36.0722275, |
|
|
|
longitude: 120.38945519, |
|
|
|
satisfaction: "bad", |
|
|
|
serviceEffect: "234234234", |
|
|
|
serviceGoal: "234234", |
|
|
|
servicePeopleNumber: 1, |
|
|
|
serviceProjectId: "1531514265581076482", |
|
|
|
serviceProjectName: "223", |
|
|
|
serviceStatus: "completed", |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
projectList: [],//服务项目list |
|
|
|
orgList: [],//服务组织list |
|
|
@ -382,22 +418,30 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
watch: { |
|
|
|
// "formData.serviceTimeEnd": function (val) { |
|
|
|
// if (val && val != '') { |
|
|
|
// let arrayTemp = val.split(' ') |
|
|
|
// this.formData.serviceTimeEnd = arrayTemp[0] |
|
|
|
// } |
|
|
|
"formData.serviceTimeEnd": function (val) { |
|
|
|
if (val && val != '') { |
|
|
|
let arrayTemp = val.split(' ') |
|
|
|
this.formData.serviceTimeEnd = arrayTemp[0] + ' 23:59:59' |
|
|
|
} |
|
|
|
|
|
|
|
// }, |
|
|
|
}, |
|
|
|
}, |
|
|
|
components: {}, |
|
|
|
async mounted () { |
|
|
|
this.startLoading() |
|
|
|
this.initMap() |
|
|
|
this.$refs.ref_form.resetFields(); |
|
|
|
if (this.formType === 'add') { |
|
|
|
this.$refs.ref_form.resetFields(); |
|
|
|
await this.loadScopeTree() |
|
|
|
} |
|
|
|
|
|
|
|
this.$refs.ref_form_feedback.resetFields(); |
|
|
|
await this.loadScopeTree() |
|
|
|
|
|
|
|
|
|
|
|
this.endLoading() |
|
|
|
|
|
|
|
this.formData = JSON.parse(JSON.stringify(this.formDataTemp)); |
|
|
|
this.feedbackFormData = { ...this.formData.feedback } |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
@ -408,6 +452,8 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
hancleClickCategray () { |
|
|
|
this.formData.serviceProjectId = '' |
|
|
|
this.formData.serviceOrgId = '' |
|
|
|
//获取服务项目 |
|
|
|
this.loadProjectList() |
|
|
|
//获取服务组织 |
|
|
@ -421,8 +467,8 @@ export default { |
|
|
|
|
|
|
|
// 获取服务范围树 |
|
|
|
loadScopeTree () { |
|
|
|
// const url = '/gov/org/isServiceProject/service/serviceScopeTree' |
|
|
|
const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/isServiceProject/service/serviceScopeTree' |
|
|
|
const url = '/gov/org/icServiceProject/service/serviceScopeTree' |
|
|
|
// const url = 'http://yapi.elinkservice.cn/mock/245/gov/org/isServiceProject/service/serviceScopeTree' |
|
|
|
let params = {} |
|
|
|
window.app.ajax.post( |
|
|
|
url, |
|
|
@ -450,7 +496,7 @@ export default { |
|
|
|
selArray.forEach(element => { |
|
|
|
|
|
|
|
let obj = { |
|
|
|
objectType: element.data.objectType, |
|
|
|
objectType: element.data.objectType === 'grid' ? 'grid' : element.data.objectType === 'neighborhood' ? 'neighborhood' : 'agency', |
|
|
|
objectId: element.data.objectId, |
|
|
|
objectName: element.data.objectName, |
|
|
|
} |
|
|
@ -461,17 +507,17 @@ export default { |
|
|
|
|
|
|
|
//加载组织 |
|
|
|
async loadProjectList () { |
|
|
|
// const url = '/heart/icServiceProject/serviceProjectList' |
|
|
|
const url = 'http://yapi.elinkservice.cn/mock/245/heart/icServiceProject/serviceProjectList' |
|
|
|
const url = '/heart/icServiceProject/serviceProjectList' |
|
|
|
// const url = 'http://yapi.elinkservice.cn/mock/245/heart/icServiceProject/serviceProjectList' |
|
|
|
let params = { |
|
|
|
isPage: false, |
|
|
|
serviceCategory: this.formData.serviceCategoryId, |
|
|
|
serviceCategoryKey: this.formData.serviceCategoryKey, |
|
|
|
} |
|
|
|
|
|
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
this.projectList = data.list |
|
|
|
this.projectList = [...data.list] |
|
|
|
} else { |
|
|
|
this.$message.error(msg) |
|
|
|
} |
|
|
@ -479,10 +525,10 @@ export default { |
|
|
|
|
|
|
|
//加载组织 |
|
|
|
async loadOrgList () { |
|
|
|
// const url = '/heart/icServiceOrg/selectlist' |
|
|
|
const url = 'http://yapi.elinkservice.cn/mock/245/heart/icServiceOrg/selectlist' |
|
|
|
const url = '/heart/icServiceOrg/selectlist' |
|
|
|
// const url = 'http://yapi.elinkservice.cn/mock/245/heart/icServiceOrg/selectlist' |
|
|
|
let params = { |
|
|
|
serviceType: this.formData.serviceCategoryId, |
|
|
|
serviceType: this.formData.serviceCategoryKey, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
@ -497,6 +543,15 @@ export default { |
|
|
|
|
|
|
|
async handleComfirm () { |
|
|
|
|
|
|
|
if (this.formType === 'add') { |
|
|
|
this.handleAdd() |
|
|
|
} else if (this.formType === 'feedback') { |
|
|
|
this.handleFeedback() |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
async handleAdd () { |
|
|
|
|
|
|
|
this.btnDisable = true |
|
|
|
setTimeout(() => { |
|
|
|
this.btnDisable = false |
|
|
@ -531,10 +586,30 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
async addFuwu () { |
|
|
|
if (this.showFeedback) { |
|
|
|
this.feedbackFormData.attachmentList = [] |
|
|
|
this.feedbackFormData.attachmentList = [...this.fileList] |
|
|
|
this.formData.feedback = { ... this.feedbackFormData } |
|
|
|
} else { |
|
|
|
this.formData.feedback = null |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
console.log(this.formData) |
|
|
|
return false |
|
|
|
// const url = '/heart/icServiceProject/service/initiate' |
|
|
|
const url = 'http://yapi.elinkservice.cn/mock/245/heart/icServiceProject/service/initiate' |
|
|
|
// return false |
|
|
|
const regPhone = /^1(3|4|5|6|7|8|9)\d{9}$/; //手机号码 |
|
|
|
if (regPhone.test(this.formData.principalContact) === false) { |
|
|
|
this.btnDisable = false |
|
|
|
this.$message({ |
|
|
|
type: 'warning', |
|
|
|
message: '请输入正确的手机号码' |
|
|
|
}) |
|
|
|
return false; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const url = '/heart/icServiceProject/service/initiate' |
|
|
|
// const url = 'http://yapi.elinkservice.cn/mock/245/heart/icServiceProject/service/initiate' |
|
|
|
let params = { |
|
|
|
|
|
|
|
...this.formData |
|
|
@ -550,17 +625,62 @@ export default { |
|
|
|
this.$message.error(msg) |
|
|
|
} |
|
|
|
}, |
|
|
|
async handleFeedback () { |
|
|
|
|
|
|
|
this.btnDisable = true |
|
|
|
setTimeout(() => { |
|
|
|
this.btnDisable = false |
|
|
|
}, 10000) |
|
|
|
|
|
|
|
this.$refs['ref_form_feedback'].validate((valid, messageObj) => { |
|
|
|
if (!valid) { |
|
|
|
app.util.validateRule(messageObj) |
|
|
|
this.btnDisable = false |
|
|
|
} else { |
|
|
|
|
|
|
|
this.addFeecback() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
async addFeecback () { |
|
|
|
|
|
|
|
this.feedbackFormData.attachmentList = [] |
|
|
|
this.feedbackFormData.attachmentList = [...this.fileList] |
|
|
|
this.feedbackFormData.serviceRecordId = this.serviceRecordId |
|
|
|
|
|
|
|
console.log(this.feedbackFormData) |
|
|
|
// return false |
|
|
|
|
|
|
|
const url = '/heart/icServiceProject/service/feedback' |
|
|
|
// const url = 'http://yapi.elinkservice.cn/mock/245/heart/icServiceProject/service/initiate' |
|
|
|
let params = { |
|
|
|
|
|
|
|
...this.feedbackFormData |
|
|
|
} |
|
|
|
|
|
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
|
|
|
|
|
if (code === 0) { |
|
|
|
this.$message.success('发起成功') |
|
|
|
this.resetData() |
|
|
|
this.$emit('handleOk') |
|
|
|
} else { |
|
|
|
this.$message.error(msg) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
beforeUpload (file) { |
|
|
|
const array = file.name.split('.') |
|
|
|
const extension = array[array.length - 1] |
|
|
|
|
|
|
|
if (extension !== 'xls' |
|
|
|
&& extension !== 'xlsx' |
|
|
|
&& extension !== 'doc' |
|
|
|
&& extension !== 'docx' |
|
|
|
&& extension !== 'pdf') { |
|
|
|
this.$message.error('只能上传word、excel、pdf文件!') |
|
|
|
const formatarray = ['jpg', 'png', 'jpeg', 'bmp', 'mp4', 'wma', 'm4a', 'mp3', 'doc', 'docx', 'xls', 'xlsx', 'pdf'] |
|
|
|
|
|
|
|
if (formatarray.indexOf(extension) === -1) { |
|
|
|
this.$message.error('只支持图片、word、pdf') |
|
|
|
return false |
|
|
|
} |
|
|
|
|
|
|
@ -579,8 +699,28 @@ export default { |
|
|
|
const array = file.name.split('.') |
|
|
|
const fileType = array[array.length - 1] |
|
|
|
|
|
|
|
const picArray = ['jpg', 'png', 'jpeg', 'bmp'] |
|
|
|
const videoarray = ['mp4', 'wma', 'm4a'] |
|
|
|
const docArray = ['doc', 'docx', 'xls', 'xlsx', 'pdf'] |
|
|
|
const mp3Array = ['mp3'] |
|
|
|
|
|
|
|
if (picArray.indexOf(fileType) > -1) { |
|
|
|
file.attachmentFormat = 'image' |
|
|
|
} else if (videoarray.indexOf(fileType) > -1) { |
|
|
|
file.attachmentFormat = 'video' |
|
|
|
} else if (docArray.indexOf(fileType) > -1) { |
|
|
|
file.attachmentFormat = 'doc' |
|
|
|
} else if (mp3Array.indexOf(fileType) > -1) { |
|
|
|
file.attachmentFormat = 'voice' |
|
|
|
} |
|
|
|
|
|
|
|
file.url = res.data.url |
|
|
|
file.type = fileType |
|
|
|
|
|
|
|
file.attachmentName = file.name |
|
|
|
file.attachmentType = file.type |
|
|
|
file.attachmentUrl = file.url |
|
|
|
|
|
|
|
this.fileList.push(file) |
|
|
|
console.log(this.fileList) |
|
|
|
} else this.$message.error(res.msg) |
|
|
@ -719,12 +859,12 @@ export default { |
|
|
|
|
|
|
|
resetData () { |
|
|
|
this.formData = { |
|
|
|
serviceCategoryId: '',//服务分类id |
|
|
|
serviceCategoryKey: '',//服务分类id |
|
|
|
serviceProjectId: '',//服务项目id |
|
|
|
serviceOrgId: '',//服务组织id |
|
|
|
serviceScope: [],// |
|
|
|
principalName: '',//经办人(责任人)姓名 |
|
|
|
principalConcat: '',//经办人联系方式 |
|
|
|
principalContact: '',//经办人联系方式 |
|
|
|
serviceTimeStart: '',//服务起始时间yyyy-MM-dd |
|
|
|
serviceTimeEnd: '',//服务截止时间yyyy-MM-dd |
|
|
|
remark: '',// |
|
|
@ -737,7 +877,7 @@ export default { |
|
|
|
serviceGoal: '',// 服务目标 |
|
|
|
serviceEffect: '',// 服务效果 |
|
|
|
servicePeopleNumber: null,// 服务人数 |
|
|
|
serviceStatus: '',// 服务状态。in_service服务中;completed:已完成 |
|
|
|
serviceStatus: 'completed',// 服务状态。in_service服务中;completed:已完成 |
|
|
|
satisfaction: '',//满意度。不满意:bad、基本满意:good、非常满意:perfect |
|
|
|
longitude: '',// 经度 |
|
|
|
latitude: '',// 维度 |
|
|
@ -765,7 +905,7 @@ export default { |
|
|
|
dataRule () { |
|
|
|
return { |
|
|
|
|
|
|
|
serviceCategoryId: [ |
|
|
|
serviceCategoryKey: [ |
|
|
|
{ required: true, message: '服务类别不能为空', trigger: 'blur' }, |
|
|
|
], |
|
|
|
serviceProjectId: [ |
|
|
|