chrislee 2 ヶ月 前
コミット
66c8c66e51

+ 18 - 7
src/components/work-flow/node-edit-normal.vue

@@ -89,7 +89,8 @@ export default {
         operatorId: [],
         prodProductionRequireList: [{}],
         planCompletionTime: '',
-        attachList: []
+        attachList: [],
+        isProgramme: 1
       },
       fileList: [],
       inspectionMethodOptions: [
@@ -132,7 +133,7 @@ export default {
   },
   watch: {
     data(val) {
-      console.log('node-edit-normal watch', val)
+      // console.log('node-edit-normal watch', val)
       this.node = val
       this.form = {
         ...this.form,
@@ -142,6 +143,14 @@ export default {
         this.form.operatorId = this.node.operatorId.split(',')
       }
 
+      // 确保 isProgramme 有正确的默认值
+      if (this.form.isProgramme === undefined || this.form.isProgramme === null || this.form.isProgramme === '') {
+        this.form.isProgramme = 2
+      } else {
+        // 确保数据类型为数字
+        this.form.isProgramme = Number(this.form.isProgramme)
+      }
+
       // 附件
       // if (this.node.attachList) {
       //   this.$nextTick(() => {
@@ -180,15 +189,17 @@ export default {
       this.form.operatorId = this.node.operatorId.split(',')
     }
 
-    console.log(this.form.isProgramme)
+    // console.log('初始 isProgramme 值:', this.form.isProgramme)
 
-    if (this.form.isProgramme === undefined || this.form.isProgramme === null) {
+    // 确保 isProgramme 有正确的默认值和数据类型
+    if (this.form.isProgramme === undefined || this.form.isProgramme === null || this.form.isProgramme === '') {
       this.form.isProgramme = 2
+    } else {
+      // 确保数据类型为数字
+      this.form.isProgramme = Number(this.form.isProgramme)
     }
 
-    console.log(this.form.isProgramme)
-
-    console.log(1111)
+    // console.log('最终 isProgramme 值:', this.form.isProgramme)
 
     this.getOperatorList()
   },

+ 135 - 189
src/views/modules/production/plan.vue

@@ -4,230 +4,176 @@
     <template v-if="!assignVisible && !noticeChangeVisible && !submitVisible">
       <el-form :inline="true" :model="dataForm" @keyup.enter.native="queryData()">
         <el-form-item label="任务号">
-          <el-input v-model="dataForm.orderCode" placeholder="" clearable/>
+          <el-input v-model="dataForm.orderCode" placeholder="" clearable />
         </el-form-item>
         <el-form-item>
           <el-button @click="queryData()">查询</el-button>
           <el-button @click="noticeSettingHandle(null, false)">通知设置</el-button>
         </el-form-item>
       </el-form>
-      <el-table
-        :data="dataList"
-        border
-        v-loading="dataListLoading"
-        style="width: 100%;">
-        <el-table-column
-          label="序号"
-          type="index"
-          width="100"
-          align="center">
+      <el-table :data="dataList" border v-loading="dataListLoading" style="width: 100%;">
+        <el-table-column label="序号" type="index" width="100" align="center">
         </el-table-column>
-         <el-table-column
-          prop="projectName"
-          header-align="center"
-          align="center"
-          min-width="140"
-          :show-tooltip-when-overflow="true"
-          label="项目名称">
+        <el-table-column prop="projectName" header-align="center" align="center" min-width="140"
+          :show-tooltip-when-overflow="true" label="项目名称">
         </el-table-column>
-        <el-table-column
-          prop="orderCode"
-          header-align="center"
-          align="center"
-          min-width="160"
-          :show-tooltip-when-overflow="true"
-          label="任务号">
+        <el-table-column prop="orderCode" header-align="center" align="center" min-width="160"
+          :show-tooltip-when-overflow="true" label="任务号">
         </el-table-column>
-        <el-table-column
-          prop="customerName"
-          header-align="center"
-          align="center"
-          min-width="160"
-          :show-tooltip-when-overflow="true"
-          label="客户名称">
+        <el-table-column prop="customerName" header-align="center" align="center" min-width="160"
+          :show-tooltip-when-overflow="true" label="客户名称">
         </el-table-column>
-        <el-table-column
-          prop="deliveryDate"
-          header-align="center"
-          align="center"
-          min-width="160"
-          :show-tooltip-when-overflow="true"
-          label="合同交期">
+        <el-table-column prop="deliveryDate" header-align="center" align="center" min-width="160"
+          :show-tooltip-when-overflow="true" label="合同交期">
         </el-table-column>
-        <el-table-column
-          prop="createTime"
-          header-align="center"
-          align="center"
-          min-width="160"
-          :show-tooltip-when-overflow="true"
-          label="创建时间">
+        <el-table-column prop="createTime" header-align="center" align="center" min-width="160"
+          :show-tooltip-when-overflow="true" label="创建时间">
         </el-table-column>
-        <el-table-column
-          prop="responsibilityPerson"
-          header-align="center"
-          align="center"
-          min-width="160"
-          :show-tooltip-when-overflow="true"
-          label="责任人">
+        <el-table-column prop="responsibilityPersonName" header-align="center" align="center" min-width="160"
+          :show-tooltip-when-overflow="true" label="责任人">
         </el-table-column>
-        <el-table-column
-          prop="state"
-          header-align="center"
-          align="center"
-          min-width="160"
-          :show-tooltip-when-overflow="true"
-          :formatter="formatState"
-          label="状态">
+        <el-table-column prop="state" header-align="center" align="center" min-width="160"
+          :show-tooltip-when-overflow="true" :formatter="formatState" label="状态">
         </el-table-column>
-        <el-table-column
-          fixed="right"
-          header-align="center"
-          align="center"
-          width="220"
-          label="操作">
+        <el-table-column fixed="right" header-align="center" align="center" width="220" label="操作">
           <template slot-scope="scope">
             <el-button type="text" size="small" @click="submitHandle(scope.row, true)">查看</el-button>
-            <el-button v-if="scope.row.state == 1" type="text" size="small" @click="assignHandle(scope.row)">分派</el-button>
-            <el-button v-if="scope.row.state == 1" type="text" size="small" @click="submitHandle(scope.row, false)">处理</el-button>
+            <el-button v-if="scope.row.state == 1" type="text" size="small"
+              @click="assignHandle(scope.row)">分派</el-button>
+            <el-button v-if="scope.row.state == 1" type="text" size="small"
+              @click="submitHandle(scope.row, false)">处理</el-button>
           </template>
         </el-table-column>
       </el-table>
-      <el-pagination
-        @size-change="sizeChangeHandle"
-        @current-change="currentChangeHandle"
-        :current-page="pageIndex"
-        :page-sizes="[10, 20, 50, 100]"
-        :page-size="pageSize"
-        :total="totalPage"
+      <el-pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" :current-page="pageIndex"
+        :page-sizes="[10, 20, 50, 100]" :page-size="pageSize" :total="totalPage"
         layout="total, sizes, prev, pager, next, jumper">
       </el-pagination>
     </template>
     <!-- 弹窗 -->
-    <assign v-if="assignVisible" ref="assign" @onChose="onChose"/>
-    <notice-change v-if="noticeChangeVisible" ref="noticeChange" @onChose="onChose"/>
-    <submit-plan v-if="submitVisible" ref="submit" @onChose="onChose"/>
+    <assign v-if="assignVisible" ref="assign" @onChose="onChose" />
+    <notice-change v-if="noticeChangeVisible" ref="noticeChange" @onChose="onChose" />
+    <submit-plan v-if="submitVisible" ref="submit" @onChose="onChose" />
   </div>
 </template>
 
 <script>
-  import Assign from '@/views/modules/production/plan-assign'
-  import NoticeChange from '@/views/modules/production/plan-notice-change-setting'
-  import SubmitPlan from '@/views/modules/production/plan-submit'
-  export default {
-    name: 'plan',
-    components: {
-      Assign, NoticeChange, SubmitPlan
-    },
-    data () {
-      return {
-        assignVisible: false,
-        noticeChangeVisible: false,
-        submitVisible: false,
-        dataForm: {},
-        dataList: [],
-        pageIndex: 1,
-        pageSize: 10,
-        totalPage: 0,
-        dataListLoading: false,
-        dataListSelections: [],
-        optionsLevel: [],
-        importLoading: false,
-        importData: {},
-        fileList: [],
-        stateOption: [
-          {label: '待处理', value: '1'},
-          {label: '已处理', value: '2'}
-        ]
-      }
+import Assign from '@/views/modules/production/plan-assign'
+import NoticeChange from '@/views/modules/production/plan-notice-change-setting'
+import SubmitPlan from '@/views/modules/production/plan-submit'
+export default {
+  name: 'plan',
+  components: {
+    Assign, NoticeChange, SubmitPlan
+  },
+  data() {
+    return {
+      assignVisible: false,
+      noticeChangeVisible: false,
+      submitVisible: false,
+      dataForm: {},
+      dataList: [],
+      pageIndex: 1,
+      pageSize: 10,
+      totalPage: 0,
+      dataListLoading: false,
+      dataListSelections: [],
+      optionsLevel: [],
+      importLoading: false,
+      importData: {},
+      fileList: [],
+      stateOption: [
+        { label: '待处理', value: '1' },
+        { label: '已处理', value: '2' }
+      ]
+    }
+  },
+  created() {
+    this.getDataList()
+  },
+  methods: {
+    onChose() {
+      this.detailVisible = false
+      this.assignVisible = false
+      this.noticeChangeVisible = false
+      this.submitVisible = false
     },
-    created () {
+    // 查询
+    queryData() {
+      this.pageIndex = 1
       this.getDataList()
     },
-    methods: {
-      onChose () {
-        this.detailVisible = false
-        this.assignVisible = false
-        this.noticeChangeVisible = false
-        this.submitVisible = false
-      },
-      // 查询
-      queryData () {
-        this.pageIndex = 1
-        this.getDataList()
-      },
-      // 获取数据列表
-      getDataList () {
-        this.dataListLoading = true
-        this.addOrUpdateVisible = false
+    // 获取数据列表
+    getDataList() {
+      this.dataListLoading = true
+      this.addOrUpdateVisible = false
 
-        this.$http({
-          url: this.$http.adornUrl(`/biz-service/projProduction/list`),
-          method: 'get',
-          params: this.$http.adornParams({
-            'current': this.pageIndex,
-            'size': this.pageSize,
-            'orderCode': this.dataForm.orderCode
-          })
-        }).then(({data}) => {
-          this.dataListLoading = false
-          if (data && data.code === '200') {
-            this.dataList = data.data.records
-            this.totalPage = Number(data.data.total)
-          } else {
-            this.dataList = []
-            this.totalPage = 0
-          }
-        })
-      },
-      // 每页数
-      sizeChangeHandle (val) {
-        this.pageSize = val
-        this.pageIndex = 1
-        this.getDataList()
-      },
-      // 当前页
-      currentChangeHandle (val) {
-        this.pageIndex = val
-        this.getDataList()
-      },
-      // 多选
-      selectionChangeHandle (val) {
-        this.dataListSelections = val
-      },
-      assignHandle (item) {
-        this.assignVisible = true
-        this.$nextTick(() => {
-          this.$refs.assign.init(item)
-        })
-      },
-      submitHandle (item, readonly) {
-        this.submitVisible = true
-        this.$nextTick(() => {
-          this.$refs.submit.init(item, readonly)
+      this.$http({
+        url: this.$http.adornUrl(`/biz-service/projProduction/list`),
+        method: 'get',
+        params: this.$http.adornParams({
+          'current': this.pageIndex,
+          'size': this.pageSize,
+          'orderCode': this.dataForm.orderCode
         })
-      },
-      formatState (row) {
-        if (!row.state) return ''
-
-        return this.getStateStr(row.state)
-      },
-      getStateStr (state) {
-        let option = this.stateOption.find(t => t.value === state)
-        if (option != null) {
-          return option.label
+      }).then(({ data }) => {
+        this.dataListLoading = false
+        if (data && data.code === '200') {
+          this.dataList = data.data.records
+          this.totalPage = Number(data.data.total)
+        } else {
+          this.dataList = []
+          this.totalPage = 0
         }
-        return ''
-      },
-      noticeSettingHandle () {
-        this.noticeChangeVisible = true
-        this.$nextTick(() => {
-          this.$refs.noticeChange.init()
-        })
+      })
+    },
+    // 每页数
+    sizeChangeHandle(val) {
+      this.pageSize = val
+      this.pageIndex = 1
+      this.getDataList()
+    },
+    // 当前页
+    currentChangeHandle(val) {
+      this.pageIndex = val
+      this.getDataList()
+    },
+    // 多选
+    selectionChangeHandle(val) {
+      this.dataListSelections = val
+    },
+    assignHandle(item) {
+      this.assignVisible = true
+      this.$nextTick(() => {
+        this.$refs.assign.init(item)
+      })
+    },
+    submitHandle(item, readonly) {
+      this.submitVisible = true
+      this.$nextTick(() => {
+        this.$refs.submit.init(item, readonly)
+      })
+    },
+    formatState(row) {
+      if (!row.state) return ''
+
+      return this.getStateStr(row.state)
+    },
+    getStateStr(state) {
+      let option = this.stateOption.find(t => t.value === state)
+      if (option != null) {
+        return option.label
       }
+      return ''
+    },
+    noticeSettingHandle() {
+      this.noticeChangeVisible = true
+      this.$nextTick(() => {
+        this.$refs.noticeChange.init()
+      })
     }
   }
+}
 </script>
 
-<style scoped>
-
-</style>
+<style scoped></style>

+ 155 - 209
src/views/modules/tech/project-tech.vue

@@ -4,108 +4,56 @@
     <template v-if="!assignVisible && !noticeChangeVisible && !submitVisible && !craftsAddOrDetailVisible">
       <el-form :inline="true" :model="dataForm" @keyup.enter.native="queryData()">
         <el-form-item label="任务号">
-          <el-input v-model="dataForm.orderCode" placeholder="" clearable/>
+          <el-input v-model="dataForm.orderCode" placeholder="" clearable />
         </el-form-item>
         <el-form-item>
           <el-button @click="queryData()">查询</el-button>
           <el-button @click="noticeSettingHandle(null, false)">通知设置</el-button>
         </el-form-item>
       </el-form>
-      <el-table
-        :data="dataList"
-        border
-        v-loading="dataListLoading"
-        style="width: 100%;">
-        <el-table-column
-          label="序号"
-          type="index"
-          width="100"
-          align="center">
+      <el-table :data="dataList" border v-loading="dataListLoading" style="width: 100%;">
+        <el-table-column label="序号" type="index" width="100" align="center">
         </el-table-column>
-         <el-table-column
-          prop="projectName"
-          header-align="center"
-          align="center"
-          min-width="140"
-          :show-tooltip-when-overflow="true"
-          label="项目名称">
+        <el-table-column prop="projectName" header-align="center" align="center" min-width="140"
+          :show-tooltip-when-overflow="true" label="项目名称">
         </el-table-column>
-        <el-table-column
-          prop="orderCode"
-          header-align="center"
-          align="center"
-          min-width="160"
-          :show-tooltip-when-overflow="true"
-          label="任务号">
+        <el-table-column prop="orderCode" header-align="center" align="center" min-width="160"
+          :show-tooltip-when-overflow="true" label="任务号">
         </el-table-column>
-        <el-table-column
-          prop="customerName"
-          header-align="center"
-          align="center"
-          min-width="160"
-          :show-tooltip-when-overflow="true"
-          label="客户名称">
+        <el-table-column prop="customerName" header-align="center" align="center" min-width="160"
+          :show-tooltip-when-overflow="true" label="客户名称">
         </el-table-column>
-        <el-table-column
-          prop="deliveryDate"
-          header-align="center"
-          align="center"
-          min-width="160"
-          :show-tooltip-when-overflow="true"
-          label="合同交期">
+        <el-table-column prop="deliveryDate" header-align="center" align="center" min-width="160"
+          :show-tooltip-when-overflow="true" label="合同交期">
         </el-table-column>
-        <el-table-column
-          prop="createTime"
-          header-align="center"
-          align="center"
-          min-width="160"
-          :show-tooltip-when-overflow="true"
-          label="创建时间">
+        <el-table-column prop="createTime" header-align="center" align="center" min-width="160"
+          :show-tooltip-when-overflow="true" label="创建时间">
         </el-table-column>
-        <el-table-column
-          prop="responsibilityPerson"
-          header-align="center"
-          align="center"
-          min-width="160"
-          :show-tooltip-when-overflow="true"
-          label="责任人">
+        <el-table-column prop="responsibilityPersonName" header-align="center" align="center" min-width="100"
+          :show-tooltip-when-overflow="true" label="责任人">
         </el-table-column>
-        <el-table-column
-          prop="state"
-          header-align="center"
-          align="center"
-          min-width="160"
-          :show-tooltip-when-overflow="true"
-          :formatter="formatState"
-          label="状态">
+        <el-table-column prop="state" header-align="center" align="center" min-width="60"
+          :show-tooltip-when-overflow="true" :formatter="formatState" label="状态">
         </el-table-column>
-        <el-table-column
-          fixed="right"
-          header-align="center"
-          align="center"
-          width="220"
-          label="操作">
+        <el-table-column fixed="right" header-align="center" align="center" width="130" label="操作">
           <template slot-scope="scope">
             <el-button type="text" size="small" @click="submitHandle(scope.row, true)">查看</el-button>
-            <el-button v-if="scope.row.state == 1" type="text" size="small" @click="assignHandle(scope.row)">分派</el-button>
-            <el-button v-if="scope.row.state == 1" type="text" size="small" @click="submitHandle(scope.row, false)">处理</el-button>
+            <el-button v-if="scope.row.state == 1" type="text" size="small"
+              @click="assignHandle(scope.row)">分派</el-button>
+            <el-button v-if="scope.row.state == 1" type="text" size="small"
+              @click="submitHandle(scope.row, false)">处理</el-button>
           </template>
         </el-table-column>
       </el-table>
-      <el-pagination
-        @size-change="sizeChangeHandle"
-        @current-change="currentChangeHandle"
-        :current-page="pageIndex"
-        :page-sizes="[10, 20, 50, 100]"
-        :page-size="pageSize"
-        :total="totalPage"
+      <el-pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle" :current-page="pageIndex"
+        :page-sizes="[10, 20, 50, 100]" :page-size="pageSize" :total="totalPage"
         layout="total, sizes, prev, pager, next, jumper">
       </el-pagination>
     </template>
     <!-- 弹窗 -->
-    <assign v-if="assignVisible" ref="assign" @onChose="onChose"/>
-    <notice-change v-if="noticeChangeVisible" ref="noticeChange" @onChose="onChose"/>
-    <submit-plan v-if="submitVisible" ref="submit" @onChose="onChose" @showCraftsAddOrDetail="showCraftsAddOrDetail"/>
+    <assign v-if="assignVisible" ref="assign" @onChose="onChose" />
+    <notice-change v-if="noticeChangeVisible" ref="noticeChange" @onChose="onChose" />
+    <submit-plan v-if="submitVisible" ref="submit" @onChose="onChose" @showCraftsAddOrDetail="showCraftsAddOrDetail" />
 
     <crafts-add-or-detail ref="craftsAddOrDetail" @onChose="onCloseCraftsAddOrDetail" v-if="craftsAddOrDetailVisible" />
 
@@ -113,145 +61,143 @@
 </template>
 
 <script>
-  import Assign from '@/views/modules/tech/project-tech-assign'
-  import NoticeChange from '@/views/modules/tech/project-tech-notice-change-setting'
-  import SubmitPlan from '@/views/modules/tech/project-tech-submit'
-  import CraftsAddOrDetail from '../tech/ctafts-add-or-detail-v2'
-  export default {
-    name: 'plan',
-    components: {
-      Assign, NoticeChange, SubmitPlan, CraftsAddOrDetail
+import Assign from '@/views/modules/tech/project-tech-assign'
+import NoticeChange from '@/views/modules/tech/project-tech-notice-change-setting'
+import SubmitPlan from '@/views/modules/tech/project-tech-submit'
+import CraftsAddOrDetail from '../tech/ctafts-add-or-detail-v2'
+export default {
+  name: 'plan',
+  components: {
+    Assign, NoticeChange, SubmitPlan, CraftsAddOrDetail
+  },
+  data() {
+    return {
+      assignVisible: false,
+      noticeChangeVisible: false,
+      submitVisible: false,
+      craftsAddOrDetailVisible: false,
+      dataForm: {},
+      dataList: [],
+      pageIndex: 1,
+      pageSize: 10,
+      totalPage: 0,
+      dataListLoading: false,
+      dataListSelections: [],
+      optionsLevel: [],
+      importLoading: false,
+      importData: {},
+      fileList: [],
+      stateOption: [
+        { label: '待处理', value: '1' },
+        { label: '已处理', value: '2' }
+      ],
+      lastSubmitItem: null
+    }
+  },
+  created() {
+    this.getDataList()
+  },
+  methods: {
+    onChose() {
+      this.detailVisible = false
+      this.assignVisible = false
+      this.noticeChangeVisible = false
+      this.submitVisible = false
+      this.craftsAddOrDetailVisible = false
     },
-    data () {
-      return {
-        assignVisible: false,
-        noticeChangeVisible: false,
-        submitVisible: false,
-        craftsAddOrDetailVisible: false,
-        dataForm: {},
-        dataList: [],
-        pageIndex: 1,
-        pageSize: 10,
-        totalPage: 0,
-        dataListLoading: false,
-        dataListSelections: [],
-        optionsLevel: [],
-        importLoading: false,
-        importData: {},
-        fileList: [],
-        stateOption: [
-          {label: '待处理', value: '1'},
-          {label: '已处理', value: '2'}
-        ],
-        lastSubmitItem: null
-      }
+    showCraftsAddOrDetail(techId) {
+      this.detailVisible = false
+      this.assignVisible = false
+      this.noticeChangeVisible = false
+      this.submitVisible = false
+
+      this.craftsAddOrDetailVisible = true
+
+      this.$nextTick(() => {
+        this.$refs.craftsAddOrDetail.init(techId, false, techId !== 0, false, false)
+      })
+    },
+    onCloseCraftsAddOrDetail() {
+      this.craftsAddOrDetailVisible = false
+      this.submitHandle(this.lastSubmitItem, false)
     },
-    created () {
+    // 查询
+    queryData() {
+      this.pageIndex = 1
       this.getDataList()
     },
-    methods: {
-      onChose () {
-        this.detailVisible = false
-        this.assignVisible = false
-        this.noticeChangeVisible = false
-        this.submitVisible = false
-        this.craftsAddOrDetailVisible = false
-      },
-      showCraftsAddOrDetail (techId) {
-        this.detailVisible = false
-        this.assignVisible = false
-        this.noticeChangeVisible = false
-        this.submitVisible = false
-
-        this.craftsAddOrDetailVisible = true
+    // 获取数据列表
+    getDataList() {
+      this.dataListLoading = true
+      this.addOrUpdateVisible = false
 
-        this.$nextTick(() => {
-          this.$refs.craftsAddOrDetail.init(techId, false, techId !== 0, false, false)
+      this.$http({
+        url: this.$http.adornUrl(`/biz-service/projTechnology/list`),
+        method: 'get',
+        params: this.$http.adornParams({
+          'current': this.pageIndex,
+          'size': this.pageSize,
+          'orderCode': this.dataForm.orderCode
         })
-      },
-      onCloseCraftsAddOrDetail () {
-        this.craftsAddOrDetailVisible = false
-        this.submitHandle(this.lastSubmitItem, false)
-      },
-      // 查询
-      queryData () {
-        this.pageIndex = 1
-        this.getDataList()
-      },
-      // 获取数据列表
-      getDataList () {
-        this.dataListLoading = true
-        this.addOrUpdateVisible = false
-
-        this.$http({
-          url: this.$http.adornUrl(`/biz-service/projTechnology/list`),
-          method: 'get',
-          params: this.$http.adornParams({
-            'current': this.pageIndex,
-            'size': this.pageSize,
-            'orderCode': this.dataForm.orderCode
-          })
-        }).then(({data}) => {
-          this.dataListLoading = false
-          if (data && data.code === '200') {
-            this.dataList = data.data.records
-            this.totalPage = Number(data.data.total)
-          } else {
-            this.dataList = []
-            this.totalPage = 0
-          }
-        })
-      },
-      // 每页数
-      sizeChangeHandle (val) {
-        this.pageSize = val
-        this.pageIndex = 1
-        this.getDataList()
-      },
-      // 当前页
-      currentChangeHandle (val) {
-        this.pageIndex = val
-        this.getDataList()
-      },
-      // 多选
-      selectionChangeHandle (val) {
-        this.dataListSelections = val
-      },
-      assignHandle (item) {
-        this.assignVisible = true
-        this.$nextTick(() => {
-          this.$refs.assign.init(item)
-        })
-      },
-      submitHandle (item, readonly) {
-        this.lastSubmitItem = item
-        this.submitVisible = true
-        this.$nextTick(() => {
-          this.$refs.submit.init(item, readonly)
-        })
-      },
-      formatState (row) {
-        if (!row.state) return ''
-
-        return this.getStateStr(row.state)
-      },
-      getStateStr (state) {
-        let option = this.stateOption.find(t => t.value === state)
-        if (option != null) {
-          return option.label
+      }).then(({ data }) => {
+        this.dataListLoading = false
+        if (data && data.code === '200') {
+          this.dataList = data.data.records
+          this.totalPage = Number(data.data.total)
+        } else {
+          this.dataList = []
+          this.totalPage = 0
         }
-        return ''
-      },
-      noticeSettingHandle () {
-        this.noticeChangeVisible = true
-        this.$nextTick(() => {
-          this.$refs.noticeChange.init()
-        })
+      })
+    },
+    // 每页数
+    sizeChangeHandle(val) {
+      this.pageSize = val
+      this.pageIndex = 1
+      this.getDataList()
+    },
+    // 当前页
+    currentChangeHandle(val) {
+      this.pageIndex = val
+      this.getDataList()
+    },
+    // 多选
+    selectionChangeHandle(val) {
+      this.dataListSelections = val
+    },
+    assignHandle(item) {
+      this.assignVisible = true
+      this.$nextTick(() => {
+        this.$refs.assign.init(item)
+      })
+    },
+    submitHandle(item, readonly) {
+      this.lastSubmitItem = item
+      this.submitVisible = true
+      this.$nextTick(() => {
+        this.$refs.submit.init(item, readonly)
+      })
+    },
+    formatState(row) {
+      if (!row.state) return ''
+
+      return this.getStateStr(row.state)
+    },
+    getStateStr(state) {
+      let option = this.stateOption.find(t => t.value === state)
+      if (option != null) {
+        return option.label
       }
+      return ''
+    },
+    noticeSettingHandle() {
+      this.noticeChangeVisible = true
+      this.$nextTick(() => {
+        this.$refs.noticeChange.init()
+      })
     }
   }
+}
 </script>
 
-<style scoped>
-
-</style>
+<style scoped></style>