|
@@ -60,15 +60,6 @@
|
|
|
v-hasPermi="['system:personalPage:remove']"
|
|
|
>删除</el-button>
|
|
|
</el-col>
|
|
|
- <el-col :span="1.5">
|
|
|
- <el-button
|
|
|
- type="warning"
|
|
|
- icon="el-icon-download"
|
|
|
- size="mini"
|
|
|
- @click="handleExport"
|
|
|
- v-hasPermi="['system:personalPage:export']"
|
|
|
- >导出</el-button>
|
|
|
- </el-col>
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
</el-row>
|
|
|
|
|
@@ -109,22 +100,29 @@
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-chat-line-square"
|
|
|
+ @click="preview(scope.row)"
|
|
|
+ v-hasPermi="['system:personal:message:query']"
|
|
|
+ >预览</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-chat-line-square"
|
|
|
@click="handleMessage(scope.row)"
|
|
|
v-hasPermi="['system:personal:message:list']"
|
|
|
- >留言记录</el-button>
|
|
|
+ >留言</el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-edit"
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
- v-hasPermi="['system:personalPage:edit']"
|
|
|
+ v-hasPermi="['system:personal:page:edit']"
|
|
|
>修改</el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-delete"
|
|
|
@click="handleDelete(scope.row)"
|
|
|
- v-hasPermi="['system:personalPage:remove']"
|
|
|
+ v-hasPermi="['system:personal:page:remove']"
|
|
|
>删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -173,6 +171,14 @@
|
|
|
<el-option v-for="item in templateList" :key="item.id" :label="item.title" :value="item.id"/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
+ <el-form-item label="二维码" prop="qrcode">
|
|
|
+ <el-image
|
|
|
+ style="width: 36px; height: 36px"
|
|
|
+ :src="codeImg"
|
|
|
+ @load="getQrcodeImg"
|
|
|
+ :preview-src-list="[codeUrl]">
|
|
|
+ </el-image>
|
|
|
+ </el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label-width="0px" prop="avatar">
|
|
@@ -200,10 +206,11 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { listPersonal, getPersonal, delPersonal, addPersonal, updatePersonal, exportPersonal,changeEnable } from "@/api/system/personalPage";
|
|
|
+import { listPersonal, getPersonal, delPersonal, addPersonal, updatePersonal, exportPersonal,changeEnable,getQrcode } from "@/api/system/personalPage";
|
|
|
import { listTemplate } from "@/api/system/templatePage";
|
|
|
import Editor from '@/components/Editor';
|
|
|
import personalAvatar from "./detail/personalAvatar";
|
|
|
+import qrcodeImg from '@/assets/image/qrcode_img.jpg'
|
|
|
|
|
|
export default {
|
|
|
name: "personalPage",
|
|
@@ -213,6 +220,8 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ codeImg: qrcodeImg,
|
|
|
+ codeUrl: "",
|
|
|
// 遮罩层
|
|
|
loading: true,
|
|
|
// 选中数组
|
|
@@ -361,6 +370,7 @@ export default {
|
|
|
this.form = response.data;
|
|
|
this.open = true;
|
|
|
this.title = "修改个人页";
|
|
|
+ this.getQrcodeImg(row);
|
|
|
});
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
@@ -414,13 +424,31 @@ export default {
|
|
|
this.download(response.msg);
|
|
|
}).catch(function() {});
|
|
|
},
|
|
|
+ getQrcodeImg(row) {
|
|
|
+ const pid = row.id;
|
|
|
+ const tid = row.templateId;
|
|
|
+ const route = this.templateList.find(item => item.id === tid).route;
|
|
|
+ const url = window.location.origin + route+'/' + pid
|
|
|
+ const param = {url:url}
|
|
|
+ getQrcode(param).then(res => {
|
|
|
+ this.codeUrl = "data:image/gif;base64," + res.img;
|
|
|
+ });
|
|
|
+ },
|
|
|
viewPage(){
|
|
|
+ debugger
|
|
|
const pid = this.form.id;
|
|
|
const tid = this.form.templateId;
|
|
|
const route = this.templateList.find(item => item.id === tid).route;
|
|
|
+ console.log(window.location.origin + route+'/' + pid)
|
|
|
var win = window.open(window.location.origin + route+'/' + pid);
|
|
|
win.document.title='个人页 - '+this.form.stakeholder
|
|
|
},
|
|
|
+ preview(row) {
|
|
|
+ const pid = row.id;
|
|
|
+ const tid = row.templateId;
|
|
|
+ const route = this.templateList.find(item => item.id === tid).route;
|
|
|
+ var win = window.open(window.location.origin + route+'/' + pid);
|
|
|
+ },
|
|
|
handleMessage(row) {
|
|
|
this.$router.push({
|
|
|
path: "/personal/message",
|