Browse Source

修复

master
主管理员 2 months ago
parent
commit
9919d994a1
11 changed files with 446 additions and 65 deletions
  1. +4
    -4
      CatmDogd-Mall-Front-test/src/api/model/AppletAnswerBase.js
  2. +4
    -4
      CatmDogd-Mall-Front-test/src/api/model/AppletAnswerTrain.js
  3. +4
    -4
      CatmDogd-Mall-Front-test/src/api/model/AppletComment.js
  4. +4
    -4
      CatmDogd-Mall-Front-test/src/api/model/AppletIncrease.js
  5. +4
    -4
      CatmDogd-Mall-Front-test/src/api/model/AppletLicense.js
  6. +30
    -10
      CatmDogd-Mall-Front-test/src/views/model/AppletAnswerBase/index.vue
  7. +31
    -11
      CatmDogd-Mall-Front-test/src/views/model/AppletAnswerTrain/index.vue
  8. +31
    -11
      CatmDogd-Mall-Front-test/src/views/model/AppletComment/index.vue
  9. +290
    -0
      CatmDogd-Mall-Front-test/src/views/model/AppletIncrease/index.vue
  10. +29
    -9
      CatmDogd-Mall-Front-test/src/views/model/AppletLicense/index.vue
  11. +15
    -4
      CatmDogd-Mall-Front-test/src/views/model/AppletPetType/index.vue

+ 4
- 4
CatmDogd-Mall-Front-test/src/api/model/AppletAnswerBase.js View File

@ -10,9 +10,9 @@ export function listAppletAnswerBase(query) {
} }
// 查询用户基本考核答案详细 // 查询用户基本考核答案详细
export function getAppletAnswerBase(questionId) {
export function getAppletAnswerBase(id) {
return request({ return request({
url: '/model/AppletAnswerBase/' + questionId,
url: '/model/AppletAnswerBase/' + id,
method: 'get' method: 'get'
}) })
} }
@ -36,9 +36,9 @@ export function updateAppletAnswerBase(data) {
} }
// 删除用户基本考核答案 // 删除用户基本考核答案
export function delAppletAnswerBase(questionId) {
export function delAppletAnswerBase(id) {
return request({ return request({
url: '/model/AppletAnswerBase/' + questionId,
url: '/model/AppletAnswerBase/' + id,
method: 'delete' method: 'delete'
}) })
} }

+ 4
- 4
CatmDogd-Mall-Front-test/src/api/model/AppletAnswerTrain.js View File

@ -10,9 +10,9 @@ export function listAppletAnswerTrain(query) {
} }
// 查询用户培训考核答案详细 // 查询用户培训考核答案详细
export function getAppletAnswerTrain(questionId) {
export function getAppletAnswerTrain(id) {
return request({ return request({
url: '/model/AppletAnswerTrain/' + questionId,
url: '/model/AppletAnswerTrain/' + id,
method: 'get' method: 'get'
}) })
} }
@ -36,9 +36,9 @@ export function updateAppletAnswerTrain(data) {
} }
// 删除用户培训考核答案 // 删除用户培训考核答案
export function delAppletAnswerTrain(questionId) {
export function delAppletAnswerTrain(id) {
return request({ return request({
url: '/model/AppletAnswerTrain/' + questionId,
url: '/model/AppletAnswerTrain/' + id,
method: 'delete' method: 'delete'
}) })
} }

+ 4
- 4
CatmDogd-Mall-Front-test/src/api/model/AppletComment.js View File

@ -10,9 +10,9 @@ export function listAppletComment(query) {
} }
// 查询用户评价详细 // 查询用户评价详细
export function getAppletComment(comment) {
export function getAppletComment(id) {
return request({ return request({
url: '/model/AppletComment/' + comment,
url: '/model/AppletComment/' + id,
method: 'get' method: 'get'
}) })
} }
@ -36,9 +36,9 @@ export function updateAppletComment(data) {
} }
// 删除用户评价 // 删除用户评价
export function delAppletComment(comment) {
export function delAppletComment(id) {
return request({ return request({
url: '/model/AppletComment/' + comment,
url: '/model/AppletComment/' + id,
method: 'delete' method: 'delete'
}) })
} }

+ 4
- 4
CatmDogd-Mall-Front-test/src/api/model/AppletIncrease.js View File

@ -10,9 +10,9 @@ export function listAppletIncrease(query) {
} }
// 查询增值服务详细 // 查询增值服务详细
export function getAppletIncrease(title) {
export function getAppletIncrease(id) {
return request({ return request({
url: '/model/AppletIncrease/' + title,
url: '/model/AppletIncrease/' + id,
method: 'get' method: 'get'
}) })
} }
@ -36,9 +36,9 @@ export function updateAppletIncrease(data) {
} }
// 删除增值服务 // 删除增值服务
export function delAppletIncrease(title) {
export function delAppletIncrease(id) {
return request({ return request({
url: '/model/AppletIncrease/' + title,
url: '/model/AppletIncrease/' + id,
method: 'delete' method: 'delete'
}) })
} }

+ 4
- 4
CatmDogd-Mall-Front-test/src/api/model/AppletLicense.js View File

@ -10,9 +10,9 @@ export function listAppletLicense(query) {
} }
// 查询专业执照信息详细 // 查询专业执照信息详细
export function getAppletLicense(title) {
export function getAppletLicense(id) {
return request({ return request({
url: '/model/AppletLicense/' + title,
url: '/model/AppletLicense/' + id,
method: 'get' method: 'get'
}) })
} }
@ -36,9 +36,9 @@ export function updateAppletLicense(data) {
} }
// 删除专业执照信息 // 删除专业执照信息
export function delAppletLicense(title) {
export function delAppletLicense(id) {
return request({ return request({
url: '/model/AppletLicense/' + title,
url: '/model/AppletLicense/' + id,
method: 'delete' method: 'delete'
}) })
} }

+ 30
- 10
CatmDogd-Mall-Front-test/src/views/model/AppletAnswerBase/index.vue View File

@ -83,6 +83,7 @@
<el-table v-loading="loading" :data="AppletAnswerBaseList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="AppletAnswerBaseList" @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="id" />
<el-table-column label="关联题目ID" align="center" prop="questionId" v-if="columns[0].visible"/> <el-table-column label="关联题目ID" align="center" prop="questionId" v-if="columns[0].visible"/>
<el-table-column label="关联答案ID" align="center" prop="answerId" v-if="columns[1].visible"/> <el-table-column label="关联答案ID" align="center" prop="answerId" v-if="columns[1].visible"/>
<el-table-column label="关联用户ID" align="center" prop="userId" v-if="columns[2].visible"/> <el-table-column label="关联用户ID" align="center" prop="userId" v-if="columns[2].visible"/>
@ -126,6 +127,9 @@
<el-form-item label="关联用户ID" prop="userId"> <el-form-item label="关联用户ID" prop="userId">
<el-input v-model="form.userId" placeholder="请输入关联用户ID" /> <el-input v-model="form.userId" placeholder="请输入关联用户ID" />
</el-form-item> </el-form-item>
<el-form-item label="删除标识" prop="delFlag">
<el-input v-model="form.delFlag" placeholder="请输入删除标识" />
</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>
@ -189,11 +193,15 @@ export default {
{ required: true, message: "关联用户ID不能为空", trigger: "blur" } { required: true, message: "关联用户ID不能为空", trigger: "blur" }
], ],
delFlag: [
{ required: true, message: "删除标识不能为空", trigger: "blur" }
],
}, },
columns: [ columns: [
{ key: 0, label: "关联题目ID", visible: true },
{ key: 1, label: "关联答案ID", visible: true },
{ key: 2, label: "关联用户ID", visible: true },
{ key: 1, label: "关联题目ID", visible: true },
{ key: 2, label: "关联答案ID", visible: true },
{ key: 3, label: "关联用户ID", visible: true },
], ],
}; };
}, },
@ -218,12 +226,24 @@ export default {
// //
reset() { reset() {
this.form = { this.form = {
id: null,
questionId: null, questionId: null,
answerId: null, answerId: null,
userId: null, userId: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -239,7 +259,7 @@ export default {
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.questionId)
this.ids = selection.map(item => item.id)
this.single = selection.length!==1 this.single = selection.length!==1
this.multiple = !selection.length this.multiple = !selection.length
}, },
@ -252,8 +272,8 @@ export default {
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const questionId = row.questionId || this.ids
getAppletAnswerBase(questionId).then(response => {
const id = row.id || this.ids
getAppletAnswerBase(id).then(response => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改用户基本考核答案"; this.title = "修改用户基本考核答案";
@ -263,7 +283,7 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
if (this.form.questionId != null) {
if (this.form.id != null) {
updateAppletAnswerBase(this.form).then(response => { updateAppletAnswerBase(this.form).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
@ -281,9 +301,9 @@ export default {
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const questionIds = row.questionId || this.ids;
this.$modal.confirm('是否确认删除用户基本考核答案编号为"' + questionIds + '"的数据项?').then(function() {
return delAppletAnswerBase(questionIds);
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除用户基本考核答案编号为"' + ids + '"的数据项?').then(function() {
return delAppletAnswerBase(ids);
}).then(() => { }).then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");


+ 31
- 11
CatmDogd-Mall-Front-test/src/views/model/AppletAnswerTrain/index.vue View File

@ -74,6 +74,7 @@
<el-table v-loading="loading" :data="AppletAnswerTrainList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="AppletAnswerTrainList" @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="id" />
<el-table-column label="关联题目ID" align="center" prop="questionId" v-if="columns[0].visible"/> <el-table-column label="关联题目ID" align="center" prop="questionId" v-if="columns[0].visible"/>
<el-table-column label="关联用户ID" align="center" prop="userId" v-if="columns[1].visible"/> <el-table-column label="关联用户ID" align="center" prop="userId" v-if="columns[1].visible"/>
<el-table-column label="答案内容" align="center" prop="answer" v-if="columns[2].visible"/> <el-table-column label="答案内容" align="center" prop="answer" v-if="columns[2].visible"/>
@ -121,6 +122,9 @@
<el-form-item label="审核备注" prop="remark"> <el-form-item label="审核备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" /> <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
</el-form-item> </el-form-item>
<el-form-item label="删除标识" prop="delFlag">
<el-input v-model="form.delFlag" placeholder="请输入删除标识" />
</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>
@ -184,12 +188,16 @@ export default {
{ required: true, message: "答案内容不能为空", trigger: "blur" } { required: true, message: "答案内容不能为空", trigger: "blur" }
], ],
delFlag: [
{ required: true, message: "删除标识不能为空", trigger: "blur" }
],
}, },
columns: [ columns: [
{ key: 0, label: "关联题目ID", visible: true },
{ key: 1, label: "关联用户ID", visible: true },
{ key: 2, label: "答案内容", visible: true },
{ key: 3, label: "审核备注", visible: true },
{ key: 1, label: "关联题目ID", visible: true },
{ key: 2, label: "关联用户ID", visible: true },
{ key: 3, label: "答案内容", visible: true },
{ key: 4, label: "审核备注", visible: true },
], ],
}; };
}, },
@ -214,6 +222,8 @@ export default {
// //
reset() { reset() {
this.form = { this.form = {
id: null,
questionId: null, questionId: null,
userId: null, userId: null,
@ -222,6 +232,16 @@ export default {
remark: null, remark: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -237,7 +257,7 @@ export default {
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.questionId)
this.ids = selection.map(item => item.id)
this.single = selection.length!==1 this.single = selection.length!==1
this.multiple = !selection.length this.multiple = !selection.length
}, },
@ -250,8 +270,8 @@ export default {
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const questionId = row.questionId || this.ids
getAppletAnswerTrain(questionId).then(response => {
const id = row.id || this.ids
getAppletAnswerTrain(id).then(response => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改用户培训考核答案"; this.title = "修改用户培训考核答案";
@ -261,7 +281,7 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
if (this.form.questionId != null) {
if (this.form.id != null) {
updateAppletAnswerTrain(this.form).then(response => { updateAppletAnswerTrain(this.form).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
@ -279,9 +299,9 @@ export default {
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const questionIds = row.questionId || this.ids;
this.$modal.confirm('是否确认删除用户培训考核答案编号为"' + questionIds + '"的数据项?').then(function() {
return delAppletAnswerTrain(questionIds);
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除用户培训考核答案编号为"' + ids + '"的数据项?').then(function() {
return delAppletAnswerTrain(ids);
}).then(() => { }).then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");


+ 31
- 11
CatmDogd-Mall-Front-test/src/views/model/AppletComment/index.vue View File

@ -83,6 +83,7 @@
<el-table v-loading="loading" :data="AppletCommentList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="AppletCommentList" @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="id" />
<el-table-column label="评价内容" align="center" prop="comment" v-if="columns[0].visible"/> <el-table-column label="评价内容" align="center" prop="comment" v-if="columns[0].visible"/>
<el-table-column label="满意度" align="center" prop="satisfaction" v-if="columns[1].visible"/> <el-table-column label="满意度" align="center" prop="satisfaction" v-if="columns[1].visible"/>
<el-table-column label="关联评价人员ID" align="center" prop="user1Id" v-if="columns[2].visible"/> <el-table-column label="关联评价人员ID" align="center" prop="user1Id" v-if="columns[2].visible"/>
@ -130,6 +131,9 @@
<el-form-item label="关联服务人员ID" prop="user2Id"> <el-form-item label="关联服务人员ID" prop="user2Id">
<el-input v-model="form.user2Id" placeholder="请输入关联服务人员ID" /> <el-input v-model="form.user2Id" placeholder="请输入关联服务人员ID" />
</el-form-item> </el-form-item>
<el-form-item label="删除标识" prop="delFlag">
<el-input v-model="form.delFlag" placeholder="请输入删除标识" />
</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>
@ -199,12 +203,16 @@ export default {
{ required: true, message: "关联服务人员ID不能为空", trigger: "blur" } { required: true, message: "关联服务人员ID不能为空", trigger: "blur" }
], ],
delFlag: [
{ required: true, message: "删除标识不能为空", trigger: "blur" }
],
}, },
columns: [ columns: [
{ key: 0, label: "评价内容", visible: true },
{ key: 1, label: "满意度", visible: true },
{ key: 2, label: "关联评价人员ID", visible: true },
{ key: 3, label: "关联服务人员ID", visible: true },
{ key: 1, label: "评价内容", visible: true },
{ key: 2, label: "满意度", visible: true },
{ key: 3, label: "关联评价人员ID", visible: true },
{ key: 4, label: "关联服务人员ID", visible: true },
], ],
}; };
}, },
@ -229,6 +237,8 @@ export default {
// //
reset() { reset() {
this.form = { this.form = {
id: null,
comment: null, comment: null,
satisfaction: null, satisfaction: null,
@ -237,6 +247,16 @@ export default {
user2Id: null, user2Id: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -252,7 +272,7 @@ export default {
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.comment)
this.ids = selection.map(item => item.id)
this.single = selection.length!==1 this.single = selection.length!==1
this.multiple = !selection.length this.multiple = !selection.length
}, },
@ -265,8 +285,8 @@ export default {
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const comment = row.comment || this.ids
getAppletComment(comment).then(response => {
const id = row.id || this.ids
getAppletComment(id).then(response => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改用户评价"; this.title = "修改用户评价";
@ -276,7 +296,7 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
if (this.form.comment != null) {
if (this.form.id != null) {
updateAppletComment(this.form).then(response => { updateAppletComment(this.form).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
@ -294,9 +314,9 @@ export default {
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const comments = row.comment || this.ids;
this.$modal.confirm('是否确认删除用户评价编号为"' + comments + '"的数据项?').then(function() {
return delAppletComment(comments);
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除用户评价编号为"' + ids + '"的数据项?').then(function() {
return delAppletComment(ids);
}).then(() => { }).then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");


+ 290
- 0
CatmDogd-Mall-Front-test/src/views/model/AppletIncrease/index.vue View File

@ -0,0 +1,290 @@
<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:AppletIncrease: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:AppletIncrease: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:AppletIncrease: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:AppletIncrease:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="AppletIncreaseList" @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="detail" 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:AppletIncrease:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['model:AppletIncrease: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="detail">
<el-input v-model="form.detail" 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 { listAppletIncrease, getAppletIncrease, delAppletIncrease, addAppletIncrease, updateAppletIncrease, exportAppletIncrease } from "@/api/model/AppletIncrease";
export default {
name: "AppletIncrease",
data() {
return {
//
loading: true,
//
exportLoading: false,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
AppletIncreaseList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
title: null,
detail: 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;
listAppletIncrease(this.queryParams).then(response => {
this.AppletIncreaseList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
title: null,
detail: 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
getAppletIncrease(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) {
updateAppletIncrease(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addAppletIncrease(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 delAppletIncrease(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams;
this.$modal.confirm('是否确认导出所有增值服务数据项?').then(() => {
this.exportLoading = true;
return exportAppletIncrease(queryParams);
}).then(response => {
this.download(response.msg);
this.exportLoading = false;
}).catch(() => {});
}
}
};
</script>

+ 29
- 9
CatmDogd-Mall-Front-test/src/views/model/AppletLicense/index.vue View File

@ -65,6 +65,7 @@
<el-table v-loading="loading" :data="AppletLicenseList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="AppletLicenseList" @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="id" />
<el-table-column label="标题" align="center" prop="title" v-if="columns[0].visible"/> <el-table-column label="标题" align="center" prop="title" v-if="columns[0].visible"/>
<el-table-column label="图片" align="center" prop="image" v-if="columns[1].visible"/> <el-table-column label="图片" align="center" prop="image" v-if="columns[1].visible"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@ -104,6 +105,9 @@
<el-form-item label="图片"> <el-form-item label="图片">
<imageUpload v-model="form.image"/> <imageUpload v-model="form.image"/>
</el-form-item> </el-form-item>
<el-form-item label="删除标识" prop="delFlag">
<el-input v-model="form.delFlag" placeholder="请输入删除标识" />
</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>
@ -157,10 +161,14 @@ export default {
{ required: true, message: "标题不能为空", trigger: "blur" } { required: true, message: "标题不能为空", trigger: "blur" }
], ],
delFlag: [
{ required: true, message: "删除标识不能为空", trigger: "blur" }
],
}, },
columns: [ columns: [
{ key: 0, label: "标题", visible: true },
{ key: 1, label: "图片", visible: false },
{ key: 1, label: "标题", visible: true },
{ key: 2, label: "图片", visible: false },
], ],
}; };
}, },
@ -185,10 +193,22 @@ export default {
// //
reset() { reset() {
this.form = { this.form = {
id: null,
title: null, title: null,
image: null, image: null,
delFlag: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null,
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -204,7 +224,7 @@ export default {
}, },
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.ids = selection.map(item => item.title)
this.ids = selection.map(item => item.id)
this.single = selection.length!==1 this.single = selection.length!==1
this.multiple = !selection.length this.multiple = !selection.length
}, },
@ -217,8 +237,8 @@ export default {
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset(); this.reset();
const title = row.title || this.ids
getAppletLicense(title).then(response => {
const id = row.id || this.ids
getAppletLicense(id).then(response => {
this.form = response.data; this.form = response.data;
this.open = true; this.open = true;
this.title = "修改专业执照信息"; this.title = "修改专业执照信息";
@ -228,7 +248,7 @@ export default {
submitForm() { submitForm() {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
if (this.form.title != null) {
if (this.form.id != null) {
updateAppletLicense(this.form).then(response => { updateAppletLicense(this.form).then(response => {
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.open = false; this.open = false;
@ -246,9 +266,9 @@ export default {
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const titles = row.title || this.ids;
this.$modal.confirm('是否确认删除专业执照信息编号为"' + titles + '"的数据项?').then(function() {
return delAppletLicense(titles);
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除专业执照信息编号为"' + ids + '"的数据项?').then(function() {
return delAppletLicense(ids);
}).then(() => { }).then(() => {
this.getList(); this.getList();
this.$modal.msgSuccess("删除成功"); this.$modal.msgSuccess("删除成功");


+ 15
- 4
CatmDogd-Mall-Front-test/src/views/model/AppletPetType/index.vue View File

@ -66,8 +66,18 @@
<el-table v-loading="loading" :data="AppletPetTypeList" @selection-change="handleSelectionChange"> <el-table v-loading="loading" :data="AppletPetTypeList" @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="id" /> <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="image" v-if="columns[1].visible"/>
<el-table-column label="标题" align="center" prop="title"/>
<!-- <el-table-column label="图片" align="center" prop="image" v-if="columns[1].visible"/>-->
<el-table-column label="图片" align="center" prop="image">
<template slot-scope="{ row }">
<el-image v-if="row.image" :src="row.image" :preview-src-list="[row.image]" class="small-img circle-img"/>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -87,7 +97,7 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
@ -103,7 +113,8 @@
<el-input v-model="form.title" placeholder="请输入标题" /> <el-input v-model="form.title" placeholder="请输入标题" />
</el-form-item> </el-form-item>
<el-form-item label="图片"> <el-form-item label="图片">
<imageUpload v-model="form.image"/>
<!-- <imageUpload v-model="form.image"/>-->
<oss-image-upload v-model="form.image" :limit="1"></oss-image-upload>
</el-form-item> </el-form-item>
<el-form-item label="删除标识" prop="delFlag"> <el-form-item label="删除标识" prop="delFlag">
<el-input v-model="form.delFlag" placeholder="请输入删除标识" /> <el-input v-model="form.delFlag" placeholder="请输入删除标识" />


Loading…
Cancel
Save