|
|
@ -6,6 +6,12 @@ |
|
|
|
:model="dataForm" |
|
|
|
@keyup.enter.native="getDataListSearch()" |
|
|
|
> |
|
|
|
<el-form-item label="部门类型" prop="deptType" label-width="100px"> |
|
|
|
<el-select v-model="dataForm.deptType" placeholder="部门类型" clearable @change="selectModel($event)" style="width:250px;"> |
|
|
|
<el-option v-for="item in deptTypeArr" :key="item.dictValue" :label="item.dictName" :value="item.dictValue" > |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="所属机构" label-width="100px"> |
|
|
|
<el-cascader |
|
|
|
v-model="ids" |
|
|
@ -25,16 +31,16 @@ |
|
|
|
style="width:250px;" |
|
|
|
></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="项目内容" prop="itemCode"> |
|
|
|
<br> |
|
|
|
<el-form-item label="项目内容" prop="itemCode" label-width="100px"> |
|
|
|
<el-input |
|
|
|
v-model="dataForm.itemContent" |
|
|
|
placeholder="请输入项目内容" |
|
|
|
clearable |
|
|
|
@keyup.native="btKeyUpItemContent" |
|
|
|
style="width:200px;" |
|
|
|
style="width:250px;" |
|
|
|
></el-input> |
|
|
|
</el-form-item> |
|
|
|
<br> |
|
|
|
<el-form-item label="提交人" prop="itemCode" label-width="100px"> |
|
|
|
<el-input |
|
|
|
v-model="dataForm.nickName" |
|
|
@ -44,7 +50,7 @@ |
|
|
|
style="width:250px;" |
|
|
|
></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="提交人手机号" prop="itemCode"> |
|
|
|
<el-form-item label="提交人手机号" prop="itemCode" label-width="100px"> |
|
|
|
<el-input |
|
|
|
v-model="dataForm.mobile" |
|
|
|
placeholder="请输入提交人手机号" |
|
|
@ -210,116 +216,142 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import mixinViewModule from '@/mixins/view-module' |
|
|
|
import Detail from './item-deal-detail' |
|
|
|
|
|
|
|
export default { |
|
|
|
mixins: [mixinViewModule], |
|
|
|
name: 'ItemDealList', |
|
|
|
data() { |
|
|
|
return { |
|
|
|
mixinViewModuleOptions: { |
|
|
|
getDataListURL: '/events/item/page', |
|
|
|
getDataListIsPage: true |
|
|
|
}, |
|
|
|
detailVisible: false, |
|
|
|
dataForm: { |
|
|
|
id: '', |
|
|
|
itemState: '0', |
|
|
|
startTime: '', |
|
|
|
endTime: '', |
|
|
|
streetId: '', |
|
|
|
communityId: '', |
|
|
|
deptId: '', |
|
|
|
itemCode: '', |
|
|
|
itemContent: '', |
|
|
|
nickName: '', |
|
|
|
mobile: '' |
|
|
|
import mixinViewModule from '@/mixins/view-module' |
|
|
|
import Detail from './item-deal-detail' |
|
|
|
|
|
|
|
}, |
|
|
|
ids: [], |
|
|
|
options: [], |
|
|
|
pickerBeginDateBefore: { |
|
|
|
disabledDate: (time) => { |
|
|
|
let beginDateVal = this.dataForm.endTime; |
|
|
|
if (beginDateVal) { |
|
|
|
return time.getTime() > new Date(beginDateVal + ' 00:00:00').getTime() |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
pickerBeginDateAfter: { |
|
|
|
disabledDate: (time) => { |
|
|
|
let EndDateVal = this.dataForm.startTime; |
|
|
|
if (EndDateVal) { |
|
|
|
return time.getTime() < new Date(EndDateVal + ' 00:00:00').getTime() |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
} |
|
|
|
export default { |
|
|
|
mixins: [mixinViewModule], |
|
|
|
name: 'ItemDealList', |
|
|
|
data() { |
|
|
|
return { |
|
|
|
mixinViewModuleOptions: { |
|
|
|
getDataListURL: '/events/item/page', |
|
|
|
getDataListIsPage: true |
|
|
|
}, |
|
|
|
components: { |
|
|
|
Detail |
|
|
|
detailVisible: false, |
|
|
|
dataForm: { |
|
|
|
id: '', |
|
|
|
itemState: '0', |
|
|
|
startTime: '', |
|
|
|
endTime: '', |
|
|
|
streetId: '', |
|
|
|
communityId: '', |
|
|
|
deptId: '', |
|
|
|
itemCode: '', |
|
|
|
itemContent: '', |
|
|
|
nickName: '', |
|
|
|
mobile: '', |
|
|
|
deptType: '' |
|
|
|
}, |
|
|
|
created: function () { |
|
|
|
this.getOptions() |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
ids: function (val) { |
|
|
|
if (val.length === 0) { |
|
|
|
this.dataForm.streetId = '' |
|
|
|
this.dataForm.communityId = '' |
|
|
|
this.dataForm.deptId = '' |
|
|
|
} |
|
|
|
if (val.length === 1) { |
|
|
|
this.dataForm.streetId = this.ids[0] |
|
|
|
this.dataForm.communityId = '' |
|
|
|
this.dataForm.deptId = '' |
|
|
|
} |
|
|
|
if (val.length === 2) { |
|
|
|
this.dataForm.streetId = this.ids[0] |
|
|
|
this.dataForm.communityId = this.ids[1] |
|
|
|
this.dataForm.deptId = '' |
|
|
|
} |
|
|
|
if (val.length === 3) { |
|
|
|
this.dataForm.streetId = this.ids[0] |
|
|
|
this.dataForm.communityId = this.ids[1] |
|
|
|
this.dataForm.deptId = this.ids[2] |
|
|
|
} |
|
|
|
ids: [], |
|
|
|
options: [], |
|
|
|
deptTypeArr: [], |
|
|
|
pickerBeginDateBefore: { |
|
|
|
disabledDate: (time) => { |
|
|
|
let beginDateVal = this.dataForm.endTime; |
|
|
|
if (beginDateVal) { |
|
|
|
return time.getTime() > new Date(beginDateVal + ' 00:00:00').getTime() |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
dealAction(id) { |
|
|
|
this.$parent.selectComponent = 'ItemDealDetailView' |
|
|
|
this.$router.push({path: '/events-item-deal', query: {id: id}}) |
|
|
|
}, |
|
|
|
getOptions() { |
|
|
|
this.$http |
|
|
|
.get(`/sys/user/deptOptions/getByLoginUser`) |
|
|
|
.then(({data: res}) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
this.options = res.data.options |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
}) |
|
|
|
}, |
|
|
|
btKeyUpItemCode (e) { |
|
|
|
e.target.value = e.target.value.replace(/[`~!#$%^&*()_\+=<>?:"{}|~!#¥%……&*()={}|《》?:“”【】\\[\]、;‘’,。、\s+]/g, '') |
|
|
|
this.dataForm.itemCode = e.target.value |
|
|
|
}, |
|
|
|
btKeyUpItemContent (e) { |
|
|
|
e.target.value = e.target.value.replace(/[`~!#$%^&*()_\+=<>?:"{}|~!#¥%……&*()={}|《》?:“”【】\\[\]、;‘’,。、\s+]/g, '') |
|
|
|
this.dataForm.itemContent = e.target.value |
|
|
|
}, |
|
|
|
btKeyUpNickName (e) { |
|
|
|
e.target.value = e.target.value.replace(/[`~!#$%^&*()_\+=<>?:"{}|~!#¥%……&*()={}|《》?:“”【】\\[\]、;‘’,。、\s+]/g, '') |
|
|
|
this.dataForm.nickName = e.target.value |
|
|
|
}, |
|
|
|
btKeyUpMobile (e) { |
|
|
|
e.target.value = e.target.value.replace(/[`~!#$%^&*()_\+=<>?:"{}|~!#¥%……&*()={}|《》?:“”【】\\[\]、;‘’,。、\s+]/g, '') |
|
|
|
this.dataForm.mobile = e.target.value |
|
|
|
pickerBeginDateAfter: { |
|
|
|
disabledDate: (time) => { |
|
|
|
let EndDateVal = this.dataForm.startTime; |
|
|
|
if (EndDateVal) { |
|
|
|
return time.getTime() < new Date(EndDateVal + ' 00:00:00').getTime() |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
components: { |
|
|
|
Detail |
|
|
|
}, |
|
|
|
created: function () { |
|
|
|
this.getOptions() |
|
|
|
// 部门类型下拉框赋值 |
|
|
|
this.getdeptTypeArrInfo('sys_deptType') |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
ids: function (val) { |
|
|
|
if (val.length === 0) { |
|
|
|
this.dataForm.streetId = '' |
|
|
|
this.dataForm.communityId = '' |
|
|
|
this.dataForm.deptId = '' |
|
|
|
} |
|
|
|
if (val.length === 1) { |
|
|
|
this.dataForm.streetId = this.ids[0] |
|
|
|
this.dataForm.communityId = '' |
|
|
|
this.dataForm.deptId = '' |
|
|
|
} |
|
|
|
if (val.length === 2) { |
|
|
|
this.dataForm.streetId = this.ids[0] |
|
|
|
this.dataForm.communityId = this.ids[1] |
|
|
|
this.dataForm.deptId = '' |
|
|
|
} |
|
|
|
if (val.length === 3) { |
|
|
|
this.dataForm.streetId = this.ids[0] |
|
|
|
this.dataForm.communityId = this.ids[1] |
|
|
|
this.dataForm.deptId = this.ids[2] |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
dealAction(id) { |
|
|
|
this.$parent.selectComponent = 'ItemDealDetailView' |
|
|
|
this.$router.push({path: '/events-item-deal', query: {id: id}}) |
|
|
|
}, |
|
|
|
getOptions() { |
|
|
|
let param = {deptType:this.dataForm.deptType} |
|
|
|
this.$http |
|
|
|
.post(`/sys/user/deptOptions/getByLoginUserNew`,param) |
|
|
|
.then(({data: res}) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
this.options = res.data.options |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 参数名称取值变化事件 |
|
|
|
selectModel (id) { |
|
|
|
this.dataForm.deptType = '' |
|
|
|
this.deptTypeArr.find((item) => { |
|
|
|
if (item.dictValue === id) { |
|
|
|
this.dataForm.deptType = item.dictValue |
|
|
|
} |
|
|
|
}) |
|
|
|
this.ids = [] |
|
|
|
this.getOptions() |
|
|
|
}, |
|
|
|
// 获取部门类型类型下拉信息 |
|
|
|
getdeptTypeArrInfo (dictType) { |
|
|
|
this.$http.get(`/sys/dict/listSimple/` + dictType).then(({ data: res }) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} |
|
|
|
if (dictType === 'sys_deptType') { |
|
|
|
this.deptTypeArr = res.data |
|
|
|
} |
|
|
|
}).catch(() => {}) |
|
|
|
}, |
|
|
|
btKeyUpItemCode (e) { |
|
|
|
e.target.value = e.target.value.replace(/[`~!#$%^&*()_\+=<>?:"{}|~!#¥%……&*()={}|《》?:“”【】\\[\]、;‘’,。、\s+]/g, '') |
|
|
|
this.dataForm.itemCode = e.target.value |
|
|
|
}, |
|
|
|
btKeyUpItemContent (e) { |
|
|
|
e.target.value = e.target.value.replace(/[`~!#$%^&*()_\+=<>?:"{}|~!#¥%……&*()={}|《》?:“”【】\\[\]、;‘’,。、\s+]/g, '') |
|
|
|
this.dataForm.itemContent = e.target.value |
|
|
|
}, |
|
|
|
btKeyUpNickName (e) { |
|
|
|
e.target.value = e.target.value.replace(/[`~!#$%^&*()_\+=<>?:"{}|~!#¥%……&*()={}|《》?:“”【】\\[\]、;‘’,。、\s+]/g, '') |
|
|
|
this.dataForm.nickName = e.target.value |
|
|
|
}, |
|
|
|
btKeyUpMobile (e) { |
|
|
|
e.target.value = e.target.value.replace(/[`~!#$%^&*()_\+=<>?:"{}|~!#¥%……&*()={}|《》?:“”【】\\[\]、;‘’,。、\s+]/g, '') |
|
|
|
this.dataForm.mobile = e.target.value |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|