智慧农业后台管理页面
guoshilong
2022-09-26 cf9495cfb1424816167586fa985ecdf29a923eea
src/views/task/task.vue
@@ -72,6 +72,14 @@
export default {
  data() {
    const validateNum = (rule, value, callback) => {
      if (!/^[1-9]\d*$/.test(value)) {
        callback(new Error("请输入正整数"));
      } else {
        callback();
      }
    };
    return {
      form: {},
      query: {},
@@ -165,10 +173,10 @@
            // dicUrl: `/api/soldr/soldr/selectSol`,
            props: {
              label: "spn",
              value: "stockId1"
              value: "id"
            },
            change: function (value) {
              console.log(value.value)
              // console.log(value.value)
            }
          },
          {
@@ -179,6 +187,11 @@
            type: "number",
            // labelWidth: 110,
            display: false,
            rules:[{
              require:false,
              trigger: "blur",
              validator: validateNum
            }]
          },
          {
            label: "拍照照片",
@@ -339,10 +352,10 @@
            dicUrl: `/api/soldr/soldr/selectSol`,
            props: {
              label: "spn",
              value: "stockId1"
              value: "id"
            },
            change: function (value) {
              console.log(value.value)
              // console.log(value.value)
            }
          },
          {
@@ -483,7 +496,7 @@
              value: "stock_id1"
            },
            change: function (value) {
              console.log(value.value)
              // console.log(value.value)
            }
          },
          {
@@ -498,6 +511,7 @@
          {
            label: "拍照照片",
            prop: "type",
            value:"1",
            span: 6,
            disabled: true,
            type: "switch",
@@ -599,7 +613,7 @@
    //处理
    submitR(row, done, loading) {
      var that = this;
      if(row.type == 0){
      if(row.type == "0"){
        if(row.tp == ""){
          that.$message.warning("请上传照片")
          done()
@@ -655,8 +669,10 @@
      getLandList(this.$farmId).then((res) => {
        if (res.data.code == 200) {
          var landIdcolumn = that.findObject(that.option.column, "landId");
          var landIdColumnChuli = that.findObject(that.optionchuli.column,"landId")
          that.landList = res.data.data;
          landIdcolumn.dicData = res.data.data;
          landIdColumnChuli.dicData = res.data.data
        }
      })
    },