"src/pages/workbench/component-center/app-build/index.vue" did not exist on "a9388ff09fa933cdaa816726dfd9882d9627d22b"
Commit 90bb7ec1 authored by 刘殿昕's avatar 刘殿昕

Merge branch 'ldx' into dev

parents f7e0e6d0 631715f7
This diff is collapsed.
......@@ -7,6 +7,7 @@ export const lang = {
personal_center: "个人中心",
profile: "个人档案",
message_center: "消息中心",
my_questions_and_answers: "我的问答",
// unit of purchase duration
by_year: "按年",
......
This diff is collapsed.
<template>
<el-form :inline="true" ref="formInline" :model="formInline" class="demo-form-inline formsearch d_ui_form">
<el-form-item
:label="item.label"
v-for="(item,index) in data"
:key="index+500"
:prop="item.key"
>
<el-input
v-if="item.type == 'input'"
class="d_search_input"
v-model="formInline[item.key]"
:placeholder="item.placeholder"
></el-input>
<el-date-picker
v-if="item.type == 'daterange'"
v-model="formInline[item.key]"
type="daterange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
></el-date-picker>
<el-select
v-if="item.type == 'select'"
v-model="formInline[item.key]"
:placeholder="item.placeholder"
>
<el-option v-for="(it,idx) in item.arr" :key="idx+600" :label="it.label" :value="it.value"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button class="primary_btn" type="primary" @click="onSubmit">查询</el-button>
<el-button class="defaule_btn" @click="remove_data">重置</el-button>
</el-form-item>
</el-form>
</template>
<script>
export default {
props: ["data"],
components: {},
data() {
return {
formInline: {},
};
},
watch: {},
computed: {},
created() {
var temp = {};
this.data.forEach((e) => {
temp[e.key] = "";
});
this.formInline = temp;
},
mounted() {},
methods: {
onSubmit() {
this.$emit("serach", this.formInline);
},
remove_data() {
this.$refs["formInline"].resetFields();
this.$emit("serach", "");
},
},
};
</script>
<style scoped>
.primary_btn {
width: 100px;
background-color: #515fe7;
color: #e6ebfe;
}
.defaule_btn {
width: 100px;
background-color: #c3caf8;
color: #0f2683;
}
</style>
<style>
.formsearch .el-form-item {
/* margin-left: 50px; */
margin-left: 30px;
}
.formsearch .el-form-item:nth-last-of-type(1) {
position: absolute;
right: -210px;
}
.formsearch .el-form-item .el-form-item__label {
color: #242c43;
font-weight: 600;
}
.d_search_input.el-input {
width: 200px;
}
</style>
<style scoped>
.formsearch {
position: relative;
width: calc(100% - 220px);
}
</style>
<template>
<div class="tab_btns">
<div
class="btn"
v-for="(item, index) in data"
:key="index + 100"
@click="clickFunc(item.func)"
:style="{
float: item.position,
backgroundColor: item.type == 'warn' ? '#ad3a4a' : '',
}"
:class="item.position == 'right' ? 'left_marg' : ''"
>
{{ item.label }}
</div>
<span class="selectnum"
>已选择
<span style="color: #242c43; font-weight: 600">{{ num }}</span></span
>
<span class="clean" @click="clean">清空</span>
</div>
</template>
<script>
export default {
props: ["data", "num"],
components: {},
data() {
return {};
},
watch: {},
computed: {},
created() {},
mounted() {},
methods: {
clickFunc(type) {
this.$emit(type);
},
clean() {
this.$emit("clean");
},
},
};
</script>
<style scoped>
.btn {
height: 40px;
line-height: 40px;
background-color: #2b4695;
border-radius: 8px;
padding: 0 30px;
float: left;
color: #fefefe;
cursor: pointer;
}
.selectnum {
/* float: right; */
line-height: 40px;
margin: 0 30px;
color: #8890a7;
}
.clean {
/* float: right; */
text-decoration: underline;
color: #2b4695;
line-height: 40px;
margin-right: 20px;
cursor: pointer;
}
.left_marg {
margin-left: 10px;
}
.tab_btns {
position: relative;
margin-bottom: 25px;
}
.tab_btns::after {
content: "";
position: absolute;
width: calc(100% + 40px);
height: 1px;
background-color: #e3e5ef;
left: -20px;
bottom: -20px;
}
</style>
<style>
.from_content1 .el-input__inner {
background-color: #f7f8f9;
}
.el-date-editor.el-range-editor .el-range-input {
background-color: #f7f8f9;
}
</style>
\ No newline at end of file
<template>
<div class="community">
<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>
<div class="from_content1 form_input_block">
<inline-form
class="form"
:data="form_data"
@serach="get_search_list"
></inline-form>
</div>
<div class="from_content form_list_block">
<table-btn
class="from_content_btn"
:data="btn_data"
:num="num"
@deleteData="deleteData"
@clean="clean"
></table-btn>
<apass-table
class="from_content_table"
height="calc(100% - 20px)"
ref="outtreetable"
@selectnum="selectnum"
v-if="tableData.length"
:data="tableData"
:header="table_header"
></apass-table>
<list-pagination
v-if="tableData.length"
:total="total_list"
:page-sizes="[50, 10]"
:page-size="currentlimit"
:current-page="currentPage"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
></list-pagination>
</div>
</div>
</template>
<script>
import inlineForm from "@/components/new-com/inlineForm";
import tableBtn from "@/components/new-com/tableBtn";
import apassTable from "@/components/new-com/apassTable";
import ListPagination from "@/components/comments-pagination";
import apassDialog from "@/components/apass-dialog";
export default {
components: {
inlineForm,
tableBtn,
apassTable,
ListPagination,
apassDialog,
},
data() {
return {
search_text: "",
tableData: [
{
user_id: "100021李想李想李想李想李想李想李想李想李想李想",
user_name: "李想李想李想李想李想李想李想李想李想李想",
user_type: 1,
oid: "f49afc8a-e4a5-4f70-8192-bbe2bb36945f",
org_name: "山西省应急管理厅-应急物资处",
gender: 2,
shared_state: 2,
state: 2,
operate_user_name: "",
operate_time: "2020-08-27 14:46:40",
sort: 1,
},
],
table_header: [],
total_list: 0,
currentPage: 1,
currentlimit: 50,
form_data: [
{
label: "问题搜索",
type: "input",
placeholder: "请输入问题标题或内容关键词",
key: "name",
},
{
label: "发布人搜索",
type: "input",
placeholder: "请输入发布人名称",
key: "name",
},
{
label: "发布时间",
type: "daterange",
placeholder: "请选择",
key: "name",
},
],
btn_data: [
{
position: "left",
label: "批量删除",
type: "warn",
func: "deleteData",
},
],
num: 0,
selected_date: [],
role_type: "",
};
},
watch: {
$route(to, from) {
this.changeState(to.path);
},
},
created() {
this.getlist();
},
methods: {
getRouter() {
let this_route = this.$route.path;
this.changeState(this_route);
},
edit_data(val) {},
deleteData() {
if (this.selected_date.length) {
this.$refs.deletelog.show();
} else {
this.$message.error("请先选择要删除的数据");
}
},
handleSizeChange(val) {
console.log(val);
this.currentlimit = val;
this.currentPage = 1;
this.getlist();
},
handleCurrentChange(val) {
console.log(val);
this.currentPage = val;
this.getlist();
},
//获取列表数据
getlist() {},
get_search_list(val) {
console.log(val);
if (val) {
this.search_text = val.name;
this.role_type = val.type;
} else {
this.search_text = "";
}
this.currentPage = 1;
this.getlist();
},
clean() {
this.$refs.outtreetable.cleanSel();
},
selectnum({ select, rows }) {
this.num = select.length;
this.selected_date = select;
},
changeState(val) {
if (val == "/user/questions") {
this.table_header = [
{
prop: "user_id",
label: "问题标题",
align: "left",
type: "html",
getHtml: (str) => {
return `<span style="color:#0f2683;font-weight:bold;width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" title="${str.user_id}">${str.user_id}</span>`;
},
},
{
prop: "user_id",
label: "问题内容",
align: "left",
type: "html",
getHtml: (str) => {
return `<span style="width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" title="${str.user_id}">${str.user_id}</span>`;
},
},
{
prop: "operate_time",
label: "回复数",
align: "center",
},
{
prop: "operate_time",
label: "浏览数",
align: "center",
},
{
prop: "operate_time",
label: "发布人",
align: "center",
},
{
prop: "operate_time",
label: "发布时间",
align: "center",
width: 200,
},
{
label: "操作",
type: "buttons",
width: "120px",
align: "center",
actionList: [
{
label: "修改",
callback: this.edit_data,
},
],
},
];
} else {
this.table_header = [
{
prop: "user_id",
label: "回答内容",
align: "left",
type: "html",
getHtml: (str) => {
return `<span style="color:#0f2683;font-weight:bold;width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" title="${str.user_id}">${str.user_id}</span>`;
},
},
{
prop: "user_id",
label: "问题标题",
align: "left",
type: "html",
getHtml: (str) => {
return `<span style="width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" title="${str.user_id}">${str.user_id}</span>`;
},
},
{
prop: "user_id",
label: "问题内容",
align: "left",
type: "html",
getHtml: (str) => {
return `<span style="width: 100%;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" title="${str.user_id}">${str.user_id}</span>`;
},
},
{
prop: "operate_time",
label: "回复数",
align: "center",
},
{
prop: "operate_time",
label: "浏览数",
align: "center",
},
{
prop: "operate_time",
label: "回复人",
align: "center",
},
{
prop: "operate_time",
label: "回复时间",
align: "center",
width: 200,
},
{
label: "操作",
type: "buttons",
width: "120px",
align: "center",
actionList: [
{
label: "修改",
callback: this.edit_data,
},
],
},
];
}
},
},
mounted() {
this.getRouter();
},
};
</script>
<style scoped>
.community {
height: calc(100%);
overflow: hidden;
}
.form_list_block {
height: calc(100% - 180px);
}
</style>
This diff is collapsed.
......@@ -419,6 +419,21 @@ export default new Router({
name: "orderDetail",
component: () => import("@/pages/user/order/order_detail"),
},
{
path: "/user/my_qa", // 我的问答
name: "myQA",
component: () => import("@/pages/user/questions-answers/my-qa"),
},
{
path: "/user/questions", // 提问列表
name: "questions",
component: () => import("@/pages/user/questions-answers/community"),
},
{
path: "/user/answers", // 回答列表
name: "answers",
component: () => import("@/pages/user/questions-answers/community"),
},
],
}, // 个人中心
{
......
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