Commit 3d1f2855 by wenyi.chen

v1版本

parent 3300a1f0
...@@ -109,6 +109,34 @@ export function productApi() { ...@@ -109,6 +109,34 @@ export function productApi() {
data, data,
}); });
}, },
productAllocationAbnormal: (data) => {
return request({
url: '/api/enterpriseAllocation/enterpriseAbnormality',
method: 'post',
data,
});
},
taskAllocation: (data) => {
return request({
url: '/api/productAllocation/task_allocation',
method: 'post',
data,
});
},
getProductAllocationInfo: (data) => {
return request({
url: '/api/productAllocation/getProductAllocationInfo',
method: 'post',
data,
});
},
productReview: (data) => {
return request({
url: '/api/productAllocation/productReview',
method: 'post',
data,
});
},
}; };
} }
......
...@@ -10,11 +10,11 @@ ...@@ -10,11 +10,11 @@
<div class="page-main" ref="pageMain"> <div class="page-main" ref="pageMain">
<el-card shadow="hover" style="height:100%;"> <el-card shadow="hover" style="height:100%;">
<Toolbar ref="ToolbarRef" v-model:showSearch="showSearch" @queryTable="getList" @search="search" :columns="columns"/> <Toolbar ref="ToolbarRef" v-model:showSearch="showSearch" @queryTable="reset" @search="search" :columns="columns"/>
<el-table :data="state.tableData.data" style="width: 100%" :height="state.tableHeight" <el-table :data="state.tableData.data" style="width: 100%" :height="state.tableHeight"
ref="multipleTableRef"> ref="multipleTableRef">
<el-table-column label="序号" type="index" width="100" show-overflow-tooltip align="center"></el-table-column> <el-table-column label="序号" type="index" width="100" show-overflow-tooltip align="center"></el-table-column>
<el-table-column prop="enterprise_id" label="企业ID" key="enterprise_name" v-if="columns[0].visible" width="300" show-overflow-tooltip align="center"></el-table-column>
<el-table-column prop="enterprise_name" label="企业名称" key="enterprise_name" v-if="columns[0].visible" width="300" show-overflow-tooltip align="center"></el-table-column> <el-table-column prop="enterprise_name" label="企业名称" key="enterprise_name" v-if="columns[0].visible" width="300" show-overflow-tooltip align="center"></el-table-column>
<el-table-column prop="product_id" label="产品ID" key="product_id" v-if="columns[0].visible" width="200" show-overflow-tooltip align="center"></el-table-column> <el-table-column prop="product_id" label="产品ID" key="product_id" v-if="columns[0].visible" width="200" show-overflow-tooltip align="center"></el-table-column>
<el-table-column prop="page_url" label="页面URL" key="page_url" v-if="columns[2].visible" width="200" align="center"> <el-table-column prop="page_url" label="页面URL" key="page_url" v-if="columns[2].visible" width="200" align="center">
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
<div class="pagination-box"> <div class="pagination-box">
<el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15" <el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15"
:pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="state.apiListParam.page" background :pager-count="5" :page-sizes="[10, 20, 30,50,100,100]" v-model:current-page="state.apiListParam.page" background
v-model:page-size="state.apiListParam.limit" layout="total, sizes, prev, pager, next, jumper" v-model:page-size="state.apiListParam.limit" layout="total, sizes, prev, pager, next, jumper"
:total="state.tableData.total"> :total="state.tableData.total">
</el-pagination> </el-pagination>
...@@ -109,6 +109,7 @@ const state = reactive({ ...@@ -109,6 +109,7 @@ const state = reactive({
testIndex:0, testIndex:0,
taskList:[], taskList:[],
verifyTypeList:['待检查','已检查'], verifyTypeList:['待检查','已检查'],
searchQuery:'',
}); });
// 页面加载时 // 页面加载时
...@@ -145,6 +146,8 @@ const search = () => { ...@@ -145,6 +146,8 @@ const search = () => {
*/ */
const searchData = (va) => { const searchData = (va) => {
if(va){ if(va){
state.searchQuery = va;
Session.set('allocation',state.searchQuery);
productApi().productAllocationList(va).then(res => { productApi().productAllocationList(va).then(res => {
state.tableData.data = res.data.data state.tableData.data = res.data.data
state.tableData.total = res.data.total state.tableData.total = res.data.total
...@@ -160,17 +163,34 @@ const search = () => { ...@@ -160,17 +163,34 @@ const search = () => {
* 重置按钮 * 重置按钮
*/ */
const reset = () => { const reset = () => {
Session.set('allocation','');
state.apiListParam.page = 1 state.apiListParam.page = 1
state.apiListParam.name = ''; state.apiListParam.name = '';
state.apiListParam.limit = 10;
state.apiListParam.inspect_status = '';
getList() getList()
} }
// 分页改变 // 分页改变
const onHandleSizeChange = (val) => { const onHandleSizeChange = (val) => {
let allocationQuery = Session.get('allocation');
let arr = [0,1, 2, 3, 4, 5];
if(allocationQuery){
if(arr.includes(allocationQuery.inspect_status)){
state.apiListParam.inspect_status = allocationQuery.inspect_status
}
}
state.apiListParam.limit = val; state.apiListParam.limit = val;
getList(); getList();
}; };
const onHandleCurrentChange = (val) => { const onHandleCurrentChange = (val) => {
let allocationQuery = Session.get('allocation');
let arr = [0,1, 2, 3, 4, 5];
if(allocationQuery){
if(arr.includes(allocationQuery.inspect_status)){
state.apiListParam.inspect_status = allocationQuery.inspect_status
}
}
state.apiListParam.page = val; state.apiListParam.page = val;
getList(); getList();
}; };
...@@ -182,7 +202,6 @@ const getList = () => { ...@@ -182,7 +202,6 @@ const getList = () => {
state.tableData.total = res.data.total state.tableData.total = res.data.total
}).catch(() => { }).catch(() => {
}) })
} }
......
...@@ -87,7 +87,7 @@ import { Session } from '/@/utils/storage'; ...@@ -87,7 +87,7 @@ import { Session } from '/@/utils/storage';
// 引入组件 // 引入组件
const Breadcrumb = defineAsyncComponent(() => import('/@/layout/navBars/breadcrumb/breadcrumb.vue')); const Breadcrumb = defineAsyncComponent(() => import('/@/layout/navBars/breadcrumb/breadcrumb.vue'));
const SetupDialog = defineAsyncComponent(() => import('/@/views/product_info/list/setup.vue')); const SetupDialog = defineAsyncComponent(() => import('/@/views/product_info/list/setup.vue'));
const AddDialog = defineAsyncComponent(() => import('/@/views/product_info/list/add.vue')); const AddDialog = defineAsyncComponent(() => import('../../task/list/add.vue'));
const DistributeDialog = defineAsyncComponent(() => import('/@/views/product_info/list/distribute.vue')); const DistributeDialog = defineAsyncComponent(() => import('/@/views/product_info/list/distribute.vue'));
const Toolbar = defineAsyncComponent(() => import('/@/components/RightToolbar/index.vue')); const Toolbar = defineAsyncComponent(() => import('/@/components/RightToolbar/index.vue'));
const Search = defineAsyncComponent(() => import('/@/views/product_info/list/search.vue')); const Search = defineAsyncComponent(() => import('/@/views/product_info/list/search.vue'));
...@@ -177,6 +177,7 @@ const onHandleCurrentChange = (val) => { ...@@ -177,6 +177,7 @@ const onHandleCurrentChange = (val) => {
// 获取列表 // 获取列表
const getList = () => { const getList = () => {
console.log(state.apiListParam)
productApi().list(state.apiListParam).then(res => { productApi().list(state.apiListParam).then(res => {
state.tableData.data = res.data.data state.tableData.data = res.data.data
state.tableData.total = res.data.total state.tableData.total = res.data.total
......
<template>
<div class="system-role-dialog-container">
<el-dialog :title="state.dialog.title" v-model="state.dialog.isShowDialog" width="700px" @close="closeDialog" :close-on-click-modal="false">
<el-form ref="dialogFormRef" :model="state.ruleForm" :rules="state.rules" size="default" label-width="200px"
v-loading="state.dataLoading" label-position="right" style="width: 500px;">
<el-form-item label="采集组名称" prop="采集组名称">
<el-input v-model="state.ruleForm.name" placeholder="请输入采集组名称" clearable ></el-input>
</el-form-item>
</el-form>
<template #footer>
<span class="dialog-footer">
<el-button @click="closeDialog()" size="default">取 消</el-button>
<el-button type="primary" :loading="state.btnLoading" @click="onSubmit(dialogFormRef)"
size="default">确认</el-button>
</span>
</template>
</el-dialog>
</div>
</template>
<script setup name="systemRoleDialog">
import { ElMessage } from 'element-plus';
import { taskApi } from '/@/api/task'
import { Session } from '/@/utils/storage';
// 定义子组件向父组件传值/事件
const emit = defineEmits(['refresh']);
// 定义变量内容
const dialogFormRef = ref();
const state = reactive({
// 查询列表参数
apiListParam: {
page: 1,
limit: 100,
search:[],
},
ruleForm: {
name:'',
},
rules: {
},
dialog: {
isShowDialog: false,
title: '添加采集组',
submitTxt: '',
},
dataLoading: false,
btnLoading: false,
userList:[],
enterpriseList:[],
});
// 打开弹窗
const openDialog = () => {
state.dialog.isShowDialog = true;
state.dialog.title = '新增采集组';
};
// 关闭弹窗
const closeDialog = () => {
emit('refresh');
dialogFormRef.value.resetFields();
state.dialog.isShowDialog = false;
};
// 提交
const onSubmit = () => {
dialogFormRef.value.validate((valid, fields) => {
if (valid) {
state.btnLoading = true
const apiData = JSON.parse(JSON.stringify(state.ruleForm))
taskApi().add(apiData).then(res => {
state.btnLoading = false
ElMessage.success('操作成功');
closeDialog();
emit('refresh');
}).catch(() => {
state.btnLoading = false
closeDialog();
emit('refresh');
})
}
})
};
// 暴露变量
defineExpose({
openDialog,
});
onMounted(() => {
});
</script>
<style scoped lang="scss"></style>
...@@ -60,13 +60,11 @@ import { Session } from '/@/utils/storage'; ...@@ -60,13 +60,11 @@ import { Session } from '/@/utils/storage';
// 引入组件 // 引入组件
const Breadcrumb = defineAsyncComponent(() => import('/@/layout/navBars/breadcrumb/breadcrumb.vue')); const Breadcrumb = defineAsyncComponent(() => import('/@/layout/navBars/breadcrumb/breadcrumb.vue'));
const SetupDialog = defineAsyncComponent(() => import('/@/views/product_info/list/setup.vue')); const SetupDialog = defineAsyncComponent(() => import('/@/views/product_info/list/setup.vue'));
const AddDialog = defineAsyncComponent(() => import('/@/views/product_info/list/add.vue'));
const DistributeDialog = defineAsyncComponent(() => import('/@/views/product_info/list/distribute.vue')); const DistributeDialog = defineAsyncComponent(() => import('/@/views/product_info/list/distribute.vue'));
const Toolbar = defineAsyncComponent(() => import('/@/components/RightToolbar/index.vue')); const Toolbar = defineAsyncComponent(() => import('/@/components/RightToolbar/index.vue'));
const Search = defineAsyncComponent(() => import('/@/views/product_info/list/search.vue')); const Search = defineAsyncComponent(() => import('/@/views/product_info/list/search.vue'));
// 定义变量内容 // 定义变量内容
const AddDialogRef = ref()
const DistributeDialogRef = ref() const DistributeDialogRef = ref()
const SetupDialogRef = ref() const SetupDialogRef = ref()
const SearchDialogRef = ref() const SearchDialogRef = ref()
......
<template>
<div class="system-menu-container">
<div class="breadcrumb-box">
<Breadcrumb />
</div>
<div class="header-search flex space-between">
<div>
<el-button type="info" @click="backToPreviousPage">返回页面</el-button>
</div>
</div>
<div class="page-main" ref="pageMain">
<el-card shadow="hover" style="height:100%;">
<!-- <Toolbar ref="ToolbarRef" v-model:showSearch="showSearch" @queryTable="reset" @search="search" :columns="columns"/> -->
<el-table :data="state.tableData.data" style="width: 100%" :height="state.tableHeight"
ref="multipleTableRef">
<el-table-column label="序号" type="index" width="100" show-overflow-tooltip align="center"></el-table-column>
<el-table-column prop="enterprise_id" label="企业ID" key="enterprise_name" v-if="columns[0].visible" width="300" show-overflow-tooltip align="center"></el-table-column>
<el-table-column prop="product_info_id" label="产品ID" key="product_info_id" v-if="columns[0].visible" width="200" show-overflow-tooltip align="center"></el-table-column>
<el-table-column prop="enterprise_name" label="企业名称" key="enterprise_name" v-if="columns[0].visible" width="300" show-overflow-tooltip align="center"></el-table-column>
<el-table-column prop="product_id" label="产品编号" key="product_id" v-if="columns[0].visible" width="200" show-overflow-tooltip align="center"></el-table-column>
<el-table-column prop="page_url" label="页面URL" key="page_url" v-if="columns[2].visible" width="200" align="center">
<template #default="scope">
<el-link type="primary" :href="scope.row.page_url" target ="_blank">{{scope.row.page_url}}</el-link>
</template>
</el-table-column>
<el-table-column prop="product_categ_name" label="产品分类名称" key="product_categ_name" v-if="columns[3].visible" width="200" align="center"></el-table-column>
<el-table-column prop="product_name" label="产品名称" key="product_name" v-if="columns[4].visible" width="200" align="center"></el-table-column>
<el-table-column prop="product_model" label="产品型号" key="product_model" v-if="columns[5].visible" width="200" align="center"></el-table-column>
<el-table-column prop="describe" label="功能描述" key="describe" v-if="columns[6].visible" width="250" show-overflow-tooltip align="center">
</el-table-column>
<el-table-column prop="parameter" label="规格参数" key="parameter" v-if="columns[7].visible" width="200" show-overflow-tooltip align="center"></el-table-column>
<el-table-column prop="inspect_status" key="verify_type" v-if="columns[12].visible" label="检查状态" width="200" align="center">
<template #default="scope">
<el-tag type="info" v-if="scope.row.inspect_status ==''||scope.row.inspect_status ==null||scope.row.inspect_status ==0">待检查</el-tag>
<el-tag v-if="scope.row.inspect_status ==1">检查完成</el-tag>
<el-tag type="warning" v-if="scope.row.inspect_status ==2">检查中</el-tag>
<el-tag type="danger" v-if="scope.row.inspect_status ==3">检查异常</el-tag>
<el-tag type="danger" v-if="scope.row.inspect_status ==4">数据异常</el-tag>
<el-tag type="danger" v-if="scope.row.inspect_status ==5">数据废弃</el-tag>
</template>
</el-table-column>
<el-table-column prop="name" label="检查人员" key="name" v-if="columns[9].visible" width="200" align="center"></el-table-column>
<el-table-column prop="inspect_time" key="inspect_time" label="检查时间" v-if="columns[10].visible" width="200" align="center">
<template #default="scope">
<el-tag type="info" v-if="scope.row.inspect_time ==''||scope.row.inspect_time ==null||scope.row.inspect_time ==undefined">待检查</el-tag>
<el-tag v-if="scope.row.inspect_time">{{scope.row.inspect_time}}</el-tag>
</template>
</el-table-column>
<el-table-column prop="distribute_time" key="distribute_time" label="分发时间" v-if="columns[10].visible" width="200" align="center"></el-table-column>
<el-table-column label="操作" width="200" fixed="right" align="center">
<template #default="scope">
<el-button size="small" @click="setup(scope.row.product_info_id)" type="primary">检查数据</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination-box">
<el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15"
:pager-count="5" :page-sizes="[10, 20, 30,50,100,100]" v-model:current-page="state.apiListParam.page" background
v-model:page-size="state.apiListParam.limit" layout="total, sizes, prev, pager, next, jumper"
:total="state.tableData.total">
</el-pagination>
</div>
</el-card>
</div>
<AddDialog ref="AddDialogRef" @refresh="getList()" />
<DistributeDialog ref="DistributeDialogRef" @refresh="getList()" />
<SetupDialog ref="SetupDialogRef" @refresh="getList()" />
<Search ref="SearchDialogRef" @search-to-parent="searchData" />
</div>
</template>
<script setup name="taskPackage-list">
import { getCurrentInstance } from 'vue';
import { productApi } from '/@/api/product'
const router = useRouter();
import { ElMessageBox, ElMessage } from 'element-plus';
import { Session } from '/@/utils/storage';
// 引入组件
const Breadcrumb = defineAsyncComponent(() => import('/@/layout/navBars/breadcrumb/breadcrumb.vue'));
const SetupDialog = defineAsyncComponent(() => import('/@/views/product_info/list/setup.vue'));
const AddDialog = defineAsyncComponent(() => import('/@/views/product_info/list/add.vue'));
const DistributeDialog = defineAsyncComponent(() => import('/@/views/product_info/list/distribute.vue'));
const Toolbar = defineAsyncComponent(() => import('/@/components/RightToolbar/index.vue'));
const Search = defineAsyncComponent(() => import('/@/views/search/allocation.vue'));
// 定义变量内容
const AddDialogRef = ref()
const DistributeDialogRef = ref()
const SetupDialogRef = ref()
const SearchDialogRef = ref()
const state = reactive({
// 查询列表参数
apiListParam: {
page: 1,
limit: 10,
enterprise_id:'',
},
tableData: {
data: [],
total: 0
},
tableHeight: '30vh',
normListExtend:[],
testIndex:0,
taskList:[],
verifyTypeList:['待检查','已检查'],
searchQuery:'',
});
// 页面加载时
onMounted(() => {
if(router.currentRoute.value.query.enterprise_id){
state.apiListParam.enterprise_id = router.currentRoute.value.query.enterprise_id
getList()
state.tableHeight = getCurrentInstance().refs.pageMain.offsetHeight - 130 - 52 + "px";
}else{
router.push({ path: '/product_info/allocation'});
}
});
/**
* 返回上一级页面
*/
const backToPreviousPage = () => {
// this.$router.push('/target')
router.push({ path: '/product_info/user_enterprise'});
}
/**
* 点击查看
*/
const setup = (product_id) => {
router.push({ path: '/task/review', query: { product_id: product_id }});
}
const emits = defineEmits(['update:showSearch', 'queryTable','search','refresh']);
const columns = ref([
{ key: 0, label: `产品ID`, visible: true },
{ key: 1, label: `企业名称`, visible: true },
{ key: 2, label: `页面URL`, visible: true },
{ key: 3, label: `产品分类名称`, visible: true },
{ key: 4, label: `产品名称`, visible: true },
{ key: 5, label: `产品型号`, visible: true },
{key: 6, label: `功能描述`, visible: true },
{ key: 7, label: `规格参数`, visible: true },
{ key: 8, label: `审核类型`, visible: true },
{ key: 9, label: `审核人员`, visible: true },
{ key: 10, label: `审核时间`, visible: true },
{ key: 11, label: `入库时间`, visible: true },
{ key: 12, label: `更新时间`, visible: true }
]);
/**
* 重置按钮
*/
const reset = () => {
state.apiListParam.page = 1
state.apiListParam.limit = 10;
getList()
}
// 分页改变
const onHandleSizeChange = (val) => {
state.apiListParam.limit = val;
getList();
};
const onHandleCurrentChange = (val) => {
state.apiListParam.page = val;
getList();
};
// 获取列表
const getList = () => {
productApi().taskAllocation(state.apiListParam).then(res => {
state.tableData.data = res.data.data
state.tableData.total = res.data.total
}).catch(() => {
})
}
</script>
<style lang="scss" scoped>
.page-main {
height: calc(100vh - 50px - 106px);
}
</style>
...@@ -19,24 +19,48 @@ ...@@ -19,24 +19,48 @@
<div class="page-main" ref="pageMain"> <div class="page-main" ref="pageMain">
<el-card shadow="hover" style="height:100%;"> <el-card shadow="hover" style="height:100%;">
<!-- <Toolbar ref="ToolbarRef" v-model:showSearch="showSearch" @queryTable="getList" @search="search" :columns="columns"/> --> <!-- <Toolbar ref="ToolbarRef" v-model:showSearch="showSearch" @queryTable="getList" @search="search" :columns="columns"/> -->
<el-table :data="state.tableData.data" style="width: 100%" :height="state.tableHeight" <el-table v-loading="state.loading" :data="state.tableData.data" style="width: 100%" :height="state.tableHeight"
ref="multipleTableRef"> ref="multipleTableRef">
<el-table-column label="序号" type="index" width="100" show-overflow-tooltip align="center"></el-table-column> <el-table-column label="序号" type="index" width="100" show-overflow-tooltip align="center"></el-table-column>
<el-table-column prop="enterpriseInfo.enterprise_name" label="企业名称" key="product_categ_name" align="center"></el-table-column> <el-table-column prop="enterpriseInfo.enterprise_name" label="企业名称" key="product_categ_name" align="center"></el-table-column>
<el-table-column prop="distribute_time" label="源网站" key="product_model" align="center">
<template #default="scope">
<el-button type="warning" size="small" @click="source_address(scope.row.enterpriseInfo.enterprise_website_official)">源网站</el-button>
</template>
</el-table-column>
<el-table-column prop="adminInfo.name" label="检查人员" key="product_name" align="center"></el-table-column> <el-table-column prop="adminInfo.name" label="检查人员" key="product_name" align="center"></el-table-column>
<el-table-column prop="total" label="产品总数" key="product_model" width="200" align="center"> <el-table-column prop="total" label="产品总数" key="product_model" width="100" align="center">
<template #default="scope"><span style="color: #409EFF;">{{scope.row.total }}</span></template> <template #default="scope"><span style="color: #409EFF;">{{scope.row.total }}</span></template>
</el-table-column> </el-table-column>
<el-table-column prop="not_checked" label="未检查数量" key="product_model" width="200" align="center"> <el-table-column prop="a" label="待分配" key="product_model" width="100" align="center">
<template #default="scope"><span style="color: #E6A23C;">{{scope.row.not_checked }}</span></template> <template #default="scope"><span>{{scope.row.a }}</span></template>
</el-table-column>
<el-table-column prop="b" label="正确" key="product_model" width="100" align="center">
<template #default="scope"><span>{{scope.row.b }}</span></template>
</el-table-column> </el-table-column>
<el-table-column prop="checked" label="已检查数量" key="product_model" width="200" align="center"> <el-table-column prop="c" label="数据异常" key="product_model" width="100" align="center">
<template #default="scope"><span style="color: #67C23A;">{{scope.row.checked }}</span></template> <template #default="scope"><span>{{scope.row.c }}</span></template>
</el-table-column>
<el-table-column prop="d" label="检查异常" key="product_model" width="100" align="center">
<template #default="scope"><span>{{scope.row.d}}</span></template>
</el-table-column>
<el-table-column prop="e" label="废弃" key="product_model" width="100" align="center">
<template #default="scope"><span >{{scope.row.e}}</span></template>
</el-table-column> </el-table-column>
<el-table-column prop="distribute_time" label="分发时间" key="product_model" align="center"></el-table-column> <el-table-column prop="distribute_time" label="分发时间" key="product_model" align="center"></el-table-column>
<el-table-column label="操作" width="200" align="center">
<el-table-column prop="abnormal" label="是否异常" key="product_model" width="200" align="center">
<template #default="scope"> <template #default="scope">
<el-button size="small" @click="allocation(scope.row.adminInfo.id,scope.row.enterpriseInfo.id)" type="primary">查看详情</el-button> <span style="color: #409EFF;" v-if="scope.row.abnormal==1">正常</span>
<span style="color: #E6A23C;" v-if="scope.row.abnormal==0">未检查</span>
<span style="color: #67C23A;" v-if="scope.row.abnormal==2">异常</span>
</template>
</el-table-column>
<el-table-column label="操作" width="400" align="center">
<template #default="scope">
<el-button size="small" type="danger" @click="enterpriseAbnormality(scope.row.id,scope.row.enterpriseInfo.id,2)" >异常企业</el-button>
<el-button size="small" type="primary" @click="enterpriseAbnormality(scope.row.id,scope.row.enterpriseInfo.id,1)" >正常企业</el-button>
<el-button size="small" @click="allocation(scope.row.enterpriseInfo.id)" >查看详情</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
...@@ -44,7 +68,7 @@ ...@@ -44,7 +68,7 @@
<div class="pagination-box"> <div class="pagination-box">
<el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15" <el-pagination @size-change="onHandleSizeChange" @current-change="onHandleCurrentChange" class="mt15"
:pager-count="5" :page-sizes="[10, 20, 30]" v-model:current-page="state.apiListParam.page" background :pager-count="5" :page-sizes="[10, 20, 30,100,500]" v-model:current-page="state.apiListParam.page" background
v-model:page-size="state.apiListParam.limit" layout="total, sizes, prev, pager, next, jumper" v-model:page-size="state.apiListParam.limit" layout="total, sizes, prev, pager, next, jumper"
:total="state.tableData.total"> :total="state.tableData.total">
</el-pagination> </el-pagination>
...@@ -67,7 +91,7 @@ import { Session } from '/@/utils/storage'; ...@@ -67,7 +91,7 @@ import { Session } from '/@/utils/storage';
// 引入组件 // 引入组件
const Breadcrumb = defineAsyncComponent(() => import('/@/layout/navBars/breadcrumb/breadcrumb.vue')); const Breadcrumb = defineAsyncComponent(() => import('/@/layout/navBars/breadcrumb/breadcrumb.vue'));
const SetupDialog = defineAsyncComponent(() => import('/@/views/product_info/list/setup.vue')); const SetupDialog = defineAsyncComponent(() => import('/@/views/product_info/list/setup.vue'));
const AddDialog = defineAsyncComponent(() => import('/@/views/product_info/list/add.vue')); // const AddDialog = defineAsyncComponent(() => import('./add.vue'));
const Toolbar = defineAsyncComponent(() => import('/@/components/RightToolbar/index.vue')); const Toolbar = defineAsyncComponent(() => import('/@/components/RightToolbar/index.vue'));
const Search = defineAsyncComponent(() => import('/@/views/product_info/list/search.vue')); const Search = defineAsyncComponent(() => import('/@/views/product_info/list/search.vue'));
...@@ -91,6 +115,7 @@ const state = reactive({ ...@@ -91,6 +115,7 @@ const state = reactive({
testIndex:0, testIndex:0,
taskList:[], taskList:[],
verifyTypeList:['待检查','已检查'], verifyTypeList:['待检查','已检查'],
loading: true
}); });
// 页面加载时 // 页面加载时
...@@ -113,8 +138,23 @@ const emits = defineEmits(['update:showSearch', 'queryTable','search','refresh'] ...@@ -113,8 +138,23 @@ const emits = defineEmits(['update:showSearch', 'queryTable','search','refresh']
}).catch(() => { }).catch(() => {
}) })
} }
const source_address= (source_address) => {
window.open(source_address, '_blank');
}
const enterpriseAbnormality = (id,enterprise_info_id,type)=>{
let apiData = {
id:id,
enterprise_info_id:enterprise_info_id,
type:type
};
productApi().productAllocationAbnormal(apiData).then(res => {
state.btnLoading = false
ElMessage.success('ok');
getList();
}).catch(() => {
state.btnLoading = false
})
}
// 分页改变 // 分页改变
const onHandleSizeChange = (val) => { const onHandleSizeChange = (val) => {
...@@ -128,9 +168,11 @@ const onHandleCurrentChange = (val) => { ...@@ -128,9 +168,11 @@ const onHandleCurrentChange = (val) => {
// 获取列表 // 获取列表
const getList = () => { const getList = () => {
state.loading = true
productApi().userEnterpriseList(state.apiListParam).then(res => { productApi().userEnterpriseList(state.apiListParam).then(res => {
state.tableData.data = res.data.data state.tableData.data = res.data.data
state.tableData.total = res.data.total state.tableData.total = res.data.total
state.loading = false
}).catch(() => { }).catch(() => {
}) })
...@@ -138,8 +180,8 @@ const getList = () => { ...@@ -138,8 +180,8 @@ const getList = () => {
/** /**
* 进入详情页面 * 进入详情页面
*/ */
const allocation = (user_id,enterprise_id) => { const allocation = (enterprise_id) => {
router.push({ path: '/product_info/allocation', query: { user_id: user_id,enterprise_id: enterprise_id }}); router.push({ path: '/task/enterprise_product', query: { enterprise_id: enterprise_id }});
} }
</script> </script>
......
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