|
@@ -1,585 +1,378 @@
|
|
|
<template>
|
|
|
- <div class="record-warp">
|
|
|
- <!-- <div>正确认结算流程,正在努力开发</div> -->
|
|
|
- <div class="record-main" v-show="true">
|
|
|
- <el-row>
|
|
|
- <el-col :span="24">
|
|
|
- <div class="search-head">
|
|
|
- <span>渠道:</span>
|
|
|
- <el-select @change="changeChannel" v-model="channel" placeholder="请选择渠道">
|
|
|
- <el-option
|
|
|
- :label="item.name"
|
|
|
- :value="item.id"
|
|
|
- v-for="item in channelList"
|
|
|
- :key="item.id"
|
|
|
- ></el-option> </el-select
|
|
|
- >
|
|
|
-
|
|
|
- <span class="margin_search">渠道结清状态:</span>
|
|
|
- <el-select class="margin_search" v-model="status" placeholder="请选择结清状态">
|
|
|
- <el-option
|
|
|
- :label="item.name"
|
|
|
- :value="item.id"
|
|
|
- v-for="item in statusList"
|
|
|
- :key="item.id"
|
|
|
- ></el-option> </el-select
|
|
|
- >
|
|
|
- <el-button type="primary" round icon="el-icon-search" @click="searchTarget"
|
|
|
- >搜索</el-button
|
|
|
- >
|
|
|
- <el-button type="info" style="text-align:right" round icon="el-icon-delete-solid" @click="clearSearch"
|
|
|
- >清空</el-button
|
|
|
- >
|
|
|
- <el-button
|
|
|
- type="success"
|
|
|
- class="add_class"
|
|
|
- icon="el-icon-document-checked"
|
|
|
- round
|
|
|
- :disabled="multipleSelection.length==0"
|
|
|
- @click="squareFun"
|
|
|
- >结清</el-button
|
|
|
- >
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <div class="table-content">
|
|
|
- <el-table
|
|
|
- :data="tableData"
|
|
|
- :row-style="{ height: '0px' }"
|
|
|
- :cell-style="{ padding: '5px' }"
|
|
|
- @selection-change="handleSelectionChange"
|
|
|
- >
|
|
|
- <el-table-column type="selection" align="center" width="" show-overflow-tooltip>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="channelName" label="渠道" align="center" width="">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="title" label="标题" align="center" width="">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="amount" label="金额" align="center" width="">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="status"
|
|
|
- label="状态"
|
|
|
- align="center"
|
|
|
- width=""
|
|
|
- :formatter="formatterOrder"
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column prop="effectiveDate" label="类型" align="center" width="">
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="expirationDate"
|
|
|
- label="订单日期起"
|
|
|
- align="center"
|
|
|
- width=""
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
- <el-table-column
|
|
|
- prop="expirationDate"
|
|
|
- label="订单日期止"
|
|
|
- align="center"
|
|
|
- width=""
|
|
|
- >
|
|
|
- </el-table-column>
|
|
|
-
|
|
|
- <el-table-column prop="createDate" label="创建时间" align="center" width="">
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
-
|
|
|
- <el-pagination
|
|
|
- small
|
|
|
- background
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- :current-page.sync="pageNum"
|
|
|
- layout="total, prev, pager, next"
|
|
|
- :page-size="pageSize"
|
|
|
- :total="total"
|
|
|
- >
|
|
|
- </el-pagination>
|
|
|
- <!-- <el-pagination small background layout="total prev, pager, next" :total="36">
|
|
|
- </el-pagination> -->
|
|
|
- </div>
|
|
|
- <ContractChannelRegister ref="register" @search="searchTarget" />
|
|
|
- <ContractPoster ref="poster" @search="searchTarget" />
|
|
|
- <ContractTopUp ref="topUp" @search="searchTarget" />
|
|
|
-
|
|
|
- <el-dialog title="查看" :visible.sync="centerDialogVisible" width="60%" center>
|
|
|
- <div>
|
|
|
- <el-row>
|
|
|
- <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
|
- <div class="user_out">
|
|
|
- <div class="user_out_sub">已使用次数</div>
|
|
|
- <div class="user_out_subNext">
|
|
|
- {{ detailObj.used }}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
|
- <div class="user_out">
|
|
|
- <div class="user_out_sub">单次价格</div>
|
|
|
- <div class="user_out_subNext">
|
|
|
- {{ detailObj.singlePrice }}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
|
- <div class="user_out">
|
|
|
- <div class="user_out_sub">充值使用次数</div>
|
|
|
- <div class="user_out_subNext">
|
|
|
- {{ detailObj.rechargeUsed }}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
|
- <div class="user_out">
|
|
|
- <div class="user_out_sub">剩余次数</div>
|
|
|
- <div class="user_out_subNext">
|
|
|
- {{ detailObj.unuse }}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
|
- <div class="user_out">
|
|
|
- <div class="user_out_sub">累计充值次数</div>
|
|
|
- <div class="user_out_subNext">
|
|
|
- {{ detailObj.rechargeCount }}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
|
- <div class="user_out">
|
|
|
- <div class="user_out_sub">签约单次金额</div>
|
|
|
- <div class="user_out_subNext">
|
|
|
- {{ detailObj.signAmount }}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
|
- <div class="user_out">
|
|
|
- <div class="user_out_sub">有效时间起</div>
|
|
|
- <div class="user_out_subNext">
|
|
|
- {{ detailObj.effectiveDate }}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
|
- <div class="user_out">
|
|
|
- <div class="user_out_sub">有效时间止</div>
|
|
|
- <div class="user_out_subNext">
|
|
|
- {{ detailObj.expirationDate }}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
|
- <div class="user_out">
|
|
|
- <div class="user_out_sub">状态</div>
|
|
|
- <div class="user_out_subNext">
|
|
|
- {{ detailObj.status == "1" ? "签约" : "解约" }}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
|
- <div class="user_out">
|
|
|
- <div class="user_out_sub">备注</div>
|
|
|
- <div class="user_out_subNext">
|
|
|
- {{ detailObj.remarks }}
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
- <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
|
|
|
- <div class="user_out">
|
|
|
- <div class="user_out_sub" style="height: 200px">海报背景图</div>
|
|
|
- <div class="user_out_subNext">
|
|
|
- <el-image
|
|
|
- :src="detailObj.background"
|
|
|
- style="width: 150px; height: 150px"
|
|
|
- />
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- </div>
|
|
|
- </el-dialog>
|
|
|
+ <!-- 普通菜单 -->
|
|
|
+ <div class="jsmind_layout">111111
|
|
|
+ <js-mind :values="mind" :options="options" ref="jsMind" height="1000px"></js-mind>
|
|
|
</div>
|
|
|
</template>
|
|
|
-
|
|
|
<script>
|
|
|
-import { oSessionStorage } from "../../../utils/utils";
|
|
|
-import contractChannelRegister from "../../../components/ContractChannelRegister.vue";
|
|
|
+import Vue from 'vue'
|
|
|
+import jm from 'vue-jsmind'
|
|
|
|
|
|
-import contractPoster from "../../../components/ContractPoster.vue";
|
|
|
-import contractTopUp from "../../../components/ContractTopUp.vue";
|
|
|
+// require('jsmind/js/jsmind.draggable.js')
|
|
|
+// require('jsmind/js/jsmind.screenshot.js')
|
|
|
export default {
|
|
|
- name: "channelManagement",
|
|
|
- components: {
|
|
|
- ContractChannelRegister: contractChannelRegister,
|
|
|
- ContractPoster: contractPoster,
|
|
|
+ props: {
|
|
|
+ showBar: { // 是否显示工具栏,显示启用编辑
|
|
|
+ type: Boolean,
|
|
|
+ default: true
|
|
|
+ },
|
|
|
+ theme: { // 主题
|
|
|
+ type: String,
|
|
|
+ default: 'info'
|
|
|
+ },
|
|
|
+ lineColor: { // 线条颜色
|
|
|
+ type: String,
|
|
|
+ default: 'skyblue'
|
|
|
+ }
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- status:'',
|
|
|
- centerDialogVisible: false,
|
|
|
- editUserFlag: false,
|
|
|
- startTime: "",
|
|
|
- endTime: "",
|
|
|
- value1: null,
|
|
|
- total: 0,
|
|
|
- pageSize: 10,
|
|
|
- pageNum: 1,
|
|
|
- keyword: "",
|
|
|
- tableData: [],
|
|
|
- userInfo: {}, //用户信息
|
|
|
- userId: "", //用户id
|
|
|
- name: "", //根据名称搜索
|
|
|
- userName: "", //根据昵称搜索
|
|
|
- hospitalOrDepartment: "", //医院科室
|
|
|
-
|
|
|
- invitationCode: "",
|
|
|
- roleType: "0",
|
|
|
- type: 0,
|
|
|
- view: {
|
|
|
- name: "",
|
|
|
- userName: "",
|
|
|
- channelId: "",
|
|
|
- role: "",
|
|
|
- },
|
|
|
- detailObj: {},
|
|
|
- channel: "",
|
|
|
- channelList: [{ name: "渠道天成", id: "1" }],
|
|
|
- multipleSelection:[],
|
|
|
- statusList: [
|
|
|
- { name: "已结算", id: "1" },
|
|
|
- { name: "待结算", id: "0" },
|
|
|
+ mind: {},
|
|
|
+ jm: null,
|
|
|
+ isZoomIn: false,
|
|
|
+ isZoomOut: false,
|
|
|
+ level: 0,
|
|
|
+ nodeOptions: [
|
|
|
+ { value: 1, label: '展开到一级节点' },
|
|
|
+ { value: 2, label: '展开到二级节点' },
|
|
|
+ { value: 3, label: '展开到三级节点' },
|
|
|
+ { value: 0, label: '展开全部节点' },
|
|
|
+ { value: -1, label: '隐藏全部节点' }
|
|
|
+ ],
|
|
|
+ themeOptions: [
|
|
|
+ { value: 'default', label: 'default' },
|
|
|
+ { value: 'primary', label: 'primary' },
|
|
|
+ { value: 'warning', label: 'warning' },
|
|
|
+ { value: 'danger', label: 'danger' },
|
|
|
+ { value: 'success', label: 'success' },
|
|
|
+ { value: 'info', label: 'info' },
|
|
|
+ { value: 'greensea', label: 'greensea' },
|
|
|
+ { value: 'nephrite', label: 'nephrite' },
|
|
|
+ { value: 'belizehole', label: 'belizehole' },
|
|
|
+ { value: 'wisteria', label: 'wisteria' },
|
|
|
+ { value: 'asphalt', label: 'asphalt' },
|
|
|
+ { value: 'orange', label: 'orange' },
|
|
|
+ { value: 'pumpkin', label: 'pumpkin' },
|
|
|
+ { value: 'pomegranate', label: 'pomegranate' },
|
|
|
+ { value: 'clouds', label: 'clouds' },
|
|
|
+ { value: 'asbestos', label: 'asbestos' }
|
|
|
],
|
|
|
- };
|
|
|
+ localTheme: this.theme,
|
|
|
+ dialogVisible: false,
|
|
|
+ nodeOption: {
|
|
|
+ content: '',
|
|
|
+ bgColor: '',
|
|
|
+ fontColor: '',
|
|
|
+ fontSize: '',
|
|
|
+ fontWeight: '',
|
|
|
+ fontStyle: ''
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
},
|
|
|
- created() {},
|
|
|
mounted() {
|
|
|
- this.userInfo = JSON.parse(oSessionStorage.getItem("userInfo"));
|
|
|
-
|
|
|
- if (this.userInfo.type == "1") {
|
|
|
- this.channel = "";
|
|
|
- } else if (this.userInfo.type == "0") {
|
|
|
- this.channel = this.userInfo.channelId;
|
|
|
- }
|
|
|
- // this.invitationCode = this.userInfo.invitationCode;
|
|
|
- this.getChannel();
|
|
|
- //判断是超级管理员吗
|
|
|
- // if (this.userInfo.roleType == "1") {
|
|
|
- // this.type = 0;
|
|
|
- // } else if (this.userInfo.roleType == "3") {
|
|
|
- // //如果登录的是代理用户
|
|
|
- // this.type = 4;
|
|
|
- // } else if (this.userInfo.roleType == "2") {
|
|
|
- // this.type = 5;
|
|
|
- // }
|
|
|
-
|
|
|
- // if (this.$route.query.invitationCode) {
|
|
|
- // this.invitationCode = this.$route.query.invitationCode;
|
|
|
- // this.type = this.$route.query.type;
|
|
|
- // }
|
|
|
- if (!this.userInfo) {
|
|
|
- //如果用户信息不存在跳转登陆页
|
|
|
- this.$router.push({ path: "/" });
|
|
|
- }
|
|
|
- this.searchTarget();
|
|
|
+ this.getData()
|
|
|
+ this.mouseWheel()
|
|
|
},
|
|
|
methods: {
|
|
|
- //结算
|
|
|
- squareFun() {
|
|
|
- let that = this;
|
|
|
- let ids = [];
|
|
|
-
|
|
|
- for (let i = 0; i < this.multipleSelection.length; i++) {
|
|
|
- ids.push(this.multipleSelection[i].id);
|
|
|
- }
|
|
|
-
|
|
|
- this.$confirm("此操作将结算, 是否继续?", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- that.squarePrice(ids);
|
|
|
+ beforeUpload (file) { // 上传文件之前钩子
|
|
|
+ if (file) {
|
|
|
+ jsMind.util.file.read(file, (jsmindData) => {
|
|
|
+ const mind = jsMind.util.json.string2json(jsmindData)
|
|
|
+ if (mind) {
|
|
|
+ this.jm.show(mind)
|
|
|
+ this.$message({ type: 'success', message: '打开成功' })
|
|
|
+ } else {
|
|
|
+ this.prompt_info('不能打开mindmap文件')
|
|
|
+ }
|
|
|
})
|
|
|
- .catch(() => {
|
|
|
- // this.$message({
|
|
|
- // type: 'info',
|
|
|
- // message: '已取消删除'
|
|
|
- // });
|
|
|
- });
|
|
|
-
|
|
|
- },
|
|
|
- squarePrice(ids) {
|
|
|
- this.$http.post(`/order/settle`, ids, (res) => {
|
|
|
- // this.$toast.success({message:'成功'});
|
|
|
- if (res && res.code == 200) {
|
|
|
- this.$message.success("结算成功");
|
|
|
- this.searchTarget();
|
|
|
- } else {
|
|
|
- this.$message.error("结算失败");
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- handleSelectionChange(val) {
|
|
|
- this.multipleSelection = val;
|
|
|
- },
|
|
|
- formatterOrder(row) {
|
|
|
- if (row.status == "1") {
|
|
|
- return "已结算";
|
|
|
- } else {
|
|
|
- return "待结算";
|
|
|
- }
|
|
|
- },
|
|
|
- //充值次数
|
|
|
- topUpCount(row) {
|
|
|
- // console.log(this.$refs.topUp)
|
|
|
- this.$refs.topUp.open(row.id);
|
|
|
- },
|
|
|
- //查看海报
|
|
|
- viewPoster(row) {
|
|
|
- this.$refs.poster.open(row);
|
|
|
- },
|
|
|
- //格式化自定义首尾页
|
|
|
- formatterSelfPage(row) {
|
|
|
- if (row.selfPage == "0") {
|
|
|
- return "否";
|
|
|
} else {
|
|
|
- return "是";
|
|
|
+ this.prompt_info('请先选择文件')
|
|
|
+ return false
|
|
|
}
|
|
|
},
|
|
|
- //获取渠道信息
|
|
|
- getChannel() {
|
|
|
- this.$http.get(`/channel/findAll`, {}, (res) => {
|
|
|
- // this.$toast.success({message:'成功'});
|
|
|
- if (res && res.code == 200) {
|
|
|
- //将值赋值给list
|
|
|
- this.channelList = res.data;
|
|
|
- } else {
|
|
|
- this.$message.error(res.msg);
|
|
|
- }
|
|
|
- });
|
|
|
- },
|
|
|
- //员工管理
|
|
|
- userManage(row) {
|
|
|
- this.$router.push({ path: "/manage/staff", query: { channelId: row.id } });
|
|
|
+ upload() {},
|
|
|
+ getData() {
|
|
|
+ this.$API({
|
|
|
+ name: 'getMind'
|
|
|
+ }).then(res => {
|
|
|
+ this.mind = res.data
|
|
|
+ this.open_empty()
|
|
|
+ }).catch(error => {
|
|
|
+ this.$message.error(error)
|
|
|
+ })
|
|
|
},
|
|
|
- //格式化状态
|
|
|
- formatterStatus(row) {
|
|
|
- if (row.status == "1") {
|
|
|
- return "签约";
|
|
|
- } else if (row.status == "0") {
|
|
|
- return "解约";
|
|
|
- } else {
|
|
|
- return "";
|
|
|
+ open_empty() {
|
|
|
+ const options = {
|
|
|
+ container: 'jsmind_container', // 必选,容器ID
|
|
|
+ editable: this.showBar, // 可选,是否启用编辑
|
|
|
+ theme: this.localTheme, // 可选,主题
|
|
|
+ view: {
|
|
|
+ line_width: 2, // 思维导图线条的粗细
|
|
|
+ line_color: this.lineColor // 思维导图线条的颜色
|
|
|
+ },
|
|
|
+ shortcut: {
|
|
|
+ enable: true // 禁用快捷键
|
|
|
+ },
|
|
|
+ layout: {
|
|
|
+ hspace: 50, // 节点之间的水平间距
|
|
|
+ vspace: 20, // 节点之间的垂直间距
|
|
|
+ pspace: 13 // 节点与连接线之间的水平间距(用于容纳节点收缩/展开控制器)
|
|
|
+ },
|
|
|
+ mode: 'side' // 显示模式,子节点只分布在根节点右侧
|
|
|
}
|
|
|
- },
|
|
|
- formatterDelete(row) {
|
|
|
- if (row.isDelete == 0) {
|
|
|
- return "正常";
|
|
|
- } else {
|
|
|
- return "已删除";
|
|
|
+ this.jm = jsMind.show(options, this.mind)
|
|
|
+ // 改变窗口大小重置画布
|
|
|
+ window.onresize = () => {
|
|
|
+ this.jm.resize()
|
|
|
}
|
|
|
},
|
|
|
- resetUser(index, val) {
|
|
|
- this.$http.get(`/user/reset/${val.id}`, {}, (res) => {
|
|
|
- // this.$toast.success({message:'成功'});
|
|
|
- if (res && res.code == 200) {
|
|
|
- this.$message.success("重置成功");
|
|
|
- this.searchTarget();
|
|
|
- } else {
|
|
|
- this.$message.error(res.msg);
|
|
|
- }
|
|
|
- });
|
|
|
- //重置密码
|
|
|
+ save_nodearray_file() {
|
|
|
+ const mindData = this.jm.get_data('node_array')
|
|
|
+ const mindName = mindData.meta.name
|
|
|
+ const mindStr = jsMind.util.json.json2string(mindData)
|
|
|
+ jsMind.util.file.save(mindStr, 'text/jsmind', mindName + '.jm')
|
|
|
},
|
|
|
- editUser(row) {
|
|
|
- this.editRegisterUser(row);
|
|
|
+ screen_shot() {
|
|
|
+ this.jm.screenshot.shootDownload()
|
|
|
},
|
|
|
- viewUser(row) {
|
|
|
- this.detailObj = row;
|
|
|
- this.centerDialogVisible = true;
|
|
|
+ expand_all() {
|
|
|
+ this.jm.expand_all()
|
|
|
},
|
|
|
- addUser() {
|
|
|
- this.addRegisterUser(true);
|
|
|
+ collapse_all() {
|
|
|
+ this.jm.collapse_all()
|
|
|
},
|
|
|
- clearSearch() {
|
|
|
- this.channel = "";
|
|
|
- this.status = "";
|
|
|
- this.searchTarget();
|
|
|
+ expand_to_level(num) {
|
|
|
+ switch (num) {
|
|
|
+ case -1:
|
|
|
+ this.collapse_all()
|
|
|
+ break
|
|
|
+ case 0:
|
|
|
+ this.expand_all()
|
|
|
+ break
|
|
|
+ default:
|
|
|
+ this.jm.expand_to_depth(num)
|
|
|
+ break
|
|
|
+ }
|
|
|
},
|
|
|
- formatterRole(val) {
|
|
|
- if (val.type == "1") {
|
|
|
- return "超级管理员";
|
|
|
+ zoomIn() {
|
|
|
+ if (this.jm.view.zoomIn()) {
|
|
|
+ this.isZoomOut = false
|
|
|
} else {
|
|
|
- return "渠道用户";
|
|
|
+ this.isZoomIn = true
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
- forma(val) {
|
|
|
- if (val.gender == "0") {
|
|
|
- return "男";
|
|
|
+ zoomOut() {
|
|
|
+ if (this.jm.view.zoomOut()) {
|
|
|
+ this.isZoomIn = false
|
|
|
} else {
|
|
|
- return "女";
|
|
|
+ this.isZoomOut = true
|
|
|
}
|
|
|
},
|
|
|
- addRegisterUser(val) {
|
|
|
- this.$refs.register.open(val);
|
|
|
+ prompt_info(msg) {
|
|
|
+ this.$message({ type: 'warning', message: msg})
|
|
|
+ },
|
|
|
+ get_nodearray_data() {
|
|
|
+ const mindData = this.jm.get_data('node_array')
|
|
|
+ const mindString = jsMind.util.json.json2string(mindData)
|
|
|
+ this.$message({ type: 'info', message: mindString})
|
|
|
},
|
|
|
- editRegisterUser(val) {
|
|
|
- this.$refs.register.edit(val);
|
|
|
+ set_theme(themeName) {
|
|
|
+ this.jm.set_theme(themeName)
|
|
|
},
|
|
|
- deleteChannel(index, row) {
|
|
|
- this.$http.delete(`/sign/delete/${row.id}`, {}, (res) => {
|
|
|
- // this.$toast.success({message:'成功'});
|
|
|
- if (res && res.code == 200) {
|
|
|
- this.$message.success("删除成功");
|
|
|
- this.searchTarget();
|
|
|
+ scrollFunc(e) {
|
|
|
+ e = e || window.event
|
|
|
+ if (e.wheelDelta) {
|
|
|
+ if (e.wheelDelta > 0) {
|
|
|
+ this.zoomIn()
|
|
|
} else {
|
|
|
- this.$message.error("删除失败");
|
|
|
+ this.zoomOut()
|
|
|
}
|
|
|
- });
|
|
|
- },
|
|
|
-
|
|
|
- handleCurrentChange(val) {
|
|
|
- this.pageNum = val;
|
|
|
- this.searchList();
|
|
|
- },
|
|
|
- //根据现有情况进行搜索
|
|
|
- searchList() {
|
|
|
- // let url =``
|
|
|
- let data = {};
|
|
|
- if (this.channel == "" || this.channel == null) {
|
|
|
- data = {
|
|
|
- pageNum: this.pageNum,
|
|
|
- pageSize: this.pageSize,
|
|
|
- status:this.status,
|
|
|
- };
|
|
|
- } else {
|
|
|
- data = {
|
|
|
- pageNum: this.pageNum,
|
|
|
- pageSize: this.pageSize,
|
|
|
- channelId: this.channel,
|
|
|
- status:this.status
|
|
|
- };
|
|
|
- }
|
|
|
- this.$http.post(`/order/find`, data, (res) => {
|
|
|
- // console.log(res,'用户测试记录')
|
|
|
- if (res && res.code == 200) {
|
|
|
- this.tableData = res.data.data;
|
|
|
- this.total = res.data.totalElements;
|
|
|
+ } else if (e.detail) {
|
|
|
+ if (e.detail > 0) {
|
|
|
+ this.zoomIn()
|
|
|
} else {
|
|
|
- // this.$toast.fail(res.msg);
|
|
|
- this.$message.error(res.msg);
|
|
|
+ this.zoomOut()
|
|
|
}
|
|
|
- });
|
|
|
- },
|
|
|
- searchTarget() {
|
|
|
- this.pageNum = 1;
|
|
|
- this.searchList();
|
|
|
+ }
|
|
|
+ this.jm.resize()
|
|
|
},
|
|
|
- //跳转首页
|
|
|
- goHome() {
|
|
|
- this.$router.push({ path: "/home" });
|
|
|
+ // 鼠标滚轮放大缩小
|
|
|
+ mouseWheel() {
|
|
|
+ if (document.addEventListener) {
|
|
|
+ document.addEventListener('domMouseScroll', this.scrollFunc, false)
|
|
|
+ }
|
|
|
+ this.$refs.container.onmousewheel = this.scrollFunc
|
|
|
},
|
|
|
- //跳转记录页
|
|
|
- goRecord() {
|
|
|
- this.$router.push({ path: "/record" });
|
|
|
+ // 新增节点
|
|
|
+ addNode() {
|
|
|
+ let selectedNode = this.jm.get_selected_node()
|
|
|
+ if (!selectedNode) {
|
|
|
+ this.$message({ type: 'warning', message: '请先选择一个节点!'})
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let nodeid = jsMind.util.uuid.newid()
|
|
|
+ let topic = 'new Node'
|
|
|
+ let newNode = this.jm.add_node(selectedNode, nodeid, topic)
|
|
|
+ if (newNode) {
|
|
|
+ this.jm.select_node(nodeid)
|
|
|
+ this.jm.begin_edit(nodeid)
|
|
|
+ }
|
|
|
},
|
|
|
- //退出登陆
|
|
|
- logout() {
|
|
|
- oSessionStorage.removeItem("userInfo");
|
|
|
- oSessionStorage.removeItem("token");
|
|
|
- this.$router.push({ path: "/" });
|
|
|
+ // 新增兄弟节点
|
|
|
+ addBrotherNode() {
|
|
|
+ let selectedNode = this.jm.get_selected_node()
|
|
|
+ if (!selectedNode) {
|
|
|
+ this.$message({ type: 'warning', message: '请先选择一个节点!'})
|
|
|
+ return
|
|
|
+ } else if (selectedNode.isroot) {
|
|
|
+ this.$message({ type: 'warning', message: '不能在根节点添加,请重新选择节点!'})
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let nodeid = jsMind.util.uuid.newid()
|
|
|
+ let topic = 'new Node'
|
|
|
+ let newNode = this.jm.insert_node_after(selectedNode, nodeid, topic)
|
|
|
+ if (newNode) {
|
|
|
+ this.jm.select_node(nodeid)
|
|
|
+ this.jm.begin_edit(nodeid)
|
|
|
+ }
|
|
|
},
|
|
|
- //点击日历获取日期
|
|
|
- getDate(param) {
|
|
|
- // console.log(param,"日期。。。")
|
|
|
- this.userRecord(param.dateStr);
|
|
|
+ // 获取选中标签的 ID
|
|
|
+ get_selected_nodeid () {
|
|
|
+ let selectedNode = this.jm.get_selected_node()
|
|
|
+ if (selectedNode) {
|
|
|
+ return selectedNode.id
|
|
|
+ } else {
|
|
|
+ return null
|
|
|
+ }
|
|
|
},
|
|
|
- //点击获取月出勤次数
|
|
|
- getTimes(param) {
|
|
|
- this.monthTimes = param;
|
|
|
+ // 删除节点
|
|
|
+ removeNode() {
|
|
|
+ let selectedId = this.get_selected_nodeid()
|
|
|
+ if (!selectedId) {
|
|
|
+ this.$message({
|
|
|
+ type: 'warning',
|
|
|
+ message: '请先选择一个节点!'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.jm.remove_node(selectedId)
|
|
|
},
|
|
|
- // 用户测试记录显示
|
|
|
- userRecord(date) {
|
|
|
- this.$http.get(
|
|
|
- `gameRecord/findListByUserIdAndDate/${this.userId}/${date}`,
|
|
|
- {},
|
|
|
- (res) => {
|
|
|
- // console.log(res,'用户测试记录')
|
|
|
- if (res && res.code == 200) {
|
|
|
- this.listData = res.data;
|
|
|
- } else {
|
|
|
- this.$toast.fail(res.msg);
|
|
|
- }
|
|
|
- }
|
|
|
- );
|
|
|
+ // 编辑节点
|
|
|
+ editNode () {
|
|
|
+ let selectedId = this.get_selected_nodeid()
|
|
|
+ if (!selectedId) {
|
|
|
+ this.$message({ type: 'warning', message: '请先选择一个节点!'})
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let nodeObj = this.jm.get_node(selectedId)
|
|
|
+ this.nodeOption.content = nodeObj.topic
|
|
|
+ this.nodeOption.bgColor = nodeObj.data['background-color']
|
|
|
+ this.nodeOption.fontColor = nodeObj.data['foreground-color']
|
|
|
+ this.nodeOption.fontSize = nodeObj.data['font-size']
|
|
|
+ this.nodeOption.fontWeight = nodeObj.data['font-weight']
|
|
|
+ this.nodeOption.fontStyle = nodeObj.data['font-style']
|
|
|
+ this.dialogVisible = true
|
|
|
},
|
|
|
+ sureEditNode () {
|
|
|
+ let selectedId = this.get_selected_nodeid()
|
|
|
+ this.jm.update_node(selectedId, this.nodeOption.content)
|
|
|
+ this.jm.set_node_font_style(selectedId, this.nodeOption.fontSize, this.nodeOption.fontWeight, this.nodeOption.fontStyle)
|
|
|
+ this.jm.set_node_color(selectedId, this.nodeOption.bgColor, this.nodeOption.fontColor)
|
|
|
+ this.nodeOption = {
|
|
|
+ content: '',
|
|
|
+ bgColor: '',
|
|
|
+ fontColor: '',
|
|
|
+ fontSize: '',
|
|
|
+ fontWeight: '',
|
|
|
+ fontStyle: ''
|
|
|
+ }
|
|
|
+ this.dialogVisible = false
|
|
|
+ }
|
|
|
},
|
|
|
-};
|
|
|
+ beforeDestroy() {
|
|
|
+ document.removeEventListener('domMouseScroll', this.scrollFunc, false)
|
|
|
+ }
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
-<style lang="less" scoped>
|
|
|
-@import "../../../styles/theme.less";
|
|
|
|
|
|
-.record-warp {
|
|
|
- width: 100%;
|
|
|
- height: 80vh;
|
|
|
- //background: url(../../assets/img/index/19.png) no-repeat center;
|
|
|
- //background-size: 100% 100%;
|
|
|
+<style lang="less">
|
|
|
+.jsmind_layout {
|
|
|
position: relative;
|
|
|
-
|
|
|
- .record-main {
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- box-sizing: border-box;
|
|
|
- overflow-y: auto;
|
|
|
-
|
|
|
- .search-head {
|
|
|
- width: 100%;
|
|
|
- display: flex;
|
|
|
- flex-direction: row;
|
|
|
- justify-content: flex-start;
|
|
|
- align-items: center;
|
|
|
-
|
|
|
- .zc-title {
|
|
|
- color: #606266;
|
|
|
- font-size: 14px;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .table-content {
|
|
|
- margin: 10px 0;
|
|
|
- }
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ width: 100%;
|
|
|
+ height: calc(100% - 40px);
|
|
|
+ overflow: hidden;
|
|
|
+ /deep/ .el-button--medium, /deep/ .el-input--medium {
|
|
|
+ margin-top: 10px;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
-.add_user_class {
|
|
|
- margin-top: 10px;
|
|
|
+jmnode.selected {
|
|
|
+ background-color: #b9b9b9 !important;
|
|
|
+ box-shadow: 2px 2px 8px #777 !important;
|
|
|
}
|
|
|
-
|
|
|
-.user_out {
|
|
|
- display: flex;
|
|
|
+jmnode:hover {
|
|
|
+ box-shadow: 2px 2px 8px #777 !important;
|
|
|
+}
|
|
|
+.jsmind_toolbar {
|
|
|
width: 100%;
|
|
|
+ padding: 10px;
|
|
|
+ height: auto;
|
|
|
+ flex-shrink: 0;
|
|
|
+ display: flex;
|
|
|
align-items: center;
|
|
|
- border: 1px solid #eeeeef;
|
|
|
- line-height: 50px;
|
|
|
- margin-top: 10px;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ background-color: #f8f9fa;
|
|
|
+ box-shadow: 0 0 4px #b8b8b8;
|
|
|
}
|
|
|
-
|
|
|
-.user_out_sub {
|
|
|
- flex: 1;
|
|
|
- background-color: #fafafa;
|
|
|
- text-align: center;
|
|
|
- // color:#ffffff
|
|
|
+#jsmind_container {
|
|
|
+ flex: 1 1 auto;
|
|
|
+ position: relative;
|
|
|
}
|
|
|
-
|
|
|
-.user_out_subNext {
|
|
|
- padding-left: 10px;
|
|
|
- flex: 3;
|
|
|
+.jsmind-inner {
|
|
|
+ overflow: hidden auto !important;
|
|
|
+}
|
|
|
+.el-upload-list {
|
|
|
+ display: none !important;
|
|
|
+}
|
|
|
+.zoom_in_out {
|
|
|
+ position: absolute;
|
|
|
+ bottom: 20px;
|
|
|
+ right: 20px;
|
|
|
+ height: auto;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ flex-direction: column;
|
|
|
+ padding: 5px;
|
|
|
+ background-color: #fff;
|
|
|
+ border-radius: 4px;
|
|
|
+ box-shadow: 2px 2px 4px #e0e0e0;
|
|
|
+ border: 1px solid #f5f5f5;
|
|
|
+ z-index: 999;
|
|
|
+}
|
|
|
+.zoom-icon {
|
|
|
+ cursor: pointer;
|
|
|
+ font-size: 20px;
|
|
|
+ padding: 6px 5px;
|
|
|
+}
|
|
|
+.disabled {
|
|
|
+ color: #bdbcbc;
|
|
|
+ cursor: not-allowed;
|
|
|
+}
|
|
|
+.el-icon-plus {
|
|
|
+ border-bottom: 1px solid #9f9f9f;
|
|
|
+}
|
|
|
+/* 隐藏滚动条 */
|
|
|
+.jsmind-inner::-webkit-scrollbar {
|
|
|
+ display: none;
|
|
|
+}
|
|
|
+.pad {
|
|
|
+ margin-right: 10px;
|
|
|
+}
|
|
|
+.pad-left {
|
|
|
+ margin-left: 10px;
|
|
|
}
|
|
|
</style>
|