| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138 |
- <template>
- <el-main class="jcjl" style="width: 100%;height: 100%;">
- <el-card>
- <el-row class="mb15">
- <h3>稽察记录修改</h3>
- </el-row>
- <el-row class="mb15">
- <el-col :span="24">
- <el-form
- :inline="true"
- size="mini"
- class="demo-form-inline"
- >
- <el-form-item label="年度">
- <el-select v-model="form.year" clearable placeholder="请选择">
- <el-option :lable="item.year" :value="item.year" :key="item.id" v-for="item in yearList"></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="批次">
- <el-select v-model="form.batch" clearable placeholder="请选择">
- <el-option :lable="item.batch" :value="item.batch" :key="item.id" v-for="item in pcList"></el-option>
- </el-select>
- </el-form-item>
- <el-input v-model="form.name" placeholder="请输入姓名" style="width: 15vw" clearable></el-input>
- <el-button type="primary" icon="el-icon-search" @click="searchJcXxData">查询</el-button>
- <el-button type="success" @click="SureModify" icon="el-icon-check" style="float: right;">确定修改</el-button>
- </el-form>
- </el-col>
- </el-row>
- <div>
- <fenPeiDidian :distributionLocationResult="distributionLocationResult" ref="fpdd" :form="form"></fenPeiDidian>
- </div>
- </el-card>
- </el-main>
- </template>
- <script>
- import request from '@util/gw_ajax_request'
- import fenPeiDidian from '../../gongZuoAnPai/fenPeiDidian_jcjlxg'
- export default {
- name: "jiChaJiLu",
- components:{
- fenPeiDidian
- },
- data(){
- return{
- tableHeight: window.innerHeight * .7,
- form: {
- name: "",
- year: "",
- batch: ""
- },
- yearList:[],
- pcList: [],
- distributionLocationResult:[],
- }
- },
- computed: {
- groupTypeData(){
- return this.$store.state.jcState.groupTypeData;
- },
- roleTypeData(){
- return this.$store.state.jcState.roleTypeData;
- }
- },
- mounted(){
- this.getYearPc();
- this.refreshDistributionLocation();
- },
- methods:{
- async getYearPc(){
- await request.post(`/tac/insp/year/list`,{}).then(res =>{
- if(res.success){
- this.$nextTick(() =>{
- this.yearList = res.data;
- })
- }
- })
- request.post(`/tac/insp/batch/list`,{}).then(res =>{
- if(res.success){
- this.pcList = res.data;
- }
- })
- },
- getTj(){
- let obj = {};
- obj.groupType = this.form.groupType.toString();
- obj.roleType = this.form.roleType.toString();
- obj.name = this.form.name;
- obj.year = this.form.year;
- obj.batch = this.form.batch;
- obj.pageSize = this.pageSize;
- obj.pageNum = this.pageNum;
- return obj;
- },
- // 刷新分配地点
- refreshDistributionLocation(){
- request.post(`/tac/insp/year/batch/group/getGroupList`,{
- "year": this.form.year,
- "batch": this.form.batch,
- "persName": this.form.name
- }).then(res =>{
- if(res.success){
- this.$nextTick(() =>{
- this.distributionLocationResult = res.data;
- })
- }
- })
- },
- searchJcXxData(){
- this.refreshDistributionLocation();
- },
- // 确定修改
- SureModify(){
- this.$confirm('确定要修改稽察记录, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- let obj = {
- "groupList": this.distributionLocationResult
- }
- request.post(`/tac/insp/year/batch/group/updateGroupList`,obj).then(res =>{
- if(res.success){
- this.$message.success("修改成功");
- }
- })
- })
- },
- }
- }
- </script>
- <style scoped>
- .mb15{
- margin-bottom: 15px;
- }
- </style>
|