研发图纸文件管理系统-前端项目
he wei
2024-12-03 98ff6711d7fb3d4b37846d62a20bcd5c09e25d07
src/pages/resourceManage/product/list.vue
@@ -49,6 +49,9 @@
            <template slot="enabled" slot-scope="{ record }">
              {{ record.enabled == -1 ? "是" : "否" }}
            </template>
            <template slot="enabled1" slot-scope="{ record }">
              {{ record.enabled == 1 ? "可用" : "不可用" }}
            </template>
            <template slot="isNormal" slot-scope="{ record }">
              {{ record.customCode == "" ? "是" : "否" }}
            </template>
@@ -65,7 +68,7 @@
                <a-space class="btn-grp" direction="vertical" slot="content">
                  <!-- TODO -->
                  <a-button
                    v-if="isTester && record.enabled == -1"
                    v-if="isTester && record.enabled != 1"
                    type="primary"
                    @click="unLock(record)"
                    >解锁</a-button
@@ -74,7 +77,7 @@
                    >下载日志</a-button
                  >
                  <a-button
                    :disabled="record.version == -1"
                    :disabled="record.version != 1"
                    type="primary"
                    @click="edit(record)"
                    >编辑</a-button
@@ -96,16 +99,22 @@
                  <a-button
                    type="primary"
                    v-if="canFeedback"
                    :disabled="record.version == -1"
                    @click="showFeedback(record)"
                    >反馈</a-button
                  >
                  <a-button
                    type="primary"
                    v-if="record.ecrList.length > 0"
                    @click="showEcrlist(record)"
                    >ecr记录</a-button
                  <a-badge
                    :count="record.ecrList.length"
                    showZero
                    :number-style="{
                      backgroundColor: record.ecrList.length > 0 ? '#090' : '#900',
                    }"
                  >
                    <a-button
                      type="primary"
                      @click="showEcrlist(record)"
                      >ecr记录</a-button
                      >
                  </a-badge>
                </a-space>
                <a>更多</a>
              </a-popover>
@@ -759,6 +768,15 @@
          width: 100,
          scopedSlots: { customRender: "enabled" },
        },
        {
          title: "是否可用",
          dataIndex: "enabled1",
          dataType: "boolean",
          align: "center",
          searchAble: false,
          width: 100,
          scopedSlots: { customRender: "enabled1" },
        },
        // {
        //   title: "创建时间",
        //   dataIndex: "createTime",
@@ -875,6 +893,9 @@
      let classList = [];
      if (record.enabled == -1) {
        classList.push("locked");
      }
      if (record.enabled == 0) {
        classList.push("unable");
      }
      return classList;
    },
@@ -1186,16 +1207,19 @@
      }
      const { pageCurr, pageSize, conditions, columns } = this;
      let params = {};
      let col, index;
      Object.keys(conditions).forEach((v) => {
        switch (v) {
          case "isNormal":
            if (conditions[v]) {
              params["customCode"] = "";
              columns.forEach((val) => {
              columns.forEach((val, idx) => {
                if (val.dataIndex == "customCode") {
                  val.search.value = "";
                  col = { ...val, search: { value: "", backup: "" } };
                  index = idx;
                }
              });
              this.$set(this.columns, index, col);
            }
            break;
          case "customCode":
@@ -1753,6 +1777,13 @@
/deep/.locked.locked.locked:hover > td {
  background: #fcd583;
}
/deep/.unable > td {
  background: #f0637b;
}
/deep/.unable.unable.unable.ant-table-row-hover > td,
/deep/.unable.unable.unable:hover > td {
  background: #ff869a;
}
</style>
<style lang="less">