Commit 6cd788ef by wenyi.chen

綫上

parent c4c7c925
...@@ -7,7 +7,5 @@ VITE_OPEN = false ...@@ -7,7 +7,5 @@ VITE_OPEN = false
# public path 配置线上环境路径(打包)、本地通过 http-server 访问时,请置空即可 # public path 配置线上环境路径(打包)、本地通过 http-server 访问时,请置空即可
VITE_PUBLIC_PATH = ./ VITE_PUBLIC_PATH = ./
Upload ='/dev/api/upload/picture'
# X-OPENAPI-TOKEN # X-OPENAPI-TOKEN
VITE_X_OPENAPI_TOKEN = 098f6bcd4621d373cade4e832627b4f6 VITE_X_OPENAPI_TOKEN = 098f6bcd4621d373cade4e832627b4f6
\ No newline at end of file
...@@ -70,6 +70,13 @@ export function claimTasksApi() { ...@@ -70,6 +70,13 @@ export function claimTasksApi() {
data, data,
}); });
}, },
notCollectible: (data) => {
return request({
url: '/api/normCollects/notCollectible',
method: 'post',
data,
});
},
normCollectsPreserve: (data) => { normCollectsPreserve: (data) => {
return request({ return request({
url: '/api/normCollects/preserve', url: '/api/normCollects/preserve',
......
...@@ -30,25 +30,25 @@ ...@@ -30,25 +30,25 @@
</el-form-item> </el-form-item>
<el-form-item label="标题" :prop="'userFilled.' + index+ '.name'" v-for="(item, index) in state.formItem.userFilled" :key="index"> <el-form-item label="标题" :prop="'userFilled.' + index+ '.name'" v-for="(item, index) in state.formItem.userFilled" :key="index">
<el-row style="width: 100% !important;"> <el-row style="width: 100% !important;">
<el-col :span="12"> <el-col :span="7">
<el-input v-model="item.name" placeholder="请输入标题" clearabl :disabled="true"></el-input> <el-input v-model="item.name" placeholder="请输入标题" clearabl :disabled="true"></el-input>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="2">
<div>是否必填:</div> <span style="color: red;" v-if="item.radio==1">*</span>内容:
</el-col> </el-col>
<el-col :span="6"> <el-col :span="13">
<div> <el-input v-model="item.value" placeholder="请填写内容" required :disabled="true"></el-input>
<el-radio v-model="item.radio" label="1" :disabled="true"></el-radio> </el-col>
<el-radio v-model="item.radio" label="0" :disabled="true"></el-radio> <el-col :span="2">
</div> <span style="color: red;" v-if="item.radio==1">必填</span>
</el-col> </el-col>
</el-row> </el-row>
<el-row style="width: 100% !important; margin-left: -8%; margin-top: 10 !important;"> <el-row style="width: 100% !important; margin-left: -8%; margin-top: 10 !important;">
<el-col :span="2"> <el-col :span="2">
<div>备注:</div> <div>备注:</div>
</el-col> </el-col>
<el-col :span="18"> <el-col :span="22">
<el-input v-model="item.remarks" placeholder="请输入备注(选填)" clearabl :disabled="true"></el-input> <el-input v-model="item.remark" placeholder="请输入备注(选填)" clearabl :disabled="true"></el-input>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
...@@ -61,6 +61,10 @@ ...@@ -61,6 +61,10 @@
<el-image style="width: 150px; height: 150px" :preview-src-list="state.srcList" :src="item"></el-image> <el-image style="width: 150px; height: 150px" :preview-src-list="state.srcList" :src="item"></el-image>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="是否可采集:" prop="state.not_collectible_remarks">
<span v-if="state.not_collectible_remarks !=''">{{ state.not_collectible_remarks }}</span>
<span v-if="state.not_collectible_remarks =='' || state.not_collectible_remarks ==null">可采集</span>
</el-form-item>
</el-form> </el-form>
<template #footer> <template #footer>
<div style="margin-bottom: 30px; float: left; width: 70%;"> <div style="margin-bottom: 30px; float: left; width: 70%;">
...@@ -121,6 +125,7 @@ const state = reactive({ ...@@ -121,6 +125,7 @@ const state = reactive({
dynamicItem: [], dynamicItem: [],
userFilled: [], userFilled: [],
}, },
not_collectible_remarks:'',
}); });
// 打开弹窗 // 打开弹窗
...@@ -146,13 +151,14 @@ const openDialog = (data) => { ...@@ -146,13 +151,14 @@ const openDialog = (data) => {
state.formItem.addItem.task_name = addItem.task_name; state.formItem.addItem.task_name = addItem.task_name;
state.formItem.addItem.refer = addItem.refer; state.formItem.addItem.refer = addItem.refer;
state.formItem.addItem.guide = addItem.guide; state.formItem.addItem.guide = addItem.guide;
state.not_collectible_remarks = data.not_collectible_remarks
if(review.review_remarks){ if(review.review_remarks){
state.review.review_remarks = review.review_remarks; state.review.review_remarks = review.review_remarks;
} }
state.userIndex = 0; state.userIndex = 0;
state.index = 0; state.index = 0;
userFilled.forEach(item => { userFilled.forEach(item => {
state.formItem.userFilled.push({id:item.id,name:item.extend_name,radio:item.required+"",value:item.extend_value,remarks:item.extend_remarks}); state.formItem.userFilled.push({id:item.id,name:item.extend_name,radio:item.required+"",value:item.extend_value,remark:item.extend_remarks});
state.userIndex++ state.userIndex++
}); });
adminFilled.forEach(item => { adminFilled.forEach(item => {
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<div class="page-main" v-loading="state.tableData.loading" ref="pageMain"> <div class="page-main" v-loading="state.tableData.loading" ref="pageMain">
<el-card shadow="hover" style="height:100%;"> <el-card shadow="hover" style="height:100%;">
<el-table :data="state.tableData.data" border 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="userInfo.name" label="领取用户" show-overflow-tooltip align="center"> <el-table-column prop="userInfo.name" label="领取用户" show-overflow-tooltip align="center">
...@@ -54,7 +54,17 @@ ...@@ -54,7 +54,17 @@
<el-tag type='info' v-if="scope.row.status==4" size="medium">已结算</el-tag> <el-tag type='info' v-if="scope.row.status==4" size="medium">已结算</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="review_remarks" label="审核备注" show-overflow-tooltip align="center"></el-table-column> <el-table-column prop="not_collectible" label="是否可采集" show-overflow-tooltip align="center">
<template #default="scope">
<span style="color: #F56C6C" v-if="scope.row.not_collectible==1" effect="plain" size="small">{{scope.row.not_collectible_remarks}}</span>
<span style="color: #909399" v-else effect="plain" size="small"></span>
</template>
</el-table-column>
<el-table-column prop="review_remarks" label="审核备注" show-overflow-tooltip align="center">
<template #default="scope">
<span style="color: #409EFF;" effect="plain" size="small">{{scope.row.review_remarks}}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="300" fixed="right" align="center"> <el-table-column label="操作" width="300" fixed="right" align="center">
<template #default="scope"> <template #default="scope">
<el-button size="small" @click="details(scope.row)">查看详情</el-button> <el-button size="small" @click="details(scope.row)">查看详情</el-button>
......
...@@ -40,18 +40,21 @@ ...@@ -40,18 +40,21 @@
<el-input v-model="item.name" placeholder="请输入标题" clearabl :disabled="true"></el-input> <el-input v-model="item.name" placeholder="请输入标题" clearabl :disabled="true"></el-input>
</el-col> </el-col>
<el-col :span="2"> <el-col :span="2">
内容: <span style="color: red;" v-if="item.radio==1">*</span>内容:
</el-col> </el-col>
<el-col :span="15"> <el-col :span="13">
<el-input v-model="item.value" placeholder="请填写内容" required :disabled="true"></el-input> <el-input v-model="item.value" placeholder="请填写内容" required :disabled="true"></el-input>
</el-col> </el-col>
<el-col :span="2">
<span style="color: red;" v-if="item.radio==1">必填</span>
</el-col>
</el-row> </el-row>
<el-row style="width: 100% !important; margin-left: -8%; margin-top: 10 !important;"> <el-row style="width: 100% !important; margin-left: -8%; margin-top: 10 !important;">
<el-col :span="2"> <el-col :span="2">
<div>备注:</div> <div>备注:</div>
</el-col> </el-col>
<el-col :span="22"> <el-col :span="22">
<el-input v-model="item.remarks" placeholder="请输入备注(选填)" clearabl :disabled="true" ></el-input> <el-input v-model="item.remark" placeholder="请输入备注(选填)" clearabl :disabled="true"></el-input>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
...@@ -60,12 +63,24 @@ ...@@ -60,12 +63,24 @@
<el-form-item label="备注" prop="normCollectInfo.remark" v-if="state.collectInfo"> <el-form-item label="备注" prop="normCollectInfo.remark" v-if="state.collectInfo">
<el-input v-model="state.normCollectInfo.remark" placeholder="请输入备注" clearable :disabled="true"></el-input> <el-input v-model="state.normCollectInfo.remark" placeholder="请输入备注" clearable :disabled="true"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="用户截图" prop="state.srcList"> <el-form-item label="用户截图:" prop="state.srcList">
<span v-if="state.imgHide==false"></span> <span v-if="state.imgHide==false"></span>
<div class="demo-image__preview" v-for='item in state.srcList' style="margin:10px" v-if="state.imgHide"> <div class="demo-image__preview" v-for='item in state.srcList' style="margin:10px" v-if="state.imgHide">
<el-image style="width: 150px; height: 150px" :preview-src-list="state.srcList" :src="item"></el-image> <el-image style="width: 150px; height: 150px" :preview-src-list="state.srcList" :src="item"></el-image>
</div> </div>
</el-form-item> </el-form-item>
<!-- <el-table-column prop="not_collectible" label="是否可采集" show-overflow-tooltip align="center">
<template #default="scope">
<span style="color: #F56C6C" v-if="scope.row.not_collectible==1" effect="plain" size="small">{{scope.row.not_collectible_remarks}}</span>
<span style="color: #909399" v-else effect="plain" size="small"></span>
</template>
</el-table-column> -->
<el-form-item label="是否可采集:" prop="state.not_collectible">
<template #default="scope">
<span style="color: #F56C6C" v-if="state.not_collectible==1" effect="plain" size="small">{{state.not_collectible_remarks}}</span>
<span style="color: #909399" v-else effect="plain" size="small"></span>
</template>
</el-form-item>
</el-form> </el-form>
<template #footer> <template #footer>
<div style="margin-bottom: 30px; float: left; width: 70%;"> <div style="margin-bottom: 30px; float: left; width: 70%;">
...@@ -127,6 +142,8 @@ const state = reactive({ ...@@ -127,6 +142,8 @@ const state = reactive({
dynamicItem: [], dynamicItem: [],
userFilled: [] userFilled: []
}, },
not_collectible:'',
not_collectible_remarks:'',
}); });
// 打开弹窗 // 打开弹窗
...@@ -152,13 +169,15 @@ const openDialog = (data) => { ...@@ -152,13 +169,15 @@ const openDialog = (data) => {
state.formItem.addItem.task_name = addItem.task_name; state.formItem.addItem.task_name = addItem.task_name;
state.formItem.addItem.refer = addItem.refer; state.formItem.addItem.refer = addItem.refer;
state.formItem.addItem.guide = addItem.guide; state.formItem.addItem.guide = addItem.guide;
state.not_collectible_remarks = data.not_collectible_remarks
state.not_collectible = data.not_collectible
state.userIndex = 0; state.userIndex = 0;
state.index = 0; state.index = 0;
if(review.review_remarks){ if(review.review_remarks){
state.review.review_remarks = review.review_remarks; state.review.review_remarks = review.review_remarks;
} }
userFilled.forEach(item => { userFilled.forEach(item => {
state.formItem.userFilled.push({id:item.id,name:item.extend_name,radio:item.required+"",value:item.extend_value,remarks:item.extend_remarks}); state.formItem.userFilled.push({id:item.id,name:item.extend_name,radio:item.required+"",value:item.extend_value,remark:item.extend_remarks});
state.userIndex++ state.userIndex++
}); });
adminFilled.forEach(item => { adminFilled.forEach(item => {
...@@ -230,6 +249,7 @@ const onSubmit = () => { ...@@ -230,6 +249,7 @@ const onSubmit = () => {
const wipeData = () => { const wipeData = () => {
state.index=0 state.index=0
state.userIndex=0 state.userIndex=0
state.not_collectible_remarks = '';
state.formItem.addItem.task_id = ''; state.formItem.addItem.task_id = '';
state.formItem.addItem.norm_id = ''; state.formItem.addItem.norm_id = '';
state.formItem.addItem.norm_list_id = ''; state.formItem.addItem.norm_list_id = '';
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<div class="page-main" v-loading="state.tableData.loading" ref="pageMain"> <div class="page-main" v-loading="state.tableData.loading" ref="pageMain">
<el-card shadow="hover" style="height:100%;"> <el-card shadow="hover" style="height:100%;">
<el-table :data="state.tableData.data" border 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="userInfo.name" label="领取用户" show-overflow-tooltip align="center"> <el-table-column prop="userInfo.name" label="领取用户" show-overflow-tooltip align="center">
...@@ -54,9 +54,15 @@ ...@@ -54,9 +54,15 @@
<el-tag type='info' v-if="scope.row.status==4" effect="plain" size="small">已结算</el-tag> <el-tag type='info' v-if="scope.row.status==4" effect="plain" size="small">已结算</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="not_collectible" label="是否可采集" show-overflow-tooltip align="center">
<template #default="scope">
<span style="color: #F56C6C" v-if="scope.row.not_collectible==1" effect="plain" size="small">{{scope.row.not_collectible_remarks}}</span>
<span style="color: #909399" v-else effect="plain" size="small"></span>
</template>
</el-table-column>
<el-table-column prop="review_remarks" label="审核备注" show-overflow-tooltip align="center"> <el-table-column prop="review_remarks" label="审核备注" show-overflow-tooltip align="center">
<template #default="scope"> <template #default="scope">
{{scope.row.review_remarks}} <span style="color: #409EFF;" effect="plain" size="small">{{scope.row.review_remarks}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="300" fixed="right" align="center"> <el-table-column label="操作" width="300" fixed="right" align="center">
......
...@@ -78,7 +78,7 @@ import { ElMessageBox, ElMessage } from 'element-plus'; ...@@ -78,7 +78,7 @@ import { ElMessageBox, ElMessage } from 'element-plus';
import { Session } from '/@/utils/storage'; import { Session } from '/@/utils/storage';
// 引入组件 // 引入组件
const Breadcrumb = defineAsyncComponent(() => import('/@/layout/navBars/breadcrumb/breadcrumb.vue')); const Breadcrumb = defineAsyncComponent(() => import('/@/layout/navBars/breadcrumb/breadcrumb.vue'));
const DetailDialog = defineAsyncComponent(() => import('../../../claimTasks/user/incomplete/details-.vue')); const DetailDialog = defineAsyncComponent(() => import('../../../claimTasks/user/incomplete/details.vue'));
// 定义变量内容 // 定义变量内容
const DetailDialogRef = ref() const DetailDialogRef = ref()
......
...@@ -3,11 +3,21 @@ ...@@ -3,11 +3,21 @@
<div class="breadcrumb-box"> <div class="breadcrumb-box">
<Breadcrumb /> <Breadcrumb />
</div> </div>
<div class="header-search flex space-between">
<div>
<el-select v-model="state.apiListParam.user_id" placeholder="请选择用户" size="default" @change="searchChange" clearable filterable style="width:200px;margin-right: 20px;">
<el-option v-for="(item, index) in state.userList" :key="index" :label="item.name"
:value="item.id"></el-option>
</el-select>
<el-button size="default" type="primary" @click="searchChange()" >查询</el-button>
</div>
</div>
<div class="page-main" v-loading="state.tableData.loading" ref="pageMain"> <div class="page-main" v-loading="state.tableData.loading" ref="pageMain">
<el-card shadow="hover" style="height:100%;"> <el-card shadow="hover" style="height:100%;">
<el-table :data="state.tableData.data" border 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="userInfo.name" label="用户名称" show-overflow-tooltip align="center"> <el-table-column prop="userInfo.name" label="用户名称" show-overflow-tooltip align="center">
...@@ -52,6 +62,7 @@ ...@@ -52,6 +62,7 @@
<script setup name="taskPackage-list"> <script setup name="taskPackage-list">
import { getCurrentInstance } from 'vue'; import { getCurrentInstance } from 'vue';
import { normOrdersApi } from '/@/api/normOrders/index'; import { normOrdersApi } from '/@/api/normOrders/index';
import { systemApi } from '/@/api/system/index';
import { ElMessageBox, ElMessage } from 'element-plus'; import { ElMessageBox, ElMessage } from 'element-plus';
import { Session } from '/@/utils/storage'; import { Session } from '/@/utils/storage';
// 引入组件 // 引入组件
...@@ -66,6 +77,7 @@ const state = reactive({ ...@@ -66,6 +77,7 @@ const state = reactive({
limit: 10, limit: 10,
name: '', name: '',
user_id:'', user_id:'',
admin:1,
}, },
tableData: { tableData: {
data: [], data: [],
...@@ -75,15 +87,19 @@ const state = reactive({ ...@@ -75,15 +87,19 @@ const state = reactive({
tableHeight: '30vh', tableHeight: '30vh',
normListExtend:[], normListExtend:[],
testIndex:0, testIndex:0,
taskList:[], userList:[],
}); });
const getUserList = () => {
systemApi().systemUserList({page:-1,limit:-1}).then(res => {
state.userList = res.data
})
}
// 页面加载时 // 页面加载时
onMounted(() => { onMounted(() => {
getUserList()
getList() getList()
state.tableHeight = getCurrentInstance().refs.pageMain.offsetHeight - 130 - 52 + "px"; state.tableHeight = getCurrentInstance().refs.pageMain.offsetHeight - 130 - 52 + "px";
}); });
/** /**
* 搜索按钮 * 搜索按钮
*/ */
......
...@@ -12,13 +12,6 @@ ...@@ -12,13 +12,6 @@
<el-form-item label="参考信源" prop="refer"> <el-form-item label="参考信源" prop="refer">
<el-input v-model="state.formItem.addItem.refer" placeholder="请输入参考信源" clearable :disabled="true"></el-input> <el-input v-model="state.formItem.addItem.refer" placeholder="请输入参考信源" clearable :disabled="true"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="信源类型" prop="refer_type">
<el-select v-model="state.formItem.addItem.refer_type" placeholder="请选择信源等级" :disabled="true">
<el-option label="官网/政府" value="1"></el-option>
<el-option label="权威媒体" value="2"></el-option>
<el-option label="其他可信信源" value="3"></el-option>
</el-select>
</el-form-item>
<el-form-item label="参考指南" prop="guide"> <el-form-item label="参考指南" prop="guide">
<el-input v-model="state.formItem.addItem.guide" placeholder="请输入参考指南" clearable :disabled="true"></el-input> <el-input v-model="state.formItem.addItem.guide" placeholder="请输入参考指南" clearable :disabled="true"></el-input>
</el-form-item> </el-form-item>
...@@ -27,17 +20,25 @@ ...@@ -27,17 +20,25 @@
<div style="width: 10%;">内容:</div> <div style="width: 10%;">内容:</div>
<el-input v-model="item.value" placeholder="请输入标题对应的值" clearable style="width: 60%;" :disabled="true"></el-input> <el-input v-model="item.value" placeholder="请输入标题对应的值" clearable style="width: 60%;" :disabled="true"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="state.normCollectInfo.remark">
<el-input v-model="state.normCollectInfo.remark" placeholder="请输入备注" clearable :disabled="true"></el-input>
</el-form-item>
<el-divider><span style="color: #F56C6C;">用户需填写区域</span></el-divider> <el-divider><span style="color: #F56C6C;">用户需填写区域</span></el-divider>
<el-form-item label="信源类型" prop="normCollectInfo.refer_type">
<el-select v-model="state.normCollectInfo.refer_type" placeholder="请选择信源等级" :disabled="true">
<el-option label="官网/政府" value="1"></el-option>
<el-option label="权威媒体" value="2"></el-option>
<el-option label="其他可信信源" value="3"></el-option>
</el-select>
</el-form-item>
<el-form-item label="标题" :prop="'userFilled.' + index+ '.name'" v-for="(item, index) in state.formItem.userFilled" :key="index"> <el-form-item label="标题" :prop="'userFilled.' + index+ '.name'" v-for="(item, index) in state.formItem.userFilled" :key="index">
<el-input v-model="item.name" placeholder="请输入标题" clearable style="width: 30%;" :disabled="true"></el-input> <el-input v-model="item.name" placeholder="请输入标题" clearable style="width: 30%;" :disabled="true"></el-input>
<div style="width: 10%;"><span style="color: red;" v-if="item.radio==1">*</span>内容:</div> <div style="width: 10%;"><span style="color: red;" v-if="item.radio==1">*</span>内容:</div>
<el-input v-model="item.value" placeholder="请填写内容" style="width: 60%;" required :disabled="true"></el-input> <el-input v-model="item.value" placeholder="请填写内容" style="width: 60%;" required :disabled="true"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="用户截图" prop="state.srcList">
<el-input v-model="state.formItem.addItem.remark" placeholder="请输入备注" clearable :disabled="true"></el-input> <span v-if="state.imgHide==false"></span>
</el-form-item> <div class="demo-image__preview" v-for='item in state.srcList' style="margin:10px" v-if="state.imgHide">
<el-form-item label="用户截图" prop="remark">
<div class="demo-image__preview" v-for='item in state.srcList' style="margin:10px">
<el-image style="width: 150px; height: 150px" :preview-src-list="state.srcList" :src="item"></el-image> <el-image style="width: 150px; height: 150px" :preview-src-list="state.srcList" :src="item"></el-image>
</div> </div>
</el-form-item> </el-form-item>
...@@ -63,6 +64,7 @@ const emit = defineEmits(['refresh']); ...@@ -63,6 +64,7 @@ const emit = defineEmits(['refresh']);
const dialogFormRef = ref(); const dialogFormRef = ref();
const router = useRouter(); const router = useRouter();
const state = reactive({ const state = reactive({
imgHide:false,
url: '', url: '',
srcList: [ srcList: [
], ],
...@@ -91,6 +93,7 @@ const state = reactive({ ...@@ -91,6 +93,7 @@ const state = reactive({
dynamicItem: [], dynamicItem: [],
userFilled: [] userFilled: []
}, },
normCollectInfo:{},
}); });
// 打开弹窗 // 打开弹窗
...@@ -106,7 +109,6 @@ const openDialog = (data) => { ...@@ -106,7 +109,6 @@ const openDialog = (data) => {
let addItem = res.data.addItem; let addItem = res.data.addItem;
let userFilled = res.data.userFilled; let userFilled = res.data.userFilled;
let adminFilled = res.data.adminFilled; let adminFilled = res.data.adminFilled;
let normCollectInfo = res.data.normCollectInfo;
// 数据详情 // 数据详情
state.formItem.addItem.task_id = addItem.task_id; state.formItem.addItem.task_id = addItem.task_id;
...@@ -118,12 +120,6 @@ const openDialog = (data) => { ...@@ -118,12 +120,6 @@ const openDialog = (data) => {
state.formItem.addItem.guide = addItem.guide; state.formItem.addItem.guide = addItem.guide;
state.userIndex = 0; state.userIndex = 0;
state.index = 0; state.index = 0;
if(normCollectInfo)
{
state.formItem.addItem.refer_type = normCollectInfo.refer_type;
state.formItem.addItem.remark = normCollectInfo.remark;
state.srcList = normCollectInfo.imgPath.split(',')
}
userFilled.forEach(item => { userFilled.forEach(item => {
state.formItem.userFilled.push({id:item.id,name:item.extend_name,radio:item.required+"",value:item.extend_value}); state.formItem.userFilled.push({id:item.id,name:item.extend_name,radio:item.required+"",value:item.extend_value});
state.userIndex++ state.userIndex++
...@@ -132,6 +128,17 @@ const openDialog = (data) => { ...@@ -132,6 +128,17 @@ const openDialog = (data) => {
state.formItem.dynamicItem.push({id:item.id,name:item.extend_name,value:item.extend_value,}); state.formItem.dynamicItem.push({id:item.id,name:item.extend_name,value:item.extend_value,});
state.index++ state.index++
}); });
if(res.data.normCollectInfo){
state.normCollectInfo = res.data.normCollectInfo
state.refer_type = res.data.normCollectInfo.refer_type
if(state.normCollectInfo.imgPath !=""){
state.imgHide=true
state.srcList = state.normCollectInfo.imgPath.split(',')
}
if(state.normCollectInfo.remark!=""){
state.collectInfo = true
}
}
}).catch(() => { }).catch(() => {
}) })
...@@ -214,4 +221,20 @@ onMounted(() => { ...@@ -214,4 +221,20 @@ onMounted(() => {
align-content: center; align-content: center;
} }
/** el-input disabled时的背景和边框*/
.el-input.is-disabled{
background:#fff !important;
color: var(--el-radio-text-color) !important;
-webkit-text-fill-color: var(--el-radio-text-color) !important;
}
:deep(.el-input .el-input__inner){
background:#fff !important;
color: var(--el-radio-text-color) !important;
-webkit-text-fill-color: var(--el-radio-text-color) !important;
}
:deep(.el-input .el-input__wrapper){
background:#fff !important;
color: var(--el-radio-text-color) !important;
-webkit-text-fill-color: var(--el-radio-text-color) !important;
}
</style> </style>
...@@ -10,6 +10,10 @@ ...@@ -10,6 +10,10 @@
<el-option v-for="(item, index) in state.taskList" :key="index" :label="item.name" <el-option v-for="(item, index) in state.taskList" :key="index" :label="item.name"
:value="item.id"></el-option> :value="item.id"></el-option>
</el-select> </el-select>
<el-select v-model="state.apiListParam.user_id" placeholder="请选择用户" size="default" @change="searchChange" clearable filterable style="width:200px;margin-right: 20px;">
<el-option v-for="(item, index) in state.userList" :key="index" :label="item.name"
:value="item.id"></el-option>
</el-select>
<el-button size="default" type="primary" @click="searchChange()" >查询</el-button> <el-button size="default" type="primary" @click="searchChange()" >查询</el-button>
</div> </div>
...@@ -18,7 +22,7 @@ ...@@ -18,7 +22,7 @@
<div class="page-main" v-loading="state.tableData.loading" ref="pageMain"> <div class="page-main" v-loading="state.tableData.loading" ref="pageMain">
<el-card shadow="hover" style="height:100%;"> <el-card shadow="hover" style="height:100%;">
<el-button size="default" type="danger" @click="settlementIndicators" style="margin-bottom: 10px;">结算</el-button> <el-button size="default" type="danger" @click="settlementIndicators" style="margin-bottom: 10px;">结算</el-button>
<el-table :data="state.tableData.data" border style="width: 100%" :height="state.tableHeight" <el-table :data="state.tableData.data" style="width: 100%" :height="state.tableHeight"
ref="multipleTableRef" @selection-change="tableSelection"> ref="multipleTableRef" @selection-change="tableSelection">
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
<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>
...@@ -56,6 +60,17 @@ ...@@ -56,6 +60,17 @@
<el-tag type='info' v-if="scope.row.status==4" effect="plain" size="small">已结算</el-tag> <el-tag type='info' v-if="scope.row.status==4" effect="plain" size="small">已结算</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="not_collectible" label="是否可采集" show-overflow-tooltip align="center">
<template #default="scope">
<span style="color: #F56C6C" v-if="scope.row.not_collectible==1" effect="plain" size="small">{{scope.row.not_collectible_remarks}}</span>
<span style="color: #909399" v-else effect="plain" size="small"></span>
</template>
</el-table-column>
<el-table-column prop="review_remarks" label="审核备注" show-overflow-tooltip align="center">
<template #default="scope">
<span style="color: #409EFF;" effect="plain" size="small">{{scope.row.review_remarks}}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="300" fixed="right" align="center"> <el-table-column label="操作" width="300" fixed="right" align="center">
<template #default="scope"> <template #default="scope">
<el-button size="small" @click="details(scope.row)">查看详情</el-button> <el-button size="small" @click="details(scope.row)">查看详情</el-button>
...@@ -83,6 +98,7 @@ import { getCurrentInstance } from 'vue'; ...@@ -83,6 +98,7 @@ import { getCurrentInstance } from 'vue';
import { claimTasksApi } from '/@/api/claimTasks/index'; import { claimTasksApi } from '/@/api/claimTasks/index';
import { normOrdersApi } from '/@/api/normOrders/index'; import { normOrdersApi } from '/@/api/normOrders/index';
import { taskPackageApi } from '/@/api/taskPackage/index'; import { taskPackageApi } from '/@/api/taskPackage/index';
import { systemApi } from '/@/api/system/index';
import { ElMessageBox, ElMessage } from 'element-plus'; import { ElMessageBox, ElMessage } from 'element-plus';
import { Session } from '/@/utils/storage'; import { Session } from '/@/utils/storage';
// 引入组件 // 引入组件
...@@ -99,6 +115,8 @@ const state = reactive({ ...@@ -99,6 +115,8 @@ const state = reactive({
name: '', name: '',
status:3, status:3,
task_id:'', task_id:'',
admin:1,
user_id:'',
}, },
// 任务领取参数 // 任务领取参数
apiAuditingParam: { apiAuditingParam: {
...@@ -118,6 +136,7 @@ const state = reactive({ ...@@ -118,6 +136,7 @@ const state = reactive({
normListExtend:[], normListExtend:[],
testIndex:0, testIndex:0,
taskList:[], taskList:[],
userList:[],
}); });
// 获取任务列表 // 获取任务列表
...@@ -126,9 +145,15 @@ const getTaskList = () => { ...@@ -126,9 +145,15 @@ const getTaskList = () => {
state.taskList = res.data state.taskList = res.data
}) })
} }
const getUserList = () => {
systemApi().systemUserList({page:-1,limit:-1}).then(res => {
state.userList = res.data
})
}
// 页面加载时 // 页面加载时
onMounted(() => { onMounted(() => {
getTaskList() getTaskList()
getUserList()
getList() getList()
state.tableHeight = getCurrentInstance().refs.pageMain.offsetHeight - 130 - 52 + "px"; state.tableHeight = getCurrentInstance().refs.pageMain.offsetHeight - 130 - 52 + "px";
}); });
...@@ -181,10 +206,11 @@ const tableSelection = (val) => { ...@@ -181,10 +206,11 @@ const tableSelection = (val) => {
if(val){ if(val){
state.apinormOrdersParam.list = []; state.apinormOrdersParam.list = [];
val.forEach(item => { val.forEach(item => {
state.apinormOrdersParam.list.push({user_id:item.user_id,norm_receives_id:item.id}); state.apinormOrdersParam.list.push({user_id:item.user_id,norm_receives_id:item.id,not_collectible:item.not_collectible});
}); });
} }
} }
// 获取列表 // 获取列表
const getList = () => { const getList = () => {
state.tableData.loading = true state.tableData.loading = true
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<div class="page-main" v-loading="state.tableData.loading" ref="pageMain"> <div class="page-main" v-loading="state.tableData.loading" ref="pageMain">
<el-card shadow="hover" style="height:100%;"> <el-card shadow="hover" style="height:100%;">
<el-table :data="state.tableData.data" border 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="norm_list_info.name" label="指标名称" show-overflow-tooltip align="center"> <el-table-column prop="norm_list_info.name" label="指标名称" show-overflow-tooltip align="center">
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<div class="page-main" v-loading="state.tableData.loading" ref="pageMain"> <div class="page-main" v-loading="state.tableData.loading" ref="pageMain">
<el-card shadow="hover" style="height:100%;"> <el-card shadow="hover" style="height:100%;">
<el-table :data="state.tableData.data" border 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 label="序号" prop="id" width="100" show-overflow-tooltip align="center"></el-table-column> <el-table-column label="序号" prop="id" width="100" show-overflow-tooltip align="center"></el-table-column>
......
...@@ -37,18 +37,21 @@ ...@@ -37,18 +37,21 @@
<el-input v-model="item.name" placeholder="请输入标题" clearabl :disabled="true"></el-input> <el-input v-model="item.name" placeholder="请输入标题" clearabl :disabled="true"></el-input>
</el-col> </el-col>
<el-col :span="2"> <el-col :span="2">
内容: <span style="color: red;" v-if="item.radio==1">*</span>内容:
</el-col> </el-col>
<el-col :span="15"> <el-col :span="13">
<el-input v-model="item.value" placeholder="请填写内容" required :disabled="true"></el-input> <el-input v-model="item.value" placeholder="请填写内容" required :disabled="true"></el-input>
</el-col> </el-col>
<el-col :span="2">
<span style="color: red;" v-if="item.radio==1">必填</span>
</el-col>
</el-row> </el-row>
<el-row style="width: 100% !important; margin-left: -8%; margin-top: 10 !important;"> <el-row style="width: 100% !important; margin-left: -8%; margin-top: 10 !important;">
<el-col :span="2"> <el-col :span="2">
<div>备注:</div> <div>备注:</div>
</el-col> </el-col>
<el-col :span="22"> <el-col :span="22">
<el-input v-model="item.remarks" placeholder="请输入备注(选填)" clearabl :disabled="true" ></el-input> <el-input v-model="item.remark" placeholder="请输入备注(选填)" clearabl :disabled="true"></el-input>
</el-col> </el-col>
</el-row> </el-row>
</el-form-item> </el-form-item>
...@@ -176,7 +179,7 @@ const openDialog = (data) => { ...@@ -176,7 +179,7 @@ const openDialog = (data) => {
state.userIndex = 0; state.userIndex = 0;
state.index = 0; state.index = 0;
userFilled.forEach(item => { userFilled.forEach(item => {
state.formItem.userFilled.push({id:item.id,name:item.extend_name,radio:item.required+"",value:item.extend_value,remarks:item.extend_remarks,}); state.formItem.userFilled.push({id:item.id,name:item.extend_name,radio:item.required+"",value:item.extend_value,remark:item.extend_remarks,});
state.userIndex++ state.userIndex++
}); });
adminFilled.forEach(item => { adminFilled.forEach(item => {
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<div class="page-main" v-loading="state.tableData.loading" ref="pageMain"> <div class="page-main" v-loading="state.tableData.loading" ref="pageMain">
<el-card shadow="hover" style="height:100%;"> <el-card shadow="hover" style="height:100%;">
<el-table :data="state.tableData.data" border 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="norm_list_info.name" label="指标名称" show-overflow-tooltip align="center"> <el-table-column prop="norm_list_info.name" label="指标名称" show-overflow-tooltip align="center">
...@@ -47,7 +47,17 @@ ...@@ -47,7 +47,17 @@
<el-tag type='info' v-if="scope.row.status==4" effect="plain" size="small">已结算</el-tag> <el-tag type='info' v-if="scope.row.status==4" effect="plain" size="small">已结算</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="review_remarks" label="审核备注" show-overflow-tooltip align="center"></el-table-column> <el-table-column prop="not_collectible" label="是否可采集" show-overflow-tooltip align="center">
<template #default="scope">
<span style="color: #F56C6C" v-if="scope.row.not_collectible==1" effect="plain" size="small">{{scope.row.not_collectible_remarks}}</span>
<span style="color: #909399" v-else effect="plain" size="small"></span>
</template>
</el-table-column>
<el-table-column prop="review_remarks" label="审核备注" show-overflow-tooltip align="center">
<template #default="scope">
<span style="color: #409EFF;" effect="plain" size="small">{{scope.row.review_remarks}}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="350" fixed="right" align="center"> <el-table-column label="操作" width="350" fixed="right" align="center">
<template #default="scope"> <template #default="scope">
<div v-if="scope.row.status == 0 || scope.row.status == 1 || scope.row.status == 2"> <div v-if="scope.row.status == 0 || scope.row.status == 1 || scope.row.status == 2">
......
...@@ -26,9 +26,28 @@ ...@@ -26,9 +26,28 @@
</el-form-item> </el-form-item>
<el-divider><span style="color: #F56C6C;">用户需填写区域</span></el-divider> <el-divider><span style="color: #F56C6C;">用户需填写区域</span></el-divider>
<el-form-item label="标题" :prop="'userFilled.' + index+ '.name'" v-for="(item, index) in state.formItem.userFilled" :key="index"> <el-form-item label="标题" :prop="'userFilled.' + index+ '.name'" v-for="(item, index) in state.formItem.userFilled" :key="index">
<el-input v-model="item.name" placeholder="请输入标题" clearable style="width: 30%;" :disabled="true"></el-input> <el-row style="width: 100% !important;">
<div style="width: 10%;"><span style="color: red;" v-if="item.radio==1">*</span>内容:</div> <el-col :span="7">
<el-input v-model="item.value" placeholder="请填写内容" style="width: 60%;" required></el-input> <el-input v-model="item.name" placeholder="请输入标题" clearabl :disabled="true"></el-input>
</el-col>
<el-col :span="2">
<span style="color: red;" v-if="item.radio==1">*</span>内容:
</el-col>
<el-col :span="13">
<el-input v-model="item.value" placeholder="请填写内容" required></el-input>
</el-col>
<el-col :span="2">
<span style="color: red;" v-if="item.radio==1">必填</span>
</el-col>
</el-row>
<el-row style="width: 100% !important; margin-left: -8%; margin-top: 10 !important;">
<el-col :span="2">
<div>备注:</div>
</el-col>
<el-col :span="22">
<el-input v-model="item.remark" placeholder="请输入备注(选填)" clearabl :disabled="true"></el-input>
</el-col>
</el-row>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="state.formItem.addItem.remark" placeholder="请输入备注" clearable></el-input> <el-input v-model="state.formItem.addItem.remark" placeholder="请输入备注" clearable></el-input>
...@@ -55,7 +74,7 @@ ...@@ -55,7 +74,7 @@
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="closeDialog()" size="default">取 消</el-button> <el-button @click="closeDialog()" size="default">取 消</el-button>
<el-button type="primary" :loading="state.btnLoading" @click="onSubmit(dialogFormRef)" <el-button type="primary" :loading="state.btnLoading" @click="onSubmit(dialogFormRef)"
size="default">确认</el-button> size="default">提交</el-button>
</span> </span>
</template> </template>
</el-dialog> </el-dialog>
......
...@@ -29,9 +29,28 @@ ...@@ -29,9 +29,28 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="标题" :prop="'userFilled.' + index+ '.name'" v-for="(item, index) in state.formItem.userFilled" :key="index"> <el-form-item label="标题" :prop="'userFilled.' + index+ '.name'" v-for="(item, index) in state.formItem.userFilled" :key="index">
<el-input v-model="item.name" placeholder="请输入标题" clearable style="width: 30%;" :disabled="true"></el-input> <el-row style="width: 100% !important;">
<div style="width: 10%;"><span style="color: red;" v-if="item.radio==1">*</span>内容:</div> <el-col :span="7">
<el-input v-model="item.value" placeholder="请填写内容" style="width: 60%;" required></el-input> <el-input v-model="item.name" placeholder="请输入标题" clearabl :disabled="true"></el-input>
</el-col>
<el-col :span="2">
<span style="color: red;" v-if="item.radio==1">*</span>内容:
</el-col>
<el-col :span="13">
<el-input v-model="item.value" placeholder="请填写内容" required></el-input>
</el-col>
<el-col :span="2">
<span style="color: red;" v-if="item.radio==1">必填</span>
</el-col>
</el-row>
<el-row style="width: 100% !important; margin-left: -8%; margin-top: 10 !important;">
<el-col :span="2">
<div>备注:</div>
</el-col>
<el-col :span="22">
<el-input v-model="item.remark" placeholder="请输入备注(选填)" clearabl :disabled="true"></el-input>
</el-col>
</el-row>
</el-form-item> </el-form-item>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="state.formItem.addItem.remark" placeholder="请输入备注" clearable></el-input> <el-input v-model="state.formItem.addItem.remark" placeholder="请输入备注" clearable></el-input>
...@@ -55,12 +74,23 @@ ...@@ -55,12 +74,23 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
<template #footer> <template #footer>
<el-row style="width: 100% !important;">
<el-col :span="12">
<span class="dialog-footer">
<el-col :span="20">
<el-input v-model="state.notCollectibleData.reason" placeholder="请输入不可采集原因" clearable></el-input><el-button type="warning" :loading="state.btnLoading" @click="notCollectible()" size="danger">不可采集</el-button>
</el-col>
</span>
</el-col>
<el-col :span="12">
<span class="dialog-footer"> <span class="dialog-footer">
<el-button @click="closeDialog()" size="default">取 消</el-button> <el-button @click="closeDialog()" size="default">取 消</el-button>
<el-button @click="preserve()" size="default" type="primary">保存</el-button> <el-button @click="preserve()" size="default" type="primary">保存</el-button>
<el-button type="primary" :loading="state.btnLoading" @click="onSubmit(dialogFormRef)" <el-button type="primary" :loading="state.btnLoading" @click="onSubmit(dialogFormRef)"
size="danger">提交</el-button> size="danger">提交</el-button>
</span> </span>
</el-col>
</el-row>
</template> </template>
</el-dialog> </el-dialog>
</div> </div>
...@@ -86,6 +116,10 @@ const state = reactive({ ...@@ -86,6 +116,10 @@ const state = reactive({
apiData: { apiData: {
id:'', id:'',
}, },
notCollectibleData:{
id:'',
reason:'',
},
rules: { rules: {
refer_type: [{ required: true, message: '请输入选择信源类型', trigger: 'blur' }], refer_type: [{ required: true, message: '请输入选择信源类型', trigger: 'blur' }],
}, },
...@@ -106,7 +140,7 @@ const state = reactive({ ...@@ -106,7 +140,7 @@ const state = reactive({
], ],
editorImgList:[], // 富文本里的内容 editorImgList:[], // 富文本里的内容
editorContent:'', // 富文本所有内容 editorContent:'', // 富文本所有内容
} },
}); });
// 编辑器实例,必须用 shallowRef // 编辑器实例,必须用 shallowRef
const editorRef = shallowRef() const editorRef = shallowRef()
...@@ -155,6 +189,50 @@ const handleCreated = (editor) => { ...@@ -155,6 +189,50 @@ const handleCreated = (editor) => {
editorRef.value = editor // 记录 editor 实例,重要! editorRef.value = editor // 记录 editor 实例,重要!
} }
// 数据不可采集
const notCollectible = () =>{
const editor = editorRef.value;
if(state.notCollectibleData.id ==""){
ElMessage.error('无法获取ID!');
return;
}
if(state.notCollectibleData.reason ==""){
ElMessage.error('请填写不可采集的原因!');
return;
}
claimTasksApi().notCollectible(state.notCollectibleData).then(res => {
// 获取富文本里的图片地址
editor.getElemsByType("image").forEach((item, index) => {
state.formItem.editorImgList.push(item.src);
})
state.formItem.editorContent = editor.getHtml() // 获取富文本内容
let apiIndex = 1;
if(state.formItem.editorImgList.length>2){
apiIndex++;
state.formItem.editorImgList = [];
ElMessage.error('只允许上传两张图片!');
}
if(apiIndex==1){
claimTasksApi().normCollectsAdd(JSON.stringify(state.formItem)).then(res => {
editor.clear()
state.btnLoading = false
ElMessage.success('操作成功');
closeDialog();
emit('refresh');
}).catch(() => {
editor.clear()
state.btnLoading = false
closeDialog();
emit('refresh');
})
}
}).catch(() => {
editor.clear()
state.btnLoading = false
closeDialog();
emit('refresh');
})
}
// 保存数据 // 保存数据
const preserve = () =>{ const preserve = () =>{
...@@ -163,6 +241,7 @@ const preserve = () =>{ ...@@ -163,6 +241,7 @@ const preserve = () =>{
state.formItem.editorImgList.push(item.src); state.formItem.editorImgList.push(item.src);
}) })
let query = { let query = {
norm_id:state.apiData.norm_id,
norm_receive_id:state.apiData.id, norm_receive_id:state.apiData.id,
content:JSON.stringify(state.formItem), content:JSON.stringify(state.formItem),
editor:editor.getHtml() editor:editor.getHtml()
...@@ -181,6 +260,7 @@ const preserve = () =>{ ...@@ -181,6 +260,7 @@ const preserve = () =>{
}) })
} }
// 提交数据 // 提交数据
const onSubmit = () => { const onSubmit = () => {
dialogFormRef.value.validate((valid, fields) => { dialogFormRef.value.validate((valid, fields) => {
...@@ -203,7 +283,6 @@ const onSubmit = () => { ...@@ -203,7 +283,6 @@ const onSubmit = () => {
} }
} }
} }
console.log(state.formItem.editorImgList.length+'--------------------------')
if(state.formItem.editorImgList.length>2){ if(state.formItem.editorImgList.length>2){
apiIndex++; apiIndex++;
state.formItem.editorImgList = []; state.formItem.editorImgList = [];
...@@ -233,10 +312,11 @@ const openDialog = (data) => { ...@@ -233,10 +312,11 @@ const openDialog = (data) => {
state.dialog.title = '指标详情'; state.dialog.title = '指标详情';
// 清空数据 // 清空数据
wipeData(); wipeData();
console.log(data)
state.apiData.id = data.id; state.apiData.id = data.id;
state.apiData.norm_id = data.norm_id;
state.formItem.addItem.norm_list_id = data.norm_list_id state.formItem.addItem.norm_list_id = data.norm_list_id
state.formItem.addItem.norm_receive_id = data.id; state.formItem.addItem.norm_receive_id = data.id;
state.notCollectibleData.id = data.id
claimTasksApi().normCollectsGetPreserve(state.apiData).then(res => { claimTasksApi().normCollectsGetPreserve(state.apiData).then(res => {
if(res.data){ if(res.data){
originalData(res.data); originalData(res.data);
...@@ -296,7 +376,7 @@ const newData= (data) => { ...@@ -296,7 +376,7 @@ const newData= (data) => {
state.userIndex = 0; state.userIndex = 0;
state.index = 0; state.index = 0;
userFilled.forEach(item => { userFilled.forEach(item => {
state.formItem.userFilled.push({id:item.id,name:item.extend_name,radio:item.required+"",value:'',remark:item.extend_remark,}); state.formItem.userFilled.push({id:item.id,name:item.extend_name,radio:item.required+"",value:'',remark:item.extend_remarks,});
state.userIndex++ state.userIndex++
}); });
adminFilled.forEach(item => { adminFilled.forEach(item => {
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<div class="page-main" v-loading="state.tableData.loading" ref="pageMain"> <div class="page-main" v-loading="state.tableData.loading" ref="pageMain">
<el-card shadow="hover" style="height:100%;"> <el-card shadow="hover" style="height:100%;">
<el-table :data="state.tableData.data" border 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="norm_list_info.name" label="指标名称" show-overflow-tooltip align="center"> <el-table-column prop="norm_list_info.name" label="指标名称" show-overflow-tooltip align="center">
......
<template>
<div class="system-menu-container">
<div class="breadcrumb-box">
<Breadcrumb />
</div>
<div class="header-search flex space-between">
<div>
<el-input class="search-item" placeholder="输入指标名称" v-model="state.apiListParam.name" size="default"
style="width: 220px;" clearable @change="searchChange()">
</el-input>
<el-button size="default" type="primary" @click="searchChange()" >查询</el-button>
<el-button size="default" @click="reset()" >重置</el-button>
</div>
</div>
<div class="page-main" v-loading="state.tableData.loading" ref="pageMain">
<el-card shadow="hover" style="height:100%;">
<el-button size="default" type="danger" @click="batchSelection" style="margin-bottom: 10px;">领取</el-button>
<!-- <el-table :data="state.tableData.data" style="width: 100%" :height="state.tableHeight"
ref="multipleTableRef" @selection-change="tableSelection">
<el-table-column type="selection" width="55" />
<el-table-column label="序号" type="index" width="100" show-overflow-tooltip align="center"></el-table-column>
<el-table-column prop="taskPackageInfo.name" label="任务名称" show-overflow-tooltip align="center">
</el-table-column>
<el-table-column prop="name" label="指标名称" show-overflow-tooltip align="center">
</el-table-column>
<el-table-column prop="sort" label="优先级" show-overflow-tooltip align="center">
<template #default="scope">
<span style="color: #909399;" v-if="scope.row.sort=='1'"></span>
<span style="color: #409EFF;" v-if="scope.row.sort=='2'"></span>
<span style="color: #F56C6C;" v-if="scope.row.sort=='3'"></span>
</template>
</el-table-column>
<el-table-column prop="level" label="难度等级" show-overflow-tooltip align="center"></el-table-column>
<el-table-column prop="refer" label="信源" show-overflow-tooltip align="center">
<template #default="scope">
<el-link type="danger" v-if="checkUrl(scope.row.refer)" :href="scope.row.refer" target ="_blank">点击查看</el-link>
<span v-else>{{scope.row.refer}}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="180" fixed="right" align="center">
<template #default="scope">
<el-button size="small" @click="receive(scope.row)" type="primary">领取</el-button>
<el-button size="small" @click="details(scope.row)">查看</el-button>
</template>
</el-table-column>
</el-table> -->
<el-table :data="state.customTableData" border style="width: 100%" :height="state.tableHeight"
ref="multipleTableRef">
<el-table-column type="selection" width="55" />
<el-table-column v-for="column in state.customColumns" :key="column.prop" :label="column.label" :prop="column.prop" show-overflow-tooltip align="center">
<template #default="scope">
<span>{{scope.row[column.prop]}}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="180" fixed="right" align="center">
<template #default="scope">
<el-button size="small" @click="receive(scope.row)" type="primary">领取</el-button>
<el-button size="small" @click="details(scope.row.data)">查看</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]" 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>
<DetailDialog ref="DetailDialogRef" @refresh="getList()" />
</div>
</template>
<script setup name="taskPackage-list">
import { getCurrentInstance } from 'vue';
import { claimTasksApi } from '/@/api/claimTasks/index';
import { ElMessageBox, ElMessage } from 'element-plus';
import { Session } from '/@/utils/storage';
// 引入组件
const Breadcrumb = defineAsyncComponent(() => import('/@/layout/navBars/breadcrumb/breadcrumb.vue'));
const DetailDialog = defineAsyncComponent(() => import('/@/views/claimTasks/user/list/dialog.vue'));
// 定义变量内容
const DetailDialogRef = ref()
const state = reactive({
// 查询列表参数
apiListParam: {
page: 1,
limit: 10,
name: '',
receives:1,
},
// 任务领取参数
apiReceiveParam: {
task_id: '',
norm_id: '',
norm_list_id: '',
user_id: '',
},
tableData: {
data: [],
loading: false,
total: 0
},
tableHeight: '30vh',
normListExtend:[],
testIndex:0,
// 结算任务
claimTasksParam:[],
customTableData:[],
customColumns:[],
});
// 页面加载时
onMounted(() => {
// getDepatment()
getList()
state.tableHeight = getCurrentInstance().refs.pageMain.offsetHeight - 130 - 52 + "px";
});
//校验链接
const checkUrl = (vlaue) =>{
if (/^https?:\/\//.test(vlaue)) {
return true;
} else {
return false;
}
}
//多选
const tableSelection = (val) => {
if(val){
state.claimTasksParam = [];
val.forEach(item => {
state.claimTasksParam.push({norm_id:item.norm_id,task_id:item.task_id,norm_list_id:item.id,user_id:Session.get('userInfo').id});
});
}
}
//批量领取
const batchSelection= () => {
claimTasksApi().batchAdd(JSON.stringify(state.claimTasksParam)).then(res => {
getList();
ElMessage.success('任务领取成功!');
state.claimTasksParam = [];
}).catch(() => {
state.claimTasksParam = [];
state.tableData.loading = false
})
getList();
}
/**
* 搜索按钮
*/
const test = () => {
return state.testIndex+1;
}
/**
* 搜索按钮
*/
const searchChange = () => {
state.apiListParam.page = 1
getList()
}
/**
* 重置按钮
*/
const reset = () => {
state.apiListParam.page = 1
state.apiListParam.name = '';
getList()
}
// 分页改变
const onHandleSizeChange = (val) => {
state.apiListParam.limit = val;
getList();
};
const onHandleCurrentChange = (val) => {
state.apiListParam.page = val;
getList();
};
// 获取列表
const getList = () => {
state.customColumns = [];
state.customTableData = [];
state.tableData.loading = true
claimTasksApi().claimTasksList(state.apiListParam).then(res => {
state.tableData.loading = false
let data =res.data.data;
let arr = [
{ label:'序号', prop: 'index'},
// { label:'ID', prop: 'id'},
{ label:'任务名称', prop: 'taskPackageInfo.name',},
{ label:'指标名称', prop: 'name'},
{ label:'优先级', prop: 'sort'},
{ label:'难度等级', prop: 'level'},
{ label:'信源', prop: 'refer'},
{ label:'数据', prop: 'data'},
];
state.customColumns = arr
data.forEach(function(item, index, arr) {
let list = {
'index': index+1,
// 'id':item.id,
'taskPackageInfo.name': item.taskPackageInfo.name,
'name': item.name,
'sort.name': item.sort,
'sort': item.sort,
'level': item.level,
'refer': item.refer,
'data': item,
}
state.customTableData.push(list);
console.log(item)
});
state.tableData.data = res.data.data
state.tableData.total = res.data.total
}).catch(() => {
state.tableData.loading = false
})
}
/**
* 点击领取任务
*/
const receive = (data) => {
state.apiReceiveParam.norm_id = data.norm_id
state.apiReceiveParam.task_id = data.task_id
state.apiReceiveParam.norm_list_id =data.id
state.apiReceiveParam.user_id =Session.get('userInfo').id;
claimTasksApi().receive(state.apiReceiveParam).then(res => {
getList();
ElMessage.success('任务领取成功!');
}).catch(() => {
state.tableData.loading = false
})
getList();
}
/**
* 点击查看
*/
const details = (data) => {
console.log(data)
DetailDialogRef.value.openDialog(data);
}
</script>
<style lang="scss" scoped>
.page-main {
height: calc(100vh - 50px - 106px);
}
</style>
...@@ -6,6 +6,10 @@ ...@@ -6,6 +6,10 @@
<div class="header-search flex space-between"> <div class="header-search flex space-between">
<div> <div>
<el-select v-model="state.apiListParam.task_id" placeholder="请选择任务" size="default" @change="searchChange" clearable filterable style="width:200px;margin-right: 20px;">
<el-option v-for="(item, index) in state.taskList" :key="index" :label="item.name"
:value="item.id"></el-option>
</el-select>
<el-input class="search-item" placeholder="输入指标名称" v-model="state.apiListParam.name" size="default" <el-input class="search-item" placeholder="输入指标名称" v-model="state.apiListParam.name" size="default"
style="width: 220px;" clearable @change="searchChange()"> style="width: 220px;" clearable @change="searchChange()">
</el-input> </el-input>
...@@ -17,11 +21,11 @@ ...@@ -17,11 +21,11 @@
<div class="page-main" v-loading="state.tableData.loading" ref="pageMain"> <div class="page-main" v-loading="state.tableData.loading" ref="pageMain">
<el-card shadow="hover" style="height:100%;"> <el-card shadow="hover" style="height:100%;">
<el-button size="default" type="danger" @click="batchSelection" style="margin-bottom: 10px;">领取</el-button> <el-button size="default" type="danger" @click="batchSelection" style="margin-bottom: 10px;">领取</el-button>
<el-table :data="state.tableData.data" border style="width: 100%" :height="state.tableHeight" <el-table :data="state.tableData.data" style="width: 100%" :height="state.tableHeight"
ref="multipleTableRef" @selection-change="tableSelection"> ref="multipleTableRef" @selection-change="tableSelection">
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
<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="taskPackageInfo.name" label="任务名称" show-overflow-tooltip align="center"> <el-table-column prop="taskPackageInfo.name" label="任务名称1" show-overflow-tooltip align="center">
</el-table-column> </el-table-column>
<el-table-column prop="name" label="指标名称" show-overflow-tooltip align="center"> <el-table-column prop="name" label="指标名称" show-overflow-tooltip align="center">
</el-table-column> </el-table-column>
...@@ -34,13 +38,6 @@ ...@@ -34,13 +38,6 @@
</el-table-column> </el-table-column>
<el-table-column prop="level" label="难度等级" show-overflow-tooltip align="center"></el-table-column> <el-table-column prop="level" label="难度等级" show-overflow-tooltip align="center"></el-table-column>
<!-- <el-table-column v-for="item in state.normListExtend[test()-1]" :key="item.id" :prop="item.id"
:label="item.extend_name">{{ item.extend_value }}
</el-table-column> -->
<!--
<el-table-column prop="city_id" label="地区" show-overflow-tooltip align="center"></el-table-column>
<el-table-column prop="year" label="时间" show-overflow-tooltip align="center"></el-table-column> -->
<el-table-column prop="refer" label="信源" show-overflow-tooltip align="center"> <el-table-column prop="refer" label="信源" show-overflow-tooltip align="center">
<template #default="scope"> <template #default="scope">
<el-link type="danger" v-if="checkUrl(scope.row.refer)" :href="scope.row.refer" target ="_blank">点击查看</el-link> <el-link type="danger" v-if="checkUrl(scope.row.refer)" :href="scope.row.refer" target ="_blank">点击查看</el-link>
...@@ -75,6 +72,7 @@ ...@@ -75,6 +72,7 @@
import { getCurrentInstance } from 'vue'; import { getCurrentInstance } from 'vue';
import { claimTasksApi } from '/@/api/claimTasks/index'; import { claimTasksApi } from '/@/api/claimTasks/index';
import { ElMessageBox, ElMessage } from 'element-plus'; import { ElMessageBox, ElMessage } from 'element-plus';
import { taskPackageApi } from '/@/api/taskPackage/index';
import { Session } from '/@/utils/storage'; import { Session } from '/@/utils/storage';
// 引入组件 // 引入组件
const Breadcrumb = defineAsyncComponent(() => import('/@/layout/navBars/breadcrumb/breadcrumb.vue')); const Breadcrumb = defineAsyncComponent(() => import('/@/layout/navBars/breadcrumb/breadcrumb.vue'));
...@@ -89,6 +87,8 @@ const state = reactive({ ...@@ -89,6 +87,8 @@ const state = reactive({
limit: 10, limit: 10,
name: '', name: '',
receives:1, receives:1,
task_id:'',
sort:'desc',
}, },
// 任务领取参数 // 任务领取参数
apiReceiveParam: { apiReceiveParam: {
...@@ -107,12 +107,19 @@ const state = reactive({ ...@@ -107,12 +107,19 @@ const state = reactive({
testIndex:0, testIndex:0,
// 结算任务 // 结算任务
claimTasksParam:[], claimTasksParam:[],
taskList:[],
}); });
// 获取任务列表
const getTaskList = () => {
taskPackageApi().taskPackageList({page:-1,limit:-1}).then(res => {
state.taskList = res.data
})
}
// 页面加载时 // 页面加载时
onMounted(() => { onMounted(() => {
// getDepatment() // getDepatment()
getList() getList()
getTaskList();
state.tableHeight = getCurrentInstance().refs.pageMain.offsetHeight - 130 - 52 + "px"; state.tableHeight = getCurrentInstance().refs.pageMain.offsetHeight - 130 - 52 + "px";
}); });
...@@ -191,8 +198,7 @@ const getList = () => { ...@@ -191,8 +198,7 @@ const getList = () => {
state.tableData.loading = false state.tableData.loading = false
let data =res.data.data; let data =res.data.data;
data.forEach(item => { data.forEach(item => {
// state.normListExtend
state.normListExtend.push(item.normListExtend);
}); });
state.tableData.data = res.data.data state.tableData.data = res.data.data
state.tableData.total = res.data.total state.tableData.total = res.data.total
......
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
<el-divider style="width: 90%;"><span style="color: #F56C6C;">用户已领取列表</span></el-divider> <el-divider style="width: 90%;"><span style="color: #F56C6C;">用户已领取列表</span></el-divider>
<el-table :data="state.tableData" border style="width: 100%" :height="state.tableHeight" <el-table :data="state.tableData" border style="width: 100%" :height="state.tableHeight"
ref="multipleTableRef"> ref="multipleTableRef">
<el-table-column v-for="column in state.columns" :key="column.prop" :label="column.label" :prop="column.prop" show-overflow-tooltip align="center"> <el-table-column v-for="column in state.columns" :key="column.prop" :label="column.label" :prop="column.prop" :width="column.width" show-overflow-tooltip align="center">
<template #default="scope"> <template #default="scope">
<span style="color:#409EFF" v-if="column.label =='用户名称'">{{scope.row[column.prop]}}</span> <span style="color:#409EFF" v-if="column.label =='用户名称'">{{scope.row[column.prop]}}</span>
<span style="color:#909399" v-else-if="column.label =='领取状态' && scope.row[column.prop] ==1">已领取</span> <span style="color:#909399" v-else-if="column.label =='领取状态' && scope.row[column.prop] ==1">已领取</span>
...@@ -184,11 +184,11 @@ const openDialog = (norm_id) => { ...@@ -184,11 +184,11 @@ const openDialog = (norm_id) => {
let receivesList = res.data.receivesList let receivesList = res.data.receivesList
if(receivesList){ if(receivesList){
let arr = [ let arr = [
{ label:'序号', prop: 'index'}, { label:'序号', prop: 'index',width:'80px'},
// { label:'ID', prop: 'id'}, // { label:'ID', prop: 'id'},
{ label:'用户名称', prop: 'userInfo.name',}, { label:'用户名称', prop: 'userInfo.name',width:120},
{ label:'任务名称', prop: 'task_info.name'}, { label:'任务名称', prop: 'task_info.name',width:180},
{ label:'指标名称', prop: 'norm_list_info.name'}, { label:'指标名称', prop: 'norm_list_info.name',width:180},
]; ];
state.columns = arr; state.columns = arr;
receivesList.forEach(function(item, index, arr) { receivesList.forEach(function(item, index, arr) {
...@@ -200,6 +200,8 @@ const openDialog = (norm_id) => { ...@@ -200,6 +200,8 @@ const openDialog = (norm_id) => {
'norm_list_info.name': item.norm_list_info.name, 'norm_list_info.name': item.norm_list_info.name,
'receives_status': item.receives_status, 'receives_status': item.receives_status,
'completion_status': item.completion_status, 'completion_status': item.completion_status,
'not_collectible_remarks': item.not_collectible_remarks?item.not_collectible_remarks:"是",
} }
state.tableData.push(list); state.tableData.push(list);
item.norm_list_extend.forEach(function(items, indexs, arrs) { item.norm_list_extend.forEach(function(items, indexs, arrs) {
...@@ -207,17 +209,18 @@ const openDialog = (norm_id) => { ...@@ -207,17 +209,18 @@ const openDialog = (norm_id) => {
state.columns.forEach(function(itemss, indexss, arrss) { state.columns.forEach(function(itemss, indexss, arrss) {
let vlues = state.columns.map(itemsss => itemsss.prop).indexOf('extend_value'+indexs) let vlues = state.columns.map(itemsss => itemsss.prop).indexOf('extend_value'+indexs)
if(vlues== -1){ if(vlues== -1){
state.columns.push( { label: items.extend_name, prop: 'extend_value'+indexs }) state.columns.push( { label: items.extend_name, prop: 'extend_value'+indexs,width:180 })
} }
}); });
}else{ }else{
state.columns.push( { label: items.extend_name, prop: 'extend_value'+indexs }) state.columns.push( { label: items.extend_name, prop: 'extend_value'+indexs,width:180 })
} }
list['extend_value'+indexs] =items.extend_value; list['extend_value'+indexs] =items.extend_value;
}); });
}); });
state.columns.push( { label: '领取状态', prop:'receives_status' }) state.columns.push( { label: '领取状态', prop:'receives_status',width:100 })
state.columns.push( { label: '完成状态', prop:'completion_status' }) state.columns.push( { label: '完成状态', prop:'completion_status',width:100 })
state.columns.push( { label: '是否可采集', prop:'not_collectible_remarks',width:200 })
} }
}).catch(() => { }).catch(() => {
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
<div class="page-main" v-loading="state.tableData.loading" ref="pageMain"> <div class="page-main" v-loading="state.tableData.loading" ref="pageMain">
<el-card shadow="hover" style="height:100%;"> <el-card shadow="hover" style="height:100%;">
<el-table :data="state.tableData.data" border 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="taskPackageInfo.name" label="任务名称" show-overflow-tooltip align="center"> <el-table-column prop="taskPackageInfo.name" label="任务名称" show-overflow-tooltip align="center">
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<div class="page-main" v-loading="state.tableData.loading" ref="pageMain"> <div class="page-main" v-loading="state.tableData.loading" ref="pageMain">
<el-card shadow="hover" style="height:100%;"> <el-card shadow="hover" style="height:100%;">
<el-table :data="state.tableData.data" border 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="name" label="任务名称" show-overflow-tooltip align="center"> <el-table-column prop="name" label="任务名称" show-overflow-tooltip align="center">
...@@ -30,11 +30,21 @@ ...@@ -30,11 +30,21 @@
</el-table-column> </el-table-column>
<el-table-column prop="unit" label="单位" show-overflow-tooltip align="center"></el-table-column> <el-table-column prop="unit" label="单位" show-overflow-tooltip align="center"></el-table-column>
<el-table-column prop="created_at" label="发布时间" show-overflow-tooltip align="center"></el-table-column> <el-table-column prop="created_at" label="发布时间" show-overflow-tooltip align="center"></el-table-column>
<el-table-column prop="name" label="领取进度" show-overflow-tooltip align="center">
<template #default="scope">
<span style="color:#409EFF">{{scope.row.receivedQuantity}}</span>
</template>
</el-table-column>
<el-table-column prop="name" label="完成进度" show-overflow-tooltip align="center">
<template #default="scope">
<span style="color:#F56C6C">{{scope.row.collectsQuantity}}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="250" fixed="right" align="center"> <el-table-column label="操作" width="250" fixed="right" align="center">
<template #default="scope"> <template #default="scope">
<!-- <el-button size="small" link type="primary" @click="details(scope.row.id)">发布指标</el-button> --> <!-- <el-button size="small" link type="primary" @click="details(scope.row.id)">发布指标</el-button> -->
<el-button size="small" link type="primary" @click="details(scope.row.id)">详情与发布</el-button> <el-button size="small" type="primary" @click="details(scope.row.id)">详情与发布</el-button>
<el-button size="small" link type="danger" @click="edit(scope.row)">修改任务</el-button> <el-button size="small" type="danger" @click="edit(scope.row)">修改任务</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
......
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