|
|
@ -0,0 +1,184 @@ |
|
|
|
|
|
<template> |
|
|
|
|
|
<div> |
|
|
|
|
|
<div class="jhbd-list" v-show="!showDetail"> |
|
|
|
|
|
<div class="jhbd-search"> |
|
|
|
|
|
<el-form :model="searchForm" ref="searchForm" :inline="true" label-width="80px"> |
|
|
|
|
|
<el-row> |
|
|
|
|
|
<el-col :span="5"> |
|
|
|
|
|
<el-form-item :label="$t('page.business.form.bdmc')" prop="name"> |
|
|
|
|
|
<el-input v-model="searchForm.bdmc" :placeholder="$t('form.placeholderInput')" clearable |
|
|
|
|
|
style="width: 200px" @keyup.enter.native="search" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="5"> |
|
|
|
|
|
<el-form-item :label="$t('page.business.form.bdbh')" prop="sn"> |
|
|
|
|
|
<el-input v-model="searchForm.bdbh" :placeholder="$t('form.placeholderInput')" clearable |
|
|
|
|
|
style="width: 200px" @keyup.enter.native="search" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="5"> |
|
|
|
|
|
<el-form-item :label="$t('page.business.form.gsr')" prop="userId"> |
|
|
|
|
|
<SelectDeptUser v-model="searchForm.userId" :name="searchForm.userMc" key="userId" |
|
|
|
|
|
@change="userChange" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="5"> |
|
|
|
|
|
<el-form-item :label="$t('page.business.form.cjsj')"> |
|
|
|
|
|
<el-date-picker v-model="daterange" clearable type="daterange" range-separator="-" |
|
|
|
|
|
:start-placeholder="$t('page.business.form.startDate')" |
|
|
|
|
|
:end-placeholder="$t('page.business.form.endDate')" value-format="yyyy-MM-dd" @change="search" |
|
|
|
|
|
style="width: 200px" /> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="4"> |
|
|
|
|
|
<el-form-item> |
|
|
|
|
|
<el-button type="primary" icon="el-icon-search" @click="search">{{ $t('form.search') }}</el-button> |
|
|
|
|
|
<el-button icon="el-icon-refresh" @click="reset">{{ $t('form.reset') }}</el-button> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div class="jhbd-content"> |
|
|
|
|
|
<el-row class="add-box"> |
|
|
|
|
|
<el-col> |
|
|
|
|
|
<el-button type="primary" icon="el-icon-plus" @click="showAdd()" |
|
|
|
|
|
v-hasPermi="['business:studyFormPlan:xz']">{{ |
|
|
|
|
|
$t('page.business.form.xzjhbd') }}</el-button> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="list"> |
|
|
|
|
|
<el-table-column :label="$t('page.business.form.bh')" prop="bdbh" /> |
|
|
|
|
|
<el-table-column :label="$t('page.business.form.bdmc')" prop="bdmc" /> |
|
|
|
|
|
<el-table-column :label="$t('page.business.form.xtmbmc')" prop="templateMc" /> |
|
|
|
|
|
<el-table-column :label="$t('page.business.form.cjsj')" align="center" prop="createTime" width="140" /> |
|
|
|
|
|
<el-table-column :label="$t('page.business.form.gsr')" align="center" prop="userMc" width="100" /> |
|
|
|
|
|
<el-table-column :label="$t('page.business.form.status')" prop="status" width="100"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span v-if="scope.row.bdzt === 1">{{ $t('page.business.form.statusTbz') }}</span> |
|
|
|
|
|
<span v-if="scope.row.bdzt === 3">{{ $t('page.business.form.statusYtj') }}</span> |
|
|
|
|
|
<span v-if="scope.row.bdzt === 5">{{ $t('page.business.form.statusYtg') }}</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column :label="$t('form.operate')" fixed="right" align="center" width="200"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
|
|
|
|
|
|
<pagination v-show="total > 0" :total="total" :page.sync="searchForm.pageNum" :limit.sync="searchForm.pageSize" |
|
|
|
|
|
@pagination="getList" /> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
|
import { |
|
|
|
|
|
studyFormPlan_list |
|
|
|
|
|
} from '@/api/business/study/studyFormPlan' |
|
|
|
|
|
import SelectDeptUser from '@/views/business/comps/select/SelectDeptUser'; |
|
|
|
|
|
import moment from "moment"; |
|
|
|
|
|
import { mapGetters } from 'vuex' |
|
|
|
|
|
export default { |
|
|
|
|
|
name: 'JhbdList', |
|
|
|
|
|
components: { SelectDeptUser }, |
|
|
|
|
|
props: { |
|
|
|
|
|
study: { |
|
|
|
|
|
type: Object, |
|
|
|
|
|
default: () => { |
|
|
|
|
|
return {} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
computed: { |
|
|
|
|
|
...mapGetters([ |
|
|
|
|
|
'id' |
|
|
|
|
|
]), |
|
|
|
|
|
}, |
|
|
|
|
|
watch: { |
|
|
|
|
|
study: { |
|
|
|
|
|
handler(newVal) { |
|
|
|
|
|
this.searchForm.studyId = newVal.studyId |
|
|
|
|
|
this.search() |
|
|
|
|
|
}, |
|
|
|
|
|
immediate: true, |
|
|
|
|
|
deep: true |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
data() { |
|
|
|
|
|
return { |
|
|
|
|
|
showDetail: false, |
|
|
|
|
|
daterange: [], |
|
|
|
|
|
searchForm: { |
|
|
|
|
|
pageNum: 1, |
|
|
|
|
|
pageSize: 10, |
|
|
|
|
|
studyId: '', |
|
|
|
|
|
bdbh: '', |
|
|
|
|
|
bdmc: '', |
|
|
|
|
|
userId: '', |
|
|
|
|
|
userMc: '', |
|
|
|
|
|
startDate: '', |
|
|
|
|
|
endDate: '', |
|
|
|
|
|
}, |
|
|
|
|
|
loading: false, |
|
|
|
|
|
total: 0, |
|
|
|
|
|
list: [], |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
created() { }, |
|
|
|
|
|
methods: { |
|
|
|
|
|
userChange(val) { |
|
|
|
|
|
this.searchForm.userId = val.id |
|
|
|
|
|
this.searchForm.userMc = val.name |
|
|
|
|
|
this.search() |
|
|
|
|
|
}, |
|
|
|
|
|
search() { |
|
|
|
|
|
this.searchForm.pageNum = 1 |
|
|
|
|
|
this.getList() |
|
|
|
|
|
}, |
|
|
|
|
|
reset() { |
|
|
|
|
|
this.resetForm("searchForm") |
|
|
|
|
|
this.handleQuery() |
|
|
|
|
|
}, |
|
|
|
|
|
getList() { |
|
|
|
|
|
if (this.daterange != null && this.daterange.length > 0) { |
|
|
|
|
|
this.searchForm.startDate = this.daterange[0] |
|
|
|
|
|
this.searchForm.endDate = moment().add(this.daterange[1], 'days').format('YYYY-MM-DD'); |
|
|
|
|
|
} else { |
|
|
|
|
|
this.searchForm.startDate = '' |
|
|
|
|
|
this.searchForm.endDate = '' |
|
|
|
|
|
} |
|
|
|
|
|
this.loading = true |
|
|
|
|
|
studyFormPlan_list(this.searchForm).then(response => { |
|
|
|
|
|
this.list = response.rows |
|
|
|
|
|
this.total = response.total |
|
|
|
|
|
this.loading = false |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
</script> |
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
|
.jhbd-list { |
|
|
|
|
|
.jhbd-search { |
|
|
|
|
|
background: #fff; |
|
|
|
|
|
margin-bottom: 10px; |
|
|
|
|
|
|
|
|
|
|
|
.right-btn { |
|
|
|
|
|
text-align: right |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.jhbd-content { |
|
|
|
|
|
background: #fff; |
|
|
|
|
|
|
|
|
|
|
|
.add-box { |
|
|
|
|
|
margin-bottom: 10px; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
</style> |