Commit cb7659f4 authored by 张俊's avatar 张俊

Merge branch 'dev' of https://cloud.wodcloud.com/git/apaas/apaas-v3-ui into dev

parents 8879184d 5f864496
...@@ -268,7 +268,7 @@ div { ...@@ -268,7 +268,7 @@ div {
} }
.el-tabs__nav-scroll .el-tabs__item { .el-tabs__nav-scroll .el-tabs__item {
line-height: 30px !important; line-height: 38px !important;
height: 44px !important; height: 44px !important;
} }
......
<template>
<div class="doc_width_nav">
<div class="part doc_part">
<h3 class="part_title">
<span>{{ title || "-" }}</span>
<span>更新时间:{{ time || "-" }}</span>
</h3>
<div
class="part_content doc_content apaas_scroll"
v-html="content"
ref="docContent"
></div>
</div>
<div class="part nav_part">
<h3 class="part_title">
<span>导航</span>
</h3>
<ul class="part_content nav_content apaas_scroll">
<li
v-for="(item, index) in navTree"
:class="[
'text_clip',
'level_' + item.level,
item.id === curNav ? ' current' : '',
]"
:key="index"
>
<a v-text="item.title" @click="clickNav(item)"></a>
</li>
</ul>
</div>
</div>
</template>
<script>
export default {
props: {
richText: {
type: String,
defalut: "",
},
title: {
type: String,
defalut: "",
},
time: {
type: String,
defalut: "",
},
},
data() {
return {
content: "",
navTree: [],
curNav: "",
};
},
watch: {
richText() {
this.translate();
},
},
mounted() {
this.translate();
},
methods: {
translate() {
let content = this.richText;
let titles =
content.match(
/<h1(([\s\S])*?)<\/h1>|<h2(([\s\S])*?)<\/h2>|<h3(([\s\S])*?)<\/h3>/g
) || [];
let time = new Date().getTime();
let pre_h1_index = 0;
let pre_h2_index = 0;
let pre_h3_index = 0;
let newTitles = titles
.map((title, index) => {
let newTitle = title;
let level = 0;
let id = "";
if (title.match(/<h1(([\s\S])*?)<\/h1>/g)) {
pre_h1_index++;
pre_h2_index = 0;
pre_h3_index = 0;
level = 1;
id = `nav_${pre_h1_index}` + "_" + time;
newTitle = title.replace(/<h1/g, `<h1 id="${id}"`);
} else if (title.match(/<h2(([\s\S])*?)<\/h2>/g)) {
pre_h2_index++;
pre_h3_index = 0;
level = 2;
id = `nav_${pre_h1_index}_${pre_h2_index}` + "_" + time;
newTitle = title.replace(/<h2/g, `<h2 id="${id}"`);
} else if (title.match(/<h3(([\s\S])*?)<\/h3>/g)) {
pre_h3_index++;
level = 3;
id = `nav_${pre_h1_index}_${pre_h2_index}_${pre_h3_index}`;
newTitle = title.replace(/<h3/g, `<h3 id="${id}"`) + "_" + time;
}
content = content.replace(new RegExp(title), newTitle);
return {
level,
id,
title: title.replace(/<\/?.+?>/g, ""),
};
})
.filter((item) => item.title);
this.content = content;
this.navTree = newTitles;
this.curNav = (newTitles[0] && newTitles[0].id) || "";
},
clickNav(item) {
let target = document.querySelector(`#${item.id}`);
this.setScroll(target, this.$refs.docContent);
this.curNav = item.id;
},
setScroll(el, parentEl) {
let actualTop = el.offsetTop;
let current = el.offsetParent;
while (current !== null) {
actualTop += current.offsetTop;
current = current.offsetParent;
}
parentEl.scrollTop = actualTop - parentEl.offsetTop;
},
},
};
</script>
<style scoped>
.doc_width_nav {
display: flex;
justify-content: flex-start;
align-items: stretch;
}
.doc_width_nav > .part {
background-color: #fff;
border-radius: 10px;
padding-bottom: 20px;
box-sizing: border-box;
box-sizing: 0;
}
.doc_width_nav > .part + .part {
margin-left: 20px;
}
.doc_part {
flex-grow: 1;
}
.nav_part {
width: 270px;
flex-shrink: 0;
}
.part_title {
padding: 10px 20px;
position: relative;
display: flex;
justify-content: space-between;
align-items: center;
}
.part_title::after {
content: "";
position: absolute;
right: 0;
left: 0;
bottom: 0;
border-bottom: 1px solid #e3e5ef;
}
.part_title > span:nth-child(1) {
font-size: 18px;
font-weight: bold;
line-height: 36px;
color: #58617a;
position: relative;
padding-left: 15px;
}
.part_title > span:nth-child(1)::before {
content: "";
width: 4px;
height: 18px;
background-color: #515fe7;
border-radius: 2px;
position: absolute;
top: 10px;
left: 0;
}
.part_title > span:nth-child(2) {
font-size: 14px;
line-height: 24px;
color: #8890a7;
padding-left: 20px;
background-image: url("/../assets/imgs/shop_ic_updatetime.png");
background-repeat: no-repeat;
background-position: left center;
}
.part_content {
height: calc(100% - 76px);
margin-top: 20px;
box-sizing: border-box;
overflow: auto;
}
.doc_content {
padding: 0 20px;
}
.nav_content {
padding-left: 20px;
}
.nav_content > li > a {
display: block;
height: 30px;
padding: 0 20px;
font-size: 14px;
line-height: 30px;
color: #58617a;
text-decoration: none;
cursor: pointer;
}
.nav_content > li.level_1 > a {
color: #242c43;
}
.nav_content > li.level_2 > a {
text-indent: 2em;
}
.nav_content > li.level_3 > a {
text-indent: 4em;
}
.nav_content > li.current > a {
background-color: #e6ebfe;
color: #515fe7;
}
</style>
...@@ -114,6 +114,19 @@ export default { ...@@ -114,6 +114,19 @@ export default {
}, },
watch: { watch: {
list(value) { list(value) {
this.getFileArray(value);
},
},
created() {
if (!this.unique) {
this.anotherData.uniqueCode = this.unique;
}
},
mounted() {
this.getFileArray(this.list);
},
methods: {
getFileArray(value) {
var getListImg = []; var getListImg = [];
if (value && value.length != 0) { if (value && value.length != 0) {
for (var i = 0; i < value.length; i++) { for (var i = 0; i < value.length; i++) {
...@@ -126,13 +139,6 @@ export default { ...@@ -126,13 +139,6 @@ export default {
this.fileArray = [...getListImg]; this.fileArray = [...getListImg];
this.hideUpload = this.fileArray.length >= this.max; this.hideUpload = this.fileArray.length >= this.max;
}, },
},
created() {
if (!this.unique) {
this.anotherData.uniqueCode = this.unique;
}
},
methods: {
beforeAvatarUpload(file) { beforeAvatarUpload(file) {
if (this.type == "mp3") { if (this.type == "mp3") {
const isMP3 = file.type === "audio/mp3"; const isMP3 = file.type === "audio/mp3";
......
...@@ -107,20 +107,20 @@ export default { ...@@ -107,20 +107,20 @@ export default {
.from_content1 .el-input__inner { .from_content1 .el-input__inner {
background-color: #f7f8f9; background-color: #f7f8f9;
} }
.el-date-editor.el-range-editor .el-range-input { .from_content1 .el-date-editor.el-range-editor .el-range-input {
background-color: #f7f8f9; background-color: #f7f8f9;
width: 80px; width: 80px;
} }
.el-date-editor.el-range-editor .el-range-separator { .from_content1 .el-date-editor.el-range-editor .el-range-separator {
width: 40px; width: 40px;
position: relative; position: relative;
top: 2px; top: 2px;
} }
.el-date-editor.el-range-editor { .from_content1 .el-date-editor.el-range-editor {
width: 260px; width: 260px;
padding: 3px 10px 3px 15px; padding: 3px 10px 3px 15px;
} }
.el-date-editor .el-range__icon { .from_content1 .el-date-editor .el-range__icon {
margin-right: 8px; margin-right: 8px;
} }
</style> </style>
\ No newline at end of file
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
</div> </div>
</div> </div>
</el-col> </el-col>
<el-col :span="4" class="shopping_cell_num"> <el-col :span="3" class="shopping_cell_num">
<div v-if="cellIsService"> <div v-if="cellIsService">
<el-input-number <el-input-number
:disabled="readOnly" :disabled="readOnly"
...@@ -136,7 +136,18 @@ ...@@ -136,7 +136,18 @@
></el-input-number> ></el-input-number>
</div> </div>
</el-col> </el-col>
<el-col :span="4" class="shopping_cell_options"> <el-col :span="2" class="shopping_cell_num">
<div v-if="cellIsService">
<el-input-number
:disabled="readOnly"
v-model="cellItems.duration"
@change="changeNum"
size="mini"
:min="1"
></el-input-number>
</div>
</el-col>
<el-col :span="3" class="shopping_cell_options">
<el-checkbox <el-checkbox
v-if="!readOnly" v-if="!readOnly"
v-model="cellItems.is_subscribe" v-model="cellItems.is_subscribe"
......
...@@ -8,8 +8,9 @@ ...@@ -8,8 +8,9 @@
</el-col> </el-col>
<el-col :span="9" class="shopping_all_head_item">服务信息</el-col> <el-col :span="9" class="shopping_all_head_item">服务信息</el-col>
<el-col :span="5" class="shopping_all_head_item">规格</el-col> <el-col :span="5" class="shopping_all_head_item">规格</el-col>
<el-col :span="4" class="shopping_all_head_item">购买时长</el-col> <el-col :span="3" class="shopping_all_head_item">购买时长</el-col>
<el-col :span="4" class="shopping_all_head_item">操作</el-col> <el-col :span="2" class="shopping_all_head_item">小计</el-col>
<el-col :span="3" class="shopping_all_head_item">操作</el-col>
</el-row> </el-row>
</div> </div>
<ShoppingCartList <ShoppingCartList
......
...@@ -8,6 +8,11 @@ import mavonEditor from 'mavon-editor' ...@@ -8,6 +8,11 @@ import mavonEditor from 'mavon-editor'
import 'mavon-editor/dist/css/index.css' import 'mavon-editor/dist/css/index.css'
Vue.use(mavonEditor) Vue.use(mavonEditor)
import { codemirror } from 'vue-codemirror'
import 'codemirror/lib/codemirror.css'
Vue.use(codemirror)
import VueResource from "vue-resource"; import VueResource from "vue-resource";
Vue.use(VueResource); Vue.use(VueResource);
......
<template> <template>
<div class="detail_box"> <div class="detail_box">
<p class="now_page_title"> <div class="apass_breadcrumb">
技术支持 / 问答中心 / 问答列表 / <el-breadcrumb separator="/">
<span>详情</span> <el-breadcrumb-item to="/technical_support">
</p> 技术支持
</el-breadcrumb-item>
<el-breadcrumb-item to="/technical_support/answer_center">
问答中心
</el-breadcrumb-item>
<el-breadcrumb-item to="/technical_support/answer_center/list">
问答列表
</el-breadcrumb-item>
<el-breadcrumb-item> 详情 </el-breadcrumb-item>
</el-breadcrumb>
</div>
<div class="detail_content"> <div class="detail_content">
<div class="question" v-if="question.title"> <div class="question" v-if="question.title">
<p>{{ question.title }}</p> <p>{{ question.title }}</p>
...@@ -49,7 +59,8 @@ ...@@ -49,7 +59,8 @@
<div slot="suffix" class="back_solt" @click="answer_question(item.id,item.user_id)">回复</div> <div slot="suffix" class="back_solt" @click="answer_question(item.id,item.user_id)">回复</div>
</el-input> </el-input>
</div> </div>
<div class="back_fllow answer_box" v-for="(it,idx) in item.children" :key="'ans_child'+idx+5000" v-if="idx<=4||answer_child_index===index"> <template v-for="(it,idx) in item.children">
<div class="back_fllow answer_box" :key="'ans_child'+idx+5000" v-if="idx<=4||answer_child_index===index">
<div :style="idx == item.children.length-1&&item.children.length<=5?{border:'0',overflow:'hidden',}:{borderBottom:'2px solid #f4f7fc',overflow:'hidden',}" > <div :style="idx == item.children.length-1&&item.children.length<=5?{border:'0',overflow:'hidden',}:{borderBottom:'2px solid #f4f7fc',overflow:'hidden',}" >
<div class="picture"> <div class="picture">
<img :src="it.user_picture_path" alt="" style="width:100%"> <img :src="it.user_picture_path" alt="" style="width:100%">
...@@ -77,6 +88,7 @@ ...@@ -77,6 +88,7 @@
</div> </div>
</div> </div>
</div> </div>
</template>
<div class="under_count" v-if="item.children&&item.children.length>5&&answer_child_index!==index"> <div class="under_count" v-if="item.children&&item.children.length>5&&answer_child_index!==index">
还有{{item.children.length-5}}条回复,<span @click="answer_child_index=index">点击查看</span> 还有{{item.children.length-5}}条回复,<span @click="answer_child_index=index">点击查看</span>
</div> </div>
...@@ -124,130 +136,7 @@ export default { ...@@ -124,130 +136,7 @@ export default {
'video' 'video'
], ],
editstr:'', editstr:'',
answer: [ answer: [],
{
id: 4,
username: "普通neo",
created: "2020-10-21T15:30:13+08:00",
content: "这个问题我知道,详情请参见http://www.baidu.com/abc",
answered_user: "",
children: [
{
id: 5,
username: "普通neo",
created: "2020-10-21T15:34:20+08:00",
content: "这个问题我知道,详情请参见http://www.baidu.com/abc",
answered_user: "我是超级管理员",
children: null,
},
{
id: 6,
username: "普通neo",
created: "2020-10-21T15:34:20+08:00",
content: "这个问题我知道,详情请参见http://www.baidu.com/abc",
answered_user: "我是超级管理员",
children: null,
},
{
id: 7,
username: "普通neo",
created: "2020-10-21T15:34:20+08:00",
content: "这个问题我知道,详情请参见http://www.baidu.com/abc",
answered_user: "我是超级管理员",
children: null,
},
{
id: 5,
username: "普通neo",
created: "2020-10-21T15:34:20+08:00",
content: "这个问题我知道,详情请参见http://www.baidu.com/abc",
answered_user: "我是超级管理员",
children: null,
},
{
id: 6,
username: "普通neo",
created: "2020-10-21T15:34:20+08:00",
content: "这个问题我知道,详情请参见http://www.baidu.com/abc",
answered_user: "我是超级管理员",
children: null,
},
{
id: 7,
username: "普通neo",
created: "2020-10-21T15:34:20+08:00",
content: "这个问题我知道,详情请参见http://www.baidu.com/abc",
answered_user: "我是超级管理员",
children: null,
},
],
},
{
id: 4,
username: "普通neo",
created: "2020-10-21T15:30:13+08:00",
content: "这个问题我知道,详情请参见http://www.baidu.com/abc",
answered_user: "",
children: [
{
id: 5,
username: "普通neo",
created: "2020-10-21T15:34:20+08:00",
content: "这个问题我知道,详情请参见http://www.baidu.com/abc",
answered_user: "我是超级管理员",
children: null,
},
{
id: 6,
username: "普通neo",
created: "2020-10-21T15:34:20+08:00",
content: "这个问题我知道,详情请参见http://www.baidu.com/abc",
answered_user: "我是超级管理员",
children: null,
},
{
id: 7,
username: "普通neo",
created: "2020-10-21T15:34:20+08:00",
content: "这个问题我知道,详情请参见http://www.baidu.com/abc",
answered_user: "我是超级管理员",
children: null,
},
{
id: 5,
username: "普通neo",
created: "2020-10-21T15:34:20+08:00",
content: "这个问题我知道,详情请参见http://www.baidu.com/abc",
answered_user: "我是超级管理员",
children: null,
},
{
id: 6,
username: "普通neo",
created: "2020-10-21T15:34:20+08:00",
content: "这个问题我知道,详情请参见http://www.baidu.com/abc",
answered_user: "我是超级管理员",
children: null,
},
{
id: 7,
username: "普通neo",
created: "2020-10-21T15:34:20+08:00",
content: "这个问题我知道,详情请参见http://www.baidu.com/abc",
answered_user: "我是超级管理员",
children: null,
},
],
},
{
id: 4,
username: "普通neo",
created: "2020-10-21T15:30:13+08:00",
content: "这个问题我知道,详情请参见http://www.baidu.com/abc",
answered_user: "",
children: null,
},
],
}; };
}, },
watch: {}, watch: {},
...@@ -383,15 +272,8 @@ export default { ...@@ -383,15 +272,8 @@ export default {
</script> </script>
<style scoped> <style scoped>
.detail_box { .apass_breadcrumb > .el-breadcrumb {
/* min-height: calc(100% - 15px); */ padding: 12px 0 11px;
}
.now_page_title {
margin: 13px 0;
color: #898d9e;
}
.now_page_title span {
color: #242c43;
} }
.detail_content { .detail_content {
width: 100%; width: 100%;
...@@ -399,7 +281,7 @@ export default { ...@@ -399,7 +281,7 @@ export default {
} }
.question, .question,
.answer { .answer {
width: 856px; width: 100%;
background-color: #fff; background-color: #fff;
box-shadow: 0px 3px 6px 0px rgba(15, 19, 65, 0.04); box-shadow: 0px 3px 6px 0px rgba(15, 19, 65, 0.04);
border-radius: 12px; border-radius: 12px;
......
<template> <template>
<div class="detail_box"> <div class="detail_box">
<p class="now_page_title"> <div class="apass_breadcrumb">
技术支持 / 问答中心 / <el-breadcrumb separator="/">
<span>发帖提问</span> <el-breadcrumb-item to="/technical_support">
</p> 技术支持
</el-breadcrumb-item>
<el-breadcrumb-item to="/technical_support/answer_center">
问答中心
</el-breadcrumb-item>
<el-breadcrumb-item> 发帖提问 </el-breadcrumb-item>
</el-breadcrumb>
</div>
<div class="detail_content"> <div class="detail_content">
<div class="detail_title"> <div class="detail_title">
<el-input v-model="title" placeholder="请输入问题标题"></el-input> <el-input v-model="title" placeholder="请输入问题标题"></el-input>
...@@ -93,15 +100,8 @@ export default { ...@@ -93,15 +100,8 @@ export default {
</script> </script>
<style scoped> <style scoped>
.detail_box { .apass_breadcrumb > .el-breadcrumb {
padding: 12px 0 11px;
}
.now_page_title {
margin: 13px 0;
color: #898d9e;
}
.now_page_title span {
color: #242c43;
} }
.detail_content { .detail_content {
width: 1200px; width: 1200px;
......
...@@ -29,7 +29,11 @@ ...@@ -29,7 +29,11 @@
</el-button> </el-button>
</span> </span>
<span> <span>
<el-input placeholder="请输入搜索内容"></el-input> <el-input
v-model="searchText"
placeholder="请输入搜索内容"
@input="searchInput"
></el-input>
</span> </span>
<span> <span>
<el-button type="primary" @click="intoAnswerPage"> <el-button type="primary" @click="intoAnswerPage">
...@@ -48,13 +52,13 @@ ...@@ -48,13 +52,13 @@
@click="viewItem(item)" @click="viewItem(item)"
> >
<h3 class="answer_title" v-text="item.title"></h3> <h3 class="answer_title" v-text="item.title"></h3>
<p class="answer_content" v-text="item.content"></p> <p class="answer_content" v-text="getContentText(item.content)"></p>
<p class="answer_info"> <p class="answer_info">
<span> <span>
<img class="user_img" :src="item.picture_path" /> <img class="user_img" :src="item.picture_path" />
<span class="user_name" v-text="item.user_name"></span> <span class="user_name" v-text="item.user_name"></span>
<span class="user_text">发布于</span> <span class="user_text">发布于</span>
<span class="user_time" v-text="item.created"></span> <span class="user_time" v-text="getTimeText(item.created)"></span>
</span> </span>
<span> <span>
<span class="num_answer" v-text="item.answer_num"></span> <span class="num_answer" v-text="item.answer_num"></span>
...@@ -78,6 +82,7 @@ ...@@ -78,6 +82,7 @@
</template> </template>
<script> <script>
import helper from "@/services/helper.js";
import ListPagination from "@/components/comments-pagination"; import ListPagination from "@/components/comments-pagination";
export default { export default {
...@@ -87,11 +92,13 @@ export default { ...@@ -87,11 +92,13 @@ export default {
data() { data() {
return { return {
answerList: [], answerList: [],
sortType: 0, // 0:最新问题 1:最热问题
listTotal: 0, listTotal: 0,
pageSizes: [10, 20, 50], pageSizes: [10, 20, 50],
pageSize: 10, pageSize: 10,
currentPage: 1, currentPage: 1,
sortType: 0, // 0:最新问题 1:最热问题
searchText: "",
inputTimer: null,
}; };
}, },
created() { created() {
...@@ -99,144 +106,38 @@ export default { ...@@ -99,144 +106,38 @@ export default {
}, },
methods: { methods: {
getAnwerList() { getAnwerList() {
this.answerList = [ this.$http
{ .get("/apaas/support/qa/question/list", {
id: 1, params: {
title: "平台的流程引擎怎么样", // 标题 style: 1,
content: "我们想用流程引擎,不会用,求大神指点", // 内容 order: this.sortType === 0 ? "" : "created",
created_by: "abc", // 发布人的userid search: this.searchText,
created: "2020-10-21T14:28:10+08:00", // 发布时间 limit: this.pageSize,
updated: "2020-10-21T14:28:10+08:00", // 更新时间 page: this.currentPage,
view: 0, // 浏览量
answer_num: 2, // 回答数,
user_name: "普通neo", // 发布人
picture_path:
"http://pic1.win4000.com/tj/2017-07-11/596437562ae53.jpg",
},
{
id: 2,
title: "平台的流程引擎怎么样6666", // 标题
content: "我们想用流程引擎,不会用,求大神指点", // 内容
created_by: "abc", // 发布人的userid
created: "2020-10-21T14:28:10+08:00", // 发布时间
updated: "2020-10-21T14:28:10+08:00", // 更新时间
view: 0, // 浏览量
answer_num: 2, // 回答数,
user_name: "普通neo", // 发布人
picture_path:
"http://pic1.win4000.com/tj/2017-07-11/596437562ae53.jpg",
},
{
id: 3,
title: "平台的流程引擎怎么样23233333", // 标题
content: "我们想用流程引擎,不会用,求大神指点", // 内容
created_by: "abc", // 发布人的userid
created: "2020-10-21T14:28:10+08:00", // 发布时间
updated: "2020-10-21T14:28:10+08:00", // 更新时间
view: 0, // 浏览量
answer_num: 2, // 回答数,
user_name: "普通neo", // 发布人
picture_path:
"http://pic1.win4000.com/tj/2017-07-11/596437562ae53.jpg",
},
{
id: 4,
title: "平台的流程引擎怎么样23233333", // 标题
content: "我们想用流程引擎,不会用,求大神指点", // 内容
created_by: "abc", // 发布人的userid
created: "2020-10-21T14:28:10+08:00", // 发布时间
updated: "2020-10-21T14:28:10+08:00", // 更新时间
view: 0, // 浏览量
answer_num: 2, // 回答数,
user_name: "普通neo", // 发布人
picture_path:
"http://pic1.win4000.com/tj/2017-07-11/596437562ae53.jpg",
},
{
id: 5,
title: "平台的流程引擎怎么样23233333", // 标题
content: "我们想用流程引擎,不会用,求大神指点", // 内容
created_by: "abc", // 发布人的userid
created: "2020-10-21T14:28:10+08:00", // 发布时间
updated: "2020-10-21T14:28:10+08:00", // 更新时间
view: 0, // 浏览量
answer_num: 2, // 回答数,
user_name: "普通neo", // 发布人
picture_path:
"http://pic1.win4000.com/tj/2017-07-11/596437562ae53.jpg",
},
{
id: 1,
title: "平台的流程引擎怎么样", // 标题
content: "我们想用流程引擎,不会用,求大神指点", // 内容
created_by: "abc", // 发布人的userid
created: "2020-10-21T14:28:10+08:00", // 发布时间
updated: "2020-10-21T14:28:10+08:00", // 更新时间
view: 0, // 浏览量
answer_num: 2, // 回答数,
user_name: "普通neo", // 发布人
picture_path:
"http://pic1.win4000.com/tj/2017-07-11/596437562ae53.jpg",
},
{
id: 2,
title: "平台的流程引擎怎么样6666", // 标题
content: "我们想用流程引擎,不会用,求大神指点", // 内容
created_by: "abc", // 发布人的userid
created: "2020-10-21T14:28:10+08:00", // 发布时间
updated: "2020-10-21T14:28:10+08:00", // 更新时间
view: 0, // 浏览量
answer_num: 2, // 回答数,
user_name: "普通neo", // 发布人
picture_path:
"http://pic1.win4000.com/tj/2017-07-11/596437562ae53.jpg",
},
{
id: 3,
title: "平台的流程引擎怎么样23233333", // 标题
content: "我们想用流程引擎,不会用,求大神指点", // 内容
created_by: "abc", // 发布人的userid
created: "2020-10-21T14:28:10+08:00", // 发布时间
updated: "2020-10-21T14:28:10+08:00", // 更新时间
view: 0, // 浏览量
answer_num: 2, // 回答数,
user_name: "普通neo", // 发布人
picture_path:
"http://pic1.win4000.com/tj/2017-07-11/596437562ae53.jpg",
},
{
id: 4,
title: "平台的流程引擎怎么样23233333", // 标题
content: "我们想用流程引擎,不会用,求大神指点", // 内容
created_by: "abc", // 发布人的userid
created: "2020-10-21T14:28:10+08:00", // 发布时间
updated: "2020-10-21T14:28:10+08:00", // 更新时间
view: 0, // 浏览量
answer_num: 2, // 回答数,
user_name: "普通neo", // 发布人
picture_path:
"http://pic1.win4000.com/tj/2017-07-11/596437562ae53.jpg",
}, },
{ })
id: 5, .then(({ data }) => {
title: "平台的流程引擎怎么样23233333", // 标题 if (data.success) {
content: "我们想用流程引擎,不会用,求大神指点", // 内容 this.answerList = data.data || [];
created_by: "abc", // 发布人的userid this.listTotal = data.total;
created: "2020-10-21T14:28:10+08:00", // 发布时间 }
updated: "2020-10-21T14:28:10+08:00", // 更新时间 });
view: 0, // 浏览量
answer_num: 2, // 回答数,
user_name: "普通neo", // 发布人
picture_path:
"http://pic1.win4000.com/tj/2017-07-11/596437562ae53.jpg",
},
];
this.listTotal = 15;
}, },
selectSortType(type) { selectSortType(type) {
this.sortType = type; this.sortType = type;
this.getAnwerList(); this.getAnwerList();
}, },
searchInput() {
if (this.inputTimer) {
clearTimeout(this.inputTimer);
}
this.inputTimer = setTimeout(() => {
console.log(this.searchText);
this.currentPage = 1;
this.getAnwerList();
}, 200);
},
changePageSize(value) { changePageSize(value) {
this.pageSize = value; this.pageSize = value;
this.currentPage = 1; this.currentPage = 1;
...@@ -252,6 +153,18 @@ export default { ...@@ -252,6 +153,18 @@ export default {
intoAnswerPage() { intoAnswerPage() {
this.$router.push("/technical_support/answer_center/edit"); this.$router.push("/technical_support/answer_center/edit");
}, },
getTimeText(time) {
return helper.dateStringTransform(time || "");
},
getContentText(content) {
let text = content.replace(/<img[^>]+>/g, "【图片】");
text = text.replace(/<iframe(([\s\S])*?)<\/iframe>/g, "【视频】");
text = text.replace(/<pre(([\s\S])*?)<\/pre>/g, "【代码】");
text = text.replace(/<\/?.+?>/g, "");
return text;
},
}, },
}; };
</script> </script>
......
This diff is collapsed.
...@@ -23,11 +23,6 @@ export default { ...@@ -23,11 +23,6 @@ export default {
data: () => ({ data: () => ({
navList: [], navList: [],
}), }),
watch: {
"$route.fullPath"(path) {
this.initNavList();
},
},
methods: { methods: {
initNavList() { initNavList() {
this.$api.general.getNowMenu({ teamName: "APAAS3" }).then((response) => { this.$api.general.getNowMenu({ teamName: "APAAS3" }).then((response) => {
......
...@@ -14,51 +14,28 @@ ...@@ -14,51 +14,28 @@
</el-breadcrumb> </el-breadcrumb>
</div> </div>
<div class="main_container"> <doc-width-nav
<div class="part doc_part"> class="main_container"
<h3 class="part_title"> :title="title"
<span>{{ title || typeText }}</span> :time="update_time"
<span>更新时间:{{ update_time }}</span> :rich-text="content"
</h3> ></doc-width-nav>
<div
class="part_content doc_content apaas_scroll"
v-html="content"
ref="docContent"
></div>
</div>
<div class="part nav_part">
<h3 class="part_title">
<span>导航</span>
</h3>
<ul class="part_content nav_content apaas_scroll">
<li
v-for="(item, index) in navTree"
:class="[
'text_clip',
'level_' + item.level,
item.id === curNav ? ' current' : '',
]"
:key="index"
>
<a v-text="item.title" @click="clickNav(item)"></a>
</li>
</ul>
</div>
</div>
</div> </div>
</template> </template>
<script> <script>
import helper from "@/services/helper.js"; import helper from "@/services/helper.js";
import DocWidthNav from "@/components/doc-width-nav.vue";
export default { export default {
components: {
DocWidthNav,
},
data() { data() {
return { return {
title: "", title: "",
update_time: "", update_time: "",
content: "", content: "",
navTree: [],
curNav: "",
}; };
}, },
computed: { computed: {
...@@ -87,59 +64,6 @@ export default { ...@@ -87,59 +64,6 @@ export default {
}, },
methods: { methods: {
getContent() { getContent() {
let successCallback = (content) => {
let titles =
content.match(
/<h1(([\s\S])*?)<\/h1>|<h2(([\s\S])*?)<\/h2>|<h3(([\s\S])*?)<\/h3>/g
) || [];
let time = new Date().getTime();
let pre_h1_index = 0;
let pre_h2_index = 0;
let pre_h3_index = 0;
let newTitles = titles
.map((title, index) => {
let newTitle = title;
let level = 0;
let id = "";
if (title.match(/<h1(([\s\S])*?)<\/h1>/g)) {
pre_h1_index++;
pre_h2_index = 0;
pre_h3_index = 0;
level = 1;
id = `nav_${pre_h1_index}` + "_" + time;
newTitle = title.replace(/<h1/g, `<h1 id="${id}"`);
} else if (title.match(/<h2(([\s\S])*?)<\/h2>/g)) {
pre_h2_index++;
pre_h3_index = 0;
level = 2;
id = `nav_${pre_h1_index}_${pre_h2_index}` + "_" + time;
newTitle = title.replace(/<h2/g, `<h2 id="${id}"`);
} else if (title.match(/<h3(([\s\S])*?)<\/h3>/g)) {
pre_h3_index++;
level = 3;
id = `nav_${pre_h1_index}_${pre_h2_index}_${pre_h3_index}`;
newTitle = title.replace(/<h3/g, `<h3 id="${id}"`) + "_" + time;
}
content = content.replace(new RegExp(title), newTitle);
return {
level,
id,
title: title.replace(/<\/?.+?>/g, ""),
};
})
.filter((item) => item.title);
this.content = content;
this.navTree = newTitles;
this.curNav = (newTitles[0] && newTitles[0].id) || "";
};
this.$http this.$http
.get("/apaas/support/document/get", { .get("/apaas/support/document/get", {
params: { params: {
...@@ -152,7 +76,7 @@ export default { ...@@ -152,7 +76,7 @@ export default {
this.update_time = this.getTimeText(data.data.updated); this.update_time = this.getTimeText(data.data.updated);
if (data.data.content) { if (data.data.content) {
successCallback(data.data.content); this.content = data.data.content;
} }
} }
}); });
...@@ -160,23 +84,6 @@ export default { ...@@ -160,23 +84,6 @@ export default {
getTimeText(time) { getTimeText(time) {
return helper.dateStringTransform(time); return helper.dateStringTransform(time);
}, },
clickNav(item) {
let target = document.querySelector(`#${item.id}`);
this.setScroll(target, this.$refs.docContent);
this.curNav = item.id;
},
setScroll(el, parentEl) {
let actualTop = el.offsetTop;
let current = el.offsetParent;
while (current !== null) {
actualTop += current.offsetTop;
current = current.offsetParent;
}
parentEl.scrollTop = actualTop - parentEl.offsetTop;
},
}, },
}; };
</script> </script>
...@@ -189,102 +96,5 @@ export default { ...@@ -189,102 +96,5 @@ export default {
} }
.main_container { .main_container {
height: calc(100% - 53px); height: calc(100% - 53px);
display: flex;
justify-content: flex-start;
align-items: stretch;
}
.main_container > .part {
background-color: #fff;
border-radius: 10px;
padding-bottom: 20px;
box-sizing: border-box;
box-sizing: 0;
}
.main_container > .part + .part {
margin-left: 20px;
}
.doc_part {
flex-grow: 1;
}
.nav_part {
width: 270px;
flex-shrink: 0;
}
.part_title {
padding: 10px 20px;
position: relative;
display: flex;
justify-content: space-between;
align-items: center;
}
.part_title::after {
content: "";
position: absolute;
right: 0;
left: 0;
bottom: 0;
border-bottom: 1px solid #e3e5ef;
}
.part_title > span:nth-child(1) {
font-size: 18px;
font-weight: bold;
line-height: 36px;
color: #58617a;
position: relative;
padding-left: 15px;
}
.part_title > span:nth-child(1)::before {
content: "";
width: 4px;
height: 18px;
background-color: #515fe7;
border-radius: 2px;
position: absolute;
top: 10px;
left: 0;
}
.part_title > span:nth-child(2) {
font-size: 14px;
line-height: 24px;
color: #8890a7;
padding-left: 20px;
background-image: url("../../../assets/imgs/shop_ic_updatetime.png");
background-repeat: no-repeat;
background-position: left center;
}
.part_content {
height: calc(100% - 76px);
margin-top: 20px;
box-sizing: border-box;
overflow: auto;
}
.doc_content {
padding: 0 20px;
}
.nav_content {
padding-left: 20px;
}
.nav_content > li > a {
display: block;
height: 30px;
padding: 0 20px;
font-size: 14px;
line-height: 30px;
color: #58617a;
text-decoration: none;
cursor: pointer;
}
.nav_content > li.level_1 > a {
color: #242c43;
}
.nav_content > li.level_2 > a {
text-indent: 2em;
}
.nav_content > li.level_3 > a {
text-indent: 4em;
}
.nav_content > li.current > a {
background-color: #e6ebfe;
color: #515fe7;
} }
</style> </style>
<template>
<div class="doc_container">
<side-nav-bar
title="SDK管理"
imgSrc="tool_ic_kaifawendang"
:nav-list="navList"
:title-path="navList[0] && navList[0].path"
style="width: 200px;"
></side-nav-bar>
<div class="main_container">
<router-view />
</div>
</div>
</template>
<script>
import sideNavBar from "@/components/side-nav-bar";
export default {
components: {
sideNavBar,
},
data: () => ({
navList: [],
}),
methods: {
initNavList() {
this.$api.general.getNowMenu({ teamName: "APAAS3" }).then((response) => {
if (response.data.success == 1) {
let arr = response.data.data[0].Child;
for (let i = 0; i < arr.length; i++) {
let first = arr[i];
if (first.visit_url == "/technical_support") {
for (let j = 0; j < first.Child.length; j++) {
let second = first.Child[j];
if (second.visit_url == "/technical_support/sdk_manage") {
this.navList = second.Child.map((item) => ({
name: item.menu_name,
path: item.visit_url,
}));
break;
}
}
break;
}
}
}
});
},
},
mounted() {
this.initNavList();
},
};
</script>
<style scoped>
.doc_container {
height: calc(100vh - 58px);
display: flex;
justify-content: flex-start;
align-items: stretch;
}
.side_nav_bar {
width: 180px;
flex-shrink: 0;
}
.main_container {
width: calc(100% - 180px);
flex-grow: 1;
flex-shrink: 1;
background-color: #f6f7fb;
overflow: auto;
}
</style>
This diff is collapsed.
<template>
<div class="doc_manage_container">
<apass-list
ref="list"
search-placeholder="请输入关键字"
:list-padding-left="paddingLeft"
:hide-search="true"
:list-total="listTotal"
:list-header="listHeader"
:list-data="listData"
@list-action="init"
>
<el-breadcrumb separator="/" slot="breadcrumb">
<el-breadcrumb-item to="/technical_support">
技术支持
</el-breadcrumb-item>
<el-breadcrumb-item to="/technical_support/doc_manage">
SDK管理
</el-breadcrumb-item>
<el-breadcrumb-item>
SDK类型管理
</el-breadcrumb-item>
</el-breadcrumb>
<template slot="top">
<div class="top_fliter">
<show-more-filter class="filter_list">
<div class="filter_item">
<span class="filter_title">SDK类型:</span>
<el-select v-model="topFilter.type" placeholder="请选择">
<el-option label="全部" value=""></el-option>
<el-option
v-for="(item, index) in types"
:key="'top_type_' + index"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</div>
<div class="filter_item">
<span class="filter_title">最后更新时间:</span>
<el-date-picker
v-model="topFilter.time"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
>
</el-date-picker>
</div>
</show-more-filter>
<div class="filter_action apaas_button">
<el-button type="primary" @click="topFilterAction">
查询
</el-button>
<el-button type="defalut" @click="topFilterClear">
重置
</el-button>
</div>
</div>
</template>
</apass-list>
</div>
</template>
<script>
import helper from "@/services/helper.js";
import apassList from "@/components/apass-list";
import apassDialog from "@/components/apass-dialog";
import showMoreFilter from "@/components/show-more-filter";
export default {
components: {
apassList,
apassDialog,
showMoreFilter,
},
data() {
return {
paddingLeft: 25,
listTotal: 0,
listHeader: [],
listData: [],
topFilter: {
type: "",
time: "",
},
types: [],
tempFilter: {},
};
},
methods: {
init(filter) {
let fullFilter = {
...filter,
...this.topFilter,
};
this.tempFilter = filter;
console.log(fullFilter);
},
topFilterClear() {
this.topFilter = {
name: "",
type: "",
time: "",
};
this.refreshPage();
},
topFilterAction() {
this.refreshPage();
},
refreshPage() {
this.$refs.list.resetCurrentPage();
},
},
};
</script>
This diff is collapsed.
<template>
<div class="page_container">
<side-nav-bar
title="SDK中心"
imgSrc="tool_ic_kaifawendang"
:nav-list="navList"
:title-path="navList[0] && navList[0].path"
style="width: 250px;"
></side-nav-bar>
<div class="main_container">
<router-view :key="$route.params.type + $route.params.id" />
</div>
</div>
</template>
<script>
import sideNavBar from "@/components/side-nav-bar";
export default {
components: {
sideNavBar,
},
data: () => ({
navList: [],
}),
methods: {
initNavList() {
let activePath = "";
let baseUrl = "/technical_support/sdk";
let data = [
{
name: "JavaScript SDK",
id: 1,
children: [
{
name: "在地图上添加图层",
id: 101,
},
{
name: "测测测自己创建测",
id: 102,
},
],
},
{
name: "Android SDK",
id: 2,
children: [
{
name: "Android",
id: 201,
},
{
name: "测测测自己创建测",
id: 202,
},
],
},
];
this.navList = data.map((item) => {
let children = item.children;
let nav = {
name: item.name,
path: `${baseUrl}/${item.name}`,
};
if (children.length > 0) {
nav.children = children.map((v) => {
let path = `${baseUrl}/${item.name}/${v.id}`;
if (activePath === "") {
activePath = path;
}
return {
name: v.name,
path: path,
};
});
nav.open = true;
} else {
nav.disabled = true;
}
return nav;
});
if (activePath && this.$route.params.id === undefined) {
this.$router.push(activePath);
} else if (activePath === "") {
this.$message.error("您尚未创建任何SDK文档");
}
},
},
mounted() {
this.initNavList();
},
};
</script>
<style scoped>
.page_container {
height: calc(100vh - 58px);
display: flex;
justify-content: flex-start;
align-items: stretch;
}
.side_nav_bar {
width: 180px;
flex-shrink: 0;
}
.main_container {
width: calc(100% - 180px);
flex-grow: 1;
flex-shrink: 1;
background-color: #f6f7fb;
overflow: auto;
}
</style>
<template>
<div class="my_qa">
<el-breadcrumb separator="/" class="bread_crumb1 bread_left">
<el-breadcrumb-item :to="{ path: '/user' }">{{
$t("lang.personal_center")
}}</el-breadcrumb-item>
<el-breadcrumb-item>{{
$t("lang.my_questions_and_answers")
}}</el-breadcrumb-item>
</el-breadcrumb>
<BlockRadius class="info_block user_qa">
<div class="left_user">
<div class="img_head">
<img :src="user_info.picture_path" class="img_head_in" />
</div>
<div class="left_word">
<p class="left_name">{{ user_info.user_name }}</p>
<p class="left_role">{{ user_info.role }}</p>
</div>
</div>
<div class="right_list">
<div class="user_qa_card my_a">
<img src="@/assets/imgs/wdjb_ic_zhye.png" />
<div class="card_word">
<p class="card_name">账户余额</p>
<p>
{{ helper.numberFormat(user_info.answer_num)
}}<span v-if="user_info.answer_num > 10000" class="card_wan">
</span>
</p>
</div>
</div>
<div class="user_qa_card my_view">
<img src="@/assets/imgs/wdjb_ic_czbs.png" />
<div class="card_word">
<p class="card_name">充值笔数</p>
<p>
{{ helper.numberFormat(user_info.view_num)
}}<span v-if="user_info.view_num > 10000" class="card_wan">
</span>
</p>
</div>
</div>
</div>
</BlockRadius>
<BlockRadius class="block_down info_block">
<div class="czjl">
<div class="czjl_p">
充值记录
<el-tooltip
class="tool_item"
effect="dark"
content="充值明细(如需进行充值,请线下联系平台超级管理员)"
placement="top-start"
offset="5"
>
<img class="tool_img" src="@/assets/imgs/tool_ic_tips.png" />
</el-tooltip>
</div>
<el-date-picker
v-model="date"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
value-format="yyyy-MM-dd"
:clearable="false"
></el-date-picker>
</div>
<apass-table
class="apa_table"
ref="outtreetable"
:data="tableData"
:header="table_header"
></apass-table>
<list-pagination
:total="total_list"
:page-sizes="[50, 20, 10]"
:page-size="currentlimit"
:current-page="currentPage"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
></list-pagination>
</BlockRadius>
</div>
</template>
<script>
import BlockRadius from "@/components/general/block-radius";
import apassTable from "@/components/apass-table";
import listPagination from "@/components/comments-pagination";
import helper from "@/services/helper.js";
export default {
components: {
BlockRadius,
apassTable,
listPagination,
},
data: () => ({
helper,
user_info: {
user_name: "",
role: "",
question_num: 0,
answer_num: 0,
view_num: 0,
picture_path: "",
},
tableData: [{}, {}],
table_header: [],
total_list: 0,
currentPage: 1,
currentlimit: 10,
date: [],
}),
watch: {},
methods: {
handleSizeChange(val) {
this.pagination.rowsPerPage = val;
this.refreshData();
},
handleCurrentChange(val) {
this.pagination.page += val;
this.refreshData();
},
getUserCoin() {
this.$api.user.getUserQA().then((response) => {
if (response.data.success == 1) {
this.user_info = response.data.data;
}
});
},
selectnum({ select, rows }) {
this.num = select.length;
this.selected_date = select;
},
getCoinList() {
let query = {
start: this.date.length != 0 ? this.date[0] : "",
end: this.date.length != 0 ? this.date[1] : "",
};
console.log(query)
this.$api.user.getUserQA().then((response) => {
if (response.data.success == 1) {
this.user_info = response.data.data;
}
});
},
},
mounted() {
this.getUserCoin();
this.getCoinList();
this.table_header = [
{
prop: "title",
label: "充值流水ID",
align: "center",
type: "html",
getHtml: (str) => {
return `<span style="color:#0f2683;font-weight:bold;width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" title="${str.title}">123123</span>`;
},
},
{
prop: "content",
label: "充值金额(金币/个)",
align: "center",
type: "html",
getHtml: (str) => {
return `<span style="width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">123123123</span>`;
},
},
{
prop: "answer_num",
label: "账户余额(金币/个)",
align: "center",
},
{
prop: "created",
label: "充值时间",
align: "center",
type: "html",
getHtml: (str) => {
return `<span>${helper.dateStringTransform(str.created)}</span>`;
},
},
];
},
};
</script>
<style scoped>
.my_qa {
/* height: calc(100% - 20px); */
height: calc(100%);
overflow: hidden;
}
.info_block {
margin: 0 20px 20px;
position: relative;
}
.block_down {
height: calc(100% - 214px);
}
.czjl {
height: 50px;
position: relative;
display: flex;
justify-content: space-between;
top: -6px;
}
.czjl::after {
content: "";
position: absolute;
left: -20px;
bottom: 0;
width: calc(100% + 40px);
height: 1px;
background-color: #e6ebfe;
}
.czjl_p {
font-weight: bold;
padding-left: 20px;
position: relative;
font-size: 16px;
top: 8px;
}
.czjl_p::after {
position: absolute;
content: "";
width: 4px;
height: 16px;
background-color: #515fe7;
border-radius: 2px;
left: 8px;
top: 3px;
}
.apa_table {
height: calc(100% - 90px);
}
.user_qa {
height: 120px;
display: flex;
justify-content: space-between;
}
.left_user {
width: 300px;
display: flex;
justify-content: space-between;
}
.img_head {
width: 76px;
height: 76px;
margin: 2px 10px;
border-radius: 50%;
overflow: hidden;
border: solid 2px #e3e5ef;
}
.img_head_in {
width: 100%;
height: 100%;
}
.left_word {
width: 200px;
padding-top: 5px;
}
.left_name {
color: #1d1e20;
font-size: 22px;
line-height: 44px;
}
.left_role {
color: #8890a7;
font-size: 14px;
}
.right_list {
width: 40%;
min-width: 550px;
max-width: 700px;
display: flex;
justify-content: space-between;
}
.user_qa_card {
width: 49%;
height: 80px;
border-radius: 10px 10px 10px 40px;
display: flex;
justify-content: space-around;
align-items: center;
font-size: 34px;
font-family: Arial;
font-weight: bold;
text-align: right;
}
.my_q {
background-color: #fcefd6;
color: #ef9433;
}
.my_a {
background-color: #e7fdfc;
color: #25bdb1;
}
.my_view {
background-color: #e5f4fe;
color: #38aef9;
}
.card_word {
}
.card_name {
color: #242c43;
font-size: 14px;
font-family: Microsoft YaHei;
font-weight: normal;
}
.card_wan {
font-size: 14px;
}
</style>
<style scoped>
.com-pagination {
margin-top: 20px;
font-size: 14px;
padding: 0 5%;
display: flex;
justify-content: space-between;
align-items: center;
}
.com_page_item {
display: flex;
justify-content: flex-end;
align-items: center;
}
.commodity_card {
}
.commodity_card_list {
width: 100%;
display: flex;
flex-wrap: wrap;
}
.commodity_card_item {
margin: 10px 0;
}
.commodity_card_item_in {
margin: 0 auto;
}
.tool_item {
}
.tool_img {
width: 16px;
height: 16px;
position: relative;
top: 2px;
left: 2px;
}
</style>
<style>
.czjl .el-input__inner {
background-color: #f7f8f9;
}
.czjl .el-date-editor.el-range-editor .el-range-input {
background-color: #f7f8f9;
width: 80px;
}
.czjl .el-date-editor.el-range-editor .el-range-separator {
width: 40px;
position: relative;
top: 2px;
}
.czjl .el-date-editor.el-range-editor {
width: 260px;
padding: 3px 10px 3px 15px;
}
.czjl .el-date-editor .el-range__icon {
margin-right: 8px;
}
</style>
\ No newline at end of file
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<list-pagination <list-pagination
v-if="tableData.length" v-if="tableData.length"
:total="total_list" :total="total_list"
:page-sizes="[50, 10]" :page-sizes="[50, 20, 10]"
:page-size="currentlimit" :page-size="currentlimit"
:current-page="currentPage" :current-page="currentPage"
@size-change="handleSizeChange" @size-change="handleSizeChange"
...@@ -92,7 +92,7 @@ export default { ...@@ -92,7 +92,7 @@ export default {
table_header: [], table_header: [],
total_list: 0, total_list: 0,
currentPage: 1, currentPage: 1,
currentlimit: 50, currentlimit: 10,
form_data: [ form_data: [
{ {
label: "问题搜索", label: "问题搜索",
......
...@@ -25,33 +25,33 @@ ...@@ -25,33 +25,33 @@
<p class="card_name">我的提问</p> <p class="card_name">我的提问</p>
<p> <p>
{{ helper.numberFormat(user_info.question_num) {{ helper.numberFormat(user_info.question_num)
}}<span v-if="user_info.question_num > 10000" class="card_wan" }}<span v-if="user_info.question_num > 10000" class="card_wan">
></span
> </span>
</p> </p>
</div> </div>
</div> </div>
<div class="user_qa_card my_a"> <div class="user_qa_card my_a">
<img src="@/assets/imgs/ic_wodehuida.png" /> <img src="@/assets/imgs/ic_wodehuida.png" />
<div class="card_word"> <div class="card_word">
<p class="card_name">我的提问</p> <p class="card_name">我的回答</p>
<p> <p>
{{ helper.numberFormat(user_info.answer_num) {{ helper.numberFormat(user_info.answer_num)
}}<span v-if="user_info.answer_num > 10000" class="card_wan" }}<span v-if="user_info.answer_num > 10000" class="card_wan">
></span
> </span>
</p> </p>
</div> </div>
</div> </div>
<div class="user_qa_card my_view"> <div class="user_qa_card my_view">
<img src="@/assets/imgs/ic_liulanshu.png" /> <img src="@/assets/imgs/ic_liulanshu.png" />
<div class="card_word"> <div class="card_word">
<p class="card_name">我的提问</p> <p class="card_name">浏览数</p>
<p> <p>
{{ helper.numberFormat(user_info.view_num) {{ helper.numberFormat(user_info.view_num)
}}<span v-if="user_info.view_num > 10000" class="card_wan" }}<span v-if="user_info.view_num > 10000" class="card_wan">
></span
> </span>
</p> </p>
</div> </div>
</div> </div>
...@@ -77,11 +77,9 @@ ...@@ -77,11 +77,9 @@
{{ item.content.replace(/<[^<>]+>/g, "") }} {{ item.content.replace(/<[^<>]+>/g, "") }}
</p> </p>
<p v-if="activeName == 2" class="cell_other"> <p v-if="activeName == 2" class="cell_other">
<span <span>
>删除时间:{{ 删除时间:{{ helper.dateStringTransform(item.deleted_time) }}
helper.dateStringTransform(item.deleted_time) </span>
}}</span
>
<span>删除人:{{ item.delete_user }}</span> <span>删除人:{{ item.delete_user }}</span>
<span>删除理由:{{ item.reason }}</span> <span>删除理由:{{ item.reason }}</span>
</p> </p>
......
This diff is collapsed.
...@@ -1004,6 +1004,14 @@ export default { ...@@ -1004,6 +1004,14 @@ export default {
color: "#58617a", color: "#58617a",
url:'/search_engine', url:'/search_engine',
}, },
{
text: "数据采集",
pic: require("@/assets/imgs/home_tool_ic_sscj.png"),
bg: "#fff2e2",
color: "#ea7d19",
url:'https://apaas3.wodcloud.com/sjcj/ui/',
target: 1,
},
], ],
service_arr: [ service_arr: [
["服务列表", "申请服务", "云资源"], ["服务列表", "申请服务", "云资源"],
......
...@@ -67,6 +67,14 @@ const user = { ...@@ -67,6 +67,14 @@ const user = {
}, },
getUserQA() { getUserQA() {
return axios.get(`/apaas/support/qa/info`) return axios.get(`/apaas/support/qa/info`)
},
// my coins
getUserCoins() {
return axios.get(``)
},
getCoinList() {
return axios.get(``)
} }
} }
......
...@@ -167,7 +167,8 @@ export default new Router({ ...@@ -167,7 +167,8 @@ export default new Router({
path: "/technical_support/doc_manage", path: "/technical_support/doc_manage",
name: "technicalSupportDoc", name: "technicalSupportDoc",
redirect: "/technical_support/doc_manage/list", redirect: "/technical_support/doc_manage/list",
component: () => import("@/pages/technical-support/doc-manage/index"), component: () =>
import("@/pages/technical-support/doc-manage/index"),
children: [ children: [
{ {
path: "/technical_support/doc_manage/list", path: "/technical_support/doc_manage/list",
...@@ -183,11 +184,26 @@ export default new Router({ ...@@ -183,11 +184,26 @@ export default new Router({
}, // 开发文档管理编辑 }, // 开发文档管理编辑
], ],
}, // 开发文档管理 }, // 开发文档管理
{
path: "/technical_support/demo_center",
name: "technicalSupportDemo",
// redirect: "/technical_support/demo_center/index",
component: () => import("@/pages/technical-support/demo-center/index"),
// children: [
// {
// path: "/technical_support/doc_manage/list",
// name: "technicalSupportDocDetail",
// component: () =>
// import("@/pages/technical-support/doc-manage/list"),
// }, // 示例中心管理列表
// ],
}, // 示例中心
{ {
path: "/technical_support/answer_center/", path: "/technical_support/answer_center/",
name: "technicalSupportDoc", name: "technicalSupportDoc",
redirect: "/technical_support/answer_center/list", redirect: "/technical_support/answer_center/list",
component: () => import("@/pages/technical-support/answer-center/index"), component: () =>
import("@/pages/technical-support/answer-center/index"),
children: [ children: [
{ {
path: "/technical_support/answer_center/list", path: "/technical_support/answer_center/list",
...@@ -206,6 +222,18 @@ export default new Router({ ...@@ -206,6 +222,18 @@ export default new Router({
}, // 问答中心详情 }, // 问答中心详情
], ],
}, // 问答中心 }, // 问答中心
{
path: "/technical_support/sdk",
name: "technicalSupportSdk",
component: () => import("@/pages/technical-support/sdk/index"),
children: [
{
path: "/technical_support/sdk/:type/:id",
name: "technicalSupportSdkDetail",
component: () => import("@/pages/technical-support/sdk/detail"),
}, // 问答中心列表
],
}, // 问答中心
], ],
}, // 技术支持 }, // 技术支持
{ {
...@@ -423,6 +451,11 @@ export default new Router({ ...@@ -423,6 +451,11 @@ export default new Router({
name: "myQA", name: "myQA",
component: () => import("@/pages/user/questions-answers/my-qa"), component: () => import("@/pages/user/questions-answers/my-qa"),
}, },
{
path: "/user/my_coin", // 我的金币
name: "myCoin",
component: () => import("@/pages/user/my-coin"),
},
], ],
}, // 个人中心 }, // 个人中心
{ {
...@@ -434,14 +467,16 @@ export default new Router({ ...@@ -434,14 +467,16 @@ export default new Router({
{ {
path: "/qa/questions", // 提问列表 path: "/qa/questions", // 提问列表
name: "questions", name: "questions",
component: () => import("@/pages/user/questions-answers/community"), component: () =>
import("@/pages/user/questions-answers/community"),
}, },
{ {
path: "/qa/answers", // 回答列表 path: "/qa/answers", // 回答列表
name: "answers", name: "answers",
component: () => import("@/pages/user/questions-answers/community"), component: () =>
import("@/pages/user/questions-answers/community"),
}, },
] ],
}, },
{ {
path: "/authority", // 权限管理 path: "/authority", // 权限管理
......
{
"data": [
{
"label": "arcgis server 地图示例",
"children": [
{
"label": "二维地图",
"name": "2d_base_map",
"branch": "arcgis_latest"
},
{
"label": "三维地图",
"name": "3d_base_map",
"branch": "arcgis_latest"
},
{
"label": "二维地图与三维地图切换",
"name": "2dto3d",
"branch": "arcgis_latest"
},
{
"label": "二维地图之加载csv数据源",
"name": "2d_csvlayer",
"branch": "arcgis_latest"
},
{
"label": "二维地图之加载json数据源",
"name": "2d_loadjson",
"branch": "arcgis_latest"
},
{
"label": "二维地图之查询",
"name": "2d_query",
"branch": "arcgis_latest"
},
{
"label": "三维地图之加载csv数据源",
"name": "3d_csvlayer",
"branch": "arcgis_latest"
},
{
"label": "基础地图",
"name": "basic_web_map",
"branch": "arcgis_latest"
},
{
"label": "地图级别控件",
"name": "sliderZoom",
"branch": "arcgis_latest"
},
{
"label": "要素图层显示要素列表",
"name": "featurelayer",
"branch": "arcgis_latest"
},
{
"label": "地理编码检索",
"name": "geocoding",
"branch": "arcgis_latest"
},
{
"label": "缓冲区服务与空间分析",
"name": "linebuffer",
"branch": "arcgis_latest"
},
{
"label": "人员轨迹查询",
"name": "peoplecluster",
"branch": "arcgis_latest"
},
{
"label": "高亮图层要素",
"name": "pointshine_map",
"branch": "arcgis_latest"
},
{
"label": "天地图_WMTS",
"name": "tdt_wmts_map",
"branch": "arcgis_latest"
},
{
"label": "方正_WMTS",
"name": "fz_map",
"branch": "arcgis_latest"
},
{
"label": "Geoserver_WMTS服务",
"name": "arcgis_load_geoserver_wmts",
"branch": "arcgis_latest"
},
{
"label": "单图层查询",
"name": "simplesearch",
"branch": "arcgis_latest"
},
{
"label": "多图层拉框查询",
"name": "multilayer3search",
"branch": "arcgis_latest"
},
{
"label": "多图层属性查询",
"name": "multilayer4search",
"branch": "arcgis_latest"
},
{
"label": "通用多图层多字段查询",
"name": "multilayersandfeilds_3search",
"branch": "arcgis_latest"
},
{
"label": "视频Webmap",
"name": "video_web_map",
"branch": "arcgis_latest"
},
{
"label": "图表Webmap",
"name": "echarts_web_map",
"branch": "arcgis_latest"
},
{
"label": "Webmap test",
"name": "webmap_test",
"branch": "arcgis_latest"
},
{
"label": "热力图",
"name": "heatmap",
"branch": "arcgis_latest"
},
{
"label": "图层管理",
"name": "manage_layers",
"branch": "arcgis_latest"
},
{
"label": "迁徙图",
"name": "migrate",
"branch": "arcgis_latest"
},
{
"label": "迁徙图2",
"name": "migrate2",
"branch": "arcgis_latest"
},
{
"label": "公交线路图",
"name": "bus_line",
"branch": "arcgis_latest"
},
{
"label": "点聚合图",
"name": "flareClusterLayer",
"branch": "arcgis_latest"
},
{
"label": "运动图层",
"name": "movinglayer",
"branch": "arcgis_latest"
},
{
"label": "3.x运动图层",
"name": "3.xmovelayer",
"branch": "arcgis_latest"
},
{
"label": "多图层查询",
"name": "2d_findTaskLayers",
"branch": "arcgis_latest"
},
{
"label": "画框统计",
"name": "2d_queryStatistic",
"branch": "arcgis_latest"
},
{
"label": "视频播放",
"name": "2d_videoView",
"branch": "arcgis_latest"
},
{
"label": "缓冲区分析",
"name": "2d_buffer_analysis",
"branch": "arcgis_latest"
},
{
"label": "加载本地JSON文件/shapefile文件",
"name": "2d_loadGeometry",
"branch": "arcgis_latest"
},
{
"label": "要素编辑",
"name": "editFeatures",
"branch": "arcgis_latest"
},
{
"label": "要素编辑用3.x版本",
"name": "2d_featureEditor3.x",
"branch": "arcgis_latest"
},
{
"label": "要素编辑用3.x版本_贵州",
"name": "2d_featureEditor3.x_guizhou",
"branch": "arcgis_latest"
}
]
}
]
}
\ No newline at end of file
This diff is collapsed.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>用echart渲染热力图</title>
<style>
html,
body,
#view {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
</style>
<link rel="stylesheet" href="https://apaas.wodcloud.com/api_4.x/esri/css/main.css">
<script>
var dojoConfig = {
parseOnLoad: true,
packages: [{
name: "src",
location: location.pathname.replace(/\/[^/]+$/, "") + "/src"
}]
};
</script>
<script src="https://apaas.wodcloud.com/mapsamples/static/js/jquery-3.3.1.min.js"></script>
<script src="https://apaas.wodcloud.com/api_4.x/init.js"></script>
<script src="https://apaas.wodcloud.com/mapsamples/static/js/echart/echarts.min.js"></script>
<script src="https://apaas.wodcloud.com/mapsamples/static/js/echart/echartsExtent.js"></script>
<script>
require([
"esri/Map",
"https://apaas.wodcloud.com/mapsamples/static/js/GaodeLayer.js",
"esri/views/SceneView",
"esri/views/MapView",
"esri/Graphic",
"esri/layers/GraphicsLayer",
"esri/geometry/Point",
"esri/geometry/SpatialReference",
"esri/symbols/PictureMarkerSymbol",
"dojo/domReady!"
], function (Map, GaodeLayer, SceneView, MapView, Graphic, GraphicsLayer, Point, SpatialReference, PictureMarkerSymbol) {
//新建矢量图层
var GaodeLayer = new GaodeLayer();
//json格式的地理数据
var map = new Map({
layers: [GaodeLayer]
});
var view = new MapView({
container: "view",
map: map,
center: [106.71543991100576, 26.58363100116717],
zoom: 10
});
});
</script>
</head>
<body>
<div id="view"></div>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>高德地图</title>
<style>
html,
body,
#view {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
</style>
<link rel="stylesheet" href="https://apaas.wodcloud.com/api_4.x/esri/css/main.css">
<script>
var dojoConfig = {
parseOnLoad: true,
packages: [{
name: "src",
location: location.pathname.replace(/\/[^/]+$/, "") + "/src"
}]
};
</script>
<script src="https://apaas.wodcloud.com/mapsamples/static/js/jquery-3.3.1.min.js"></script>
<script src="https://apaas.wodcloud.com/api_4.x/init.js"></script>
<script>
require([
"esri/Map",
"https://apaas.wodcloud.com/mapsamples/static/js/GaodeLayer.js",
"esri/views/SceneView",
"esri/views/MapView",
"esri/Graphic",
"esri/layers/GraphicsLayer",
"esri/geometry/Point",
"esri/geometry/SpatialReference",
"esri/symbols/PictureMarkerSymbol",
"dojo/domReady!"
], function (Map, GaodeLayer, SceneView, MapView, Graphic, GraphicsLayer, Point, SpatialReference, PictureMarkerSymbol) {
//新建矢量图层
var GaodeLayer = new GaodeLayer();
//json格式的地理数据
var map = new Map({
layers: [GaodeLayer, footprintlayer]
});
var view = new MapView({
container: "view",
map: map,
center: [106.71543991100576, 26.58363100116717],
zoom: 10
});
});
</script>
</head>
<body>
<div id="view"></div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>高德地图</title>
<style>
html,
body,
#view {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
</style>
<link rel="stylesheet" href="https://apaas.wodcloud.com/api_4.x/esri/css/main.css">
<script>
var dojoConfig = {
parseOnLoad: true,
packages: [{
name: "src",
location: location.pathname.replace(/\/[^/]+$/, "") + "/src"
}]
};
</script>
<script src="https://apaas.wodcloud.com/mapsamples/static/js/jquery-3.3.1.min.js"></script>
<script src="https://apaas.wodcloud.com/api_4.x/init.js"></script>
<script>
require([
"esri/Map",
"https://apaas.wodcloud.com/mapsamples/static/js/GaodeLayer.js",
"esri/views/SceneView",
"esri/views/MapView",
"esri/Graphic",
"esri/layers/GraphicsLayer",
"esri/geometry/Point",
"esri/geometry/SpatialReference",
"esri/symbols/PictureMarkerSymbol",
"esri/layers/BaseTileLayer", "esri/request",
"dojo/domReady!"
], function (Map, GaodeLayer, SceneView, MapView, Graphic, GraphicsLayer, Point, SpatialReference, PictureMarkerSymbol, BaseTileLayer, esriRequest) {
//新建矢量图层
var bsLayer = BaseTileLayer.createSubclass({
properties: {
urlTemplate: null,
},
getTileUrl: function (level, row, col) {
return url = 'http://webrd0' + (col % 4 + 1) + '.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x=' + col + '&y=' + row + '&z=' + level;
},
fetchTile: function (level, row, col) {
var url = this.getTileUrl(level, row, col);
return esriRequest(url, {
responseType: "image"
})
.then(function (response) {
var image = response.data;
var width = this.tileInfo.size[0];
var height = this.tileInfo.size[0];
var canvas = document.createElement("canvas");
var context = canvas.getContext("2d");
canvas.width = width;
canvas.height = height;
context.drawImage(image, 0, 0, width, height);
return canvas;
}.bind(this));
}
})
var GaodeLayer = new bsLayer();
//var GaodeLayer = new GaodeLayer();
//json格式的地理数据
var map = new Map({
layers: [GaodeLayer]
});
var view = new MapView({
container: "view",
map: map,
center: [106.71543991100576, 26.58363100116717],
zoom: 10
});
});
</script>
</head>
<body>
<div id="view"></div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
<title>WMTS地图北斗服务3.x</title>
<link rel="stylesheet" href="https://apaas.wodcloud.com/api_3.x/esri/css/esri.css">
<style>
html,
body,
#map {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
</style>
<script src="https://apaas.wodcloud.com/api_3.x/init.js"></script>
<script>
require([
"esri/map",
"esri/layers/WMTSLayer",
"esri/layers/ArcGISDynamicMapServiceLayer",
"esri/layers/WMTSLayerInfo",
"esri/geometry/Extent",
"esri/layers/TileInfo",
"esri/SpatialReference",
"dojo/domReady!"
], function (
Map,
WMTSLayer,
ArcGISDynamicMapServiceLayer,
WMTSLayerInfo,
Extent,
TileInfo,
SpatialReference
) {
var map = new Map("map", {
center: [116.7, 34.5],
zoom: 8
});
var tileInfo = new TileInfo({
"dpi": 96,
"format": "image/png",
"compressionQuality": 0,
"spatialReference": new SpatialReference({
"wkid": 4490
}),
"rows": 256,
"cols": 256,
"origin": {
"x": -180,
"y": 90
},
"lods": [
{ "level": "0", "scale": 295829355.45, "resolution": 0.703125 },
{ "level": "1", "scale": 147914677.725, "resolution": 0.3515625 },
{ "level": "2", "scale": 73957338.8625, "resolution": 0.17578125 },
{ "level": "3", "scale": 36978669.43125, "resolution": 0.087890625 },
{ "level": "4", "scale": 18489334.715625, "resolution": 0.0439453125 },
{ "level": "5", "scale": 9244667.3578125, "resolution": 0.02197265625 },
{ "level": "6", "scale": 4622333.67890625, "resolution": 0.010986328125 },
{ "level": "7", "scale": 2311166.83945312, "resolution": 0.0054931640625 },
{ "level": "8", "scale": 1155583.41972656, "resolution": 0.00274658203125 },
{ "level": "9", "scale": 577791.709863281, "resolution": 0.001373291015625 },
{ "level": "10", "scale": 288895.8549316406, "resolution": 0.0006866455078125 },
{ "level": "11", "scale": 144447.9274658203, "resolution": 0.00034332275390625 },
{ "level": "12", "scale": 4508.935440959931, "resolution": 0.000171661376953125 },
{ "level": "13", "scale": 36111.98186645508, "resolution": 0.0000858306884765625 },
{ "level": "14", "scale": 18055.99093322754, "resolution": 0.0000429153442382812 },
{ "level": "15", "scale": 9027.99546661377, "resolution": 0.0000214576721191406 },
{ "level": "16", "scale": 4513.997733306885, "resolution": 0.0000107288360595703 },
{ "level": "17", "scale": 2256.9988666534423, "resolution": 0.00000536441802978515 },
{ "level": "18", "scale": 1128.4994333267211, "resolution": 0.00000268220901489257 },
{ "level": "19", "scale": 564.2497166633606, "resolution": 0.00000134110450744628 }
]
});
var tileExtent = new Extent(-180.0, -85.0511287798065, 180.0, 85.05112877980648, new SpatialReference({
wkid: 4490
}));
var layerInfo = new WMTSLayerInfo({
tileInfo: tileInfo,
fullExtent: tileExtent,
initialExtent: tileExtent,
identifier: "guizhou",
tileMatrixSet: "ChinaPublicServices_guizhou",
format: "image/png",
style: "default"
});
var resourceInfo = {
version: "1.0.0",
layerInfos: [layerInfo],
copyright: ""
};
var options = {
serviceMode: "KVP",
resourceInfo: resourceInfo,
layerInfo: layerInfo
};
var wmtsLayer = new WMTSLayer("http://apaas.gy.wodcloud.com/iserver/services/map-guizhou/wmts-china", options);
map.addLayer(wmtsLayer);
var atmsl = ArcGISDynamicMapServiceLayer("https://apaasgis-zw.wodcloud.com/server/rest/services/GZ_LYJQZTT/MapServer");
map.addLayer(atmsl);
});
</script>
</head>
<body>
<div id="map"></div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no" />
<title>WMTS地图北斗服务4.x</title>
<link rel="stylesheet" href="https://apaas.wodcloud.com/api_4.x/esri/css/main.css" />
<style>
html,
body,
#viewDiv {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
}
</style>
<script src="https://apaas.wodcloud.com/mapsamples/static/js/jquery-3.3.1.min.js"></script>
<script src="https://apaas.wodcloud.com/api_4.x/init.js"></script>
<script>
require([
"esri/Map",
"esri/views/MapView",
"esri/layers/WebTileLayer",
"esri/layers/support/TileInfo",
"esri/layers/MapImageLayer",
"esri/geometry/SpatialReference",
"esri/widgets/DistanceMeasurement2D",
"esri/widgets/AreaMeasurement2D",
"esri/Graphic",
"esri/layers/GraphicsLayer",
"esri/geometry/Point",
"esri/geometry/SpatialReference",
"esri/symbols/PictureMarkerSymbol",
"dojo/domReady!"
], function (Map, MapView, WebTileLayer, TileInfo, MapImageLayer, SpatialReference, DistanceMeasurement2D, AreaMeasurement2D, Graphic, GraphicsLayer, Point, SpatialReference, PictureMarkerSymbol) {
var tileInfo = new TileInfo({
"dpi": 96,
"format": "image/png",
"compressionQuality": 0,
"spatialReference": new SpatialReference(4326),
"rows": 256,
"cols": 256,
"origin": {
"x": -180,
"y": 90
},
"lods": [
{ "level": "0", "scale": 295829355.45, "resolution": 0.703125 },
{ "level": "1", "scale": 147914677.725, "resolution": 0.3515625 },
{ "level": "2", "scale": 73957338.8625, "resolution": 0.17578125 },
{ "level": "3", "scale": 36978669.43125, "resolution": 0.087890625 },
{ "level": "4", "scale": 18489334.715625, "resolution": 0.0439453125 },
{ "level": "5", "scale": 9244667.3578125, "resolution": 0.02197265625 },
{ "level": "6", "scale": 4622333.67890625, "resolution": 0.010986328125 },
{ "level": "7", "scale": 2311166.83945312, "resolution": 0.0054931640625 },
{ "level": "8", "scale": 1155583.41972656, "resolution": 0.00274658203125 },
{ "level": "9", "scale": 577791.709863281, "resolution": 0.001373291015625 },
{ "level": "10", "scale": 288895.8549316406, "resolution": 6.866455078125E-4 },
{ "level": "11", "scale": 144447.9274658203, "resolution": 3.4332275390625E-4 },
{ "level": "12", "scale": 4508.935440959931, "resolution": 1.71661376953125E-4 },
{ "level": "13", "scale": 36111.98186645508, "resolution": 8.58306884765625E-5 },
{ "level": "14", "scale": 18055.99093322754, "resolution": 4.291534423828125E-5 },
{ "level": "15", "scale": 9027.99546661377, "resolution": 2.1457672119140625E-5 },
{ "level": "16", "scale": 4513.997733306885, "resolution": 1.0728836059570312E-5 },
{ "level": "17", "scale": 2256.9988666534423, "resolution": 5.364418029785156E-6 },
{ "level": "18", "scale": 1128.4994333267211, "resolution": 2.682209014892578E-6 },
{ "level": "19", "scale": 564.2497166633606, "resolution": 1.341104507446289E-6 }
]
});
var layer = new WebTileLayer(
{
// urlTemplate:"http://jgsw.gy.wodcloud.com/iserver/services/map-guizhou/wmts-china/guizhou/default/ChinaPublicServices_guizhou/{level}/{row}/{col}.png",
urlTemplate: "http://jgsw.gy.wodcloud.com/iserver/services/map-guizhou/wmts-china?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=guizhou&STYLE=default&FORMAT=image/png&TILEMATRIXSET=ChinaPublicServices_guizhou&tileMatrix={level}&tileRow={row}&tileCol={col}",
tileInfo: tileInfo,
spatialReference: new SpatialReference(4326),
}
);
var url = "https://apaas.wodcloud.com/mapsamples/static/data/JZD_CGCS2000_GK_108_3.json"
// var url = "../../data/JZD_CGCS2000_BEIDOU.json"
$.ajax({
type: "GET",
url: url,
dataType: "json",
timeout: 5000,
success: function (response) {
console.log(response)
loaddata(response);
},
error: function (xhr, status, err) {
alert("找不到数据");
}
});
var footprintlayer = new GraphicsLayer();
function loaddata(data) {
if (!data.features || !data.features.length) {
console.log("no data");
return;
}
var wkid = data.crs.properties.name.split(':')[1];
var features = data.features;
for (var i = 0; i < features.length; i++) {
var feature = features[i];
if (feature) {
var properties = feature.properties;
var reportor = properties.BUS_REPO_1 ? properties.BUS_REPO_1 : "匿名";
var happenedTime = properties.BUS_HAPPEN;
var happenedAddress = properties.BUS_ADDRES;
var description = properties.BUS_DESCRI;
var lon = feature.geometry.coordinates[0];
var lat = feature.geometry.coordinates[1];
var pt = new Point({
"x": lon,
"y": lat,
"spatialReference": new SpatialReference(wkid)
});
var symbol = new PictureMarkerSymbol("https://apaas.wodcloud.com/mapsamples/static/images/marker-yellow.png", 26, 37);
// var imgaeURL = require("../../../static/images/marker-yellow.png");
// var symbol = new PictureMarkerSymbol(imgaeURL,26, 37);
var attr = {
"name": reportor,
"happenedTime": happenedTime,
"happenedAddress": happenedAddress,
"detail": description
};
var graphic = new Graphic(pt, symbol, attr);
footprintlayer.add(graphic);
}
}
}
// 创建地图
var map = new Map();
map.add(layer);
//map.add(footprintlayer);
// 创建二维地图
var view = new MapView({
container: "viewDiv",
map: map,
center: [106.72, 26.585],
zoom: 10,
constraints: {
lods: tileInfo.lods,
snapToZoom: true
},
});
// var ml = new MapImageLayer({
// url: "http://apaasgis-zw.wodcloud.com/server/rest/services/GZ_LYJQZTT/MapServer",
// spatialReference: new SpatialReference(4326),
// })
// map.add(ml);
var measurementWidget = new DistanceMeasurement2D({
view: view
});
view.ui.add(measurementWidget, "top-right");
});
</script>
</head>
<body>
<div id="viewDiv"></div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no" />
<title>2D Base Map</title>
<link rel="stylesheet" href="https://apaas.wodcloud.com/api_4.x/esri/css/main.css">
<style>
html,
body,
#viewDiv {
padding: 0;
margin: 0;
height: 100%;
width: 100%;
}
</style>
<script src="https://apaas.wodcloud.com/api_4.x/init.js"></script>
<script>
require([
"esri/Map",
"esri/views/MapView"
], function(Map, MapView) {
var map = new Map({
basemap: "streets"
});
var view = new MapView({
container: "viewDiv",
map: map,
zoom: 4,
center: [108.3, 33.9]
});
});
</script>
</head>
<body>
<div id="viewDiv"></div>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no" />
<title>3.x编辑数据</title>
<link rel="stylesheet" href="https://apaas.wodcloud.com/api_3.x/esri/css/esri.css">
<link rel="stylesheet" href="https://apaas.wodcloud.com/api_3.x/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="https://apaas.wodcloud.com/api_3.x/esri/css/esri.css">
<style>
html,
body {
height: 100%;
width: 100%;
margin: 0;
overflow: hidden;
}
#map {
padding: 0;
}
#header {
font-size: 1.1em;
font-family: sans-serif;
padding-left: 1em;
padding-top: 4px;
color: #660000;
}
.templatePicker {
border: none;
}
.dj_ie .infowindow .window .top .right .user .content {
position: relative;
}
.dj_ie .simpleInfoWindow .content {
position: relative;
}
</style>
<script src="https://apaas.wodcloud.com/api_3.x/init.js"></script>
<script>
require(["esri/map",
"esri/tasks/GeometryService",
"esri/layers/ArcGISTiledMapServiceLayer",
"esri/layers/FeatureLayer",
"esri/Color",
"esri/symbols/SimpleMarkerSymbol",
"esri/symbols/SimpleLineSymbol",
"esri/dijit/editing/Editor",
"esri/dijit/editing/TemplatePicker",
"esri/config",
"dojo/i18n!esri/nls/jsapi",
"dojo/_base/array", "dojo/parser", "dojo/keys",
"dijit/layout/BorderContainer", "dijit/layout/ContentPane",
"dojo/domReady!"], function (Map, GeometryService,
ArcGISTiledMapServiceLayer, FeatureLayer,
Color, SimpleMarkerSymbol, SimpleLineSymbol,
Editor, TemplatePicker,
esriConfig, jsapiBundle,
arrayUtils, parser, keys) {
parser.parse();
jsapiBundle.toolbars.draw.start = jsapiBundle.toolbars.draw.start + "<br>Press <b>ALT</b> to enable snapping";
esriConfig.defaults.io.proxyUrl = "/proxy/";
esriConfig.defaults.geometryService = new GeometryService("http://apaas.mesh.gat.gz/arcgis/rest/services/Utilities/Geometry/GeometryServer");
map = new Map("map", {
basemap: "streets",
center: [120.0450645, 31.00552071],
zoom: 10
});
map.on("layers-add-result", initEditor);
//add boundaries and place names
// var labels = new ArcGISTiledMapServiceLayer("https://server.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places/MapServer");
// map.addLayer(labels);
var responsePoints = new FeatureLayer("https://arcgisserver.wodcloud.com/arcgis/rest/services/guizhoutestTwo/FeatureServer/0", {
className: "线",
mode: FeatureLayer.MODE_ONDEMAND,
showAttribution: false,
showLabels: true,
outFields: ['*']
});
var responsePolys = new FeatureLayer("https://arcgisserver.wodcloud.com/arcgis/rest/services/guizhoutestTwo/FeatureServer/2", {
className: "网格",
mode: FeatureLayer.MODE_ONDEMAND,
showAttribution: false,
showLabels: true,
outFields: ['*']
});
map.addLayers([responsePolys, responsePoints]);
function initEditor(evt) {
var templateLayers = arrayUtils.map(evt.layers, function (result) {
return result.layer;
});
var templatePicker = new TemplatePicker({
featureLayers: templateLayers,
grouping: true,
rows: "auto",
columns: 3
}, "templateDiv");
templatePicker.startup();
var layers = arrayUtils.map(evt.layers, function (result) {
return { featureLayer: result.layer };
});
var settings = {
map: map,
templatePicker: templatePicker,
layerInfos: layers,
toolbarVisible: true,
toolbarOptions: {
reshapeVisible: true,
mergeVisible: true,
cutVisible: true,
},
createOptions: {
polylineDrawTools: [Editor.CREATE_TOOL_FREEHAND_POLYLINE],
polygonDrawTools: [Editor.CREATE_TOOL_FREEHAND_POLYGON,
Editor.EDIT_VERTICES,
Editor.CREATE_TOOL_CIRCLE,
Editor.CREATE_TOOL_TRIANGLE,
Editor.CREATE_TOOL_RECTANGLE,
]
}
};
var params = { settings: settings };
var myEditor = new Editor(params, 'editorDiv');
//define snapping options
var symbol = new SimpleMarkerSymbol(
SimpleMarkerSymbol.STYLE_CROSS,
15,
new SimpleLineSymbol(
SimpleLineSymbol.STYLE_SOLID,
new Color([255, 0, 0, 0.5]),
5
),
null
);
map.enableSnapping({
snapPointSymbol: symbol,
tolerance: 20,
snapKey: keys.ALT
});
myEditor.startup();
}
});
</script>
</head>
<body class="claro">
<div id="main" data-dojo-type="dijit/layout/BorderContainer" data-dojo-props="design:'headline'"
style="width:100%;height:100%;">
<div data-dojo-type="dijit/layout/ContentPane" data-dojo-props="region:'left'"
style="width: 300px;overflow:hidden;">
<div id="templateDiv"></div>
<div id="editorDiv"></div>
</div>
<div data-dojo-type="dijit/layout/ContentPane" id="map" data-dojo-props="region:'center'"></div>
</div>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment