shuishen
2024-04-18 4522ab3fe8bd45ee753ef187448c1e884bbc601f
src/views/sms/smsTemplate.vue
@@ -14,13 +14,16 @@
        <!--  <el-button :size="size" type="text" icon="el-icon-video-play" v-if="userInfo.role_name.includes('admin')"
          @click="handleDebug(row)">调试
        </el-button> -->
        <el-button :size="size" type="text" icon="el-icon-circle-check" v-if="permission.sms_enable"
        <el-button :size="size" type="text" icon="el-icon-circle-check" v-if="row.status == 1"
          @click.stop="handleEnable(row)">启用
        </el-button>
        <el-button :size="size" type="text" icon="el-icon-circle-check" v-if="row.status == 2"
          @click.stop="handleEnable(row)">禁用
        </el-button>
      </template>
      <template slot-scope="{row, size}" slot="status">
        <el-tag :size="size" :type="row.statusName == '是' ? 'success' : 'info'">{{ row.statusName }}</el-tag>
        <el-tag :size="size" :type="row.status == 1 ? 'info' : 'success'">{{ row.status == 1 ?'否':'是' }}</el-tag>
      </template>
      <template slot-scope="{row, size}" slot="category">
        <el-tag :size="size">{{ row.categoryName }}</el-tag>
@@ -63,7 +66,7 @@
          searchLabelWidth: 96,
          searchShow: true,
          searchMenuSpan: 3,
          menuWidth: 350,
          menuWidth: 300,
          height: 'auto',
          calcHeight: 30,
          tip: false,
@@ -74,7 +77,7 @@
          dialogWidth: 880,
          dialogClickModal: false,
          column: [{
              width: 100,
              width: 200,
              label: "模板id",
              prop: "id",
              span: 24,
@@ -84,11 +87,26 @@
              editDisplay: false,
              viewDisplay: false,
            }, {
              width: 100,
              label: "标题",
              prop: "title",
              span: 24,
              align: "center",
              slot: true,
              rules: [{
                required: true,
                message: "请输入标题",
                trigger: "blur"
              }],
            }, {
              label: "模版内容",
              prop: "content",
              type: 'textarea',
              slot: true,
              span: 24,
              width: 200,
              // width: 400,
              searchSpan: 4,
              align: "center",
              search: true,
              rules: [{
                required: true,
@@ -101,23 +119,23 @@
              prop: "createTime",
              span: 24,
              width: 200,
              align: "center",
              addDisplay: false,
              editDisplay: false,
              rules: [{
                required: true,
                message: "请输入短信签名",
                trigger: "blur"
              }],
            },
            {
              width: 100,
              label: "是否启用",
              prop: "isDeleted",
              label: "备注",
              prop: "remark",
              span: 24,
              align: "center",
              slot: true,
              addDisplay: false,
              editDisplay: false,
              viewDisplay: false,
            },
          ]
        },
@@ -256,7 +274,8 @@
            type: "warning"
          })
          .then(() => {
            return enable(row.id)
            row.status = row.status == 1 ? 2 : 1
            return update(row)
          })
          .then(() => {
            this.onLoad(this.page)