874fc074e7adef17bdb5fcdfa958d2cba78e3c68.svn-base 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. <template>
  2. <el-main class="jcjl" style="width: 100%;height: 100%;">
  3. <el-card>
  4. <el-row class="mb15">
  5. <h3>稽察记录修改</h3>
  6. </el-row>
  7. <el-row class="mb15">
  8. <el-col :span="24">
  9. <el-form
  10. :inline="true"
  11. size="mini"
  12. class="demo-form-inline"
  13. >
  14. <el-form-item label="年度">
  15. <el-select v-model="form.year" clearable placeholder="请选择">
  16. <el-option :lable="item.year" :value="item.year" :key="item.id" v-for="item in yearList"></el-option>
  17. </el-select>
  18. </el-form-item>
  19. <el-form-item label="批次">
  20. <el-select v-model="form.batch" clearable placeholder="请选择">
  21. <el-option :lable="item.batch" :value="item.batch" :key="item.id" v-for="item in pcList"></el-option>
  22. </el-select>
  23. </el-form-item>
  24. <el-input v-model="form.name" placeholder="请输入姓名" style="width: 15vw" clearable></el-input>
  25. <el-button type="primary" icon="el-icon-search" @click="searchJcXxData">查询</el-button>
  26. <el-button type="success" @click="SureModify" icon="el-icon-check" style="float: right;">确定修改</el-button>
  27. </el-form>
  28. </el-col>
  29. </el-row>
  30. <div>
  31. <fenPeiDidian :distributionLocationResult="distributionLocationResult" ref="fpdd" :form="form"></fenPeiDidian>
  32. </div>
  33. </el-card>
  34. </el-main>
  35. </template>
  36. <script>
  37. import request from '@util/gw_ajax_request'
  38. import fenPeiDidian from '../../gongZuoAnPai/fenPeiDidian_jcjlxg'
  39. export default {
  40. name: "jiChaJiLu",
  41. components:{
  42. fenPeiDidian
  43. },
  44. data(){
  45. return{
  46. tableHeight: window.innerHeight * .7,
  47. form: {
  48. name: "",
  49. year: "",
  50. batch: ""
  51. },
  52. yearList:[],
  53. pcList: [],
  54. distributionLocationResult:[],
  55. }
  56. },
  57. computed: {
  58. groupTypeData(){
  59. return this.$store.state.jcState.groupTypeData;
  60. },
  61. roleTypeData(){
  62. return this.$store.state.jcState.roleTypeData;
  63. }
  64. },
  65. mounted(){
  66. this.getYearPc();
  67. this.refreshDistributionLocation();
  68. },
  69. methods:{
  70. async getYearPc(){
  71. await request.post(`/tac/insp/year/list`,{}).then(res =>{
  72. if(res.success){
  73. this.$nextTick(() =>{
  74. this.yearList = res.data;
  75. })
  76. }
  77. })
  78. request.post(`/tac/insp/batch/list`,{}).then(res =>{
  79. if(res.success){
  80. this.pcList = res.data;
  81. }
  82. })
  83. },
  84. getTj(){
  85. let obj = {};
  86. obj.groupType = this.form.groupType.toString();
  87. obj.roleType = this.form.roleType.toString();
  88. obj.name = this.form.name;
  89. obj.year = this.form.year;
  90. obj.batch = this.form.batch;
  91. obj.pageSize = this.pageSize;
  92. obj.pageNum = this.pageNum;
  93. return obj;
  94. },
  95. // 刷新分配地点
  96. refreshDistributionLocation(){
  97. request.post(`/tac/insp/year/batch/group/getGroupList`,{
  98. "year": this.form.year,
  99. "batch": this.form.batch,
  100. "persName": this.form.name
  101. }).then(res =>{
  102. if(res.success){
  103. this.$nextTick(() =>{
  104. this.distributionLocationResult = res.data;
  105. })
  106. }
  107. })
  108. },
  109. searchJcXxData(){
  110. this.refreshDistributionLocation();
  111. },
  112. // 确定修改
  113. SureModify(){
  114. this.$confirm('确定要修改稽察记录, 是否继续?', '提示', {
  115. confirmButtonText: '确定',
  116. cancelButtonText: '取消',
  117. type: 'warning'
  118. }).then(() => {
  119. let obj = {
  120. "groupList": this.distributionLocationResult
  121. }
  122. request.post(`/tac/insp/year/batch/group/updateGroupList`,obj).then(res =>{
  123. if(res.success){
  124. this.$message.success("修改成功");
  125. }
  126. })
  127. })
  128. },
  129. }
  130. }
  131. </script>
  132. <style scoped>
  133. .mb15{
  134. margin-bottom: 15px;
  135. }
  136. </style>