Commit beab1667829c3d36394ccfb2284c1be771728458

Authored by 杨泽宇
1 parent 38e4453f

debug

docs/develop/dict.md
... ... @@ -159,6 +159,6 @@
159 159 | 活动状态 | value |
160 160 | :-----: | :------: |
161 161 | 初始状态 | 0 |
162   - | 机审通过 | 1 |
  162 + | 审核通过 | 1 |
163 163 | 上线 | 2 |
164 164 | 机审失败 | -1 |
165 165 \ No newline at end of file
... ...
src/views/event/config.ts
... ... @@ -46,7 +46,7 @@ export const onlineStatus: EnumArrayItem[] = [
46 46 label: '初始状态',
47 47 value: 0
48 48 }, {
49   - label: '机审通过',
  49 + label: '审核通过',
50 50 value: 1
51 51 }, {
52 52 label: '机审失败',
... ...
src/views/event/feedback/index.vue
... ... @@ -41,6 +41,11 @@ let data = reactive({
41 41 const value1 = ref([]);
42 42 let multipleSelection = ref<any[]>([]);
43 43 const multipleTableRef = ref<InstanceType<typeof ElTable>>();
  44 +const {
  45 + appContext: {
  46 + config: { globalProperties },
  47 + },
  48 +} = getCurrentInstance();
44 49 /**
45 50 * 表格选中响应
46 51 * @param {array} data 选中的一条数据
... ... @@ -71,7 +76,7 @@ const handleLine = (obj: any) =&gt; {
71 76 try {
72 77 let res = await feedbackStatus({
73 78 ids: obj.id,
74   - status: obj.status
  79 + status: obj.status,
75 80 });
76 81 if (res?.data) {
77 82 ElMessage({
... ... @@ -144,7 +149,10 @@ onMounted(() =&gt; {
144 149 <el-button
145 150 type="success"
146 151 @click="
147   - handleLine({ id: multipleSelection.map((i) => i.id).join(','), status: 2 })
  152 + handleLine({
  153 + id: multipleSelection.map((i) => i.id).join(','),
  154 + status: 2,
  155 + })
148 156 "
149 157 :disabled="!multipleSelection.length"
150 158 >批量上线</el-button
... ... @@ -152,7 +160,10 @@ onMounted(() =&gt; {
152 160 <el-button
153 161 type="info"
154 162 @click="
155   - handleLine({ id: multipleSelection.map((i) => i.id).join(','), status: 1 })
  163 + handleLine({
  164 + id: multipleSelection.map((i) => i.id).join(','),
  165 + status: 1,
  166 + })
156 167 "
157 168 :disabled="!multipleSelection.length"
158 169 >批量下线</el-button
... ... @@ -170,19 +181,16 @@ onMounted(() =&gt; {
170 181 ref="multipleTableRef"
171 182 @selection-change="handleSelectionChange"
172 183 >
173   - <el-table-column
174   - type="selection"
175   - align="center"
176   - />
  184 + <el-table-column type="selection" align="center" />
177 185 <el-table-column prop="id" label="ID" align="center"></el-table-column>
178 186 <el-table-column
179   - prop="userName"
180   - label="用户"
  187 + prop="handworkName"
  188 + label="活动名称"
181 189 align="center"
182 190 ></el-table-column>
183 191 <el-table-column
184   - prop="handworkName"
185   - label="活动名称"
  192 + prop="userName"
  193 + label="用户名"
186 194 align="center"
187 195 ></el-table-column>
188 196 <el-table-column
... ... @@ -190,12 +198,24 @@ onMounted(() =&gt; {
190 198 label="评价"
191 199 align="center"
192 200 ></el-table-column>
  201 + <el-table-column prop="imgs" label="评价图片" align="center">
  202 + <template #default="scope">
  203 + <el-image
  204 + style="width: 100px; height: 100px"
  205 + :src="scope.row?.imgs[0]? scope.row?.imgs[0]: globalProperties.$defaultImage"
  206 + :preview-src-list="scope.row?.imgs"
  207 + :initial-index="4"
  208 + fit="cover"
  209 + >
  210 + </el-image>
  211 + </template>
  212 + </el-table-column>
193 213 <el-table-column prop="isAnonymity" label="匿名状态" align="center">
194 214 <template #default="scope">
195 215 {{ scope.row.isAnonymity ? "匿名" : "实名" }}
196 216 </template>
197 217 </el-table-column>
198   - <el-table-column prop="status" label="显示到前台" align="center">
  218 + <el-table-column prop="status" label="状态" align="center">
199 219 <template #default="scope">
200 220 {{ globalFilters(scope.row.status, data.onlineStatus) }}
201 221 </template>
... ... @@ -207,8 +227,18 @@ onMounted(() =&gt; {
207 227 </el-table-column>
208 228 <el-table-column label="操作" align="center">
209 229 <template #default="scope">
210   - <el-button type="text" v-if="~~scope.row.status === 1" @click="handleLine({id: scope.row.id, status: 2})">上线</el-button>
211   - <el-button type="text" v-if="~~scope.row.status === 2" @click="handleLine({id: scope.row.id, status: 1})">下线</el-button>
  230 + <el-button
  231 + type="text"
  232 + v-if="~~scope.row.status === 1"
  233 + @click="handleLine({ id: scope.row.id, status: 2 })"
  234 + >上线</el-button
  235 + >
  236 + <el-button
  237 + type="text"
  238 + v-if="~~scope.row.status === 2"
  239 + @click="handleLine({ id: scope.row.id, status: 1 })"
  240 + >下线</el-button
  241 + >
212 242 </template>
213 243 </el-table-column>
214 244 </el-table>
... ...