shuishen
2024-01-06 25e73114a2d23d8d43e392e8a1f71ecf12ecb970
src/views/article/publicSignUp.vue
@@ -10,10 +10,10 @@
      </template>
      <template slot-scope="{type,size,row }" slot="menu">
        <el-button icon="el-icon-circle-plus-outline" :size="size" :type="type" @click.stop="openDilog(row,0)">
        <el-button icon="el-icon-circle-plus-outline" :size="size" :type="type" @click.stop="openDilog(row)">
          公益报名
        </el-button>
        <el-button icon="el-icon-user" :size="size" :type="type" @click.stop="openUserPopup(row, 1)">
        <el-button icon="el-icon-user" :size="size" :type="type" @click.stop="openUserPopup(row)">
          参与用户
        </el-button>
        <el-button v-if="row.publish == '1'" icon="el-icon-close" :size="size" :type="type" @click.stop="updateFb(row)">
@@ -39,22 +39,14 @@
      </template>
    </avue-crud>
    <publicSignUpChild ref="publicSignUpChild"></publicSignUpChild>
    <el-dialog title="" append-to-body :visible.sync="dialogVisibles" width="50%" :before-close="handleClose">
      <span slot="title" class="dialog-footer">
        {{discussForm.ontitle}}
      </span>
      <!--  <div id="" v-if="discussForm.eventType == 1">
        <avue-form @submit="handleSubmit" :option="optionDiscuss" v-model="discussForm"></avue-form>
      </div> -->
      <div id="">
        <avue-form @submit="handleSubmit" :option="optionEnroll" v-model="discussForm">
        </avue-form>
      </div>
      <avue-form @submit="handleSubmit" :option="optionEnroll" v-model="discussForm"></avue-form>
    </el-dialog>
  </basic-container>
</template>
@@ -74,7 +66,7 @@
    removePd,
    updatePd,
    addPd,
    getNoticePd,
    getDetailPd,
    upcommentPd
  } from "@/api/discuss/publicDiscuss";
@@ -112,7 +104,7 @@
          voteNumberPublic: 0,
          appointUser: '',
          userIds: '',
          eventType: 1,
          eventType: 0,
        },
        dialogVisibles: false,
        form: {},
@@ -141,7 +133,7 @@
          excelBtn: true,
          dialogClickModal: false,
          column: [{
              label: "资讯标题",
              label: "文章标题",
              prop: "title",
              span: 24,
              row: true,
@@ -149,12 +141,12 @@
              search: true,
              rules: [{
                required: true,
                message: "请输入资讯标题",
                message: "请输入文章标题",
                trigger: "blur",
              }, ],
            },
            {
              label: "资讯封面",
              label: "文章封面",
              prop: "url",
              // align:'center',
              width: 80,
@@ -169,7 +161,7 @@
              span: 24,
            },
            {
              label: "资讯范围",
              label: "文章范围",
              prop: "articleList",
              span: 12,
              minRows: 2,
@@ -179,7 +171,7 @@
              dicData: [],
              rules: [{
                required: true,
                message: "请选择资讯范围",
                message: "请选择文章范围",
                trigger: "blur",
              }, ],
              props: {
@@ -189,7 +181,7 @@
              hide: true,
            },
            {
              label: "资讯类型",
              label: "文章类型",
              prop: "type",
              searchSpan: 3,
              width: 80,
@@ -199,7 +191,7 @@
              type: "select",
              rules: [{
                required: true,
                message: "请选择资讯类型",
                message: "请选择文章类型",
                trigger: "blur",
              }, ],
              dicData: [{
@@ -274,7 +266,7 @@
              ],
            },
            {
              label: "资讯内容",
              label: "文章内容",
              prop: "content",
              component: "AvueUeditor",
              options: {
@@ -349,8 +341,8 @@
              offset: 6,
              prop: "endTime",
              type: "datetime",
              format: "yyyy-MM-dd hh:mm:ss",
              valueFormat: "timestamp",
              format: "yyyy-MM-dd",
              valueFormat: "yyyy-MM-dd HH:mm:ss",
              rules: [{
                required: true,
                message: "请选截止时间",
@@ -406,16 +398,27 @@
    },
    methods: {
      openUserPopup(row) {
        this.$refs.publicSignUpChild.openUser(row)
      },
      openDilog(row, type) {
        this.dialogVisibles = true
        this.discussForm.eventType = type
        this.discussForm.articleId = row.id
        this.discussForm.title = row.title
        if (type == 0) {
          this.discussForm.ontitle = '公益报名'
        } else {
          this.discussForm.ontitle = '创建议题'
        }
        this.discussForm.ontitle = '公益报名'
        this.getpunlicDiscussDetail(row)
      },
      getpunlicDiscussDetail(row) {
        getDetailPd({
          articleId: row.id
        }).then((res) => {
          let data = res.data.data
          this.discussForm = data;
        });
      },
      handleSubmit(form, done) {
@@ -708,4 +711,4 @@
  .avue-upload__icon {
    line-height: 6;
  }
</style>
</style>