|
@@ -40,7 +40,7 @@
|
|
|
v-if="checkPrivilege('button', 'add')"
|
|
|
type="primary"
|
|
|
icon="el-icon-circle-plus-outline"
|
|
|
- @click="toSelectCardCreateType"
|
|
|
+ @click="toAdd"
|
|
|
>添加题卡</el-button
|
|
|
>
|
|
|
</div>
|
|
@@ -80,12 +80,22 @@
|
|
|
@click="toPreview(scope.row)"
|
|
|
>查看</el-button
|
|
|
>
|
|
|
+ <el-button
|
|
|
+ v-if="
|
|
|
+ checkPrivilege('link', 'edit') &&
|
|
|
+ scope.row.createType !== 'UPLOAD'
|
|
|
+ "
|
|
|
+ class="btn-primary"
|
|
|
+ type="text"
|
|
|
+ @click="toEditCard(scope.row)"
|
|
|
+ >编辑题卡</el-button
|
|
|
+ >
|
|
|
<el-button
|
|
|
v-if="checkPrivilege('link', 'edit')"
|
|
|
class="btn-primary"
|
|
|
type="text"
|
|
|
- @click="toEdit(scope.row)"
|
|
|
- >编辑</el-button
|
|
|
+ @click="toEditInfo(scope.row)"
|
|
|
+ >编辑信息</el-button
|
|
|
>
|
|
|
<el-button
|
|
|
v-if="checkPrivilege('link', 'delete')"
|
|
@@ -110,29 +120,6 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <!-- card-create-type -->
|
|
|
- <el-dialog
|
|
|
- class="card-create-type"
|
|
|
- :visible.sync="modalIsShow"
|
|
|
- title="题卡创建方式"
|
|
|
- top="10vh"
|
|
|
- width="600px"
|
|
|
- :close-on-click-modal="false"
|
|
|
- :close-on-press-escape="false"
|
|
|
- append-to-body
|
|
|
- >
|
|
|
- <div class="card-types">
|
|
|
- <div
|
|
|
- v-for="(val, key) in CARD_CREATE_TYPE"
|
|
|
- :key="key"
|
|
|
- class="card-type"
|
|
|
- @click="toAdd(key)"
|
|
|
- >
|
|
|
- {{ val }}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div slot="footer"></div>
|
|
|
- </el-dialog>
|
|
|
<!-- ModifyCardInfo -->
|
|
|
<modify-card-info
|
|
|
ref="ModifyCardInfo"
|
|
@@ -160,11 +147,19 @@ export default {
|
|
|
size: this.GLOBAL.pageSize,
|
|
|
total: 0,
|
|
|
CARD_CREATE_TYPE,
|
|
|
- cardList: [],
|
|
|
- curCard: {},
|
|
|
- // card-create-type dialog
|
|
|
- modalIsShow: false,
|
|
|
- editType: "ADD"
|
|
|
+ cardList: [
|
|
|
+ {
|
|
|
+ id: "11",
|
|
|
+ name: "标准题卡001",
|
|
|
+ type: "",
|
|
|
+ orgs: [],
|
|
|
+ orgNames: ["一中"],
|
|
|
+ createType: "STANDARD",
|
|
|
+ remark: "",
|
|
|
+ createTime: "152145785632145"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ curCard: {}
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
@@ -184,25 +179,22 @@ export default {
|
|
|
this.current = page;
|
|
|
this.getList();
|
|
|
},
|
|
|
- toAdd(createType) {
|
|
|
- console.log(createType);
|
|
|
- this.curCard = { createType };
|
|
|
- this.modalIsShow = false;
|
|
|
- setTimeout(() => {
|
|
|
- this.$refs.ModifyCardInfo.open();
|
|
|
- }, 200);
|
|
|
- },
|
|
|
- toSelectCardCreateType() {
|
|
|
- this.modalIsShow = true;
|
|
|
+ toAdd() {
|
|
|
+ this.curCard = {};
|
|
|
+ this.$refs.ModifyCardInfo.open();
|
|
|
},
|
|
|
toPreview(row) {
|
|
|
this.curCard = row;
|
|
|
this.$refs.ModifyRole.open();
|
|
|
},
|
|
|
- toEdit(row) {
|
|
|
+ toEditCard(row) {
|
|
|
this.curCard = row;
|
|
|
this.$refs.ModifyRole.open();
|
|
|
},
|
|
|
+ toEditInfo(row) {
|
|
|
+ this.curCard = row;
|
|
|
+ this.$refs.ModifyCardInfo.open();
|
|
|
+ },
|
|
|
toDelete(row) {
|
|
|
this.$confirm(`确定要删除题卡【${row.name}】吗?`, "提示", {
|
|
|
type: "warning"
|