Commit 42931db4 authored by “yiyousong”'s avatar “yiyousong”

pref:修改列表

parent 6d9f2c01
......@@ -8,6 +8,9 @@
.green{
color:#1BBC9B;
}
.edit{
color:#03d76f;
}
.clofff{
color:#fff;
}
......
......@@ -64,7 +64,7 @@
<!-- 操作 -->
<template slot="action" slot-scope="text">
<a-space size="middle">
<a class="primary" @click="handleEdit(text)">编辑</a>
<a class="edit" @click="handleEdit(text)">编辑</a>
<a class="delete" @click="handleDel(text.id)">删除</a>
</a-space>
</template>
......
......@@ -40,7 +40,7 @@
<!-- 操作 -->
<template slot="action" slot-scope="text">
<a-space size="middle">
<a class="primary" @click="handleEdit(text)">编辑</a>
<a class="edit" @click="handleEdit(text)">编辑</a>
<a class="delete" @click="handleDel(text.id)">删除</a>
</a-space>
</template>
......@@ -113,7 +113,7 @@ export default {
},
{
title: "操作",
width: "10%",
width: "110px",
scopedSlots: { customRender: "action" },
},
];
......
......@@ -77,7 +77,7 @@
<!-- 操作 -->
<template slot="action" slot-scope="text">
<a-space size="middle">
<a class="primary" @click="handleEdit(text)">编辑</a>
<a class="edit" @click="handleEdit(text)">编辑</a>
<a class="primary" @click="handleCheck(text.id)">查看</a>
<a
class="delete"
......@@ -156,7 +156,7 @@ const columns = [
},
{
title: "操作",
width: "10%",
width: "150px",
scopedSlots: { customRender: "action" },
},
];
......
......@@ -18,15 +18,15 @@
v-for="(v, i) in form.appInfoFieldList"
:key="v.fieldCode"
:label="v.fieldName"
:class="{ content: v.fieldType == 'text' }"
:class="{
content: v.fieldType == 'text',
'upload-item': v.fieldType == 'upload',
}"
:prop="`appInfoFieldList.${i}.fieldValue`"
:rules="{
required: v.fieldNull ? false : true,
message: `${v.fieldName}不能为空`,
trigger:
v.fieldType == 'date' || v.fieldType == 'text'
? 'change'
: 'blur',
trigger: v.fieldType == 'text' ? 'blur' : 'change',
}"
>
<a-input
......@@ -53,6 +53,21 @@
<div v-else-if="v.fieldType == 'text'" class="content-box">
<YQuillEditor v-model="v.fieldValue" height="auto"></YQuillEditor>
</div>
<a-upload
v-else-if="v.fieldType == 'upload'"
:action="api2 + 'file/commonupload'"
:multiple="false"
:file-list="v.fileList"
@change="
(info) => {
handleChange(info, v);
}
"
>
<a-button type="primary">
<a-icon type="upload" /> 点击上传
</a-button>
</a-upload>
</a-form-model-item>
</a-form-model>
</div>
......@@ -98,6 +113,10 @@ export default {
},
data() {
return {
api: process.env.VUE_APP_API_BASE_URL.includes("base")
? process.env.VUE_APP_API_BASE_URL.replace("base", "")
: process.env.VUE_APP_API_BASE_URL,
api2: process.env.VUE_APP_API_BASE_URL + "/",
labelCol: {
span: 2,
},
......@@ -151,14 +170,44 @@ export default {
delete v.id;
}
v.fieldValue = "";
if (v.fieldType == "upload") {
v.fileList = [];
}
return v;
});
this.form.appId = this.$route.query.id;
},
// 编辑
onEdit(data) {
data.appInfoFieldList.forEach((v) => {
if (v.fieldType == "upload") {
v.fileList = [
{
uid: v.id,
name: v.fieldValue,
status: "done",
url: v.fieldValue,
},
];
}
});
this.form = { ...data };
},
// 文件上传
handleChange(info, row) {
let fileList = [...info.fileList];
fileList = fileList.slice(-1);
fileList = fileList.map((file) => {
if (file.response) {
file.url = file.response.url;
} else {
file.url = "";
}
return file;
});
row.fileList = fileList;
row.fieldValue = fileList.map((v) => v.url).join(",");
},
},
};
</script>
......@@ -201,4 +250,7 @@ export default {
display: flex;
}
}
.upload-item {
display: block !important;
}
</style>
\ No newline at end of file
......@@ -86,6 +86,10 @@ const fieldTypeItem = [
value: "text",
label: "富文本",
},
{
value: "upload",
label: "文件上传",
},
];
export default {
props: {
......@@ -117,7 +121,7 @@ export default {
fieldName: [
{ required: true, message: "请输入字段名称", trigger: "blur" },
],
fieldTyp: [
fieldType: [
{ required: true, message: "请选择字段类型", trigger: "change" },
],
fieldNull: [
......
......@@ -177,7 +177,7 @@ const leftColumns = [
},
{
title: "操作",
width: "20%",
width: "110px",
scopedSlots: {
customRender: "action",
},
......@@ -199,7 +199,7 @@ const rightColumns = [
},
{
title: "操作",
width: "20%",
width: "110px",
scopedSlots: {
customRender: "action",
},
......
......@@ -198,7 +198,7 @@ const leftColumns = [
},
{
title: "操作",
width: "20%",
width: "110px",
scopedSlots: {
customRender: "action",
},
......@@ -224,7 +224,7 @@ const rightColumns = [
},
{
title: "操作",
width: "20%",
width: "110px",
scopedSlots: {
customRender: "action",
},
......
......@@ -265,7 +265,7 @@ const leftColumns = [
{
title: "操作",
width: "20%",
width: "110px",
scopedSlots: {
customRender: "action",
},
......@@ -292,7 +292,7 @@ const rightColumns = [
},
{
title: "操作",
width: "20%",
width: "110px",
scopedSlots: {
customRender: "action",
},
......
......@@ -253,7 +253,7 @@ const columns = [
},
{
title: "操作",
width: "9%",
width: "120px",
scopedSlots: { customRender: "action" },
},
];
......
......@@ -218,7 +218,7 @@ const leftColumns = [
},
{
title: "操作",
width: "12%",
width: "110px",
scopedSlots: {
customRender: "action",
},
......
......@@ -137,12 +137,14 @@
{{ text.createTime | dateFormat }}
</template>
<!-- 操作 -->
<span slot="action" slot-scope="text">
<div slot="action" slot-scope="text">
<div class="flex flexwrap">
<a class="yewu" type="primary" @click="workModal(text)">业务</a>
<a class="shixiang" @click="addWindowMatter(text)">事项</a>
<a class="edit" type="primary" @click="editModal(text)">编辑</a>
<a class="delete" @click="delWindow(text.id)">删除</a>
</span>
</div>
</div>
</a-table>
</div>
</div>
......@@ -721,7 +723,7 @@ export default {
background-color: #fff;
}
.edit {
color: rgb(41, 184, 41);
color: #03d76f;
margin-right: 5px;
}
.delete {
......
......@@ -63,8 +63,10 @@
</template>
<!-- 操作 -->
<template slot="action" slot-scope="text">
<a type="primary" @click="handleEdit(text)" class="edit">编辑</a>
<a-space>
<a @click="handleEdit(text)" class="edit">编辑</a>
<a class="delet" @click="handleDel(text.id)">删除</a>
</a-space>
</template>
</a-table>
</div>
......@@ -123,7 +125,7 @@ const columns = [
},
{
title: "操作",
width: "10%",
width: "110px",
scopedSlots: {
customRender: "action",
},
......@@ -289,8 +291,7 @@ export default {
letter-spacing: normal;
}
.edit {
color: rgb(41, 184, 41);
margin-right: 40px;
color: #03d76f;
}
.delet {
color: red;
......
......@@ -258,7 +258,7 @@ const leftColumns = [
},
{
title: "操作",
width: "20%",
width: "110px",
scopedSlots: {
customRender: "action",
},
......@@ -307,7 +307,7 @@ const rightColumns = [
},
{
title: "操作",
width: "20%",
width: "110px",
scopedSlots: {
customRender: "action",
},
......
......@@ -231,7 +231,7 @@ const columns = [
{
title: "操作",
width: "12%",
width: "160px",
scopedSlots: {
customRender: "action",
},
......@@ -533,7 +533,7 @@ export default {
object-fit: cover;
}
.edit {
color: #1bbc9b;
color: #03d76f;
}
.edit-pwd {
color: #1890ff;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment