zengh
2021-08-26 cafc92e382db6863151575aed0087c53e73cb017
新闻修改
2 files modified
77 ■■■■■ changed files
public/app/qfqk.apk patch | view | raw | blame | history
src/views/article/article.vue 77 ●●●●● patch | view | raw | blame | history
public/app/qfqk.apk
Binary files differ
src/views/article/article.vue
@@ -31,6 +31,24 @@
          >删 除
        </el-button>
      </template>
      <template slot-scope="{type,size,row }" slot="menu">
        <el-button v-if="row.publish == '1'" icon="el-icon-close" :size="size" :type="type" @click.stop="updateFb(row)">
          撤销
        </el-button>
        <el-button v-if="row.publish == '0'" icon="el-icon-check" :size="size" :type="type" @click.stop="updateFb(row)">
          发布
        </el-button>
      </template>
      <template slot-scope="{ row }" slot="publish">
        <el-tag
        >{{
          row.publish == "1" ? "已发布" : row.publish == "0" ? "未发布" : "未发布"
          }}
        </el-tag>
      </template>
    </avue-crud>
  </basic-container>
</template>
@@ -58,7 +76,8 @@
        dialogWidth: 950,
        tip: false,
        searchShow: true,
        searchMenuSpan: 6,
          searchMenuSpan: 3,
          menuWidth: 350,
        border: false,
        //stripe:true,
        index: true,
@@ -72,7 +91,7 @@
            prop: "title",
            span: 24,
            row: true,
            searchSpan: 5,
              searchSpan: 4,
            search: true,
            rules: [
              {
@@ -138,8 +157,9 @@
            label: "发布时间",
            prop: "dateTime",
            type: "datetime",
            format: "yyyy-MM-dd HH:mm:ss",
            valueFormat: "yyyy-MM-dd HH:mm:ss",
              format: "yyyy-MM-dd",
              valueFormat: "yyyy-MM-dd",
              searchSpan: 5,
            searchRange: true,
            hide: true,
            addDisplay: false,
@@ -165,12 +185,33 @@
            valueFormat: "yyyy-MM-dd HH:mm:ss",
          },
          {
              label: "发布状态",
              prop: "publish",
              searchSpan: 3,
              width: 80,
              value: "0",
              slot: true,
              search: true,
              type: "select",
              dicData: [
                {
                  label: "未发布",
                  value: "0",
                },
                {
                  label: "已发布",
                  value: "1",
                }
              ],
            },
            {
            label: "视频",
            prop: "videoUrl",
            type: "upload",
            accept: "video/mp4",
            display: true,
            hide: true,
              span: 24,
            listType: "picture-img",
              action: "/api/depl/put-depl",
            propsHttp: {
@@ -202,9 +243,10 @@
  watch: {
    "form.articleType": {
      handler(val) {
          if (val) {
        var videoUrl = this.findObject(this.option.column, "videoUrl");
        var content = this.findObject(this.option.column, "content");
        if (val === "2" || val === "2001"|| val === "2002"|| val === "2003") {
            if (val.indexOf('ksp') != -1) {
          videoUrl.display = true;
          content.display = false;
          videoUrl.rules = [
@@ -218,6 +260,7 @@
          videoUrl.display = false;
          content.display = true;
          videoUrl.rules = [];
            }
        }
      },
      immediate: true,
@@ -371,9 +414,33 @@
        this.selectionClear();
      });
    },
      updateFb(row) {
        if (row.publish == "0") {
          row.publish = "1";
        } else {
          row.publish = "0";
        }
        update(row).then(
          () => {
            this.onLoad(this.page);
            this.$message({
              type: "success",
              message: "操作成功!",
            });
            done();
          },
          (error) => {
            window.console.log(error);
            loading();
          }
        );
      }
  },
};
</script>
<style>
  .avue-upload__icon {
    line-height: 6;
  }
</style>