spring
2025-03-03 f01d916828cf9746a0f438d9472af9271efd9729
src/views/CNAS/resourceDemand/device/component/scrapApplicationForm.vue
@@ -73,6 +73,11 @@
</template>
<script>
import {
  getDeviceScrapped,
  addDeviceScrapped,
} from '@/api/cnas/resourceDemand/device.js'
import { selectUserCondition } from "@/api/business/inspectionTask";
export default {
  name: "scrapApplicationForm",
  // import 引入的组件需要注入到对象中才能使用
@@ -122,7 +127,9 @@
    },
    // 查询详情
    searchInfo() {
      this.$axios.get(this.$api.deviceScrapped.getDeviceScrapped + '?scrappedId=' + this.form.scrappedId).then(res => {
      getDeviceScrapped({
        scrappedId: this.form.scrappedId
      }).then(res => {
        if (res.code === 200) {
          this.form = { ...res.data }
          if (this.form.isFinish === 0) {
@@ -155,13 +162,7 @@
      this.form.flowType = this.currentStep
      this.$refs.modelForm.validate((valid) => {
        if (valid) {
          this.$axios.post(this.$api.deviceScrapped.addDeviceScrapped,
            this.form, {
            headers: {
              'Content-Type': 'application/json'
            },
            noQs: true
          }).then(res => {
          addDeviceScrapped(this.form).then(res => {
            if (res.code == 200) {
              this.$message.success('新增成功')
              this.resetForm()
@@ -179,18 +180,11 @@
      this.$emit('closeDialog')
    },
    getUserList() {
      this.$axios.post(this.$api.user.selectUserList, {
        page: { current: -1, size: -1, },
        entity: { name: null }
      }, {
        headers: {
          'Content-Type': 'application/json'
        }
      }).then(res => {
      selectUserCondition().then(res => {
        if (res.code === 201) {
          return
        }
        this.userList = res.data.records
        this.userList = res.data
      })
    },
  },