Browse Source

PC点赞

dev
caoyizhong 3 years ago
parent
commit
0f1d2d36ac
  1. 35
      src/views/wjnft/company/index.vue

35
src/views/wjnft/company/index.vue

@ -53,16 +53,16 @@
v-hasPermi="['wjnft:company:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['wjnft:company:export']"
>导出</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="warning"-->
<!-- plain-->
<!-- icon="el-icon-download"-->
<!-- size="mini"-->
<!-- @click="handleExport"-->
<!-- v-hasPermi="['wjnft:company:export']"-->
<!-- >导出</el-button>-->
<!-- </el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -99,7 +99,13 @@
</template>
</el-table-column>
<el-table-column label="点赞数量" align="center" prop="thumbsUp" />
<el-table-column label="点赞数量" align="center" prop="thumbsUp" >
<template slot-scope="scope">
<span v-if="scope.row.thumbsUp">{{ thumbsUp }}</span>
<span v-else> </span>
</template>
</el-table-column>
<el-table-column label="发布时间" align="center" prop="createdTime" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createdTime, '{y}-{m}-{d}') }}</span>
@ -235,6 +241,9 @@ export default {
//
cancel() {
this.open = false;
this.echo = false;
this.urlPath = null;
this.$refs.uploadFile.$refs.upload.clearFiles();
this.reset();
},
//
@ -278,8 +287,10 @@ export default {
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getCompany(id).then(response => {
this.form = response.data;
this.urlPath = response.data.picture;
this.open = true;
this.echo = true;
this.title = "修改科普";
@ -290,6 +301,8 @@ export default {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
console.log(this.form);
this.form.picture = this.global.apiUrl;
updateCompany(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;

Loading…
Cancel
Save