|
@@ -4,7 +4,7 @@
|
|
|
<el-row :style="{ padding: '12px' }">
|
|
|
<el-col :span="12">
|
|
|
<i class="el-icon-search"></i>
|
|
|
- <span :style="{ padding: '4px' }">筛选发行商 </span>
|
|
|
+ <span :style="{ padding: '4px' }">筛选发行商 </span>
|
|
|
</el-col>
|
|
|
<el-col :span="12" :style="{ textAlign: 'right' }">
|
|
|
<el-button @click="empty">重置</el-button>
|
|
@@ -32,32 +32,27 @@
|
|
|
</el-row>
|
|
|
</div>
|
|
|
<div class="pubform">
|
|
|
- <el-table
|
|
|
- :data="tableData"
|
|
|
- stripe
|
|
|
- border
|
|
|
- :style="{ borderRadius: '4px' }"
|
|
|
- :header-cell-style="{ 'text-align': 'center' }"
|
|
|
- :cell-style="{ 'text-align': 'center' }"
|
|
|
- >
|
|
|
+ <el-table :data="tableData" stripe border :style="{ borderRadius: '4px' }"
|
|
|
+ :header-cell-style="{ 'text-align': 'center' }" :cell-style="{ 'text-align': 'center' }">
|
|
|
<el-table-column prop="issuerId" label="ID"> </el-table-column>
|
|
|
- <el-table-column prop="headPortraits" label="头像"> </el-table-column>
|
|
|
+ <el-table-column prop="headPortrait" label="头像">
|
|
|
+ <template v-slot="scope">
|
|
|
+ <img class="avaImg" :src="scope.row.headPortrait" width="40" height="40">
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="collectionTitle" label="发行方名称">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="opreation" label="操作">
|
|
|
- <el-button type="text">修改</el-button>
|
|
|
- <el-button type="text">删除</el-button>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button type="text">修改</el-button>
|
|
|
+ <el-button type="text" @click="deleteInfo(scope.row)">删除</el-button>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<el-row :style="{ marginTop: '16px' }">
|
|
|
<el-col :span="24" :style="{ textAlign: 'right' }">
|
|
|
- <el-pagination
|
|
|
- background
|
|
|
- :page-size="10"
|
|
|
- layout="total, prev, pager, next"
|
|
|
- :total="total"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- >
|
|
|
+ <el-pagination background :page-size="10" layout="total, prev, pager, next" :total="total"
|
|
|
+ @current-change="handleCurrentChange">
|
|
|
</el-pagination>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -66,8 +61,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { publishList } from "@/api/publisher/publish";
|
|
|
-import { searchPublish } from "@/api/publisher/publish";
|
|
|
+import { publishList, searchPublish, deletePublish } from "@/api/publisher/publish";
|
|
|
export default {
|
|
|
name: "publisherList",
|
|
|
data() {
|
|
@@ -79,31 +73,28 @@ export default {
|
|
|
},
|
|
|
tableData: [], // 具体数据
|
|
|
total: 1, // 数据个数
|
|
|
-
|
|
|
- issuerID:'' //发行商ID
|
|
|
-
|
|
|
+ issuerID: '' //发行商ID
|
|
|
};
|
|
|
},
|
|
|
- created() {
|
|
|
+ mounted() {
|
|
|
this.getpublishList();
|
|
|
},
|
|
|
methods: {
|
|
|
- empty(){
|
|
|
- this.issuerID=''
|
|
|
+ empty() {
|
|
|
+ this.issuerID = ''
|
|
|
},
|
|
|
search() {
|
|
|
- if(this.issuerId){
|
|
|
- searchPublish(issuerId).then((res)=>{
|
|
|
- console.log(res);
|
|
|
- })
|
|
|
- }
|
|
|
+ if (this.issuerId) {
|
|
|
+ searchPublish(issuerId).then((res) => {
|
|
|
+ console.log(res);
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
addPublish() {
|
|
|
this.$router.push("./addPublisher");
|
|
|
},
|
|
|
getpublishList() {
|
|
|
publishList(this.pageInfo).then((data) => {
|
|
|
- console.log(data);
|
|
|
this.tableData = data.rows;
|
|
|
this.total = data.total;
|
|
|
});
|
|
@@ -112,6 +103,30 @@ export default {
|
|
|
this.pageInfo.pageNum = newPage;
|
|
|
this.getpublishList();
|
|
|
},
|
|
|
+ deleteInfo(id) {
|
|
|
+ console.log(id.issuerId);
|
|
|
+ this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ let issuerId = id.issuerId
|
|
|
+ deletePublish(issuerId).then(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '删除成功!'
|
|
|
+ });
|
|
|
+ this.getpublishList();
|
|
|
+ }).catch(err => {
|
|
|
+ console.log(err);
|
|
|
+ })
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消删除'
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
@@ -121,12 +136,18 @@ export default {
|
|
|
border-radius: 4px;
|
|
|
margin: 16px;
|
|
|
}
|
|
|
+
|
|
|
.addpub {
|
|
|
border: 1px solid #ccc;
|
|
|
border-radius: 4px;
|
|
|
margin: 16px;
|
|
|
}
|
|
|
+
|
|
|
.pubform {
|
|
|
padding: 0 16px;
|
|
|
}
|
|
|
+
|
|
|
+.avaImg {
|
|
|
+ border-radius: 50%;
|
|
|
+}
|
|
|
</style>
|