lin
2024-04-02 e21dd8e2494a47ff4702a321479aa6ae16cbb0fb
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>
@@ -74,7 +77,7 @@
          dialogWidth: 880,
          dialogClickModal: false,
          column: [{
              width: 100,
              width: 200,
              label: "模板id",
              prop: "id",
              span: 24,
@@ -87,8 +90,9 @@
              label: "模版内容",
              prop: "content",
              span: 24,
              width: 200,
              width: 400,
              searchSpan: 4,
              align: "center",
              search: true,
              rules: [{
                required: true,
@@ -101,6 +105,7 @@
              prop: "createTime",
              span: 24,
              width: 200,
              align: "center",
              addDisplay: false,
              rules: [{
                required: true,
@@ -111,7 +116,7 @@
            {
              width: 100,
              label: "是否启用",
              prop: "isDeleted",
              prop: "status",
              span: 24,
              align: "center",
              slot: true,
@@ -256,7 +261,8 @@
            type: "warning"
          })
          .then(() => {
            return enable(row.id)
            row.status = row.status == 1 ? 2 : 1
            return update(row)
          })
          .then(() => {
            this.onLoad(this.page)