| @ -0,0 +1,369 @@ | |||
| <template> | |||
| <div class="app-container"> | |||
| <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="medium" class="ry_form"> | |||
| <el-form-item label="接单地址" prop="area"> | |||
| <el-input | |||
| v-model="queryParams.area" | |||
| placeholder="请输入接单地址" | |||
| clearable | |||
| size="small" | |||
| @keyup.enter.native="handleQuery" | |||
| /> | |||
| </el-form-item> | |||
| <el-form-item label="详细地址" prop="address"> | |||
| <el-input | |||
| v-model="queryParams.address" | |||
| placeholder="请输入详细地址" | |||
| clearable | |||
| size="small" | |||
| @keyup.enter.native="handleQuery" | |||
| /> | |||
| </el-form-item> | |||
| <el-form-item label="接单状态" prop="status"> | |||
| <el-select v-model="queryParams.status" placeholder="请选择接单状态" clearable size="small"> | |||
| </el-select> | |||
| </el-form-item> | |||
| <el-form-item label="接单范围" prop="range"> | |||
| <el-input | |||
| v-model="queryParams.range" | |||
| placeholder="请输入接单范围" | |||
| clearable | |||
| size="small" | |||
| @keyup.enter.native="handleQuery" | |||
| /> | |||
| </el-form-item> | |||
| <el-form-item label="${comment}" prop="outDate"> | |||
| <el-date-picker | |||
| clearable | |||
| size="small" | |||
| v-model="queryParams.outDate" | |||
| type="datetime" | |||
| value-format="yyyy-MM-dd HH:mm:ss" | |||
| placeholder="选择${comment}"> | |||
| </el-date-picker> | |||
| </el-form-item> | |||
| <el-form-item label="关联用户id" prop="userId"> | |||
| <el-input | |||
| v-model="queryParams.userId" | |||
| placeholder="请输入关联用户id" | |||
| clearable | |||
| size="small" | |||
| @keyup.enter.native="handleQuery" | |||
| /> | |||
| </el-form-item> | |||
| <el-form-item class="flex_one tr"> | |||
| <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> | |||
| <el-row :gutter="10" class="mb8"> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="primary" | |||
| plain | |||
| icon="el-icon-plus" | |||
| size="mini" | |||
| @click="handleAdd" | |||
| v-hasPermi="['model:AppletAddress:add']" | |||
| >新增</el-button> | |||
| </el-col> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="success" | |||
| plain | |||
| icon="el-icon-edit" | |||
| size="mini" | |||
| :disabled="single" | |||
| @click="handleUpdate" | |||
| v-hasPermi="['model:AppletAddress:edit']" | |||
| >修改</el-button> | |||
| </el-col> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="danger" | |||
| plain | |||
| icon="el-icon-delete" | |||
| size="mini" | |||
| :disabled="multiple" | |||
| @click="handleDelete" | |||
| v-hasPermi="['model:AppletAddress:remove']" | |||
| >删除</el-button> | |||
| </el-col> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="warning" | |||
| plain | |||
| icon="el-icon-download" | |||
| size="mini" | |||
| :loading="exportLoading" | |||
| @click="handleExport" | |||
| v-hasPermi="['model:AppletAddress:export']" | |||
| >导出</el-button> | |||
| </el-col> | |||
| <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar> | |||
| </el-row> | |||
| <el-table v-loading="loading" :data="AppletAddressList" @selection-change="handleSelectionChange"> | |||
| <el-table-column type="selection" width="55" align="center" /> | |||
| <el-table-column label="唯一标识" align="center" prop="id" /> | |||
| <el-table-column label="接单地址" align="center" prop="area" v-if="columns[0].visible"/> | |||
| <el-table-column label="详细地址" align="center" prop="address" v-if="columns[1].visible"/> | |||
| <el-table-column label="接单状态" align="center" prop="status" v-if="columns[2].visible"/> | |||
| <el-table-column label="接单范围" align="center" prop="range" v-if="columns[3].visible"/> | |||
| <el-table-column label="${comment}" align="center" prop="outDate" width="180" v-if="columns[4].visible"> | |||
| <template slot-scope="scope"> | |||
| <span>{{ parseTime(scope.row.outDate, '')}}</span> | |||
| </template> | |||
| </el-table-column> | |||
| <el-table-column label="关联用户id" align="center" prop="userId" v-if="columns[5].visible"/> | |||
| <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | |||
| <template slot-scope="scope"> | |||
| <el-button | |||
| size="mini" | |||
| type="text" | |||
| icon="el-icon-edit" | |||
| @click="handleUpdate(scope.row)" | |||
| v-hasPermi="['model:AppletAddress:edit']" | |||
| >修改</el-button> | |||
| <el-button | |||
| size="mini" | |||
| type="text" | |||
| icon="el-icon-delete" | |||
| @click="handleDelete(scope.row)" | |||
| v-hasPermi="['model:AppletAddress:remove']" | |||
| >删除</el-button> | |||
| </template> | |||
| </el-table-column> | |||
| </el-table> | |||
| <pagination | |||
| v-show="total>0" | |||
| :total="total" | |||
| :page.sync="queryParams.pageNum" | |||
| :limit.sync="queryParams.pageSize" | |||
| @pagination="getList" | |||
| /> | |||
| <!-- 添加或修改地址信息对话框 --> | |||
| <el-dialog :title="title" :visible.sync="open" width="50%" append-to-body> | |||
| <el-form ref="form" :model="form" :rules="rules" label-width="108px" inline class="dialog-form-two"> | |||
| <el-form-item label="接单地址" prop="area"> | |||
| <el-input v-model="form.area" placeholder="请输入接单地址" /> | |||
| </el-form-item> | |||
| <el-form-item label="详细地址" prop="address"> | |||
| <el-input v-model="form.address" placeholder="请输入详细地址" /> | |||
| </el-form-item> | |||
| <el-form-item label="接单范围" prop="range"> | |||
| <el-input v-model="form.range" placeholder="请输入接单范围" /> | |||
| </el-form-item> | |||
| <el-form-item label="${comment}" prop="outDate"> | |||
| <el-date-picker clearable size="small" | |||
| v-model="form.outDate" | |||
| type="datetime" | |||
| value-format="yyyy-MM-dd HH:mm:ss" | |||
| placeholder="选择${comment}"> | |||
| </el-date-picker> | |||
| </el-form-item> | |||
| <el-form-item label="关联用户id" prop="userId"> | |||
| <el-input v-model="form.userId" placeholder="请输入关联用户id" /> | |||
| </el-form-item> | |||
| <el-form-item label="删除标识" prop="delFlag"> | |||
| <el-input v-model="form.delFlag" placeholder="请输入删除标识" /> | |||
| </el-form-item> | |||
| </el-form> | |||
| <div slot="footer" class="dialog-footer"> | |||
| <el-button type="primary" @click="submitForm">确 定</el-button> | |||
| <el-button @click="cancel">取 消</el-button> | |||
| </div> | |||
| </el-dialog> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import { listAppletAddress, getAppletAddress, delAppletAddress, addAppletAddress, updateAppletAddress, exportAppletAddress } from "@/api/model/AppletAddress"; | |||
| export default { | |||
| name: "AppletAddress", | |||
| data() { | |||
| return { | |||
| // 遮罩层 | |||
| loading: true, | |||
| // 导出遮罩层 | |||
| exportLoading: false, | |||
| // 选中数组 | |||
| ids: [], | |||
| // 非单个禁用 | |||
| single: true, | |||
| // 非多个禁用 | |||
| multiple: true, | |||
| // 显示搜索条件 | |||
| showSearch: true, | |||
| // 总条数 | |||
| total: 0, | |||
| // 地址信息表格数据 | |||
| AppletAddressList: [], | |||
| // 弹出层标题 | |||
| title: "", | |||
| // 是否显示弹出层 | |||
| open: false, | |||
| // 查询参数 | |||
| queryParams: { | |||
| pageNum: 1, | |||
| pageSize: 10, | |||
| area: null, | |||
| address: null, | |||
| status: null, | |||
| range: null, | |||
| outDate: null, | |||
| userId: null, | |||
| }, | |||
| // 表单参数 | |||
| form: {}, | |||
| // 表单校验 | |||
| rules: { | |||
| delFlag: [ | |||
| { required: true, message: "删除标识不能为空", trigger: "blur" } | |||
| ], | |||
| }, | |||
| columns: [ | |||
| { key: 1, label: "接单地址", visible: true }, | |||
| { key: 2, label: "详细地址", visible: true }, | |||
| { key: 3, label: "接单状态", visible: true }, | |||
| { key: 4, label: "接单范围", visible: true }, | |||
| { key: 5, label: "$column.columnComment", visible: true }, | |||
| { key: 6, label: "关联用户id", visible: true }, | |||
| ], | |||
| }; | |||
| }, | |||
| created() { | |||
| this.getList(); | |||
| }, | |||
| methods: { | |||
| /** 查询地址信息列表 */ | |||
| getList() { | |||
| this.loading = true; | |||
| listAppletAddress(this.queryParams).then(response => { | |||
| this.AppletAddressList = response.rows; | |||
| this.total = response.total; | |||
| this.loading = false; | |||
| }); | |||
| }, | |||
| // 取消按钮 | |||
| cancel() { | |||
| this.open = false; | |||
| this.reset(); | |||
| }, | |||
| // 表单重置 | |||
| reset() { | |||
| this.form = { | |||
| id: null, | |||
| area: null, | |||
| address: null, | |||
| status: "0", | |||
| range: null, | |||
| outDate: null, | |||
| userId: null, | |||
| delFlag: null, | |||
| createBy: null, | |||
| createTime: null, | |||
| updateBy: null, | |||
| updateTime: null, | |||
| }; | |||
| this.resetForm("form"); | |||
| }, | |||
| /** 搜索按钮操作 */ | |||
| handleQuery() { | |||
| this.queryParams.pageNum = 1; | |||
| this.getList(); | |||
| }, | |||
| /** 重置按钮操作 */ | |||
| resetQuery() { | |||
| this.resetForm("queryForm"); | |||
| this.handleQuery(); | |||
| }, | |||
| // 多选框选中数据 | |||
| handleSelectionChange(selection) { | |||
| this.ids = selection.map(item => item.id) | |||
| this.single = selection.length!==1 | |||
| this.multiple = !selection.length | |||
| }, | |||
| /** 新增按钮操作 */ | |||
| handleAdd() { | |||
| this.reset(); | |||
| this.open = true; | |||
| this.title = "添加地址信息"; | |||
| }, | |||
| /** 修改按钮操作 */ | |||
| handleUpdate(row) { | |||
| this.reset(); | |||
| const id = row.id || this.ids | |||
| getAppletAddress(id).then(response => { | |||
| this.form = response.data; | |||
| this.open = true; | |||
| this.title = "修改地址信息"; | |||
| }); | |||
| }, | |||
| /** 提交按钮 */ | |||
| submitForm() { | |||
| this.$refs["form"].validate(valid => { | |||
| if (valid) { | |||
| if (this.form.id != null) { | |||
| updateAppletAddress(this.form).then(response => { | |||
| this.$modal.msgSuccess("修改成功"); | |||
| this.open = false; | |||
| this.getList(); | |||
| }); | |||
| } else { | |||
| addAppletAddress(this.form).then(response => { | |||
| this.$modal.msgSuccess("新增成功"); | |||
| this.open = false; | |||
| this.getList(); | |||
| }); | |||
| } | |||
| } | |||
| }); | |||
| }, | |||
| /** 删除按钮操作 */ | |||
| handleDelete(row) { | |||
| const ids = row.id || this.ids; | |||
| this.$modal.confirm('是否确认删除地址信息编号为"' + ids + '"的数据项?').then(function() { | |||
| return delAppletAddress(ids); | |||
| }).then(() => { | |||
| this.getList(); | |||
| this.$modal.msgSuccess("删除成功"); | |||
| }).catch(() => {}); | |||
| }, | |||
| /** 导出按钮操作 */ | |||
| handleExport() { | |||
| const queryParams = this.queryParams; | |||
| this.$modal.confirm('是否确认导出所有地址信息数据项?').then(() => { | |||
| this.exportLoading = true; | |||
| return exportAppletAddress(queryParams); | |||
| }).then(response => { | |||
| this.download(response.msg); | |||
| this.exportLoading = false; | |||
| }).catch(() => {}); | |||
| } | |||
| } | |||
| }; | |||
| </script> | |||
| @ -0,0 +1,317 @@ | |||
| <template> | |||
| <div class="app-container"> | |||
| <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="medium" class="ry_form"> | |||
| <el-form-item label="标题" prop="title"> | |||
| <el-input | |||
| v-model="queryParams.title" | |||
| placeholder="请输入标题" | |||
| clearable | |||
| size="small" | |||
| @keyup.enter.native="handleQuery" | |||
| /> | |||
| </el-form-item> | |||
| <el-form-item label="金额" prop="amount"> | |||
| <el-input | |||
| v-model="queryParams.amount" | |||
| placeholder="请输入金额" | |||
| clearable | |||
| size="small" | |||
| @keyup.enter.native="handleQuery" | |||
| /> | |||
| </el-form-item> | |||
| <el-form-item label="类型" prop="type"> | |||
| <el-select v-model="queryParams.type" placeholder="请选择类型" clearable size="small"> | |||
| </el-select> | |||
| </el-form-item> | |||
| <el-form-item class="flex_one tr"> | |||
| <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> | |||
| <el-row :gutter="10" class="mb8"> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="primary" | |||
| plain | |||
| icon="el-icon-plus" | |||
| size="mini" | |||
| @click="handleAdd" | |||
| v-hasPermi="['model:AppletAmountLog:add']" | |||
| >新增</el-button> | |||
| </el-col> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="success" | |||
| plain | |||
| icon="el-icon-edit" | |||
| size="mini" | |||
| :disabled="single" | |||
| @click="handleUpdate" | |||
| v-hasPermi="['model:AppletAmountLog:edit']" | |||
| >修改</el-button> | |||
| </el-col> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="danger" | |||
| plain | |||
| icon="el-icon-delete" | |||
| size="mini" | |||
| :disabled="multiple" | |||
| @click="handleDelete" | |||
| v-hasPermi="['model:AppletAmountLog:remove']" | |||
| >删除</el-button> | |||
| </el-col> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="warning" | |||
| plain | |||
| icon="el-icon-download" | |||
| size="mini" | |||
| :loading="exportLoading" | |||
| @click="handleExport" | |||
| v-hasPermi="['model:AppletAmountLog:export']" | |||
| >导出</el-button> | |||
| </el-col> | |||
| <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar> | |||
| </el-row> | |||
| <el-table v-loading="loading" :data="AppletAmountLogList" @selection-change="handleSelectionChange"> | |||
| <el-table-column type="selection" width="55" align="center" /> | |||
| <el-table-column label="唯一标识" align="center" prop="id" /> | |||
| <el-table-column label="标题" align="center" prop="title" v-if="columns[0].visible"/> | |||
| <el-table-column label="金额" align="center" prop="amount" v-if="columns[1].visible"/> | |||
| <el-table-column label="类型" align="center" prop="type" v-if="columns[2].visible"/> | |||
| <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | |||
| <template slot-scope="scope"> | |||
| <el-button | |||
| size="mini" | |||
| type="text" | |||
| icon="el-icon-edit" | |||
| @click="handleUpdate(scope.row)" | |||
| v-hasPermi="['model:AppletAmountLog:edit']" | |||
| >修改</el-button> | |||
| <el-button | |||
| size="mini" | |||
| type="text" | |||
| icon="el-icon-delete" | |||
| @click="handleDelete(scope.row)" | |||
| v-hasPermi="['model:AppletAmountLog:remove']" | |||
| >删除</el-button> | |||
| </template> | |||
| </el-table-column> | |||
| </el-table> | |||
| <pagination | |||
| v-show="total>0" | |||
| :total="total" | |||
| :page.sync="queryParams.pageNum" | |||
| :limit.sync="queryParams.pageSize" | |||
| @pagination="getList" | |||
| /> | |||
| <!-- 添加或修改金额明细对话框 --> | |||
| <el-dialog :title="title" :visible.sync="open" width="50%" append-to-body> | |||
| <el-form ref="form" :model="form" :rules="rules" label-width="108px" inline class="dialog-form-two"> | |||
| <el-form-item label="标题" prop="title"> | |||
| <el-input v-model="form.title" placeholder="请输入标题" /> | |||
| </el-form-item> | |||
| <el-form-item label="金额" prop="amount"> | |||
| <el-input v-model="form.amount" placeholder="请输入金额" /> | |||
| </el-form-item> | |||
| <el-form-item label="删除标识" prop="delFlag"> | |||
| <el-input v-model="form.delFlag" placeholder="请输入删除标识" /> | |||
| </el-form-item> | |||
| </el-form> | |||
| <div slot="footer" class="dialog-footer"> | |||
| <el-button type="primary" @click="submitForm">确 定</el-button> | |||
| <el-button @click="cancel">取 消</el-button> | |||
| </div> | |||
| </el-dialog> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import { listAppletAmountLog, getAppletAmountLog, delAppletAmountLog, addAppletAmountLog, updateAppletAmountLog, exportAppletAmountLog } from "@/api/model/AppletAmountLog"; | |||
| export default { | |||
| name: "AppletAmountLog", | |||
| data() { | |||
| return { | |||
| // 遮罩层 | |||
| loading: true, | |||
| // 导出遮罩层 | |||
| exportLoading: false, | |||
| // 选中数组 | |||
| ids: [], | |||
| // 非单个禁用 | |||
| single: true, | |||
| // 非多个禁用 | |||
| multiple: true, | |||
| // 显示搜索条件 | |||
| showSearch: true, | |||
| // 总条数 | |||
| total: 0, | |||
| // 金额明细表格数据 | |||
| AppletAmountLogList: [], | |||
| // 弹出层标题 | |||
| title: "", | |||
| // 是否显示弹出层 | |||
| open: false, | |||
| // 查询参数 | |||
| queryParams: { | |||
| pageNum: 1, | |||
| pageSize: 10, | |||
| title: null, | |||
| amount: null, | |||
| type: null, | |||
| }, | |||
| // 表单参数 | |||
| form: {}, | |||
| // 表单校验 | |||
| rules: { | |||
| title: [ | |||
| { required: true, message: "标题不能为空", trigger: "blur" } | |||
| ], | |||
| amount: [ | |||
| { required: true, message: "金额不能为空", trigger: "blur" } | |||
| ], | |||
| type: [ | |||
| { required: true, message: "类型不能为空", trigger: "change" } | |||
| ], | |||
| delFlag: [ | |||
| { required: true, message: "删除标识不能为空", trigger: "blur" } | |||
| ], | |||
| }, | |||
| columns: [ | |||
| { key: 1, label: "标题", visible: true }, | |||
| { key: 2, label: "金额", visible: true }, | |||
| { key: 3, label: "类型", visible: true }, | |||
| ], | |||
| }; | |||
| }, | |||
| created() { | |||
| this.getList(); | |||
| }, | |||
| methods: { | |||
| /** 查询金额明细列表 */ | |||
| getList() { | |||
| this.loading = true; | |||
| listAppletAmountLog(this.queryParams).then(response => { | |||
| this.AppletAmountLogList = response.rows; | |||
| this.total = response.total; | |||
| this.loading = false; | |||
| }); | |||
| }, | |||
| // 取消按钮 | |||
| cancel() { | |||
| this.open = false; | |||
| this.reset(); | |||
| }, | |||
| // 表单重置 | |||
| reset() { | |||
| this.form = { | |||
| id: null, | |||
| title: null, | |||
| amount: null, | |||
| type: null, | |||
| delFlag: null, | |||
| createBy: null, | |||
| createTime: null, | |||
| updateBy: null, | |||
| updateTime: null, | |||
| }; | |||
| this.resetForm("form"); | |||
| }, | |||
| /** 搜索按钮操作 */ | |||
| handleQuery() { | |||
| this.queryParams.pageNum = 1; | |||
| this.getList(); | |||
| }, | |||
| /** 重置按钮操作 */ | |||
| resetQuery() { | |||
| this.resetForm("queryForm"); | |||
| this.handleQuery(); | |||
| }, | |||
| // 多选框选中数据 | |||
| handleSelectionChange(selection) { | |||
| this.ids = selection.map(item => item.id) | |||
| this.single = selection.length!==1 | |||
| this.multiple = !selection.length | |||
| }, | |||
| /** 新增按钮操作 */ | |||
| handleAdd() { | |||
| this.reset(); | |||
| this.open = true; | |||
| this.title = "添加金额明细"; | |||
| }, | |||
| /** 修改按钮操作 */ | |||
| handleUpdate(row) { | |||
| this.reset(); | |||
| const id = row.id || this.ids | |||
| getAppletAmountLog(id).then(response => { | |||
| this.form = response.data; | |||
| this.open = true; | |||
| this.title = "修改金额明细"; | |||
| }); | |||
| }, | |||
| /** 提交按钮 */ | |||
| submitForm() { | |||
| this.$refs["form"].validate(valid => { | |||
| if (valid) { | |||
| if (this.form.id != null) { | |||
| updateAppletAmountLog(this.form).then(response => { | |||
| this.$modal.msgSuccess("修改成功"); | |||
| this.open = false; | |||
| this.getList(); | |||
| }); | |||
| } else { | |||
| addAppletAmountLog(this.form).then(response => { | |||
| this.$modal.msgSuccess("新增成功"); | |||
| this.open = false; | |||
| this.getList(); | |||
| }); | |||
| } | |||
| } | |||
| }); | |||
| }, | |||
| /** 删除按钮操作 */ | |||
| handleDelete(row) { | |||
| const ids = row.id || this.ids; | |||
| this.$modal.confirm('是否确认删除金额明细编号为"' + ids + '"的数据项?').then(function() { | |||
| return delAppletAmountLog(ids); | |||
| }).then(() => { | |||
| this.getList(); | |||
| this.$modal.msgSuccess("删除成功"); | |||
| }).catch(() => {}); | |||
| }, | |||
| /** 导出按钮操作 */ | |||
| handleExport() { | |||
| const queryParams = this.queryParams; | |||
| this.$modal.confirm('是否确认导出所有金额明细数据项?').then(() => { | |||
| this.exportLoading = true; | |||
| return exportAppletAmountLog(queryParams); | |||
| }).then(response => { | |||
| this.download(response.msg); | |||
| this.exportLoading = false; | |||
| }).catch(() => {}); | |||
| } | |||
| } | |||
| }; | |||
| </script> | |||
| @ -0,0 +1,338 @@ | |||
| <template> | |||
| <div class="app-container"> | |||
| <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="medium" class="ry_form"> | |||
| <el-form-item label="是否正确答案" prop="isTrue"> | |||
| <el-input | |||
| v-model="queryParams.isTrue" | |||
| placeholder="请输入是否正确答案" | |||
| clearable | |||
| size="small" | |||
| @keyup.enter.native="handleQuery" | |||
| /> | |||
| </el-form-item> | |||
| <el-form-item label="排序编号" prop="orderNo"> | |||
| <el-input | |||
| v-model="queryParams.orderNo" | |||
| placeholder="请输入排序编号" | |||
| clearable | |||
| size="small" | |||
| @keyup.enter.native="handleQuery" | |||
| /> | |||
| </el-form-item> | |||
| <el-form-item label="关联题目ID" prop="questionId"> | |||
| <el-input | |||
| v-model="queryParams.questionId" | |||
| placeholder="请输入关联题目ID" | |||
| clearable | |||
| size="small" | |||
| @keyup.enter.native="handleQuery" | |||
| /> | |||
| </el-form-item> | |||
| <el-form-item class="flex_one tr"> | |||
| <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> | |||
| <el-row :gutter="10" class="mb8"> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="primary" | |||
| plain | |||
| icon="el-icon-plus" | |||
| size="mini" | |||
| @click="handleAdd" | |||
| v-hasPermi="['model:AppletAnswer:add']" | |||
| >新增</el-button> | |||
| </el-col> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="success" | |||
| plain | |||
| icon="el-icon-edit" | |||
| size="mini" | |||
| :disabled="single" | |||
| @click="handleUpdate" | |||
| v-hasPermi="['model:AppletAnswer:edit']" | |||
| >修改</el-button> | |||
| </el-col> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="danger" | |||
| plain | |||
| icon="el-icon-delete" | |||
| size="mini" | |||
| :disabled="multiple" | |||
| @click="handleDelete" | |||
| v-hasPermi="['model:AppletAnswer:remove']" | |||
| >删除</el-button> | |||
| </el-col> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="warning" | |||
| plain | |||
| icon="el-icon-download" | |||
| size="mini" | |||
| :loading="exportLoading" | |||
| @click="handleExport" | |||
| v-hasPermi="['model:AppletAnswer:export']" | |||
| >导出</el-button> | |||
| </el-col> | |||
| <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar> | |||
| </el-row> | |||
| <el-table v-loading="loading" :data="AppletAnswerList" @selection-change="handleSelectionChange"> | |||
| <el-table-column type="selection" width="55" align="center" /> | |||
| <el-table-column label="唯一标识" align="center" prop="id" /> | |||
| <el-table-column label="答案内容" align="center" prop="title" v-if="columns[0].visible"/> | |||
| <el-table-column label="是否正确答案" align="center" prop="isTrue" v-if="columns[1].visible"/> | |||
| <el-table-column label="排序编号" align="center" prop="orderNo" v-if="columns[2].visible"/> | |||
| <el-table-column label="关联题目ID" align="center" prop="questionId" v-if="columns[3].visible"/> | |||
| <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | |||
| <template slot-scope="scope"> | |||
| <el-button | |||
| size="mini" | |||
| type="text" | |||
| icon="el-icon-edit" | |||
| @click="handleUpdate(scope.row)" | |||
| v-hasPermi="['model:AppletAnswer:edit']" | |||
| >修改</el-button> | |||
| <el-button | |||
| size="mini" | |||
| type="text" | |||
| icon="el-icon-delete" | |||
| @click="handleDelete(scope.row)" | |||
| v-hasPermi="['model:AppletAnswer:remove']" | |||
| >删除</el-button> | |||
| </template> | |||
| </el-table-column> | |||
| </el-table> | |||
| <pagination | |||
| v-show="total>0" | |||
| :total="total" | |||
| :page.sync="queryParams.pageNum" | |||
| :limit.sync="queryParams.pageSize" | |||
| @pagination="getList" | |||
| /> | |||
| <!-- 添加或修改基本考核答案对话框 --> | |||
| <el-dialog :title="title" :visible.sync="open" width="50%" append-to-body> | |||
| <el-form ref="form" :model="form" :rules="rules" label-width="108px" inline class="dialog-form-two"> | |||
| <el-form-item label="答案内容" prop="title"> | |||
| <el-input v-model="form.title" type="textarea" placeholder="请输入内容" /> | |||
| </el-form-item> | |||
| <el-form-item label="是否正确答案" prop="isTrue"> | |||
| <el-input v-model="form.isTrue" placeholder="请输入是否正确答案" /> | |||
| </el-form-item> | |||
| <el-form-item label="排序编号" prop="orderNo"> | |||
| <el-input v-model="form.orderNo" placeholder="请输入排序编号" /> | |||
| </el-form-item> | |||
| <el-form-item label="关联题目ID" prop="questionId"> | |||
| <el-input v-model="form.questionId" placeholder="请输入关联题目ID" /> | |||
| </el-form-item> | |||
| <el-form-item label="删除标识" prop="delFlag"> | |||
| <el-input v-model="form.delFlag" placeholder="请输入删除标识" /> | |||
| </el-form-item> | |||
| </el-form> | |||
| <div slot="footer" class="dialog-footer"> | |||
| <el-button type="primary" @click="submitForm">确 定</el-button> | |||
| <el-button @click="cancel">取 消</el-button> | |||
| </div> | |||
| </el-dialog> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import { listAppletAnswer, getAppletAnswer, delAppletAnswer, addAppletAnswer, updateAppletAnswer, exportAppletAnswer } from "@/api/model/AppletAnswer"; | |||
| export default { | |||
| name: "AppletAnswer", | |||
| data() { | |||
| return { | |||
| // 遮罩层 | |||
| loading: true, | |||
| // 导出遮罩层 | |||
| exportLoading: false, | |||
| // 选中数组 | |||
| ids: [], | |||
| // 非单个禁用 | |||
| single: true, | |||
| // 非多个禁用 | |||
| multiple: true, | |||
| // 显示搜索条件 | |||
| showSearch: true, | |||
| // 总条数 | |||
| total: 0, | |||
| // 基本考核答案表格数据 | |||
| AppletAnswerList: [], | |||
| // 弹出层标题 | |||
| title: "", | |||
| // 是否显示弹出层 | |||
| open: false, | |||
| // 查询参数 | |||
| queryParams: { | |||
| pageNum: 1, | |||
| pageSize: 10, | |||
| title: null, | |||
| isTrue: null, | |||
| orderNo: null, | |||
| questionId: null, | |||
| }, | |||
| // 表单参数 | |||
| form: {}, | |||
| // 表单校验 | |||
| rules: { | |||
| title: [ | |||
| { required: true, message: "答案内容不能为空", trigger: "blur" } | |||
| ], | |||
| isTrue: [ | |||
| { required: true, message: "是否正确答案不能为空", trigger: "blur" } | |||
| ], | |||
| orderNo: [ | |||
| { required: true, message: "排序编号不能为空", trigger: "blur" } | |||
| ], | |||
| questionId: [ | |||
| { required: true, message: "关联题目ID不能为空", trigger: "blur" } | |||
| ], | |||
| delFlag: [ | |||
| { required: true, message: "删除标识不能为空", trigger: "blur" } | |||
| ], | |||
| }, | |||
| columns: [ | |||
| { key: 1, label: "答案内容", visible: true }, | |||
| { key: 2, label: "是否正确答案", visible: true }, | |||
| { key: 3, label: "排序编号", visible: true }, | |||
| { key: 4, label: "关联题目ID", visible: true }, | |||
| ], | |||
| }; | |||
| }, | |||
| created() { | |||
| this.getList(); | |||
| }, | |||
| methods: { | |||
| /** 查询基本考核答案列表 */ | |||
| getList() { | |||
| this.loading = true; | |||
| listAppletAnswer(this.queryParams).then(response => { | |||
| this.AppletAnswerList = response.rows; | |||
| this.total = response.total; | |||
| this.loading = false; | |||
| }); | |||
| }, | |||
| // 取消按钮 | |||
| cancel() { | |||
| this.open = false; | |||
| this.reset(); | |||
| }, | |||
| // 表单重置 | |||
| reset() { | |||
| this.form = { | |||
| id: null, | |||
| title: null, | |||
| isTrue: null, | |||
| orderNo: null, | |||
| questionId: null, | |||
| delFlag: null, | |||
| createBy: null, | |||
| createTime: null, | |||
| updateBy: null, | |||
| updateTime: null, | |||
| }; | |||
| this.resetForm("form"); | |||
| }, | |||
| /** 搜索按钮操作 */ | |||
| handleQuery() { | |||
| this.queryParams.pageNum = 1; | |||
| this.getList(); | |||
| }, | |||
| /** 重置按钮操作 */ | |||
| resetQuery() { | |||
| this.resetForm("queryForm"); | |||
| this.handleQuery(); | |||
| }, | |||
| // 多选框选中数据 | |||
| handleSelectionChange(selection) { | |||
| this.ids = selection.map(item => item.id) | |||
| this.single = selection.length!==1 | |||
| this.multiple = !selection.length | |||
| }, | |||
| /** 新增按钮操作 */ | |||
| handleAdd() { | |||
| this.reset(); | |||
| this.open = true; | |||
| this.title = "添加基本考核答案"; | |||
| }, | |||
| /** 修改按钮操作 */ | |||
| handleUpdate(row) { | |||
| this.reset(); | |||
| const id = row.id || this.ids | |||
| getAppletAnswer(id).then(response => { | |||
| this.form = response.data; | |||
| this.open = true; | |||
| this.title = "修改基本考核答案"; | |||
| }); | |||
| }, | |||
| /** 提交按钮 */ | |||
| submitForm() { | |||
| this.$refs["form"].validate(valid => { | |||
| if (valid) { | |||
| if (this.form.id != null) { | |||
| updateAppletAnswer(this.form).then(response => { | |||
| this.$modal.msgSuccess("修改成功"); | |||
| this.open = false; | |||
| this.getList(); | |||
| }); | |||
| } else { | |||
| addAppletAnswer(this.form).then(response => { | |||
| this.$modal.msgSuccess("新增成功"); | |||
| this.open = false; | |||
| this.getList(); | |||
| }); | |||
| } | |||
| } | |||
| }); | |||
| }, | |||
| /** 删除按钮操作 */ | |||
| handleDelete(row) { | |||
| const ids = row.id || this.ids; | |||
| this.$modal.confirm('是否确认删除基本考核答案编号为"' + ids + '"的数据项?').then(function() { | |||
| return delAppletAnswer(ids); | |||
| }).then(() => { | |||
| this.getList(); | |||
| this.$modal.msgSuccess("删除成功"); | |||
| }).catch(() => {}); | |||
| }, | |||
| /** 导出按钮操作 */ | |||
| handleExport() { | |||
| const queryParams = this.queryParams; | |||
| this.$modal.confirm('是否确认导出所有基本考核答案数据项?').then(() => { | |||
| this.exportLoading = true; | |||
| return exportAppletAnswer(queryParams); | |||
| }).then(response => { | |||
| this.download(response.msg); | |||
| this.exportLoading = false; | |||
| }).catch(() => {}); | |||
| } | |||
| } | |||
| }; | |||
| </script> | |||
| @ -0,0 +1,317 @@ | |||
| <template> | |||
| <div class="app-container"> | |||
| <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="medium" class="ry_form"> | |||
| <el-form-item label="题目标题" prop="title"> | |||
| <el-input | |||
| v-model="queryParams.title" | |||
| placeholder="请输入题目标题" | |||
| clearable | |||
| size="small" | |||
| @keyup.enter.native="handleQuery" | |||
| /> | |||
| </el-form-item> | |||
| <el-form-item label="题目类型" prop="type"> | |||
| <el-select v-model="queryParams.type" placeholder="请选择题目类型" clearable size="small"> | |||
| </el-select> | |||
| </el-form-item> | |||
| <el-form-item label="排序编号" prop="orderNo"> | |||
| <el-input | |||
| v-model="queryParams.orderNo" | |||
| placeholder="请输入排序编号" | |||
| clearable | |||
| size="small" | |||
| @keyup.enter.native="handleQuery" | |||
| /> | |||
| </el-form-item> | |||
| <el-form-item class="flex_one tr"> | |||
| <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> | |||
| <el-row :gutter="10" class="mb8"> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="primary" | |||
| plain | |||
| icon="el-icon-plus" | |||
| size="mini" | |||
| @click="handleAdd" | |||
| v-hasPermi="['model:AppletQuestion:add']" | |||
| >新增</el-button> | |||
| </el-col> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="success" | |||
| plain | |||
| icon="el-icon-edit" | |||
| size="mini" | |||
| :disabled="single" | |||
| @click="handleUpdate" | |||
| v-hasPermi="['model:AppletQuestion:edit']" | |||
| >修改</el-button> | |||
| </el-col> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="danger" | |||
| plain | |||
| icon="el-icon-delete" | |||
| size="mini" | |||
| :disabled="multiple" | |||
| @click="handleDelete" | |||
| v-hasPermi="['model:AppletQuestion:remove']" | |||
| >删除</el-button> | |||
| </el-col> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="warning" | |||
| plain | |||
| icon="el-icon-download" | |||
| size="mini" | |||
| :loading="exportLoading" | |||
| @click="handleExport" | |||
| v-hasPermi="['model:AppletQuestion:export']" | |||
| >导出</el-button> | |||
| </el-col> | |||
| <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar> | |||
| </el-row> | |||
| <el-table v-loading="loading" :data="AppletQuestionList" @selection-change="handleSelectionChange"> | |||
| <el-table-column type="selection" width="55" align="center" /> | |||
| <el-table-column label="唯一标识" align="center" prop="id" /> | |||
| <el-table-column label="题目标题" align="center" prop="title" v-if="columns[0].visible"/> | |||
| <el-table-column label="题目类型" align="center" prop="type" v-if="columns[1].visible"/> | |||
| <el-table-column label="排序编号" align="center" prop="orderNo" v-if="columns[2].visible"/> | |||
| <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | |||
| <template slot-scope="scope"> | |||
| <el-button | |||
| size="mini" | |||
| type="text" | |||
| icon="el-icon-edit" | |||
| @click="handleUpdate(scope.row)" | |||
| v-hasPermi="['model:AppletQuestion:edit']" | |||
| >修改</el-button> | |||
| <el-button | |||
| size="mini" | |||
| type="text" | |||
| icon="el-icon-delete" | |||
| @click="handleDelete(scope.row)" | |||
| v-hasPermi="['model:AppletQuestion:remove']" | |||
| >删除</el-button> | |||
| </template> | |||
| </el-table-column> | |||
| </el-table> | |||
| <pagination | |||
| v-show="total>0" | |||
| :total="total" | |||
| :page.sync="queryParams.pageNum" | |||
| :limit.sync="queryParams.pageSize" | |||
| @pagination="getList" | |||
| /> | |||
| <!-- 添加或修改考核题库对话框 --> | |||
| <el-dialog :title="title" :visible.sync="open" width="50%" append-to-body> | |||
| <el-form ref="form" :model="form" :rules="rules" label-width="108px" inline class="dialog-form-two"> | |||
| <el-form-item label="题目标题" prop="title"> | |||
| <el-input v-model="form.title" placeholder="请输入题目标题" /> | |||
| </el-form-item> | |||
| <el-form-item label="排序编号" prop="orderNo"> | |||
| <el-input v-model="form.orderNo" placeholder="请输入排序编号" /> | |||
| </el-form-item> | |||
| <el-form-item label="删除标识" prop="delFlag"> | |||
| <el-input v-model="form.delFlag" placeholder="请输入删除标识" /> | |||
| </el-form-item> | |||
| </el-form> | |||
| <div slot="footer" class="dialog-footer"> | |||
| <el-button type="primary" @click="submitForm">确 定</el-button> | |||
| <el-button @click="cancel">取 消</el-button> | |||
| </div> | |||
| </el-dialog> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import { listAppletQuestion, getAppletQuestion, delAppletQuestion, addAppletQuestion, updateAppletQuestion, exportAppletQuestion } from "@/api/model/AppletQuestion"; | |||
| export default { | |||
| name: "AppletQuestion", | |||
| data() { | |||
| return { | |||
| // 遮罩层 | |||
| loading: true, | |||
| // 导出遮罩层 | |||
| exportLoading: false, | |||
| // 选中数组 | |||
| ids: [], | |||
| // 非单个禁用 | |||
| single: true, | |||
| // 非多个禁用 | |||
| multiple: true, | |||
| // 显示搜索条件 | |||
| showSearch: true, | |||
| // 总条数 | |||
| total: 0, | |||
| // 考核题库表格数据 | |||
| AppletQuestionList: [], | |||
| // 弹出层标题 | |||
| title: "", | |||
| // 是否显示弹出层 | |||
| open: false, | |||
| // 查询参数 | |||
| queryParams: { | |||
| pageNum: 1, | |||
| pageSize: 10, | |||
| title: null, | |||
| type: null, | |||
| orderNo: null, | |||
| }, | |||
| // 表单参数 | |||
| form: {}, | |||
| // 表单校验 | |||
| rules: { | |||
| title: [ | |||
| { required: true, message: "题目标题不能为空", trigger: "blur" } | |||
| ], | |||
| type: [ | |||
| { required: true, message: "题目类型不能为空", trigger: "change" } | |||
| ], | |||
| orderNo: [ | |||
| { required: true, message: "排序编号不能为空", trigger: "blur" } | |||
| ], | |||
| delFlag: [ | |||
| { required: true, message: "删除标识不能为空", trigger: "blur" } | |||
| ], | |||
| }, | |||
| columns: [ | |||
| { key: 1, label: "题目标题", visible: true }, | |||
| { key: 2, label: "题目类型", visible: true }, | |||
| { key: 3, label: "排序编号", visible: true }, | |||
| ], | |||
| }; | |||
| }, | |||
| created() { | |||
| this.getList(); | |||
| }, | |||
| methods: { | |||
| /** 查询考核题库列表 */ | |||
| getList() { | |||
| this.loading = true; | |||
| listAppletQuestion(this.queryParams).then(response => { | |||
| this.AppletQuestionList = response.rows; | |||
| this.total = response.total; | |||
| this.loading = false; | |||
| }); | |||
| }, | |||
| // 取消按钮 | |||
| cancel() { | |||
| this.open = false; | |||
| this.reset(); | |||
| }, | |||
| // 表单重置 | |||
| reset() { | |||
| this.form = { | |||
| id: null, | |||
| title: null, | |||
| type: null, | |||
| orderNo: null, | |||
| delFlag: null, | |||
| createBy: null, | |||
| createTime: null, | |||
| updateBy: null, | |||
| updateTime: null, | |||
| }; | |||
| this.resetForm("form"); | |||
| }, | |||
| /** 搜索按钮操作 */ | |||
| handleQuery() { | |||
| this.queryParams.pageNum = 1; | |||
| this.getList(); | |||
| }, | |||
| /** 重置按钮操作 */ | |||
| resetQuery() { | |||
| this.resetForm("queryForm"); | |||
| this.handleQuery(); | |||
| }, | |||
| // 多选框选中数据 | |||
| handleSelectionChange(selection) { | |||
| this.ids = selection.map(item => item.id) | |||
| this.single = selection.length!==1 | |||
| this.multiple = !selection.length | |||
| }, | |||
| /** 新增按钮操作 */ | |||
| handleAdd() { | |||
| this.reset(); | |||
| this.open = true; | |||
| this.title = "添加考核题库"; | |||
| }, | |||
| /** 修改按钮操作 */ | |||
| handleUpdate(row) { | |||
| this.reset(); | |||
| const id = row.id || this.ids | |||
| getAppletQuestion(id).then(response => { | |||
| this.form = response.data; | |||
| this.open = true; | |||
| this.title = "修改考核题库"; | |||
| }); | |||
| }, | |||
| /** 提交按钮 */ | |||
| submitForm() { | |||
| this.$refs["form"].validate(valid => { | |||
| if (valid) { | |||
| if (this.form.id != null) { | |||
| updateAppletQuestion(this.form).then(response => { | |||
| this.$modal.msgSuccess("修改成功"); | |||
| this.open = false; | |||
| this.getList(); | |||
| }); | |||
| } else { | |||
| addAppletQuestion(this.form).then(response => { | |||
| this.$modal.msgSuccess("新增成功"); | |||
| this.open = false; | |||
| this.getList(); | |||
| }); | |||
| } | |||
| } | |||
| }); | |||
| }, | |||
| /** 删除按钮操作 */ | |||
| handleDelete(row) { | |||
| const ids = row.id || this.ids; | |||
| this.$modal.confirm('是否确认删除考核题库编号为"' + ids + '"的数据项?').then(function() { | |||
| return delAppletQuestion(ids); | |||
| }).then(() => { | |||
| this.getList(); | |||
| this.$modal.msgSuccess("删除成功"); | |||
| }).catch(() => {}); | |||
| }, | |||
| /** 导出按钮操作 */ | |||
| handleExport() { | |||
| const queryParams = this.queryParams; | |||
| this.$modal.confirm('是否确认导出所有考核题库数据项?').then(() => { | |||
| this.exportLoading = true; | |||
| return exportAppletQuestion(queryParams); | |||
| }).then(response => { | |||
| this.download(response.msg); | |||
| this.exportLoading = false; | |||
| }).catch(() => {}); | |||
| } | |||
| } | |||
| }; | |||
| </script> | |||
| @ -0,0 +1,299 @@ | |||
| <template> | |||
| <div class="app-container"> | |||
| <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="medium" class="ry_form"> | |||
| <el-form-item label="标题" prop="title"> | |||
| <el-input | |||
| v-model="queryParams.title" | |||
| placeholder="请输入标题" | |||
| clearable | |||
| size="small" | |||
| @keyup.enter.native="handleQuery" | |||
| /> | |||
| </el-form-item> | |||
| <el-form-item label="视频" prop="video"> | |||
| <el-input | |||
| v-model="queryParams.video" | |||
| placeholder="请输入视频" | |||
| clearable | |||
| size="small" | |||
| @keyup.enter.native="handleQuery" | |||
| /> | |||
| </el-form-item> | |||
| <el-form-item class="flex_one tr"> | |||
| <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> | |||
| <el-row :gutter="10" class="mb8"> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="primary" | |||
| plain | |||
| icon="el-icon-plus" | |||
| size="mini" | |||
| @click="handleAdd" | |||
| v-hasPermi="['model:AppletService:add']" | |||
| >新增</el-button> | |||
| </el-col> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="success" | |||
| plain | |||
| icon="el-icon-edit" | |||
| size="mini" | |||
| :disabled="single" | |||
| @click="handleUpdate" | |||
| v-hasPermi="['model:AppletService:edit']" | |||
| >修改</el-button> | |||
| </el-col> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="danger" | |||
| plain | |||
| icon="el-icon-delete" | |||
| size="mini" | |||
| :disabled="multiple" | |||
| @click="handleDelete" | |||
| v-hasPermi="['model:AppletService:remove']" | |||
| >删除</el-button> | |||
| </el-col> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="warning" | |||
| plain | |||
| icon="el-icon-download" | |||
| size="mini" | |||
| :loading="exportLoading" | |||
| @click="handleExport" | |||
| v-hasPermi="['model:AppletService:export']" | |||
| >导出</el-button> | |||
| </el-col> | |||
| <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar> | |||
| </el-row> | |||
| <el-table v-loading="loading" :data="AppletServiceList" @selection-change="handleSelectionChange"> | |||
| <el-table-column type="selection" width="55" align="center" /> | |||
| <el-table-column label="唯一标识" align="center" prop="id" /> | |||
| <el-table-column label="标题" align="center" prop="title" v-if="columns[0].visible"/> | |||
| <el-table-column label="视频" align="center" prop="video" v-if="columns[1].visible"/> | |||
| <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | |||
| <template slot-scope="scope"> | |||
| <el-button | |||
| size="mini" | |||
| type="text" | |||
| icon="el-icon-edit" | |||
| @click="handleUpdate(scope.row)" | |||
| v-hasPermi="['model:AppletService:edit']" | |||
| >修改</el-button> | |||
| <el-button | |||
| size="mini" | |||
| type="text" | |||
| icon="el-icon-delete" | |||
| @click="handleDelete(scope.row)" | |||
| v-hasPermi="['model:AppletService:remove']" | |||
| >删除</el-button> | |||
| </template> | |||
| </el-table-column> | |||
| </el-table> | |||
| <pagination | |||
| v-show="total>0" | |||
| :total="total" | |||
| :page.sync="queryParams.pageNum" | |||
| :limit.sync="queryParams.pageSize" | |||
| @pagination="getList" | |||
| /> | |||
| <!-- 添加或修改平台&服务介绍信息对话框 --> | |||
| <el-dialog :title="title" :visible.sync="open" width="50%" append-to-body> | |||
| <el-form ref="form" :model="form" :rules="rules" label-width="108px" inline class="dialog-form-two"> | |||
| <el-form-item label="标题" prop="title"> | |||
| <el-input v-model="form.title" placeholder="请输入标题" /> | |||
| </el-form-item> | |||
| <el-form-item label="视频" prop="video"> | |||
| <el-input v-model="form.video" placeholder="请输入视频" /> | |||
| </el-form-item> | |||
| <el-form-item label="删除标识" prop="delFlag"> | |||
| <el-input v-model="form.delFlag" placeholder="请输入删除标识" /> | |||
| </el-form-item> | |||
| </el-form> | |||
| <div slot="footer" class="dialog-footer"> | |||
| <el-button type="primary" @click="submitForm">确 定</el-button> | |||
| <el-button @click="cancel">取 消</el-button> | |||
| </div> | |||
| </el-dialog> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import { listAppletService, getAppletService, delAppletService, addAppletService, updateAppletService, exportAppletService } from "@/api/model/AppletService"; | |||
| export default { | |||
| name: "AppletService", | |||
| data() { | |||
| return { | |||
| // 遮罩层 | |||
| loading: true, | |||
| // 导出遮罩层 | |||
| exportLoading: false, | |||
| // 选中数组 | |||
| ids: [], | |||
| // 非单个禁用 | |||
| single: true, | |||
| // 非多个禁用 | |||
| multiple: true, | |||
| // 显示搜索条件 | |||
| showSearch: true, | |||
| // 总条数 | |||
| total: 0, | |||
| // 平台&服务介绍信息表格数据 | |||
| AppletServiceList: [], | |||
| // 弹出层标题 | |||
| title: "", | |||
| // 是否显示弹出层 | |||
| open: false, | |||
| // 查询参数 | |||
| queryParams: { | |||
| pageNum: 1, | |||
| pageSize: 10, | |||
| title: null, | |||
| video: null, | |||
| }, | |||
| // 表单参数 | |||
| form: {}, | |||
| // 表单校验 | |||
| rules: { | |||
| title: [ | |||
| { required: true, message: "标题不能为空", trigger: "blur" } | |||
| ], | |||
| delFlag: [ | |||
| { required: true, message: "删除标识不能为空", trigger: "blur" } | |||
| ], | |||
| }, | |||
| columns: [ | |||
| { key: 1, label: "标题", visible: true }, | |||
| { key: 2, label: "视频", visible: true }, | |||
| ], | |||
| }; | |||
| }, | |||
| created() { | |||
| this.getList(); | |||
| }, | |||
| methods: { | |||
| /** 查询平台&服务介绍信息列表 */ | |||
| getList() { | |||
| this.loading = true; | |||
| listAppletService(this.queryParams).then(response => { | |||
| this.AppletServiceList = response.rows; | |||
| this.total = response.total; | |||
| this.loading = false; | |||
| }); | |||
| }, | |||
| // 取消按钮 | |||
| cancel() { | |||
| this.open = false; | |||
| this.reset(); | |||
| }, | |||
| // 表单重置 | |||
| reset() { | |||
| this.form = { | |||
| id: null, | |||
| title: null, | |||
| video: null, | |||
| delFlag: null, | |||
| createBy: null, | |||
| createTime: null, | |||
| updateBy: null, | |||
| updateTime: null, | |||
| }; | |||
| this.resetForm("form"); | |||
| }, | |||
| /** 搜索按钮操作 */ | |||
| handleQuery() { | |||
| this.queryParams.pageNum = 1; | |||
| this.getList(); | |||
| }, | |||
| /** 重置按钮操作 */ | |||
| resetQuery() { | |||
| this.resetForm("queryForm"); | |||
| this.handleQuery(); | |||
| }, | |||
| // 多选框选中数据 | |||
| handleSelectionChange(selection) { | |||
| this.ids = selection.map(item => item.id) | |||
| this.single = selection.length!==1 | |||
| this.multiple = !selection.length | |||
| }, | |||
| /** 新增按钮操作 */ | |||
| handleAdd() { | |||
| this.reset(); | |||
| this.open = true; | |||
| this.title = "添加平台&服务介绍信息"; | |||
| }, | |||
| /** 修改按钮操作 */ | |||
| handleUpdate(row) { | |||
| this.reset(); | |||
| const id = row.id || this.ids | |||
| getAppletService(id).then(response => { | |||
| this.form = response.data; | |||
| this.open = true; | |||
| this.title = "修改平台&服务介绍信息"; | |||
| }); | |||
| }, | |||
| /** 提交按钮 */ | |||
| submitForm() { | |||
| this.$refs["form"].validate(valid => { | |||
| if (valid) { | |||
| if (this.form.id != null) { | |||
| updateAppletService(this.form).then(response => { | |||
| this.$modal.msgSuccess("修改成功"); | |||
| this.open = false; | |||
| this.getList(); | |||
| }); | |||
| } else { | |||
| addAppletService(this.form).then(response => { | |||
| this.$modal.msgSuccess("新增成功"); | |||
| this.open = false; | |||
| this.getList(); | |||
| }); | |||
| } | |||
| } | |||
| }); | |||
| }, | |||
| /** 删除按钮操作 */ | |||
| handleDelete(row) { | |||
| const ids = row.id || this.ids; | |||
| this.$modal.confirm('是否确认删除平台&服务介绍信息编号为"' + ids + '"的数据项?').then(function() { | |||
| return delAppletService(ids); | |||
| }).then(() => { | |||
| this.getList(); | |||
| this.$modal.msgSuccess("删除成功"); | |||
| }).catch(() => {}); | |||
| }, | |||
| /** 导出按钮操作 */ | |||
| handleExport() { | |||
| const queryParams = this.queryParams; | |||
| this.$modal.confirm('是否确认导出所有平台&服务介绍信息数据项?').then(() => { | |||
| this.exportLoading = true; | |||
| return exportAppletService(queryParams); | |||
| }).then(response => { | |||
| this.download(response.msg); | |||
| this.exportLoading = false; | |||
| }).catch(() => {}); | |||
| } | |||
| } | |||
| }; | |||
| </script> | |||
| @ -0,0 +1,326 @@ | |||
| <template> | |||
| <div class="app-container"> | |||
| <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="medium" class="ry_form"> | |||
| <el-form-item label="服务日期" prop="date"> | |||
| <el-date-picker | |||
| clearable | |||
| size="small" | |||
| v-model="queryParams.date" | |||
| type="datetime" | |||
| value-format="yyyy-MM-dd HH:mm:ss" | |||
| placeholder="选择服务日期"> | |||
| </el-date-picker> | |||
| </el-form-item> | |||
| <el-form-item label="关联订单ID" prop="orderId"> | |||
| <el-input | |||
| v-model="queryParams.orderId" | |||
| placeholder="请输入关联订单ID" | |||
| clearable | |||
| size="small" | |||
| @keyup.enter.native="handleQuery" | |||
| /> | |||
| </el-form-item> | |||
| <el-form-item class="flex_one tr"> | |||
| <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> | |||
| <el-row :gutter="10" class="mb8"> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="primary" | |||
| plain | |||
| icon="el-icon-plus" | |||
| size="mini" | |||
| @click="handleAdd" | |||
| v-hasPermi="['model:AppletServiceDate:add']" | |||
| >新增</el-button> | |||
| </el-col> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="success" | |||
| plain | |||
| icon="el-icon-edit" | |||
| size="mini" | |||
| :disabled="single" | |||
| @click="handleUpdate" | |||
| v-hasPermi="['model:AppletServiceDate:edit']" | |||
| >修改</el-button> | |||
| </el-col> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="danger" | |||
| plain | |||
| icon="el-icon-delete" | |||
| size="mini" | |||
| :disabled="multiple" | |||
| @click="handleDelete" | |||
| v-hasPermi="['model:AppletServiceDate:remove']" | |||
| >删除</el-button> | |||
| </el-col> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="warning" | |||
| plain | |||
| icon="el-icon-download" | |||
| size="mini" | |||
| :loading="exportLoading" | |||
| @click="handleExport" | |||
| v-hasPermi="['model:AppletServiceDate:export']" | |||
| >导出</el-button> | |||
| </el-col> | |||
| <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar> | |||
| </el-row> | |||
| <el-table v-loading="loading" :data="AppletServiceDateList" @selection-change="handleSelectionChange"> | |||
| <el-table-column type="selection" width="55" align="center" /> | |||
| <el-table-column label="唯一标识" align="center" prop="id" /> | |||
| <el-table-column label="服务日期" align="center" prop="date" width="180" v-if="columns[0].visible"> | |||
| <template slot-scope="scope"> | |||
| <span>{{ parseTime(scope.row.date, '')}}</span> | |||
| </template> | |||
| </el-table-column> | |||
| <el-table-column label="服务内容" align="center" prop="details" v-if="columns[1].visible"/> | |||
| <el-table-column label="关联订单ID" align="center" prop="orderId" v-if="columns[2].visible"/> | |||
| <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | |||
| <template slot-scope="scope"> | |||
| <el-button | |||
| size="mini" | |||
| type="text" | |||
| icon="el-icon-edit" | |||
| @click="handleUpdate(scope.row)" | |||
| v-hasPermi="['model:AppletServiceDate:edit']" | |||
| >修改</el-button> | |||
| <el-button | |||
| size="mini" | |||
| type="text" | |||
| icon="el-icon-delete" | |||
| @click="handleDelete(scope.row)" | |||
| v-hasPermi="['model:AppletServiceDate:remove']" | |||
| >删除</el-button> | |||
| </template> | |||
| </el-table-column> | |||
| </el-table> | |||
| <pagination | |||
| v-show="total>0" | |||
| :total="total" | |||
| :page.sync="queryParams.pageNum" | |||
| :limit.sync="queryParams.pageSize" | |||
| @pagination="getList" | |||
| /> | |||
| <!-- 添加或修改服务日期对话框 --> | |||
| <el-dialog :title="title" :visible.sync="open" width="50%" append-to-body> | |||
| <el-form ref="form" :model="form" :rules="rules" label-width="108px" inline class="dialog-form-two"> | |||
| <el-form-item label="服务日期" prop="date"> | |||
| <el-date-picker clearable size="small" | |||
| v-model="form.date" | |||
| type="datetime" | |||
| value-format="yyyy-MM-dd HH:mm:ss" | |||
| placeholder="选择服务日期"> | |||
| </el-date-picker> | |||
| </el-form-item> | |||
| <el-form-item label="服务内容" prop="details"> | |||
| <el-input v-model="form.details" type="textarea" placeholder="请输入内容" /> | |||
| </el-form-item> | |||
| <el-form-item label="关联订单ID" prop="orderId"> | |||
| <el-input v-model="form.orderId" placeholder="请输入关联订单ID" /> | |||
| </el-form-item> | |||
| <el-form-item label="删除标识" prop="delFlag"> | |||
| <el-input v-model="form.delFlag" placeholder="请输入删除标识" /> | |||
| </el-form-item> | |||
| </el-form> | |||
| <div slot="footer" class="dialog-footer"> | |||
| <el-button type="primary" @click="submitForm">确 定</el-button> | |||
| <el-button @click="cancel">取 消</el-button> | |||
| </div> | |||
| </el-dialog> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import { listAppletServiceDate, getAppletServiceDate, delAppletServiceDate, addAppletServiceDate, updateAppletServiceDate, exportAppletServiceDate } from "@/api/model/AppletServiceDate"; | |||
| export default { | |||
| name: "AppletServiceDate", | |||
| data() { | |||
| return { | |||
| // 遮罩层 | |||
| loading: true, | |||
| // 导出遮罩层 | |||
| exportLoading: false, | |||
| // 选中数组 | |||
| ids: [], | |||
| // 非单个禁用 | |||
| single: true, | |||
| // 非多个禁用 | |||
| multiple: true, | |||
| // 显示搜索条件 | |||
| showSearch: true, | |||
| // 总条数 | |||
| total: 0, | |||
| // 服务日期表格数据 | |||
| AppletServiceDateList: [], | |||
| // 弹出层标题 | |||
| title: "", | |||
| // 是否显示弹出层 | |||
| open: false, | |||
| // 查询参数 | |||
| queryParams: { | |||
| pageNum: 1, | |||
| pageSize: 10, | |||
| date: null, | |||
| details: null, | |||
| orderId: null, | |||
| }, | |||
| // 表单参数 | |||
| form: {}, | |||
| // 表单校验 | |||
| rules: { | |||
| date: [ | |||
| { required: true, message: "服务日期不能为空", trigger: "blur" } | |||
| ], | |||
| details: [ | |||
| { required: true, message: "服务内容不能为空", trigger: "blur" } | |||
| ], | |||
| orderId: [ | |||
| { required: true, message: "关联订单ID不能为空", trigger: "blur" } | |||
| ], | |||
| delFlag: [ | |||
| { required: true, message: "删除标识不能为空", trigger: "blur" } | |||
| ], | |||
| }, | |||
| columns: [ | |||
| { key: 1, label: "服务日期", visible: true }, | |||
| { key: 2, label: "服务内容", visible: true }, | |||
| { key: 3, label: "关联订单ID", visible: true }, | |||
| ], | |||
| }; | |||
| }, | |||
| created() { | |||
| this.getList(); | |||
| }, | |||
| methods: { | |||
| /** 查询服务日期列表 */ | |||
| getList() { | |||
| this.loading = true; | |||
| listAppletServiceDate(this.queryParams).then(response => { | |||
| this.AppletServiceDateList = response.rows; | |||
| this.total = response.total; | |||
| this.loading = false; | |||
| }); | |||
| }, | |||
| // 取消按钮 | |||
| cancel() { | |||
| this.open = false; | |||
| this.reset(); | |||
| }, | |||
| // 表单重置 | |||
| reset() { | |||
| this.form = { | |||
| id: null, | |||
| date: null, | |||
| details: null, | |||
| orderId: null, | |||
| delFlag: null, | |||
| createBy: null, | |||
| createTime: null, | |||
| updateBy: null, | |||
| updateTime: null, | |||
| }; | |||
| this.resetForm("form"); | |||
| }, | |||
| /** 搜索按钮操作 */ | |||
| handleQuery() { | |||
| this.queryParams.pageNum = 1; | |||
| this.getList(); | |||
| }, | |||
| /** 重置按钮操作 */ | |||
| resetQuery() { | |||
| this.resetForm("queryForm"); | |||
| this.handleQuery(); | |||
| }, | |||
| // 多选框选中数据 | |||
| handleSelectionChange(selection) { | |||
| this.ids = selection.map(item => item.id) | |||
| this.single = selection.length!==1 | |||
| this.multiple = !selection.length | |||
| }, | |||
| /** 新增按钮操作 */ | |||
| handleAdd() { | |||
| this.reset(); | |||
| this.open = true; | |||
| this.title = "添加服务日期"; | |||
| }, | |||
| /** 修改按钮操作 */ | |||
| handleUpdate(row) { | |||
| this.reset(); | |||
| const id = row.id || this.ids | |||
| getAppletServiceDate(id).then(response => { | |||
| this.form = response.data; | |||
| this.open = true; | |||
| this.title = "修改服务日期"; | |||
| }); | |||
| }, | |||
| /** 提交按钮 */ | |||
| submitForm() { | |||
| this.$refs["form"].validate(valid => { | |||
| if (valid) { | |||
| if (this.form.id != null) { | |||
| updateAppletServiceDate(this.form).then(response => { | |||
| this.$modal.msgSuccess("修改成功"); | |||
| this.open = false; | |||
| this.getList(); | |||
| }); | |||
| } else { | |||
| addAppletServiceDate(this.form).then(response => { | |||
| this.$modal.msgSuccess("新增成功"); | |||
| this.open = false; | |||
| this.getList(); | |||
| }); | |||
| } | |||
| } | |||
| }); | |||
| }, | |||
| /** 删除按钮操作 */ | |||
| handleDelete(row) { | |||
| const ids = row.id || this.ids; | |||
| this.$modal.confirm('是否确认删除服务日期编号为"' + ids + '"的数据项?').then(function() { | |||
| return delAppletServiceDate(ids); | |||
| }).then(() => { | |||
| this.getList(); | |||
| this.$modal.msgSuccess("删除成功"); | |||
| }).catch(() => {}); | |||
| }, | |||
| /** 导出按钮操作 */ | |||
| handleExport() { | |||
| const queryParams = this.queryParams; | |||
| this.$modal.confirm('是否确认导出所有服务日期数据项?').then(() => { | |||
| this.exportLoading = true; | |||
| return exportAppletServiceDate(queryParams); | |||
| }).then(response => { | |||
| this.download(response.msg); | |||
| this.exportLoading = false; | |||
| }).catch(() => {}); | |||
| } | |||
| } | |||
| }; | |||
| </script> | |||
| @ -0,0 +1,345 @@ | |||
| <template> | |||
| <div class="app-container"> | |||
| <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="medium" class="ry_form"> | |||
| <el-form-item label="服务类型" prop="serviceType"> | |||
| <el-select v-model="queryParams.serviceType" placeholder="请选择服务类型" clearable size="small"> | |||
| </el-select> | |||
| </el-form-item> | |||
| <el-form-item label="服务时间" prop="serviceTime"> | |||
| <el-date-picker | |||
| clearable | |||
| size="small" | |||
| v-model="queryParams.serviceTime" | |||
| type="datetime" | |||
| value-format="yyyy-MM-dd HH:mm:ss" | |||
| placeholder="选择服务时间"> | |||
| </el-date-picker> | |||
| </el-form-item> | |||
| <el-form-item label="服务地点" prop="serviceSpot"> | |||
| <el-input | |||
| v-model="queryParams.serviceSpot" | |||
| placeholder="请输入服务地点" | |||
| clearable | |||
| size="small" | |||
| @keyup.enter.native="handleQuery" | |||
| /> | |||
| </el-form-item> | |||
| <el-form-item class="flex_one tr"> | |||
| <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> | |||
| <el-row :gutter="10" class="mb8"> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="primary" | |||
| plain | |||
| icon="el-icon-plus" | |||
| size="mini" | |||
| @click="handleAdd" | |||
| v-hasPermi="['model:AppletServiceLog:add']" | |||
| >新增</el-button> | |||
| </el-col> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="success" | |||
| plain | |||
| icon="el-icon-edit" | |||
| size="mini" | |||
| :disabled="single" | |||
| @click="handleUpdate" | |||
| v-hasPermi="['model:AppletServiceLog:edit']" | |||
| >修改</el-button> | |||
| </el-col> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="danger" | |||
| plain | |||
| icon="el-icon-delete" | |||
| size="mini" | |||
| :disabled="multiple" | |||
| @click="handleDelete" | |||
| v-hasPermi="['model:AppletServiceLog:remove']" | |||
| >删除</el-button> | |||
| </el-col> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="warning" | |||
| plain | |||
| icon="el-icon-download" | |||
| size="mini" | |||
| :loading="exportLoading" | |||
| @click="handleExport" | |||
| v-hasPermi="['model:AppletServiceLog:export']" | |||
| >导出</el-button> | |||
| </el-col> | |||
| <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar> | |||
| </el-row> | |||
| <el-table v-loading="loading" :data="AppletServiceLogList" @selection-change="handleSelectionChange"> | |||
| <el-table-column type="selection" width="55" align="center" /> | |||
| <el-table-column label="唯一标识" align="center" prop="id" /> | |||
| <el-table-column label="服务类型" align="center" prop="serviceType" v-if="columns[0].visible"/> | |||
| <el-table-column label="服务时间" align="center" prop="serviceTime" width="180" v-if="columns[1].visible"> | |||
| <template slot-scope="scope"> | |||
| <span>{{ parseTime(scope.row.serviceTime, '')}}</span> | |||
| </template> | |||
| </el-table-column> | |||
| <el-table-column label="服务地点" align="center" prop="serviceSpot" v-if="columns[2].visible"/> | |||
| <el-table-column label="文字记录" align="center" prop="text" v-if="columns[3].visible"/> | |||
| <el-table-column label="图片记录" align="center" prop="image" v-if="columns[4].visible"/> | |||
| <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | |||
| <template slot-scope="scope"> | |||
| <el-button | |||
| size="mini" | |||
| type="text" | |||
| icon="el-icon-edit" | |||
| @click="handleUpdate(scope.row)" | |||
| v-hasPermi="['model:AppletServiceLog:edit']" | |||
| >修改</el-button> | |||
| <el-button | |||
| size="mini" | |||
| type="text" | |||
| icon="el-icon-delete" | |||
| @click="handleDelete(scope.row)" | |||
| v-hasPermi="['model:AppletServiceLog:remove']" | |||
| >删除</el-button> | |||
| </template> | |||
| </el-table-column> | |||
| </el-table> | |||
| <pagination | |||
| v-show="total>0" | |||
| :total="total" | |||
| :page.sync="queryParams.pageNum" | |||
| :limit.sync="queryParams.pageSize" | |||
| @pagination="getList" | |||
| /> | |||
| <!-- 添加或修改服务记录对话框 --> | |||
| <el-dialog :title="title" :visible.sync="open" width="50%" append-to-body> | |||
| <el-form ref="form" :model="form" :rules="rules" label-width="108px" inline class="dialog-form-two"> | |||
| <el-form-item label="服务时间" prop="serviceTime"> | |||
| <el-date-picker clearable size="small" | |||
| v-model="form.serviceTime" | |||
| type="datetime" | |||
| value-format="yyyy-MM-dd HH:mm:ss" | |||
| placeholder="选择服务时间"> | |||
| </el-date-picker> | |||
| </el-form-item> | |||
| <el-form-item label="服务地点" prop="serviceSpot"> | |||
| <el-input v-model="form.serviceSpot" placeholder="请输入服务地点" /> | |||
| </el-form-item> | |||
| <el-form-item label="文字记录" prop="text"> | |||
| <el-input v-model="form.text" type="textarea" placeholder="请输入内容" /> | |||
| </el-form-item> | |||
| <el-form-item label="图片记录"> | |||
| <imageUpload v-model="form.image"/> | |||
| </el-form-item> | |||
| <el-form-item label="删除标识" prop="delFlag"> | |||
| <el-input v-model="form.delFlag" placeholder="请输入删除标识" /> | |||
| </el-form-item> | |||
| </el-form> | |||
| <div slot="footer" class="dialog-footer"> | |||
| <el-button type="primary" @click="submitForm">确 定</el-button> | |||
| <el-button @click="cancel">取 消</el-button> | |||
| </div> | |||
| </el-dialog> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import { listAppletServiceLog, getAppletServiceLog, delAppletServiceLog, addAppletServiceLog, updateAppletServiceLog, exportAppletServiceLog } from "@/api/model/AppletServiceLog"; | |||
| export default { | |||
| name: "AppletServiceLog", | |||
| data() { | |||
| return { | |||
| // 遮罩层 | |||
| loading: true, | |||
| // 导出遮罩层 | |||
| exportLoading: false, | |||
| // 选中数组 | |||
| ids: [], | |||
| // 非单个禁用 | |||
| single: true, | |||
| // 非多个禁用 | |||
| multiple: true, | |||
| // 显示搜索条件 | |||
| showSearch: true, | |||
| // 总条数 | |||
| total: 0, | |||
| // 服务记录表格数据 | |||
| AppletServiceLogList: [], | |||
| // 弹出层标题 | |||
| title: "", | |||
| // 是否显示弹出层 | |||
| open: false, | |||
| // 查询参数 | |||
| queryParams: { | |||
| pageNum: 1, | |||
| pageSize: 10, | |||
| serviceType: null, | |||
| serviceTime: null, | |||
| serviceSpot: null, | |||
| text: null, | |||
| image: null, | |||
| }, | |||
| // 表单参数 | |||
| form: {}, | |||
| // 表单校验 | |||
| rules: { | |||
| serviceType: [ | |||
| { required: true, message: "服务类型不能为空", trigger: "change" } | |||
| ], | |||
| serviceTime: [ | |||
| { required: true, message: "服务时间不能为空", trigger: "blur" } | |||
| ], | |||
| serviceSpot: [ | |||
| { required: true, message: "服务地点不能为空", trigger: "blur" } | |||
| ], | |||
| delFlag: [ | |||
| { required: true, message: "删除标识不能为空", trigger: "blur" } | |||
| ], | |||
| }, | |||
| columns: [ | |||
| { key: 1, label: "服务类型", visible: true }, | |||
| { key: 2, label: "服务时间", visible: true }, | |||
| { key: 3, label: "服务地点", visible: true }, | |||
| { key: 4, label: "文字记录", visible: true }, | |||
| { key: 5, label: "图片记录", visible: false }, | |||
| ], | |||
| }; | |||
| }, | |||
| created() { | |||
| this.getList(); | |||
| }, | |||
| methods: { | |||
| /** 查询服务记录列表 */ | |||
| getList() { | |||
| this.loading = true; | |||
| listAppletServiceLog(this.queryParams).then(response => { | |||
| this.AppletServiceLogList = response.rows; | |||
| this.total = response.total; | |||
| this.loading = false; | |||
| }); | |||
| }, | |||
| // 取消按钮 | |||
| cancel() { | |||
| this.open = false; | |||
| this.reset(); | |||
| }, | |||
| // 表单重置 | |||
| reset() { | |||
| this.form = { | |||
| id: null, | |||
| serviceType: null, | |||
| serviceTime: null, | |||
| serviceSpot: null, | |||
| text: null, | |||
| image: null, | |||
| delFlag: null, | |||
| createBy: null, | |||
| createTime: null, | |||
| updateBy: null, | |||
| updateTime: null, | |||
| }; | |||
| this.resetForm("form"); | |||
| }, | |||
| /** 搜索按钮操作 */ | |||
| handleQuery() { | |||
| this.queryParams.pageNum = 1; | |||
| this.getList(); | |||
| }, | |||
| /** 重置按钮操作 */ | |||
| resetQuery() { | |||
| this.resetForm("queryForm"); | |||
| this.handleQuery(); | |||
| }, | |||
| // 多选框选中数据 | |||
| handleSelectionChange(selection) { | |||
| this.ids = selection.map(item => item.id) | |||
| this.single = selection.length!==1 | |||
| this.multiple = !selection.length | |||
| }, | |||
| /** 新增按钮操作 */ | |||
| handleAdd() { | |||
| this.reset(); | |||
| this.open = true; | |||
| this.title = "添加服务记录"; | |||
| }, | |||
| /** 修改按钮操作 */ | |||
| handleUpdate(row) { | |||
| this.reset(); | |||
| const id = row.id || this.ids | |||
| getAppletServiceLog(id).then(response => { | |||
| this.form = response.data; | |||
| this.open = true; | |||
| this.title = "修改服务记录"; | |||
| }); | |||
| }, | |||
| /** 提交按钮 */ | |||
| submitForm() { | |||
| this.$refs["form"].validate(valid => { | |||
| if (valid) { | |||
| if (this.form.id != null) { | |||
| updateAppletServiceLog(this.form).then(response => { | |||
| this.$modal.msgSuccess("修改成功"); | |||
| this.open = false; | |||
| this.getList(); | |||
| }); | |||
| } else { | |||
| addAppletServiceLog(this.form).then(response => { | |||
| this.$modal.msgSuccess("新增成功"); | |||
| this.open = false; | |||
| this.getList(); | |||
| }); | |||
| } | |||
| } | |||
| }); | |||
| }, | |||
| /** 删除按钮操作 */ | |||
| handleDelete(row) { | |||
| const ids = row.id || this.ids; | |||
| this.$modal.confirm('是否确认删除服务记录编号为"' + ids + '"的数据项?').then(function() { | |||
| return delAppletServiceLog(ids); | |||
| }).then(() => { | |||
| this.getList(); | |||
| this.$modal.msgSuccess("删除成功"); | |||
| }).catch(() => {}); | |||
| }, | |||
| /** 导出按钮操作 */ | |||
| handleExport() { | |||
| const queryParams = this.queryParams; | |||
| this.$modal.confirm('是否确认导出所有服务记录数据项?').then(() => { | |||
| this.exportLoading = true; | |||
| return exportAppletServiceLog(queryParams); | |||
| }).then(response => { | |||
| this.download(response.msg); | |||
| this.exportLoading = false; | |||
| }).catch(() => {}); | |||
| } | |||
| } | |||
| }; | |||
| </script> | |||
| @ -0,0 +1,294 @@ | |||
| <template> | |||
| <div class="app-container"> | |||
| <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="medium" class="ry_form"> | |||
| <el-form-item label="标题" prop="title"> | |||
| <el-input | |||
| v-model="queryParams.title" | |||
| placeholder="请输入标题" | |||
| clearable | |||
| size="small" | |||
| @keyup.enter.native="handleQuery" | |||
| /> | |||
| </el-form-item> | |||
| <el-form-item class="flex_one tr"> | |||
| <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> | |||
| <el-row :gutter="10" class="mb8"> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="primary" | |||
| plain | |||
| icon="el-icon-plus" | |||
| size="mini" | |||
| @click="handleAdd" | |||
| v-hasPermi="['model:AppletTrain:add']" | |||
| >新增</el-button> | |||
| </el-col> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="success" | |||
| plain | |||
| icon="el-icon-edit" | |||
| size="mini" | |||
| :disabled="single" | |||
| @click="handleUpdate" | |||
| v-hasPermi="['model:AppletTrain:edit']" | |||
| >修改</el-button> | |||
| </el-col> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="danger" | |||
| plain | |||
| icon="el-icon-delete" | |||
| size="mini" | |||
| :disabled="multiple" | |||
| @click="handleDelete" | |||
| v-hasPermi="['model:AppletTrain:remove']" | |||
| >删除</el-button> | |||
| </el-col> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="warning" | |||
| plain | |||
| icon="el-icon-download" | |||
| size="mini" | |||
| :loading="exportLoading" | |||
| @click="handleExport" | |||
| v-hasPermi="['model:AppletTrain:export']" | |||
| >导出</el-button> | |||
| </el-col> | |||
| <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar> | |||
| </el-row> | |||
| <el-table v-loading="loading" :data="AppletTrainList" @selection-change="handleSelectionChange"> | |||
| <el-table-column type="selection" width="55" align="center" /> | |||
| <el-table-column label="唯一标识" align="center" prop="id" /> | |||
| <el-table-column label="标题" align="center" prop="title" v-if="columns[0].visible"/> | |||
| <el-table-column label="培训内容" align="center" prop="content" v-if="columns[1].visible"/> | |||
| <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | |||
| <template slot-scope="scope"> | |||
| <el-button | |||
| size="mini" | |||
| type="text" | |||
| icon="el-icon-edit" | |||
| @click="handleUpdate(scope.row)" | |||
| v-hasPermi="['model:AppletTrain:edit']" | |||
| >修改</el-button> | |||
| <el-button | |||
| size="mini" | |||
| type="text" | |||
| icon="el-icon-delete" | |||
| @click="handleDelete(scope.row)" | |||
| v-hasPermi="['model:AppletTrain:remove']" | |||
| >删除</el-button> | |||
| </template> | |||
| </el-table-column> | |||
| </el-table> | |||
| <pagination | |||
| v-show="total>0" | |||
| :total="total" | |||
| :page.sync="queryParams.pageNum" | |||
| :limit.sync="queryParams.pageSize" | |||
| @pagination="getList" | |||
| /> | |||
| <!-- 添加或修改服务培训对话框 --> | |||
| <el-dialog :title="title" :visible.sync="open" width="50%" append-to-body> | |||
| <el-form ref="form" :model="form" :rules="rules" label-width="108px" inline class="dialog-form-two"> | |||
| <el-form-item label="标题" prop="title"> | |||
| <el-input v-model="form.title" placeholder="请输入标题" /> | |||
| </el-form-item> | |||
| <el-form-item label="培训内容"> | |||
| <editor v-model="form.content" :min-height="192"/> | |||
| </el-form-item> | |||
| <el-form-item label="删除标识" prop="delFlag"> | |||
| <el-input v-model="form.delFlag" placeholder="请输入删除标识" /> | |||
| </el-form-item> | |||
| </el-form> | |||
| <div slot="footer" class="dialog-footer"> | |||
| <el-button type="primary" @click="submitForm">确 定</el-button> | |||
| <el-button @click="cancel">取 消</el-button> | |||
| </div> | |||
| </el-dialog> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import { listAppletTrain, getAppletTrain, delAppletTrain, addAppletTrain, updateAppletTrain, exportAppletTrain } from "@/api/model/AppletTrain"; | |||
| export default { | |||
| name: "AppletTrain", | |||
| data() { | |||
| return { | |||
| // 遮罩层 | |||
| loading: true, | |||
| // 导出遮罩层 | |||
| exportLoading: false, | |||
| // 选中数组 | |||
| ids: [], | |||
| // 非单个禁用 | |||
| single: true, | |||
| // 非多个禁用 | |||
| multiple: true, | |||
| // 显示搜索条件 | |||
| showSearch: true, | |||
| // 总条数 | |||
| total: 0, | |||
| // 服务培训表格数据 | |||
| AppletTrainList: [], | |||
| // 弹出层标题 | |||
| title: "", | |||
| // 是否显示弹出层 | |||
| open: false, | |||
| // 查询参数 | |||
| queryParams: { | |||
| pageNum: 1, | |||
| pageSize: 10, | |||
| title: null, | |||
| content: null, | |||
| }, | |||
| // 表单参数 | |||
| form: {}, | |||
| // 表单校验 | |||
| rules: { | |||
| title: [ | |||
| { required: true, message: "标题不能为空", trigger: "blur" } | |||
| ], | |||
| content: [ | |||
| { required: true, message: "培训内容不能为空", trigger: "blur" } | |||
| ], | |||
| delFlag: [ | |||
| { required: true, message: "删除标识不能为空", trigger: "blur" } | |||
| ], | |||
| }, | |||
| columns: [ | |||
| { key: 1, label: "标题", visible: true }, | |||
| { key: 2, label: "培训内容", visible: true }, | |||
| ], | |||
| }; | |||
| }, | |||
| created() { | |||
| this.getList(); | |||
| }, | |||
| methods: { | |||
| /** 查询服务培训列表 */ | |||
| getList() { | |||
| this.loading = true; | |||
| listAppletTrain(this.queryParams).then(response => { | |||
| this.AppletTrainList = response.rows; | |||
| this.total = response.total; | |||
| this.loading = false; | |||
| }); | |||
| }, | |||
| // 取消按钮 | |||
| cancel() { | |||
| this.open = false; | |||
| this.reset(); | |||
| }, | |||
| // 表单重置 | |||
| reset() { | |||
| this.form = { | |||
| id: null, | |||
| title: null, | |||
| content: null, | |||
| delFlag: null, | |||
| createBy: null, | |||
| createTime: null, | |||
| updateBy: null, | |||
| updateTime: null, | |||
| }; | |||
| this.resetForm("form"); | |||
| }, | |||
| /** 搜索按钮操作 */ | |||
| handleQuery() { | |||
| this.queryParams.pageNum = 1; | |||
| this.getList(); | |||
| }, | |||
| /** 重置按钮操作 */ | |||
| resetQuery() { | |||
| this.resetForm("queryForm"); | |||
| this.handleQuery(); | |||
| }, | |||
| // 多选框选中数据 | |||
| handleSelectionChange(selection) { | |||
| this.ids = selection.map(item => item.id) | |||
| this.single = selection.length!==1 | |||
| this.multiple = !selection.length | |||
| }, | |||
| /** 新增按钮操作 */ | |||
| handleAdd() { | |||
| this.reset(); | |||
| this.open = true; | |||
| this.title = "添加服务培训"; | |||
| }, | |||
| /** 修改按钮操作 */ | |||
| handleUpdate(row) { | |||
| this.reset(); | |||
| const id = row.id || this.ids | |||
| getAppletTrain(id).then(response => { | |||
| this.form = response.data; | |||
| this.open = true; | |||
| this.title = "修改服务培训"; | |||
| }); | |||
| }, | |||
| /** 提交按钮 */ | |||
| submitForm() { | |||
| this.$refs["form"].validate(valid => { | |||
| if (valid) { | |||
| if (this.form.id != null) { | |||
| updateAppletTrain(this.form).then(response => { | |||
| this.$modal.msgSuccess("修改成功"); | |||
| this.open = false; | |||
| this.getList(); | |||
| }); | |||
| } else { | |||
| addAppletTrain(this.form).then(response => { | |||
| this.$modal.msgSuccess("新增成功"); | |||
| this.open = false; | |||
| this.getList(); | |||
| }); | |||
| } | |||
| } | |||
| }); | |||
| }, | |||
| /** 删除按钮操作 */ | |||
| handleDelete(row) { | |||
| const ids = row.id || this.ids; | |||
| this.$modal.confirm('是否确认删除服务培训编号为"' + ids + '"的数据项?').then(function() { | |||
| return delAppletTrain(ids); | |||
| }).then(() => { | |||
| this.getList(); | |||
| this.$modal.msgSuccess("删除成功"); | |||
| }).catch(() => {}); | |||
| }, | |||
| /** 导出按钮操作 */ | |||
| handleExport() { | |||
| const queryParams = this.queryParams; | |||
| this.$modal.confirm('是否确认导出所有服务培训数据项?').then(() => { | |||
| this.exportLoading = true; | |||
| return exportAppletTrain(queryParams); | |||
| }).then(response => { | |||
| this.download(response.msg); | |||
| this.exportLoading = false; | |||
| }).catch(() => {}); | |||
| } | |||
| } | |||
| }; | |||
| </script> | |||
| @ -0,0 +1,381 @@ | |||
| <template> | |||
| <div class="app-container"> | |||
| <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="medium" class="ry_form"> | |||
| <el-form-item label="昵称" prop="nickName"> | |||
| <el-input | |||
| v-model="queryParams.nickName" | |||
| placeholder="请输入昵称" | |||
| clearable | |||
| size="small" | |||
| @keyup.enter.native="handleQuery" | |||
| /> | |||
| </el-form-item> | |||
| <el-form-item label="手机号" prop="phone"> | |||
| <el-input | |||
| v-model="queryParams.phone" | |||
| placeholder="请输入手机号" | |||
| clearable | |||
| size="small" | |||
| @keyup.enter.native="handleQuery" | |||
| /> | |||
| </el-form-item> | |||
| <el-form-item label="性别" prop="sex"> | |||
| <el-select v-model="queryParams.sex" placeholder="请选择性别" clearable size="small"> | |||
| </el-select> | |||
| </el-form-item> | |||
| <el-form-item label="服务宠物类型" prop="petTypeId"> | |||
| <el-input | |||
| v-model="queryParams.petTypeId" | |||
| placeholder="请输入服务宠物类型" | |||
| clearable | |||
| size="small" | |||
| @keyup.enter.native="handleQuery" | |||
| /> | |||
| </el-form-item> | |||
| <template v-if="showMoreCondition"> | |||
| <el-form-item class="flex_one tr"> | |||
| <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> | |||
| <el-row :gutter="10" class="mb8"> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="primary" | |||
| plain | |||
| icon="el-icon-plus" | |||
| size="mini" | |||
| @click="handleAdd" | |||
| v-hasPermi="['model:AppletUser2:add']" | |||
| >新增</el-button> | |||
| </el-col> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="success" | |||
| plain | |||
| icon="el-icon-edit" | |||
| size="mini" | |||
| :disabled="single" | |||
| @click="handleUpdate" | |||
| v-hasPermi="['model:AppletUser2:edit']" | |||
| >修改</el-button> | |||
| </el-col> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="danger" | |||
| plain | |||
| icon="el-icon-delete" | |||
| size="mini" | |||
| :disabled="multiple" | |||
| @click="handleDelete" | |||
| v-hasPermi="['model:AppletUser2:remove']" | |||
| >删除</el-button> | |||
| </el-col> | |||
| <el-col :span="1.5"> | |||
| <el-button | |||
| type="warning" | |||
| plain | |||
| icon="el-icon-download" | |||
| size="mini" | |||
| :loading="exportLoading" | |||
| @click="handleExport" | |||
| v-hasPermi="['model:AppletUser2:export']" | |||
| >导出</el-button> | |||
| </el-col> | |||
| <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar> | |||
| </el-row> | |||
| <el-table v-loading="loading" :data="AppletUser2List" @selection-change="handleSelectionChange"> | |||
| <el-table-column type="selection" width="55" align="center" /> | |||
| <el-table-column label="唯一标识" align="center" prop="id" /> | |||
| <el-table-column label="头像" align="center" prop="headImage" v-if="columns[0].visible"/> | |||
| <el-table-column label="昵称" align="center" prop="nickName" v-if="columns[1].visible"/> | |||
| <el-table-column label="手机号" align="center" prop="phone" v-if="columns[2].visible"/> | |||
| <el-table-column label="性别" align="center" prop="sex" v-if="columns[3].visible"/> | |||
| <el-table-column label="个人简介" align="center" prop="brief" v-if="columns[4].visible"/> | |||
| <el-table-column label="养宠经验" align="center" prop="experience" v-if="columns[5].visible"/> | |||
| <el-table-column label="服务宠物类型" align="center" prop="petTypeId" v-if="columns[6].visible"/> | |||
| <el-table-column label="基础服务" align="center" prop="serviceBase" v-if="columns[7].visible"/> | |||
| <el-table-column label="增值服务" align="center" prop="serviceIncrease" v-if="columns[8].visible"/> | |||
| <el-table-column label="操作" align="center" class-name="small-padding fixed-width"> | |||
| <template slot-scope="scope"> | |||
| <el-button | |||
| size="mini" | |||
| type="text" | |||
| icon="el-icon-edit" | |||
| @click="handleUpdate(scope.row)" | |||
| v-hasPermi="['model:AppletUser2:edit']" | |||
| >修改</el-button> | |||
| <el-button | |||
| size="mini" | |||
| type="text" | |||
| icon="el-icon-delete" | |||
| @click="handleDelete(scope.row)" | |||
| v-hasPermi="['model:AppletUser2:remove']" | |||
| >删除</el-button> | |||
| </template> | |||
| </el-table-column> | |||
| </el-table> | |||
| <pagination | |||
| v-show="total>0" | |||
| :total="total" | |||
| :page.sync="queryParams.pageNum" | |||
| :limit.sync="queryParams.pageSize" | |||
| @pagination="getList" | |||
| /> | |||
| <!-- 添加或修改用户服务信息对话框 --> | |||
| <el-dialog :title="title" :visible.sync="open" width="50%" append-to-body> | |||
| <el-form ref="form" :model="form" :rules="rules" label-width="108px" inline class="dialog-form-two"> | |||
| <el-form-item label="头像"> | |||
| <imageUpload v-model="form.headImage"/> | |||
| </el-form-item> | |||
| <el-form-item label="昵称" prop="nickName"> | |||
| <el-input v-model="form.nickName" placeholder="请输入昵称" /> | |||
| </el-form-item> | |||
| <el-form-item label="手机号" prop="phone"> | |||
| <el-input v-model="form.phone" placeholder="请输入手机号" /> | |||
| </el-form-item> | |||
| <el-form-item label="个人简介" prop="brief"> | |||
| <el-input v-model="form.brief" type="textarea" placeholder="请输入内容" /> | |||
| </el-form-item> | |||
| <el-form-item label="养宠经验" prop="experience"> | |||
| <el-input v-model="form.experience" type="textarea" placeholder="请输入内容" /> | |||
| </el-form-item> | |||
| <el-form-item label="服务宠物类型" prop="petTypeId"> | |||
| <el-input v-model="form.petTypeId" placeholder="请输入服务宠物类型" /> | |||
| </el-form-item> | |||
| <el-form-item label="基础服务" prop="serviceBase"> | |||
| <el-input v-model="form.serviceBase" type="textarea" placeholder="请输入内容" /> | |||
| </el-form-item> | |||
| <el-form-item label="增值服务" prop="serviceIncrease"> | |||
| <el-input v-model="form.serviceIncrease" type="textarea" placeholder="请输入内容" /> | |||
| </el-form-item> | |||
| <el-form-item label="删除标识" prop="delFlag"> | |||
| <el-input v-model="form.delFlag" placeholder="请输入删除标识" /> | |||
| </el-form-item> | |||
| </el-form> | |||
| <div slot="footer" class="dialog-footer"> | |||
| <el-button type="primary" @click="submitForm">确 定</el-button> | |||
| <el-button @click="cancel">取 消</el-button> | |||
| </div> | |||
| </el-dialog> | |||
| </div> | |||
| </template> | |||
| <script> | |||
| import { listAppletUser2, getAppletUser2, delAppletUser2, addAppletUser2, updateAppletUser2, exportAppletUser2 } from "@/api/model/AppletUser2"; | |||
| export default { | |||
| name: "AppletUser2", | |||
| data() { | |||
| return { | |||
| // 遮罩层 | |||
| loading: true, | |||
| // 导出遮罩层 | |||
| exportLoading: false, | |||
| // 选中数组 | |||
| ids: [], | |||
| // 非单个禁用 | |||
| single: true, | |||
| // 非多个禁用 | |||
| multiple: true, | |||
| // 显示搜索条件 | |||
| showSearch: true, | |||
| // 总条数 | |||
| total: 0, | |||
| // 用户服务信息表格数据 | |||
| AppletUser2List: [], | |||
| // 弹出层标题 | |||
| title: "", | |||
| // 是否显示弹出层 | |||
| open: false, | |||
| // 查询参数 | |||
| queryParams: { | |||
| pageNum: 1, | |||
| pageSize: 10, | |||
| headImage: null, | |||
| nickName: null, | |||
| phone: null, | |||
| sex: null, | |||
| brief: null, | |||
| experience: null, | |||
| petTypeId: null, | |||
| serviceBase: null, | |||
| serviceIncrease: null, | |||
| }, | |||
| // 表单参数 | |||
| form: {}, | |||
| // 表单校验 | |||
| rules: { | |||
| nickName: [ | |||
| { required: true, message: "昵称不能为空", trigger: "blur" } | |||
| ], | |||
| phone: [ | |||
| { required: true, message: "手机号不能为空", trigger: "blur" } | |||
| ], | |||
| sex: [ | |||
| { required: true, message: "性别不能为空", trigger: "change" } | |||
| ], | |||
| delFlag: [ | |||
| { required: true, message: "删除标识不能为空", trigger: "blur" } | |||
| ], | |||
| }, | |||
| columns: [ | |||
| { key: 1, label: "头像", visible: false }, | |||
| { key: 2, label: "昵称", visible: true }, | |||
| { key: 3, label: "手机号", visible: true }, | |||
| { key: 4, label: "性别", visible: true }, | |||
| { key: 5, label: "个人简介", visible: true }, | |||
| { key: 6, label: "养宠经验", visible: true }, | |||
| { key: 7, label: "服务宠物类型", visible: true }, | |||
| { key: 8, label: "基础服务", visible: true }, | |||
| { key: 9, label: "增值服务", visible: true }, | |||
| ], | |||
| }; | |||
| }, | |||
| created() { | |||
| this.getList(); | |||
| }, | |||
| methods: { | |||
| /** 查询用户服务信息列表 */ | |||
| getList() { | |||
| this.loading = true; | |||
| listAppletUser2(this.queryParams).then(response => { | |||
| this.AppletUser2List = response.rows; | |||
| this.total = response.total; | |||
| this.loading = false; | |||
| }); | |||
| }, | |||
| // 取消按钮 | |||
| cancel() { | |||
| this.open = false; | |||
| this.reset(); | |||
| }, | |||
| // 表单重置 | |||
| reset() { | |||
| this.form = { | |||
| id: null, | |||
| headImage: null, | |||
| nickName: null, | |||
| phone: null, | |||
| sex: null, | |||
| brief: null, | |||
| experience: null, | |||
| petTypeId: null, | |||
| serviceBase: null, | |||
| serviceIncrease: null, | |||
| delFlag: null, | |||
| createBy: null, | |||
| createTime: null, | |||
| updateBy: null, | |||
| updateTime: null, | |||
| }; | |||
| this.resetForm("form"); | |||
| }, | |||
| /** 搜索按钮操作 */ | |||
| handleQuery() { | |||
| this.queryParams.pageNum = 1; | |||
| this.getList(); | |||
| }, | |||
| /** 重置按钮操作 */ | |||
| resetQuery() { | |||
| this.resetForm("queryForm"); | |||
| this.handleQuery(); | |||
| }, | |||
| // 多选框选中数据 | |||
| handleSelectionChange(selection) { | |||
| this.ids = selection.map(item => item.id) | |||
| this.single = selection.length!==1 | |||
| this.multiple = !selection.length | |||
| }, | |||
| /** 新增按钮操作 */ | |||
| handleAdd() { | |||
| this.reset(); | |||
| this.open = true; | |||
| this.title = "添加用户服务信息"; | |||
| }, | |||
| /** 修改按钮操作 */ | |||
| handleUpdate(row) { | |||
| this.reset(); | |||
| const id = row.id || this.ids | |||
| getAppletUser2(id).then(response => { | |||
| this.form = response.data; | |||
| this.open = true; | |||
| this.title = "修改用户服务信息"; | |||
| }); | |||
| }, | |||
| /** 提交按钮 */ | |||
| submitForm() { | |||
| this.$refs["form"].validate(valid => { | |||
| if (valid) { | |||
| if (this.form.id != null) { | |||
| updateAppletUser2(this.form).then(response => { | |||
| this.$modal.msgSuccess("修改成功"); | |||
| this.open = false; | |||
| this.getList(); | |||
| }); | |||
| } else { | |||
| addAppletUser2(this.form).then(response => { | |||
| this.$modal.msgSuccess("新增成功"); | |||
| this.open = false; | |||
| this.getList(); | |||
| }); | |||
| } | |||
| } | |||
| }); | |||
| }, | |||
| /** 删除按钮操作 */ | |||
| handleDelete(row) { | |||
| const ids = row.id || this.ids; | |||
| this.$modal.confirm('是否确认删除用户服务信息编号为"' + ids + '"的数据项?').then(function() { | |||
| return delAppletUser2(ids); | |||
| }).then(() => { | |||
| this.getList(); | |||
| this.$modal.msgSuccess("删除成功"); | |||
| }).catch(() => {}); | |||
| }, | |||
| /** 导出按钮操作 */ | |||
| handleExport() { | |||
| const queryParams = this.queryParams; | |||
| this.$modal.confirm('是否确认导出所有用户服务信息数据项?').then(() => { | |||
| this.exportLoading = true; | |||
| return exportAppletUser2(queryParams); | |||
| }).then(response => { | |||
| this.download(response.msg); | |||
| this.exportLoading = false; | |||
| }).catch(() => {}); | |||
| } | |||
| } | |||
| }; | |||
| </script> | |||
| @ -0,0 +1,6 @@ | |||
| { | |||
| "name": "pet-admin", | |||
| "lockfileVersion": 3, | |||
| "requires": true, | |||
| "packages": {} | |||
| } | |||
| @ -0,0 +1,104 @@ | |||
| package com.ruoyi.model.controller; | |||
| import java.util.List; | |||
| import javax.servlet.http.HttpServletResponse; | |||
| import org.springframework.security.access.prepost.PreAuthorize; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.web.bind.annotation.GetMapping; | |||
| import org.springframework.web.bind.annotation.PostMapping; | |||
| import org.springframework.web.bind.annotation.PutMapping; | |||
| import org.springframework.web.bind.annotation.DeleteMapping; | |||
| import org.springframework.web.bind.annotation.PathVariable; | |||
| import org.springframework.web.bind.annotation.RequestBody; | |||
| import org.springframework.web.bind.annotation.RequestMapping; | |||
| import org.springframework.web.bind.annotation.RestController; | |||
| import com.ruoyi.common.annotation.Log; | |||
| import com.ruoyi.common.core.controller.BaseController; | |||
| import com.ruoyi.common.core.domain.AjaxResult; | |||
| import com.ruoyi.common.enums.BusinessType; | |||
| import com.ruoyi.model.domain.AppletTrain; | |||
| import com.ruoyi.model.service.IAppletTrainService; | |||
| import com.ruoyi.common.utils.poi.ExcelUtil; | |||
| import com.ruoyi.common.core.page.TableDataInfo; | |||
| /** | |||
| * 服务培训Controller | |||
| * | |||
| * @author ruoyi | |||
| * @date 2025-03-28 | |||
| */ | |||
| @RestController | |||
| @RequestMapping("/model/AppletTrain") | |||
| public class AppletTrainController extends BaseController | |||
| { | |||
| @Autowired | |||
| private IAppletTrainService appletTrainService; | |||
| /** | |||
| * 查询服务培训列表 | |||
| */ | |||
| @PreAuthorize("@ss.hasPermi('model:AppletTrain:list')") | |||
| @GetMapping("/list") | |||
| public TableDataInfo list(AppletTrain appletTrain) | |||
| { | |||
| startPage(); | |||
| List<AppletTrain> list = appletTrainService.selectAppletTrainList(appletTrain); | |||
| return getDataTable(list); | |||
| } | |||
| /** | |||
| * 导出服务培训列表 | |||
| */ | |||
| @PreAuthorize("@ss.hasPermi('model:AppletTrain:export')") | |||
| @Log(title = "服务培训", businessType = BusinessType.EXPORT) | |||
| @PostMapping("/export") | |||
| public void export(HttpServletResponse response, AppletTrain appletTrain) | |||
| { | |||
| // List<AppletTrain> list = appletTrainService.selectAppletTrainList(appletTrain); | |||
| // ExcelUtil<AppletTrain> util = new ExcelUtil<AppletTrain>(AppletTrain.class); | |||
| // util.exportExcel(response, list, "服务培训数据"); | |||
| } | |||
| /** | |||
| * 获取服务培训详细信息 | |||
| */ | |||
| @PreAuthorize("@ss.hasPermi('model:AppletTrain:query')") | |||
| @GetMapping(value = "/{id}") | |||
| public AjaxResult getInfo(@PathVariable("id") Long id) | |||
| { | |||
| return success(appletTrainService.selectAppletTrainById(id)); | |||
| } | |||
| /** | |||
| * 新增服务培训 | |||
| */ | |||
| @PreAuthorize("@ss.hasPermi('model:AppletTrain:add')") | |||
| @Log(title = "服务培训", businessType = BusinessType.INSERT) | |||
| @PostMapping | |||
| public AjaxResult add(@RequestBody AppletTrain appletTrain) | |||
| { | |||
| return toAjax(appletTrainService.insertAppletTrain(appletTrain)); | |||
| } | |||
| /** | |||
| * 修改服务培训 | |||
| */ | |||
| @PreAuthorize("@ss.hasPermi('model:AppletTrain:edit')") | |||
| @Log(title = "服务培训", businessType = BusinessType.UPDATE) | |||
| @PutMapping | |||
| public AjaxResult edit(@RequestBody AppletTrain appletTrain) | |||
| { | |||
| return toAjax(appletTrainService.updateAppletTrain(appletTrain)); | |||
| } | |||
| /** | |||
| * 删除服务培训 | |||
| */ | |||
| @PreAuthorize("@ss.hasPermi('model:AppletTrain:remove')") | |||
| @Log(title = "服务培训", businessType = BusinessType.DELETE) | |||
| @DeleteMapping("/{ids}") | |||
| public AjaxResult remove(@PathVariable Long[] ids) | |||
| { | |||
| return toAjax(appletTrainService.deleteAppletTrainByIds(ids)); | |||
| } | |||
| } | |||