更新表格样式
This commit is contained in:
@@ -60,7 +60,7 @@ export default function useGeneratorTableColumns(columns, options = {}) {
|
|||||||
dataIndex: key,
|
dataIndex: key,
|
||||||
width: key === options.left_fixed_key ? 100 : includeSpecialType(value.question_type) ? 300 : 200,
|
width: key === options.left_fixed_key ? 100 : includeSpecialType(value.question_type) ? 300 : 200,
|
||||||
fixed: key === options.fixed,
|
fixed: key === options.fixed,
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
slots: { customRender: key }
|
slots: { customRender: key }
|
||||||
}))
|
}))
|
||||||
return previousValue.concat(arr)
|
return previousValue.concat(arr)
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<a-table :columns="columns" :data-source="dataSource" :pagination="false" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :rowKey="(record,index)=> record.id">
|
<a-table class="pro-table" :columns="columns" :data-source="dataSource" :pagination="false" :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :rowKey="(record,index)=> record.id">
|
||||||
<template #action="{ record }">
|
<template #action="{ record }">
|
||||||
<a-button type="link" @click="checkInfo($event,record)">查看</a-button>
|
<a-button type="link" @click="checkInfo($event,record)">查看</a-button>
|
||||||
<a-dropdown>
|
<a-dropdown>
|
||||||
@@ -81,7 +81,7 @@ const columns = [
|
|||||||
title: "分析名称",
|
title: "分析名称",
|
||||||
key: "title",
|
key: "title",
|
||||||
dataIndex: "title",
|
dataIndex: "title",
|
||||||
align: "center",
|
// align: "center",
|
||||||
slots: {
|
slots: {
|
||||||
customRender: "titles",
|
customRender: "titles",
|
||||||
},
|
},
|
||||||
@@ -90,7 +90,7 @@ const columns = [
|
|||||||
title: "交叉行/列",
|
title: "交叉行/列",
|
||||||
key: "question_index",
|
key: "question_index",
|
||||||
dataIndex: "question_index",
|
dataIndex: "question_index",
|
||||||
align: "center",
|
// align: "center",
|
||||||
slots: {
|
slots: {
|
||||||
customRender: "tag",
|
customRender: "tag",
|
||||||
},
|
},
|
||||||
@@ -99,7 +99,7 @@ const columns = [
|
|||||||
title: "提交时间",
|
title: "提交时间",
|
||||||
key: "created_at",
|
key: "created_at",
|
||||||
dataIndex: "created_at",
|
dataIndex: "created_at",
|
||||||
align: "center",
|
// align: "center",
|
||||||
sorter: (a, b) => { return a.time> b.time? 1 : -1 },
|
sorter: (a, b) => { return a.time> b.time? 1 : -1 },
|
||||||
slots: {
|
slots: {
|
||||||
customRender: "createdAt",
|
customRender: "createdAt",
|
||||||
@@ -109,13 +109,13 @@ const columns = [
|
|||||||
title: "样本数量",
|
title: "样本数量",
|
||||||
key: "sample_num",
|
key: "sample_num",
|
||||||
dataIndex: "sample_num",
|
dataIndex: "sample_num",
|
||||||
align: "center",
|
// align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
dataIndex: "action",
|
dataIndex: "action",
|
||||||
key: "action",
|
key: "action",
|
||||||
align: "center",
|
// align: "center",
|
||||||
slots: {
|
slots: {
|
||||||
customRender: "action",
|
customRender: "action",
|
||||||
},
|
},
|
||||||
@@ -319,10 +319,14 @@ setup(props) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.pagination {
|
.pagination {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
position: relative;
|
position: relative;
|
||||||
left: 100%;
|
left: 100%;
|
||||||
transform: translateX(-100%);
|
transform: translateX(-100%);
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
.pro-table:deep(.ant-btn) {
|
||||||
|
padding: 0;
|
||||||
|
padding-right: 10px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ const tableColumns = computed(() => {
|
|||||||
key: item.key,
|
key: item.key,
|
||||||
slots: { customRender: item.key },
|
slots: { customRender: item.key },
|
||||||
width: 100,
|
width: 100,
|
||||||
align: 'center'
|
// align: 'center'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ export default defineComponent({
|
|||||||
key: "index",
|
key: "index",
|
||||||
dataIndex: "index",
|
dataIndex: "index",
|
||||||
width: 50,
|
width: 50,
|
||||||
align: "center",
|
// align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: () => (
|
title: () => (
|
||||||
@@ -107,7 +107,7 @@ export default defineComponent({
|
|||||||
key: "title",
|
key: "title",
|
||||||
dataIndex: "title",
|
dataIndex: "title",
|
||||||
slots: { customRender: "title" },
|
slots: { customRender: "title" },
|
||||||
align: "center",
|
// align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
@@ -115,7 +115,7 @@ export default defineComponent({
|
|||||||
dataIndex: "operation",
|
dataIndex: "operation",
|
||||||
slots: { customRender: "operation" },
|
slots: { customRender: "operation" },
|
||||||
width: 160,
|
width: 160,
|
||||||
align: "center",
|
// align: "center",
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ function init(data) {
|
|||||||
sorter: setSort(item, data.head),
|
sorter: setSort(item, data.head),
|
||||||
slots: { customRender: item.key },
|
slots: { customRender: item.key },
|
||||||
width: 140,
|
width: 140,
|
||||||
align: "center",
|
// align: "center",
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ export default defineComponent({
|
|||||||
dataIndex: item.key,
|
dataIndex: item.key,
|
||||||
slots: { customRender: item.key },
|
slots: { customRender: item.key },
|
||||||
width: 100,
|
width: 100,
|
||||||
align: "center",
|
// align: "center",
|
||||||
fixed: index === 0 ? 'left' : null
|
fixed: index === 0 ? 'left' : null
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ export default defineComponent({
|
|||||||
key: item.key,
|
key: item.key,
|
||||||
slots: { customRender: item.key },
|
slots: { customRender: item.key },
|
||||||
width: 100,
|
width: 100,
|
||||||
align: "center",
|
// align: "center",
|
||||||
fixed: index === 0 ? "left" : null,
|
fixed: index === 0 ? "left" : null,
|
||||||
};
|
};
|
||||||
}) || [];
|
}) || [];
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ export default defineComponent({
|
|||||||
key: item.key,
|
key: item.key,
|
||||||
slots: { customRender: item.key },
|
slots: { customRender: item.key },
|
||||||
width: 100,
|
width: 100,
|
||||||
align: "center",
|
// align: "center",
|
||||||
fixed: index === 0 ? "left" : null,
|
fixed: index === 0 ? "left" : null,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ watch(
|
|||||||
key: item.key,
|
key: item.key,
|
||||||
slots: { customRender: item.key },
|
slots: { customRender: item.key },
|
||||||
width: 100,
|
width: 100,
|
||||||
align: "center",
|
// align: "center",
|
||||||
fixed: index === 0 ? "left" : null,
|
fixed: index === 0 ? "left" : null,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ watch(
|
|||||||
key: item.key,
|
key: item.key,
|
||||||
slots: { customRender: item.key },
|
slots: { customRender: item.key },
|
||||||
width: 100,
|
width: 100,
|
||||||
align: "center",
|
// align: "center",
|
||||||
fixed: index === 0 ? "left" : null,
|
fixed: index === 0 ? "left" : null,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ watch(
|
|||||||
key: item.key,
|
key: item.key,
|
||||||
slots: { customRender: item.key },
|
slots: { customRender: item.key },
|
||||||
width: 100,
|
width: 100,
|
||||||
align: "center",
|
// align: "center",
|
||||||
fixed: index === 0 ? "left" : null,
|
fixed: index === 0 ? "left" : null,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ watch(
|
|||||||
key: item.key,
|
key: item.key,
|
||||||
slots: { customRender: item.key },
|
slots: { customRender: item.key },
|
||||||
width: 100,
|
width: 100,
|
||||||
align: "center",
|
// align: "center",
|
||||||
fixed: index === 0 ? "left" : null,
|
fixed: index === 0 ? "left" : null,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ watch(
|
|||||||
key: item.key,
|
key: item.key,
|
||||||
slots: { customRender: item.key },
|
slots: { customRender: item.key },
|
||||||
width: 100,
|
width: 100,
|
||||||
align: "center",
|
// align: "center",
|
||||||
fixed: index === 0 ? "left" : null,
|
fixed: index === 0 ? "left" : null,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -14,14 +14,14 @@ import {ref} from 'vue'
|
|||||||
const style1 ={color: '#d3d3d3'}
|
const style1 ={color: '#d3d3d3'}
|
||||||
const style ={color:'#1890ff'}
|
const style ={color:'#1890ff'}
|
||||||
const mockData = []
|
const mockData = []
|
||||||
const mockColumns = [{title: '做答ID', dataIndex: 'id', key: 'id', width: 200, align: 'center', fixed: 'left'}]
|
const mockColumns = [{title: '做答ID', dataIndex: 'id', key: 'id', width: 200, fixed: 'left'}]
|
||||||
for(let i = 0; i<30; i++) {
|
for(let i = 0; i<30; i++) {
|
||||||
mockColumns.push({
|
mockColumns.push({
|
||||||
title: `场景${i}`,
|
title: `场景${i}`,
|
||||||
dataIndex: `scene${i}`,
|
dataIndex: `scene${i}`,
|
||||||
key: `scene${i}`,
|
key: `scene${i}`,
|
||||||
width: 200,
|
width: 200,
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
customCell: (record) => {
|
customCell: (record) => {
|
||||||
for(let k in record) {
|
for(let k in record) {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -18,13 +18,13 @@ const tableColumns = ref([
|
|||||||
dataIndex: 'id',
|
dataIndex: 'id',
|
||||||
key: 'id',
|
key: 'id',
|
||||||
width: 200,
|
width: 200,
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '选项名称',
|
title: '选项名称',
|
||||||
dataIndex: 'name',
|
dataIndex: 'name',
|
||||||
key: 'name',
|
key: 'name',
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
customCell: () => {
|
customCell: () => {
|
||||||
return {
|
return {
|
||||||
style: {
|
style: {
|
||||||
@@ -37,7 +37,7 @@ const tableColumns = ref([
|
|||||||
title: '效用值',
|
title: '效用值',
|
||||||
dataIndex: 'percent',
|
dataIndex: 'percent',
|
||||||
key: 'percent',
|
key: 'percent',
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
customCell: (record) => {
|
customCell: (record) => {
|
||||||
return {
|
return {
|
||||||
style: {
|
style: {
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ watch(() => props.info, (info) => {
|
|||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
width: 200,
|
width: 200,
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
dataIndex: item.key,
|
dataIndex: item.key,
|
||||||
fixed: item.key === "answer_id" ? 'left' : null
|
fixed: item.key === "answer_id" ? 'left' : null
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -103,33 +103,33 @@ const columns= [
|
|||||||
title: '不喜欢(1分)',
|
title: '不喜欢(1分)',
|
||||||
dataIndex: 'one',
|
dataIndex: 'one',
|
||||||
key: 'one',
|
key: 'one',
|
||||||
align:'center',
|
// align:'center',
|
||||||
slots: { customRender: 'one' }
|
slots: { customRender: 'one' }
|
||||||
},{
|
},{
|
||||||
title: '能忍受(2分)',
|
title: '能忍受(2分)',
|
||||||
dataIndex: 'two',
|
dataIndex: 'two',
|
||||||
key: 'two',
|
key: 'two',
|
||||||
align:'center',
|
// align:'center',
|
||||||
slots: { customRender: 'two' }
|
slots: { customRender: 'two' }
|
||||||
},{
|
},{
|
||||||
title: '无所谓(3分)',
|
title: '无所谓(3分)',
|
||||||
dataIndex: 'three',
|
dataIndex: 'three',
|
||||||
key: 'three',
|
key: 'three',
|
||||||
align:'center',
|
// align:'center',
|
||||||
slots: { customRender: 'three' }
|
slots: { customRender: 'three' }
|
||||||
|
|
||||||
},{
|
},{
|
||||||
title: '理应如此(4分)',
|
title: '理应如此(4分)',
|
||||||
dataIndex: 'four',
|
dataIndex: 'four',
|
||||||
key: 'four',
|
key: 'four',
|
||||||
align:'center',
|
// align:'center',
|
||||||
slots: { customRender: 'four' }
|
slots: { customRender: 'four' }
|
||||||
|
|
||||||
},{
|
},{
|
||||||
title: '喜欢(5分)',
|
title: '喜欢(5分)',
|
||||||
dataIndex: 'five',
|
dataIndex: 'five',
|
||||||
key: 'five',
|
key: 'five',
|
||||||
align:'center',
|
// align:'center',
|
||||||
slots: { customRender: 'five' }
|
slots: { customRender: 'five' }
|
||||||
|
|
||||||
}]
|
}]
|
||||||
|
|||||||
@@ -247,14 +247,14 @@ const columns = [
|
|||||||
dataIndex: "title",
|
dataIndex: "title",
|
||||||
key: "title",
|
key: "title",
|
||||||
slots: { customRender: "title" },
|
slots: { customRender: "title" },
|
||||||
align: "center",
|
// align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "状态",
|
title: "状态",
|
||||||
dataIndex: "status_str",
|
dataIndex: "status_str",
|
||||||
key: "status_str",
|
key: "status_str",
|
||||||
slots: { customRender: "status_str" },
|
slots: { customRender: "status_str" },
|
||||||
align: "center",
|
// align: "center",
|
||||||
width: 200,
|
width: 200,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -263,13 +263,13 @@ const columns = [
|
|||||||
key: "finished_at",
|
key: "finished_at",
|
||||||
slots: { customRender: "finished_at" },
|
slots: { customRender: "finished_at" },
|
||||||
sorter: true,
|
sorter: true,
|
||||||
align: "center",
|
// align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
key: "action",
|
key: "action",
|
||||||
slots: { customRender: "action" },
|
slots: { customRender: "action" },
|
||||||
align: "center",
|
// align: "center",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
<div class="table-container" v-if="true" :style="total <= 0 ? 'margin: 20px 0 0 0;' : ''">
|
<div class="table-container" v-if="true" :style="total <= 0 ? 'margin: 20px 0 0 0;' : ''">
|
||||||
<DataTable :has-selection="false" :params="searchParams" :per-page="per_page" :page="page" :sn="sn" :table-columns="columns" :table-source="tableData" :total="total" @change="onPageChange" @select="onSelectChange" @sign="Sign">
|
<DataTable :has-selection="false" :params="searchParams" :per-page="per_page" :page="page" :sn="sn" :table-columns="columns" :table-source="tableData" :total="total" @change="onPageChange" @select="onSelectChange" @sign="Sign">
|
||||||
<template #operation="{ record }">
|
<template #operation="{ record }">
|
||||||
<a @click="openDetailModal(record)">查看</a>
|
<a @click="openDetailModal(record)" style="margin-right:5px">查看</a>
|
||||||
<!-- <a style="margin: 10px" @click="openDetailModal(record)">编辑</a> -->
|
<!-- <a style="margin: 10px" @click="openDetailModal(record)">编辑</a> -->
|
||||||
<a-dropdown :trigger="['click']">
|
<a-dropdown :trigger="['click']">
|
||||||
<a class="ant-dropdown-link" @click.prevent>
|
<a class="ant-dropdown-link" @click.prevent>
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ const columns = ref([
|
|||||||
title: '问卷标题',
|
title: '问卷标题',
|
||||||
key: 'project_name',
|
key: 'project_name',
|
||||||
dataIndex: 'project_name',
|
dataIndex: 'project_name',
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
width: 110,
|
width: 110,
|
||||||
fixed: 'left',
|
fixed: 'left',
|
||||||
slots: {
|
slots: {
|
||||||
@@ -165,7 +165,7 @@ const columns = ref([
|
|||||||
title: '问卷标签',
|
title: '问卷标签',
|
||||||
key: 'tag[0].title',
|
key: 'tag[0].title',
|
||||||
dataIndex: 'tag[0].title',
|
dataIndex: 'tag[0].title',
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
width: 110,
|
width: 110,
|
||||||
slots: {
|
slots: {
|
||||||
customRender: 'tag'
|
customRender: 'tag'
|
||||||
@@ -175,7 +175,7 @@ const columns = ref([
|
|||||||
title: '问卷状态',
|
title: '问卷状态',
|
||||||
key: 'status_txt',
|
key: 'status_txt',
|
||||||
dataIndex: 'status_txt',
|
dataIndex: 'status_txt',
|
||||||
align: 'center',
|
// align: 'left',
|
||||||
width: 110,
|
width: 110,
|
||||||
slots: {
|
slots: {
|
||||||
customRender: 'status_txt'
|
customRender: 'status_txt'
|
||||||
@@ -186,13 +186,13 @@ const columns = ref([
|
|||||||
key: 'owner_name',
|
key: 'owner_name',
|
||||||
dataIndex: 'owner_name',
|
dataIndex: 'owner_name',
|
||||||
width: 100,
|
width: 100,
|
||||||
align: 'center'
|
// align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '所属事业部',
|
title: '所属事业部',
|
||||||
key: 'business_name',
|
key: 'business_name',
|
||||||
dataIndex: 'business_name',
|
dataIndex: 'business_name',
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
width: 130
|
width: 130
|
||||||
// slots: {
|
// slots: {
|
||||||
// customRender: "business_name",
|
// customRender: "business_name",
|
||||||
@@ -203,7 +203,7 @@ const columns = ref([
|
|||||||
key: 'dept_name',
|
key: 'dept_name',
|
||||||
dataIndex: 'dept_name',
|
dataIndex: 'dept_name',
|
||||||
width: 110,
|
width: 110,
|
||||||
align: 'center'
|
// align: 'center'
|
||||||
// slots: {
|
// slots: {
|
||||||
// customRender: "dept_name",
|
// customRender: "dept_name",
|
||||||
// },
|
// },
|
||||||
@@ -213,21 +213,21 @@ const columns = ref([
|
|||||||
key: 'created_at',
|
key: 'created_at',
|
||||||
dataIndex: 'created_at',
|
dataIndex: 'created_at',
|
||||||
width: 110,
|
width: 110,
|
||||||
align: 'center'
|
// align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '样本回收总量',
|
title: '样本回收总量',
|
||||||
key: 'answer_count',
|
key: 'answer_count',
|
||||||
dataIndex: 'answer_count',
|
dataIndex: 'answer_count',
|
||||||
width: 125,
|
width: 125,
|
||||||
align: 'center'
|
// align: 'center'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '有效回收数量',
|
title: '有效回收数量',
|
||||||
key: 'answer_valid_complete_count',
|
key: 'answer_valid_complete_count',
|
||||||
dataIndex: 'answer_valid_complete_count',
|
dataIndex: 'answer_valid_complete_count',
|
||||||
width: 125,
|
width: 125,
|
||||||
align: 'center'
|
// align: 'center'
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
const checked = ref(0)
|
const checked = ref(0)
|
||||||
@@ -564,7 +564,7 @@ const countColor = (value) => {
|
|||||||
.status-text {
|
.status-text {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
// justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
&::before {
|
&::before {
|
||||||
content: '';
|
content: '';
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ const columns = [
|
|||||||
title: "文件名称",
|
title: "文件名称",
|
||||||
key: "file_name",
|
key: "file_name",
|
||||||
dataIndex: "file_name",
|
dataIndex: "file_name",
|
||||||
align: "center",
|
// align: "center",
|
||||||
slots: {
|
slots: {
|
||||||
customRender: "file_name",
|
customRender: "file_name",
|
||||||
},
|
},
|
||||||
@@ -54,7 +54,7 @@ const columns = [
|
|||||||
title: "时间",
|
title: "时间",
|
||||||
key: "created_at",
|
key: "created_at",
|
||||||
dataIndex: "created_at",
|
dataIndex: "created_at",
|
||||||
align: "center",
|
// align: "center",
|
||||||
// sorter: true,
|
// sorter: true,
|
||||||
sorter: (a, b) => { return a.time> b.time? 1 : -1 },
|
sorter: (a, b) => { return a.time> b.time? 1 : -1 },
|
||||||
},
|
},
|
||||||
@@ -62,7 +62,7 @@ const columns = [
|
|||||||
title: "文件大小",
|
title: "文件大小",
|
||||||
key: "file_size",
|
key: "file_size",
|
||||||
dataIndex: "file_size",
|
dataIndex: "file_size",
|
||||||
align: "center",
|
// align: "center",
|
||||||
slots: {
|
slots: {
|
||||||
customRender: "file_size",
|
customRender: "file_size",
|
||||||
},
|
},
|
||||||
@@ -71,7 +71,7 @@ const columns = [
|
|||||||
title: "状态",
|
title: "状态",
|
||||||
dataIndex: "status_str",
|
dataIndex: "status_str",
|
||||||
key: "status_str",
|
key: "status_str",
|
||||||
align: "center",
|
// align: "center",
|
||||||
slots: {
|
slots: {
|
||||||
customRender: "status_str",
|
customRender: "status_str",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -40,14 +40,14 @@ export default defineComponent({
|
|||||||
title: '模版标题',
|
title: '模版标题',
|
||||||
key: 'title',
|
key: 'title',
|
||||||
dataIndex: 'title',
|
dataIndex: 'title',
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
sorter: true
|
sorter: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '创建人',
|
title: '创建人',
|
||||||
key: 'created_user',
|
key: 'created_user',
|
||||||
dataIndex: 'created_user',
|
dataIndex: 'created_user',
|
||||||
align: 'center'
|
// align: 'center'
|
||||||
// sorter: true,
|
// sorter: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -55,14 +55,14 @@ export default defineComponent({
|
|||||||
title: '创建时间',
|
title: '创建时间',
|
||||||
key: 'created_at',
|
key: 'created_at',
|
||||||
dataIndex: 'created_at',
|
dataIndex: 'created_at',
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
sorter: true
|
sorter: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
dataIndex: 'action',
|
dataIndex: 'action',
|
||||||
key: 'action',
|
key: 'action',
|
||||||
align: 'center',
|
// align: 'center',
|
||||||
slots: {
|
slots: {
|
||||||
customRender: 'action'
|
customRender: 'action'
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -269,9 +269,9 @@ const columns = [
|
|||||||
title: "问卷名称",
|
title: "问卷名称",
|
||||||
key: "project_name",
|
key: "project_name",
|
||||||
dataIndex: "project_name",
|
dataIndex: "project_name",
|
||||||
align: "center",
|
// align: "center",
|
||||||
sorter: true,
|
sorter: true,
|
||||||
width: 150,
|
width: 260,
|
||||||
slots: {
|
slots: {
|
||||||
customRender: "titles",
|
customRender: "titles",
|
||||||
},
|
},
|
||||||
@@ -280,7 +280,7 @@ const columns = [
|
|||||||
title: "问卷标签",
|
title: "问卷标签",
|
||||||
key: "tag[0].title",
|
key: "tag[0].title",
|
||||||
dataIndex: "tag[0].title",
|
dataIndex: "tag[0].title",
|
||||||
align: "center",
|
// align: "center",
|
||||||
slots: {
|
slots: {
|
||||||
customRender: "tag",
|
customRender: "tag",
|
||||||
},
|
},
|
||||||
@@ -290,7 +290,7 @@ const columns = [
|
|||||||
title: "问卷状态",
|
title: "问卷状态",
|
||||||
key: "status",
|
key: "status",
|
||||||
dataIndex: "status",
|
dataIndex: "status",
|
||||||
align: "center",
|
// align: "center",
|
||||||
width: 120,
|
width: 120,
|
||||||
sorter: true,
|
sorter: true,
|
||||||
slots: {
|
slots: {
|
||||||
@@ -302,28 +302,28 @@ const columns = [
|
|||||||
key: "answer_num",
|
key: "answer_num",
|
||||||
width: 100,
|
width: 100,
|
||||||
dataIndex: "answer_num",
|
dataIndex: "answer_num",
|
||||||
align: "center",
|
// align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "所有者",
|
title: "所有者",
|
||||||
key: "owner",
|
key: "owner",
|
||||||
width: 100,
|
width: 100,
|
||||||
dataIndex: "owner",
|
dataIndex: "owner",
|
||||||
align: "center",
|
// align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "最近编辑",
|
title: "最近编辑",
|
||||||
key: "updated_user",
|
key: "updated_user",
|
||||||
width: 100,
|
width: 100,
|
||||||
dataIndex: "updated_user",
|
dataIndex: "updated_user",
|
||||||
align: "center",
|
// align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "创建时间",
|
title: "创建时间",
|
||||||
key: "created_at",
|
key: "created_at",
|
||||||
width: 150,
|
width: 150,
|
||||||
dataIndex: "created_at",
|
dataIndex: "created_at",
|
||||||
align: "center",
|
// align: "center",
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -331,7 +331,7 @@ const columns = [
|
|||||||
key: "updated_at",
|
key: "updated_at",
|
||||||
width: 150,
|
width: 150,
|
||||||
dataIndex: "updated_at",
|
dataIndex: "updated_at",
|
||||||
align: "center",
|
// align: "center",
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -339,7 +339,7 @@ const columns = [
|
|||||||
width: 200,
|
width: 200,
|
||||||
dataIndex: "action",
|
dataIndex: "action",
|
||||||
key: "action",
|
key: "action",
|
||||||
align: "center",
|
// align: "center",
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
slots: {
|
slots: {
|
||||||
customRender: "action",
|
customRender: "action",
|
||||||
@@ -795,7 +795,7 @@ export default defineComponent({
|
|||||||
.status-text {
|
.status-text {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
// justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
&::before {
|
&::before {
|
||||||
content: "";
|
content: "";
|
||||||
|
|||||||
@@ -182,21 +182,21 @@ export default {
|
|||||||
{
|
{
|
||||||
title: "应用名称",
|
title: "应用名称",
|
||||||
dataIndex: "applicationChineseName",
|
dataIndex: "applicationChineseName",
|
||||||
align: "center",
|
// align: "center",
|
||||||
key: "applicationChineseName",
|
key: "applicationChineseName",
|
||||||
isShow: false,
|
isShow: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "应用名称(英文)",
|
title: "应用名称(英文)",
|
||||||
dataIndex: "applicationName",
|
dataIndex: "applicationName",
|
||||||
align: "center",
|
// align: "center",
|
||||||
key: "applicationName",
|
key: "applicationName",
|
||||||
isShow: false,
|
isShow: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "应用负责人(及电话)",
|
title: "应用负责人(及电话)",
|
||||||
dataIndex: "systemAdministrator",
|
dataIndex: "systemAdministrator",
|
||||||
align: "center",
|
// align: "center",
|
||||||
key: "systemAdministrator",
|
key: "systemAdministrator",
|
||||||
slots: { customRender: "systemAdministrator" },
|
slots: { customRender: "systemAdministrator" },
|
||||||
isShow: false,
|
isShow: false,
|
||||||
|
|||||||
@@ -179,14 +179,14 @@ export default {
|
|||||||
{
|
{
|
||||||
title: "接收应用",
|
title: "接收应用",
|
||||||
dataIndex: "applicationChineseName",
|
dataIndex: "applicationChineseName",
|
||||||
align: "center",
|
// align: "center",
|
||||||
width: "25%",
|
width: "25%",
|
||||||
key: "applicationChineseName",
|
key: "applicationChineseName",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "已有样本数量",
|
title: "已有样本数量",
|
||||||
dataIndex: "answer_samples",
|
dataIndex: "answer_samples",
|
||||||
align: "center",
|
// align: "center",
|
||||||
width: "25%",
|
width: "25%",
|
||||||
slots: { customRender: "answer_samples" },
|
slots: { customRender: "answer_samples" },
|
||||||
key: "answer_samples",
|
key: "answer_samples",
|
||||||
@@ -194,7 +194,7 @@ export default {
|
|||||||
{
|
{
|
||||||
dataIndex: "num",
|
dataIndex: "num",
|
||||||
key: "num",
|
key: "num",
|
||||||
align: "center",
|
// align: "center",
|
||||||
slots: { title: "numTitle", customRender: "num" },
|
slots: { title: "numTitle", customRender: "num" },
|
||||||
align: "right",
|
align: "right",
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -94,20 +94,20 @@ export default {
|
|||||||
{
|
{
|
||||||
title: "接收应用",
|
title: "接收应用",
|
||||||
dataIndex: "applicationChineseName",
|
dataIndex: "applicationChineseName",
|
||||||
align: "center",
|
// align: "center",
|
||||||
key: "applicationChineseName",
|
key: "applicationChineseName",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "应用负责人电话",
|
title: "应用负责人电话",
|
||||||
dataIndex: "systemAdministratorPhone",
|
dataIndex: "systemAdministratorPhone",
|
||||||
align: "center",
|
// align: "center",
|
||||||
slots: { customRender: "systemAdministrator" },
|
slots: { customRender: "systemAdministrator" },
|
||||||
key: "systemAdministratorPhone",
|
key: "systemAdministratorPhone",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
dataIndex: "num",
|
dataIndex: "num",
|
||||||
key: "num",
|
key: "num",
|
||||||
align: "center",
|
// align: "center",
|
||||||
slots: { title: "numTitle", customRender: "num" },
|
slots: { title: "numTitle", customRender: "num" },
|
||||||
align: "right",
|
align: "right",
|
||||||
},
|
},
|
||||||
@@ -128,7 +128,7 @@ export default {
|
|||||||
dataIndex: "action",
|
dataIndex: "action",
|
||||||
key: "action",
|
key: "action",
|
||||||
width: "80px",
|
width: "80px",
|
||||||
align: "center",
|
// align: "center",
|
||||||
slots: { customRender: "action" },
|
slots: { customRender: "action" },
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -102,20 +102,20 @@ export default {
|
|||||||
{
|
{
|
||||||
title: "创建人",
|
title: "创建人",
|
||||||
dataIndex: "creater",
|
dataIndex: "creater",
|
||||||
align: "center",
|
// align: "center",
|
||||||
key: "creater",
|
key: "creater",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "创建时间",
|
title: "创建时间",
|
||||||
dataIndex: "created_at",
|
dataIndex: "created_at",
|
||||||
align: "center",
|
// align: "center",
|
||||||
key: "created_at",
|
key: "created_at",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
dataIndex: "action",
|
dataIndex: "action",
|
||||||
key: "action",
|
key: "action",
|
||||||
align: "center",
|
// align: "center",
|
||||||
width: "200px",
|
width: "200px",
|
||||||
slots: { customRender: "action" },
|
slots: { customRender: "action" },
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -92,14 +92,14 @@
|
|||||||
|
|
||||||
<template #action="{ record }">
|
<template #action="{ record }">
|
||||||
<!-- <a style="margin-right: 10px;" @click="showDrawer($event,record)">查看详情</a> -->
|
<!-- <a style="margin-right: 10px;" @click="showDrawer($event,record)">查看详情</a> -->
|
||||||
<a @click="editClick(record)" style="margin-right: 12px">编辑</a>
|
<a @click="editClick(record)" style="margin-right: 10px">编辑</a>
|
||||||
<a @click="editStateClick(record)" v-if="record.status == 1" style="margin-right: 12px"
|
<a @click="editStateClick(record)" v-if="record.status == 1" style="margin-right: 10px"
|
||||||
>暂停</a
|
>暂停</a
|
||||||
>
|
>
|
||||||
<a @click="editStateClick(record)" v-if="record.status == 0" style="margin-right: 12px"
|
<a @click="editStateClick(record)" v-if="record.status == 0" style="margin-right: 10px"
|
||||||
>启动</a
|
>启动</a
|
||||||
>
|
>
|
||||||
<a @click="delClick(record.id)" style="margin-right: 12px">删除</a>
|
<a @click="delClick(record.id)" style="margin-right: 10px">删除</a>
|
||||||
<!-- <a-dropdown>
|
<!-- <a-dropdown>
|
||||||
<a
|
<a
|
||||||
class="ant-dropdown-link"
|
class="ant-dropdown-link"
|
||||||
|
|||||||
@@ -66,7 +66,7 @@
|
|||||||
<a
|
<a
|
||||||
class="ant-dropdown-link"
|
class="ant-dropdown-link"
|
||||||
:class="{ 'ant-dropdown-link-disable': record.type === 1 }"
|
:class="{ 'ant-dropdown-link-disable': record.type === 1 }"
|
||||||
style="display: inline-block"
|
style="display: inline-block;"
|
||||||
@click.prevent
|
@click.prevent
|
||||||
>
|
>
|
||||||
更多
|
更多
|
||||||
@@ -185,7 +185,7 @@ const columns = [
|
|||||||
width: 300,
|
width: 300,
|
||||||
key: "title",
|
key: "title",
|
||||||
dataIndex: "title",
|
dataIndex: "title",
|
||||||
align: "center",
|
// align: "center",
|
||||||
sorter: true,
|
sorter: true,
|
||||||
slots: {
|
slots: {
|
||||||
customRender: "title",
|
customRender: "title",
|
||||||
@@ -194,7 +194,7 @@ const columns = [
|
|||||||
{
|
{
|
||||||
title: "模板标签",
|
title: "模板标签",
|
||||||
width: 300,
|
width: 300,
|
||||||
align: "center",
|
// align: "center",
|
||||||
slots: {
|
slots: {
|
||||||
customRender: "tag",
|
customRender: "tag",
|
||||||
},
|
},
|
||||||
@@ -204,7 +204,7 @@ const columns = [
|
|||||||
width: 200,
|
width: 200,
|
||||||
key: "created_user",
|
key: "created_user",
|
||||||
dataIndex: "created_user",
|
dataIndex: "created_user",
|
||||||
align: "center",
|
// align: "center",
|
||||||
// sorter: true,
|
// sorter: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -212,15 +212,15 @@ const columns = [
|
|||||||
width: 300,
|
width: 300,
|
||||||
key: "created_at",
|
key: "created_at",
|
||||||
dataIndex: "created_at",
|
dataIndex: "created_at",
|
||||||
align: "center",
|
// align: "center",
|
||||||
sorter: true,
|
sorter: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "操作",
|
title: "操作",
|
||||||
width: 300,
|
width: 200,
|
||||||
dataIndex: "action",
|
dataIndex: "action",
|
||||||
key: "action",
|
key: "action",
|
||||||
align: "center",
|
// align: "center",
|
||||||
fixed: "right",
|
fixed: "right",
|
||||||
slots: {
|
slots: {
|
||||||
customRender: "action",
|
customRender: "action",
|
||||||
@@ -586,6 +586,10 @@ export default defineComponent({
|
|||||||
color: #434343;
|
color: #434343;
|
||||||
background: #f5f5f5;
|
background: #f5f5f5;
|
||||||
}
|
}
|
||||||
|
.pro-table:deep(.ant-btn) {
|
||||||
|
padding: 0;
|
||||||
|
padding-right: 10px;
|
||||||
|
}
|
||||||
.pro-cont {
|
.pro-cont {
|
||||||
padding: 0 32px;
|
padding: 0 32px;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user