Lou
2024-03-23 f8b6f4ef601f2bccb8d0e08e338c7d6a31fd342d
议事添加附件
2 files modified
101 ■■■■ changed files
src/views/article/components/deitDiscussion.vue 99 ●●●● patch | view | raw | blame | history
vue.config.js 2 ●●● patch | view | raw | blame | history
src/views/article/components/deitDiscussion.vue
@@ -133,27 +133,7 @@
              }],
            },
            {
              label: '选项范围',
              prop: 'optionRange',
              type: 'radio',
              value: 0,
              button: true,
              row: true,
              dicData: [{
                label: '单选',
                value: 0
              }, {
                label: '多选',
                value: 1
              }],
              rules: [{
                required: true,
                message: '请选项范围',
                trigger: 'blur'
              }],
            },
            {
              label: '选项必填',
          label: '议题必填',
              prop: 'mandatoryFlag',
              type: 'radio',
              value: 1,
@@ -173,6 +153,27 @@
              }],
            },
            {
          label: '选项范围',
          prop: 'optionRange',
          type: 'radio',
          value: 0,
          button: true,
          row: true,
          dicData: [{
            label: '单选',
            value: 0
          }, {
            label: '多选',
            value: 1
          }],
          rules: [{
            required: true,
            message: '请选项范围',
            trigger: 'blur'
          }],
        },
        {
              label: '最多可选',
              prop: 'optionNumber',
              display: false,
@@ -185,8 +186,25 @@
                message: '请输入最多可选择数量',
                trigger: 'blur'
              }],
          span: 4,
            },
        {
          width: 110,
          labelWidth: 100,
          label: "附件",
          prop: "attachment",
          type: "upload",
          listType: "text",
          action: "/api/blade-resource/oss/endpoint/put-pdfFile",
          accept: "application/pdf",
          propsHttp: {
            res: "data",
            name: 'name',
            url: "link",
          },
          span: 24,
        },
            {
              label: '选项内容',
              prop: 'children',
@@ -410,6 +428,7 @@
      },
      initData(newData) {
      console.log("======>",  newData);
        this.editFlag = false
        this.popupTableShow = true
        this.articleId = newData.id
@@ -428,6 +447,33 @@
      handleSubmit(form, done) {
        done()
        form.articleId = this.articleId
      console.log("form===>", form);
      if (this.editFlag && Array.isArray(form.attachment)) {
        if (form.attachment.length > 0) {
          var urls = []
          // var split = form.attachment.split(",")
          form.attachment.forEach(url => {
            var names = url.split("jczz/")
            urls.push(names[1])
          })
          form.attachment = urls.join(",")
        }else {
          form.attachment = "";
        }
      } else {
        if (form.attachment) {
          var urls = [];
          var splits = form.attachment.split(",");
          splits.forEach(url => {
            var names = url.split("jczz/")
            urls.push(names[1])
          })
          form.attachment = urls.join(",")
        }
      }
        if (this.disCussFromListClone.length > 0) {
          this.disCussFromListClone.forEach(item => {
            if (form.children.length > 0) {
@@ -469,6 +515,17 @@
      // 提交修改
      rowUpdate(row, index, done, loading) {
        done()
      if (row.attachment.length > 0) {
        var urls = []
        var split = row.attachment.split(",")
        split.forEach(url => {
          var names = url.split("jczz/")
          urls.push(names[1])
        })
        row.attachment = urls.join(",")
      }
        if (!row.id) {
          addPd(row).then(() => {
            this.onLoad()
vue.config.js
@@ -38,7 +38,7 @@
        proxy: {
            "/api": {
                //本地服务接口地址
                target:"http://192.168.2.140:9528",
                target:"http://192.168.2.111:9528",
                // target: "https://srgdjczzxtpt.com:2080/api",
                // target: "https://kt39592615.goho.co",
                // target: "http://z4042833u6.wicp.vip",