|
@@ -8,7 +8,7 @@
|
|
|
@finish="onFinish"
|
|
|
>
|
|
|
<a-row :gutter="24">
|
|
|
- <a-col :span="9">
|
|
|
+ <a-col :span="6">
|
|
|
<a-form-item
|
|
|
name="tempName"
|
|
|
label="模板名称"
|
|
@@ -16,7 +16,7 @@
|
|
|
<a-input v-model:value="formState.tempName" style="width: 200px"></a-input>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :span="9">
|
|
|
+ <a-col :span="6">
|
|
|
<a-form-item
|
|
|
name="tempNo"
|
|
|
label="模板编号"
|
|
@@ -24,6 +24,14 @@
|
|
|
<a-input v-model:value="formState.tempNo" style="width: 200px"></a-input>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
+ <a-col :span="6">
|
|
|
+ <a-form-item
|
|
|
+ name="tempNo"
|
|
|
+ label="创建日期"
|
|
|
+ :label-col="{span:6}">
|
|
|
+
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
<a-col :span="6" style="text-align: left">
|
|
|
<a-button type="primary" html-type="submit" @click="onFinish">查询</a-button>
|
|
|
<a-button style="margin: 0 8px" @click="() => {formRef.resetFields();loadData()}">重置</a-button>
|
|
@@ -37,7 +45,7 @@
|
|
|
</a-radio-group>
|
|
|
<a-button type="primary" html-type="button" @click="add">
|
|
|
<template #icon>
|
|
|
- <PlusOutlined />
|
|
|
+ <PlusOutlined/>
|
|
|
</template>
|
|
|
添加搜索模板
|
|
|
</a-button>
|
|
@@ -52,46 +60,47 @@
|
|
|
<div class="search-result-list" v-if="viewModel=='card'">
|
|
|
<a-spin :spinning="loading">
|
|
|
<a-row :gutter="[24,8]">
|
|
|
- <a-col :span="6" v-for="item in data">
|
|
|
- <a-card :title="item.tempName" >
|
|
|
- <template #extra>
|
|
|
- <a-button type="link" @click="edit(item.tempId)">查看详情</a-button>
|
|
|
- </template>
|
|
|
- <template class="ant-card-actions" #actions>
|
|
|
- <FormOutlined key="edit" @click="edit(item.tempId)"/>
|
|
|
- <a-popconfirm placement="leftTop"
|
|
|
- title="是否删除数据?"
|
|
|
- @confirm="deleteSingle(item.tempId)">
|
|
|
- <DeleteOutlined key="ellipsis"/>
|
|
|
- </a-popconfirm>
|
|
|
- </template>
|
|
|
- <a-popover title="详细信息" :visible="item.visible">
|
|
|
- <template #content>
|
|
|
- <p>维度:{{ item.dimensionName }}</p>
|
|
|
- <p>度量:{{ item.measurName }}</p>
|
|
|
+ <a-col :span="6" v-for="item in data">
|
|
|
+ <a-card :title="item.tempName">
|
|
|
+ <template #extra>
|
|
|
+ <a-button type="link" @click="edit(item.tempId)">查看详情</a-button>
|
|
|
</template>
|
|
|
- </a-popover>
|
|
|
- <a-row :gutter="[24,4]" @mouseover="item.visible=true" @mouseout="item.visible=false">
|
|
|
- <a-col :span="10" class="col-text">维度:</a-col>
|
|
|
- <a-col :span="12" class="col-content" >{{ item.dimensionName }}</a-col>
|
|
|
- <a-col :span="10" class="col-text">度量:</a-col>
|
|
|
- <a-col :span="12" class="col-content" >{{ item.measurName }}</a-col>
|
|
|
- <a-col :span="10" class="col-text">创建人:</a-col>
|
|
|
- <a-col :span="12">{{ item.createdName }}</a-col>
|
|
|
- <a-col :span="10" class="col-text">创建/更新日期:</a-col>
|
|
|
- <a-col :span="12">{{ dayjs(item.createTime ?? item.modifyTime).format('YYYY-MM-DD') }}</a-col>
|
|
|
- <a-col :span="10" class="col-text">备注:</a-col>
|
|
|
- <a-col :span="12" class="col-content">{{ item.remark }}</a-col>
|
|
|
- </a-row>
|
|
|
- </a-card>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
+ <template class="ant-card-actions" #actions>
|
|
|
+ <FormOutlined key="edit" @click="edit(item.tempId)"/>
|
|
|
+ <a-popconfirm placement="leftTop"
|
|
|
+ title="是否删除数据?"
|
|
|
+ @confirm="deleteSingle(item.tempId)">
|
|
|
+ <DeleteOutlined key="ellipsis"/>
|
|
|
+ </a-popconfirm>
|
|
|
+ </template>
|
|
|
+ <a-popover title="详细信息" :visible="item.visible">
|
|
|
+ <template #content>
|
|
|
+ <p>维度:{{ item.dimensionName }}</p>
|
|
|
+ <p>度量:{{ item.measurName }}</p>
|
|
|
+ </template>
|
|
|
+ </a-popover>
|
|
|
+ <a-row :gutter="[24,4]" @mouseover="item.visible=true" @mouseout="item.visible=false">
|
|
|
+ <a-col :span="10" class="col-text">维度:</a-col>
|
|
|
+ <a-col :span="12" class="col-content">{{ item.dimensionName }}</a-col>
|
|
|
+ <a-col :span="10" class="col-text">度量:</a-col>
|
|
|
+ <a-col :span="12" class="col-content">{{ item.measurName }}</a-col>
|
|
|
+ <a-col :span="10" class="col-text">创建人:</a-col>
|
|
|
+ <a-col :span="12">{{ item.createdName }}</a-col>
|
|
|
+ <a-col :span="10" class="col-text">创建/更新日期:</a-col>
|
|
|
+ <a-col :span="12">{{ dayjs(item.createTime ?? item.modifyTime).format('YYYY-MM-DD') }}</a-col>
|
|
|
+ <a-col :span="10" class="col-text">备注:</a-col>
|
|
|
+ <a-col :span="12" class="col-content">{{ item.remark }}</a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-card>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
</a-spin>
|
|
|
</div>
|
|
|
<div class="search-result-list" v-else="viewModel=='list'">
|
|
|
<a-table :columns="columns" :data-source="data" :scroll="{ x:'100%', y: 500 }"
|
|
|
:loading="loading"
|
|
|
- :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" :row-key="record=>record.tempId"
|
|
|
+ :row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
|
|
+ :row-key="record=>record.tempId"
|
|
|
bordered>
|
|
|
<template #bodyCell="{ column,record }">
|
|
|
<template v-if="column.key === 'operation'">
|
|
@@ -100,7 +109,8 @@
|
|
|
</template>
|
|
|
</a-table>
|
|
|
</div>
|
|
|
- <a-pagination :page-size-options="['5', '20', '30', '40', '50']" show-size-changer v-model:current="pagination.current" :total="pagination.total" style="float: right;margin-top: 10px;"
|
|
|
+ <a-pagination :page-size-options="['5', '20', '30', '40', '50']" show-size-changer
|
|
|
+ v-model:current="pagination.current" :total="pagination.total" style="float: right;margin-top: 10px;"
|
|
|
:pageSize="pagination.pageSize" :show-total="total => `共 ${total} 条`"
|
|
|
@change="(current)=>handleTableChange({ current: current,pageSize: pagination.pageSize })"
|
|
|
@showSizeChange="(current,pageSize)=>handleTableChange({ current: current,pageSize: pageSize })"/>
|
|
@@ -122,7 +132,6 @@ export default defineComponent({
|
|
|
name: 'tempList',
|
|
|
components: {},
|
|
|
setup() {
|
|
|
-
|
|
|
const route = useRoute();
|
|
|
const router = useRouter();
|
|
|
const expand = ref(false);
|
|
@@ -195,7 +204,7 @@ export default defineComponent({
|
|
|
loadData();
|
|
|
})
|
|
|
};
|
|
|
- const deleteSingle=(id:string)=>{
|
|
|
+ const deleteSingle = (id: string) => {
|
|
|
postdel('temp/deletes', [id]).then(() => {
|
|
|
loadData();
|
|
|
})
|
|
@@ -221,7 +230,7 @@ export default defineComponent({
|
|
|
onSelectChange,
|
|
|
onFinish,
|
|
|
loadData,
|
|
|
- add,deleteSingle,
|
|
|
+ add, deleteSingle,
|
|
|
edit, onDelete
|
|
|
};
|
|
|
},
|