| | |
| | | <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> |
| | |
| | | <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 |
| | |
| | | >下载日志</a-button |
| | | > |
| | | <a-button |
| | | :disabled="record.version == -1" |
| | | :disabled="record.version != 1" |
| | | type="primary" |
| | | @click="edit(record)" |
| | | >编辑</a-button |
| | |
| | | <a-button |
| | | type="primary" |
| | | v-if="canFeedback" |
| | | :disabled="record.version == -1" |
| | | @click="showFeedback(record)" |
| | | >反馈</a-button |
| | | > |
| | |
| | | width: 100, |
| | | scopedSlots: { customRender: "enabled" }, |
| | | }, |
| | | { |
| | | title: "是否可用", |
| | | dataIndex: "enabled1", |
| | | dataType: "boolean", |
| | | align: "center", |
| | | searchAble: false, |
| | | width: 100, |
| | | scopedSlots: { customRender: "enabled1" }, |
| | | }, |
| | | // { |
| | | // title: "创建时间", |
| | | // dataIndex: "createTime", |
| | |
| | | let classList = []; |
| | | if (record.enabled == -1) { |
| | | classList.push("locked"); |
| | | } |
| | | if (record.enabled == 0) { |
| | | classList.push("unable"); |
| | | } |
| | | return classList; |
| | | }, |
| | |
| | | } |
| | | 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": |
| | |
| | | /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"> |