字段信息管理修改
This commit is contained in:
parent
9661ae223f
commit
bd3724fcb5
@ -1,13 +1,34 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container" ref="layout">
|
<div class="app-container" ref="layout">
|
||||||
<div ref="topform" class="form">
|
<div ref="topform" class="form">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form
|
||||||
|
:model="queryParams"
|
||||||
|
ref="queryForm"
|
||||||
|
size="small"
|
||||||
|
:inline="true"
|
||||||
|
v-show="showSearch"
|
||||||
|
label-width="68px"
|
||||||
|
>
|
||||||
<el-form-item label="字段名称" prop="fieldName">
|
<el-form-item label="字段名称" prop="fieldName">
|
||||||
<el-input v-model="queryParams.fieldName" placeholder="请输入字段名称" clearable @keyup.enter.native="handleQuery" />
|
<el-input
|
||||||
|
v-model="queryParams.fieldName"
|
||||||
|
placeholder="请输入字段名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="字段类型" label-width="100px" prop="fieldType">
|
<el-form-item label="字段类型" label-width="100px" prop="fieldType">
|
||||||
<el-select v-model="queryParams.fieldType" placeholder="请选择字段类型" clearable>
|
<el-select
|
||||||
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
|
v-model="queryParams.fieldType"
|
||||||
|
placeholder="请选择字段类型"
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in options"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -36,84 +57,236 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
size="mini"
|
||||||
|
@click="handleQuery"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||||
|
>重置</el-button
|
||||||
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
<div ref="mb8" class="mb8">
|
<div ref="mb8" class="mb8">
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
<el-button
|
||||||
v-hasPermi="['manage:labelfieldinfo:add']">新增</el-button>
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['manage:labelfieldinfo:add']"
|
||||||
|
>新增</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate"
|
<el-button
|
||||||
v-hasPermi="['manage:labelfieldinfo:edit']">修改</el-button>
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
v-hasPermi="['manage:labelfieldinfo:edit']"
|
||||||
|
>修改</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete"
|
<el-button
|
||||||
v-hasPermi="['manage:labelfieldinfo:remove']">删除</el-button>
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
v-hasPermi="['manage:labelfieldinfo:remove']"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
:showSearch.sync="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
<div ref="table">
|
<div ref="table">
|
||||||
<el-table :max-height="maxTableHeight" v-loading="loading" :data="labelfieldinfodata"
|
<el-table
|
||||||
@selection-change="handleSelectionChange">
|
:max-height="maxTableHeight"
|
||||||
|
v-loading="loading"
|
||||||
|
:data="labelfieldinfodata"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="字段名称" align="center" prop="fieldName" />
|
<el-table-column label="字段名称" align="center" prop="fieldName" />
|
||||||
<el-table-column label="字段编码" align="center" prop="fieldCode" />
|
<el-table-column label="字段编码" align="center" prop="fieldCode" />
|
||||||
<el-table-column label="字段类型" align="center" prop="fieldType">
|
<el-table-column label="字段类型" align="center" prop="fieldType">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.fieldType == "PORTRAIT_LABEL_FIELD" ? '画像标签' : '' }}
|
{{
|
||||||
{{ scope.row.fieldType == "KNOWLEDGE_FIELD" ? '知识库字段' : '' }}
|
scope.row.fieldType == "PORTRAIT_LABEL_FIELD" ? "画像标签" : ""
|
||||||
|
}}
|
||||||
|
{{ scope.row.fieldType == "KNOWLEDGE_FIELD" ? "知识库字段" : "" }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="字段排序" align="center" prop="fieldSort" />
|
<el-table-column label="字段排序" align="center" prop="fieldSort" />
|
||||||
<el-table-column label="字段备注信息" align="center" prop="fieldRemark" :show-overflow-tooltip="true" />
|
<el-table-column
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
label="字段备注信息"
|
||||||
|
align="center"
|
||||||
|
prop="fieldRemark"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
label="任务细分"
|
||||||
|
align="center"
|
||||||
|
prop="taskPartitionDictName"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
align="center"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
|
<el-button
|
||||||
v-hasPermi="['manage:labelfieldinfo:edit']">修改</el-button>
|
size="mini"
|
||||||
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
|
type="text"
|
||||||
v-hasPermi="['manage:labelfieldinfo:remove']">删除</el-button>
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['manage:labelfieldinfo:edit']"
|
||||||
|
>修改</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['manage:labelfieldinfo:remove']"
|
||||||
|
>删除</el-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
<pagination
|
||||||
@pagination="getList" />
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- 添加标签字段信息对话框 -->
|
<!-- 添加标签字段信息对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="750px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="750px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px" :inline="true">
|
<el-form
|
||||||
|
ref="form"
|
||||||
|
:model="form"
|
||||||
|
:rules="rules"
|
||||||
|
label-width="100px"
|
||||||
|
:inline="true"
|
||||||
|
>
|
||||||
<div v-for="(aitem, index) in form.labelFieldInfoList" :key="index">
|
<div v-for="(aitem, index) in form.labelFieldInfoList" :key="index">
|
||||||
<el-form-item label="字段名称" :rules="rules.labelFieldInfoList.fieldName"
|
<el-form-item
|
||||||
:prop="`labelFieldInfoList.${index}.fieldName`">
|
label="字段名称"
|
||||||
<el-input v-model="aitem.fieldName" placeholder="请输入字段名称" style="width: 210px" />
|
:rules="rules.labelFieldInfoList.fieldName"
|
||||||
|
:prop="`labelFieldInfoList.${index}.fieldName`"
|
||||||
|
>
|
||||||
|
<el-input
|
||||||
|
v-model="aitem.fieldName"
|
||||||
|
placeholder="请输入字段名称"
|
||||||
|
style="width: 210px"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="字段类型" :rules="rules.labelFieldInfoList.fieldType"
|
<el-form-item
|
||||||
:prop="`labelFieldInfoList.${index}.fieldType`">
|
label="字段类型"
|
||||||
<el-select v-model="aitem.fieldType" placeholder="请选择字段类型" clearable style="width: 210px">
|
:rules="rules.labelFieldInfoList.fieldType"
|
||||||
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
|
:prop="`labelFieldInfoList.${index}.fieldType`"
|
||||||
|
>
|
||||||
|
<el-select
|
||||||
|
v-model="aitem.fieldType"
|
||||||
|
placeholder="请选择字段类型"
|
||||||
|
clearable
|
||||||
|
style="width: 210px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in options"
|
||||||
|
:key="item.dictValue"
|
||||||
|
:label="item.dictLabel"
|
||||||
|
:value="item.dictValue"
|
||||||
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="字段排序" :rules="rules.labelFieldInfoList.fieldSort"
|
<el-form-item
|
||||||
:prop="`labelFieldInfoList.${index}.fieldSort`">
|
label="字段排序"
|
||||||
<el-input-number v-model="aitem.fieldSort" controls-position="right" :min="0" placeholder="请输入字段排序"
|
:rules="rules.labelFieldInfoList.fieldSort"
|
||||||
style="width: 210px" />
|
:prop="`labelFieldInfoList.${index}.fieldSort`"
|
||||||
|
>
|
||||||
|
<el-input-number
|
||||||
|
v-model="aitem.fieldSort"
|
||||||
|
controls-position="right"
|
||||||
|
:min="0"
|
||||||
|
placeholder="请输入字段排序"
|
||||||
|
style="width: 210px"
|
||||||
|
/>
|
||||||
<!-- <el-input v-model="aitem.fieldSort" placeholder="请输入字段排序" oninput="value=value.replace(/[^\d]/g,'')"
|
<!-- <el-input v-model="aitem.fieldSort" placeholder="请输入字段排序" oninput="value=value.replace(/[^\d]/g,'')"
|
||||||
maxlength="5"/> -->
|
maxlength="5"/> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="字段备注信息" prop="fieldRemark">
|
<el-form-item label="字段备注信息" prop="fieldRemark">
|
||||||
<el-input style="width: 210px" v-model="aitem.fieldRemark" placeholder="请输入字段备注信息" type="textarea" />
|
<el-input
|
||||||
|
style="width: 210px"
|
||||||
|
v-model="aitem.fieldRemark"
|
||||||
|
placeholder="请输入字段备注信息"
|
||||||
|
type="textarea"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-button type="primary" plain icon="el-icon-circle-plus-outline" style="margin-top: 9px; margin-left: 6px"
|
<el-form-item label="任务细分" prop="taskPartitionDictId">
|
||||||
v-if="index == 0" @click="addnurseClassifyitem"></el-button>
|
<el-button
|
||||||
<el-button type="danger" icon="el-icon-delete" plain style="margin-top: 9px; margin-left: 6px"
|
type=""
|
||||||
v-if="index != 0" @click="delnurseClassifyitem(index)"></el-button>
|
v-if="aitem.taskPartitionDictName == '请选择任务细分'"
|
||||||
|
@click="clickinnerVisible(aitem, index)"
|
||||||
|
style="
|
||||||
|
width: 210px;
|
||||||
|
text-align: left;
|
||||||
|
height: 36px;
|
||||||
|
color: #c0c4cc;
|
||||||
|
overflow: hidden;
|
||||||
|
"
|
||||||
|
>{{ aitem.taskPartitionDictName }}</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
@click="clickinnerVisible(aitem, index)"
|
||||||
|
type=""
|
||||||
|
v-else
|
||||||
|
style="
|
||||||
|
width: 210px;
|
||||||
|
text-align: left;
|
||||||
|
height: 36px;
|
||||||
|
padding-left: -10px;
|
||||||
|
overflow: hidden;
|
||||||
|
"
|
||||||
|
>{{ aitem.taskPartitionDictName }}</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
plain
|
||||||
|
icon="el-icon-circle-plus-outline"
|
||||||
|
style="margin-left: 6px"
|
||||||
|
v-if="index == 0"
|
||||||
|
@click="addnurseClassifyitem"
|
||||||
|
></el-button>
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
plain
|
||||||
|
style="margin-left: 6px"
|
||||||
|
v-if="index != 0"
|
||||||
|
@click="delnurseClassifyitem(index)"
|
||||||
|
></el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
@ -122,43 +295,240 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 修改标签字段信息对话框 -->
|
<!-- 修改标签字段信息对话框 -->
|
||||||
<el-dialog :title="titleup" :visible.sync="openup" width="750px" append-to-body>
|
<el-dialog
|
||||||
<el-form ref="form" :model="form" :rules="rulesup" label-width="100px" :inline="true">
|
:title="titleup"
|
||||||
|
:visible.sync="openup"
|
||||||
|
width="750px"
|
||||||
|
append-to-body
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
ref="form"
|
||||||
|
:model="form"
|
||||||
|
:rules="rulesup"
|
||||||
|
label-width="100px"
|
||||||
|
:inline="true"
|
||||||
|
>
|
||||||
<el-form-item label="字段名称" prop="fieldName">
|
<el-form-item label="字段名称" prop="fieldName">
|
||||||
<el-input v-model="form.fieldName" placeholder="请输入字段名称" style="width: 210px" />
|
<el-input
|
||||||
|
v-model="form.fieldName"
|
||||||
|
placeholder="请输入字段名称"
|
||||||
|
style="width: 210px"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="字段类型" prop="fieldType">
|
<el-form-item label="字段类型" prop="fieldType">
|
||||||
<el-select v-model="form.fieldType" placeholder="请选择字段类型" clearable style="width: 210px">
|
<el-select
|
||||||
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
|
v-model="form.fieldType"
|
||||||
|
placeholder="请选择字段类型"
|
||||||
|
clearable
|
||||||
|
style="width: 210px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in options"
|
||||||
|
:key="item.dictValue"
|
||||||
|
:label="item.dictLabel"
|
||||||
|
:value="item.dictValue"
|
||||||
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="字段排序" prop="fieldSort">
|
<el-form-item label="字段排序" prop="fieldSort">
|
||||||
<el-input-number v-model="form.fieldSort" controls-position="right" :min="0" placeholder="请输入字段排序"
|
<el-input-number
|
||||||
style="width: 210px" />
|
v-model="form.fieldSort"
|
||||||
|
controls-position="right"
|
||||||
|
:min="0"
|
||||||
|
placeholder="请输入字段排序"
|
||||||
|
style="width: 210px"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="字段备注信息" prop="fieldRemark">
|
<el-form-item label="字段备注信息" prop="fieldRemark">
|
||||||
<el-input style="width: 210px" v-model="form.fieldRemark" placeholder="请输入字段备注信息" type="textarea" />
|
<el-input
|
||||||
|
style="width: 210px"
|
||||||
|
v-model="form.fieldRemark"
|
||||||
|
placeholder="请输入字段备注信息"
|
||||||
|
type="textarea"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="任务细分" prop="taskPartitionDictId">
|
||||||
|
<el-button
|
||||||
|
type=""
|
||||||
|
v-if="form.taskPartitionDictName == '请选择任务细分'"
|
||||||
|
@click="clickinnerVisiblexg()"
|
||||||
|
style="
|
||||||
|
width: 210px;
|
||||||
|
text-align: left;
|
||||||
|
height: 36px;
|
||||||
|
color: #c0c4cc;
|
||||||
|
overflow: hidden;
|
||||||
|
"
|
||||||
|
>{{ form.taskPartitionDictName }}</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
@click="clickinnerVisiblexg()"
|
||||||
|
type=""
|
||||||
|
v-else
|
||||||
|
style="
|
||||||
|
width: 210px;
|
||||||
|
text-align: left;
|
||||||
|
height: 36px;
|
||||||
|
padding-left: -10px;
|
||||||
|
overflow: hidden;
|
||||||
|
"
|
||||||
|
>{{ form.taskPartitionDictName }}</el-button
|
||||||
|
>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
<el-button @click="cancelup">取 消</el-button>
|
<el-button @click="cancelup">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<!-- 任务细分弹框 -->
|
||||||
|
<el-dialog
|
||||||
|
title="选择任务细分"
|
||||||
|
:visible.sync="innerVisible"
|
||||||
|
width="1000px"
|
||||||
|
append-to-body
|
||||||
|
:before-close="innerVisiblecancel"
|
||||||
|
>
|
||||||
|
<el-form
|
||||||
|
:model="queryParamstask"
|
||||||
|
ref="queryForm"
|
||||||
|
size="small"
|
||||||
|
:inline="true"
|
||||||
|
v-show="showSearch"
|
||||||
|
label-width="100px"
|
||||||
|
>
|
||||||
|
<el-form-item label="任务细分名称" prop="taskPartitionName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParamstask.taskPartitionName"
|
||||||
|
placeholder="请输入任务细分名称"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="任务细分编码" prop="taskPartitionCode">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParamstask.taskPartitionCode"
|
||||||
|
placeholder="请输入任务细分编码"
|
||||||
|
clearable
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
size="mini"
|
||||||
|
@click="handleQuerytask"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuerytask"
|
||||||
|
>重置</el-button
|
||||||
|
>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-table
|
||||||
|
:max-height="maxTableHeight"
|
||||||
|
v-loading="loading"
|
||||||
|
:data="partitionList"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
|
<el-table-column label="请选择" width="100" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
style="width: 15px; height: 15px"
|
||||||
|
v-if="taskPartitionDictId == scope.row.taskTypeId"
|
||||||
|
circle
|
||||||
|
@click="nurseclickzx(scope.row)"
|
||||||
|
></el-button>
|
||||||
|
<el-button
|
||||||
|
v-else
|
||||||
|
style="width: 15px; height: 15px"
|
||||||
|
circle
|
||||||
|
@click="nurseclickzx(scope.row)"
|
||||||
|
></el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="任务类型名称"
|
||||||
|
align="center"
|
||||||
|
prop="taskTypeName"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="任务细分名称"
|
||||||
|
align="center"
|
||||||
|
prop="taskPartitionName"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="任务细分编码"
|
||||||
|
align="center"
|
||||||
|
prop="taskPartitionCode"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="二级分类描述"
|
||||||
|
align="center"
|
||||||
|
prop="secondClassifyDescribe"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="执行时间"
|
||||||
|
align="center"
|
||||||
|
prop="executionTime"
|
||||||
|
width="180"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="任务细分排序"
|
||||||
|
align="center"
|
||||||
|
prop="taskPartitionSort"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="任务细分备注"
|
||||||
|
align="center"
|
||||||
|
prop="taskPartitionRemark"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
class="pag"
|
||||||
|
v-show="totaltask > 0"
|
||||||
|
:total="totaltask"
|
||||||
|
:page.sync="queryParamstask.pageNum"
|
||||||
|
:limit.sync="queryParamstask.pageSize"
|
||||||
|
@pagination="getListpartit"
|
||||||
|
/>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listLabelfieldinfo, getLabelfieldinfo, delLabelfieldinfo, addLabelfieldinfo, updateLabelfieldinfo } from "@/api/manage/labelfieldinfo";
|
import { listLabelfieldinfo, getLabelfieldinfo, delLabelfieldinfo, addLabelfieldinfo, updateLabelfieldinfo } from "@/api/manage/labelfieldinfo";
|
||||||
|
import { listPartition } from "@/api/system/partition";
|
||||||
|
import { getAgencytype } from "@/api/system/agency";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Labelfieldinfo",
|
name: "Labelfieldinfo",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
innerVisible: false,//任务细分
|
||||||
|
// 任务细分字典表格数据
|
||||||
|
partitionList: [],
|
||||||
|
// 查询参数
|
||||||
|
queryParamstask: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
taskTypeId: null,
|
||||||
|
taskTypeName: null,
|
||||||
|
taskPartitionName: null,
|
||||||
|
taskPartitionCode: null,
|
||||||
|
secondClassifyDescribe: null,
|
||||||
|
executionTime: null,
|
||||||
|
taskPartitionSort: null,
|
||||||
|
taskPartitionRemark: null,
|
||||||
|
},
|
||||||
|
nnerVisibleindex: '',
|
||||||
|
taskPartitionDictId: '',
|
||||||
maxTableHeight: undefined,
|
maxTableHeight: undefined,
|
||||||
|
totaltask: 0,
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
@ -189,13 +559,7 @@ export default {
|
|||||||
fieldSort: null,
|
fieldSort: null,
|
||||||
fieldRemark: null,
|
fieldRemark: null,
|
||||||
},
|
},
|
||||||
options: [{
|
options: [],
|
||||||
value: 'PORTRAIT_LABEL_FIELD',
|
|
||||||
label: '画像标签'
|
|
||||||
}, {
|
|
||||||
value: 'KNOWLEDGE_FIELD',
|
|
||||||
label: '知识库'
|
|
||||||
},],
|
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
@ -267,12 +631,66 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
this.infolistword();
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getMaxTableHeight()
|
this.getMaxTableHeight()
|
||||||
this.screenChange()
|
this.screenChange()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
infolistword() {
|
||||||
|
var dictType = "field_type";
|
||||||
|
getAgencytype(dictType).then((res) => {
|
||||||
|
this.options = res.data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 任务细分列表
|
||||||
|
getListpartit() {
|
||||||
|
this.loading = true;
|
||||||
|
listPartition(this.queryParamstask).then(response => {
|
||||||
|
this.partitionList = response.rows;
|
||||||
|
this.totaltask = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
// 任务细分弹框
|
||||||
|
clickinnerVisible(aitem, index) {
|
||||||
|
this.getListpartit();
|
||||||
|
this.taskPartitionDictId = aitem.taskPartitionDictId ? aitem.taskPartitionDictId : '';
|
||||||
|
this.nnerVisibleindex = index;
|
||||||
|
this.innerVisible = true;
|
||||||
|
},
|
||||||
|
// 修改任务细分弹框
|
||||||
|
clickinnerVisiblexg() {
|
||||||
|
if (this.form.taskPartitionDictId) {
|
||||||
|
this.taskPartitionDictId = this.form.taskPartitionDictId
|
||||||
|
}
|
||||||
|
this.getListpartit();
|
||||||
|
this.innerVisible = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
// 关闭
|
||||||
|
innerVisiblecancel() {
|
||||||
|
this.innerVisible = false;
|
||||||
|
},
|
||||||
|
nurseclickzx(row) {
|
||||||
|
console.log(row)
|
||||||
|
if (this.title == '添加标签字段信息') {
|
||||||
|
this.form.labelFieldInfoList[this.nnerVisibleindex].taskPartitionDictName =
|
||||||
|
row.taskTypeName;
|
||||||
|
this.form.labelFieldInfoList[this.nnerVisibleindex].taskPartitionDictId =
|
||||||
|
row.taskTypeId;
|
||||||
|
} else if (this.titleup == '修改标签字段信息') {
|
||||||
|
this.form.taskPartitionDictName =
|
||||||
|
row.taskTypeName;
|
||||||
|
this.form.taskPartitionDictId =
|
||||||
|
row.taskTypeId;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
this.innerVisible = false;
|
||||||
|
},
|
||||||
|
|
||||||
/** 查询标签字段信息列表 */
|
/** 查询标签字段信息列表 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -289,7 +707,8 @@ export default {
|
|||||||
fieldName: null,
|
fieldName: null,
|
||||||
fieldRemark: null,
|
fieldRemark: null,
|
||||||
fieldSort: undefined,
|
fieldSort: undefined,
|
||||||
|
taskPartitionDictName: '请选择任务细分',
|
||||||
|
taskPartitionDictId: '',
|
||||||
};
|
};
|
||||||
if (this.form.labelFieldInfoList.length == 5) {
|
if (this.form.labelFieldInfoList.length == 5) {
|
||||||
this.$message.error("最多批量添加5条");
|
this.$message.error("最多批量添加5条");
|
||||||
@ -325,7 +744,11 @@ export default {
|
|||||||
createBy: null,
|
createBy: null,
|
||||||
createTime: null,
|
createTime: null,
|
||||||
updateBy: null,
|
updateBy: null,
|
||||||
updateTime: null
|
updateTime: null,
|
||||||
|
taskPartitionDictName: null,
|
||||||
|
taskPartitionDictId: null,
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
},
|
},
|
||||||
@ -339,6 +762,16 @@ export default {
|
|||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
|
handleQuerytask(){
|
||||||
|
this.queryParamstask.pageNum = 1;
|
||||||
|
this.getListpartit();
|
||||||
|
|
||||||
|
},
|
||||||
|
resetQuerytask() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuerytask();
|
||||||
|
},
|
||||||
|
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.id)
|
this.ids = selection.map(item => item.id)
|
||||||
@ -355,6 +788,9 @@ export default {
|
|||||||
fieldName: null,
|
fieldName: null,
|
||||||
fieldRemark: null,
|
fieldRemark: null,
|
||||||
fieldSort: undefined,
|
fieldSort: undefined,
|
||||||
|
taskPartitionDictName: '请选择任务细分',
|
||||||
|
taskPartitionDictId: '',
|
||||||
|
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
@ -363,29 +799,46 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
|
|
||||||
this.reset();
|
this.reset();
|
||||||
|
this.infolistword();
|
||||||
const id = row.id || this.ids
|
const id = row.id || this.ids
|
||||||
getLabelfieldinfo(id).then(response => {
|
getLabelfieldinfo(id).then(response => {
|
||||||
this.form = response.data;
|
this.form = response.data;
|
||||||
|
if(!this.form.taskPartitionDictName||this.form.taskPartitionDictName==""){
|
||||||
|
this.form.taskPartitionDictName='请选择任务细分'
|
||||||
|
}
|
||||||
this.openup = true;
|
this.openup = true;
|
||||||
|
|
||||||
// this.title = "修改标签字段信息";
|
|
||||||
this.titleup = "修改标签字段信息";
|
this.titleup = "修改标签字段信息";
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
|
|
||||||
console.log(this.form)
|
console.log(this.form)
|
||||||
|
// return
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
|
var obj = JSON.parse(JSON.stringify(this.form))
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateLabelfieldinfo(this.form).then(response => {
|
if(obj.taskPartitionDictName=='请选择任务细分'){
|
||||||
|
obj.taskPartitionDictName=""
|
||||||
|
|
||||||
|
}
|
||||||
|
console.log(obj,'obj')
|
||||||
|
// return
|
||||||
|
updateLabelfieldinfo(obj).then(response => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.openup = false;
|
this.openup = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addLabelfieldinfo(this.form).then(response => {
|
obj.labelFieldInfoList.forEach(e => {
|
||||||
|
if (e.taskPartitionDictName == '请选择任务细分') {
|
||||||
|
e.taskPartitionDictName = ""
|
||||||
|
}
|
||||||
|
});
|
||||||
|
addLabelfieldinfo(obj).then(response => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
@ -437,6 +890,12 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
.pag{
|
||||||
|
top: 13px;
|
||||||
|
position: relative;
|
||||||
|
left: 61%;
|
||||||
|
|
||||||
|
}
|
||||||
::v-deep .el-input-number .el-input__inner {
|
::v-deep .el-input-number .el-input__inner {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user