正在显示
3 个修改的文件
包含
549 行增加
和
5 行删除
ailink-back202601141038.zip
0 → 100644
不能预览此文件类型
| 1 | <template> | 1 | <template> |
| 2 | - <div class="app-container home">首页</div> | 2 | + <div class="app-container"> |
| 3 | + <el-form | ||
| 4 | + :model="queryParams" | ||
| 5 | + ref="queryRef" | ||
| 6 | + v-show="showSearch" | ||
| 7 | + :inline="true" | ||
| 8 | + label-width="68px" | ||
| 9 | + > | ||
| 10 | + <el-form-item label="站点名称" prop="name"> | ||
| 11 | + <el-input | ||
| 12 | + v-model="queryParams.name" | ||
| 13 | + placeholder="请输入站点名称" | ||
| 14 | + clearable | ||
| 15 | + style="width: 240px" | ||
| 16 | + @keyup.enter="handleQuery" | ||
| 17 | + /> | ||
| 18 | + </el-form-item> | ||
| 19 | + <el-form-item label="域名" prop="domainName"> | ||
| 20 | + <el-input | ||
| 21 | + v-model="queryParams.domainName" | ||
| 22 | + placeholder="请输入域名" | ||
| 23 | + clearable | ||
| 24 | + style="width: 240px" | ||
| 25 | + @keyup.enter="handleQuery" | ||
| 26 | + /> | ||
| 27 | + </el-form-item> | ||
| 28 | + <el-form-item label="生成路径" prop="path"> | ||
| 29 | + <el-input | ||
| 30 | + v-model="queryParams.path" | ||
| 31 | + placeholder="生成路径" | ||
| 32 | + clearable | ||
| 33 | + style="width: 240px" | ||
| 34 | + @keyup.enter="handleQuery" | ||
| 35 | + /> | ||
| 36 | + </el-form-item> | ||
| 37 | + <el-form-item label="路由地址" prop="pathPrefix"> | ||
| 38 | + <el-input | ||
| 39 | + v-model="queryParams.pathPrefix" | ||
| 40 | + placeholder="请输入路由地址" | ||
| 41 | + clearable | ||
| 42 | + style="width: 240px" | ||
| 43 | + @keyup.enter="handleQuery" | ||
| 44 | + /> | ||
| 45 | + </el-form-item> | ||
| 46 | + <el-form-item label="更新频率" prop="changefreq"> | ||
| 47 | + <el-input | ||
| 48 | + v-model="queryParams.changefreq" | ||
| 49 | + placeholder="更新频率" | ||
| 50 | + clearable | ||
| 51 | + style="width: 240px" | ||
| 52 | + @keyup.enter="handleQuery" | ||
| 53 | + /> | ||
| 54 | + </el-form-item> | ||
| 55 | + <el-form-item> | ||
| 56 | + <el-button type="primary" icon="Search" @click="handleQuery" | ||
| 57 | + >搜索</el-button | ||
| 58 | + > | ||
| 59 | + <el-button icon="Refresh" @click="resetQuery">重置</el-button> | ||
| 60 | + </el-form-item> | ||
| 61 | + </el-form> | ||
| 62 | + | ||
| 63 | + <el-row :gutter="10" class="mb8"> | ||
| 64 | + <el-col :span="1.5"> | ||
| 65 | + <el-button | ||
| 66 | + type="primary" | ||
| 67 | + plain | ||
| 68 | + icon="Plus" | ||
| 69 | + @click="handleAdd" | ||
| 70 | + v-hasPermi="['system:role:add']" | ||
| 71 | + >新增</el-button | ||
| 72 | + > | ||
| 73 | + </el-col> | ||
| 74 | + <el-col :span="1.5"> | ||
| 75 | + <el-button | ||
| 76 | + type="success" | ||
| 77 | + plain | ||
| 78 | + icon="Edit" | ||
| 79 | + :disabled="single" | ||
| 80 | + @click="handleUpdate" | ||
| 81 | + v-hasPermi="['system:role:edit']" | ||
| 82 | + >修改</el-button | ||
| 83 | + > | ||
| 84 | + </el-col> | ||
| 85 | + <el-col :span="1.5"> | ||
| 86 | + <el-button | ||
| 87 | + type="danger" | ||
| 88 | + plain | ||
| 89 | + icon="Delete" | ||
| 90 | + :disabled="multiple" | ||
| 91 | + @click="handleDelete" | ||
| 92 | + v-hasPermi="['system:role:remove']" | ||
| 93 | + >删除</el-button | ||
| 94 | + > | ||
| 95 | + </el-col> | ||
| 96 | + <el-col :span="1.5"> | ||
| 97 | + <el-button | ||
| 98 | + type="warning" | ||
| 99 | + plain | ||
| 100 | + icon="Download" | ||
| 101 | + @click="handleExport" | ||
| 102 | + v-hasPermi="['system:role:export']" | ||
| 103 | + >导出</el-button | ||
| 104 | + > | ||
| 105 | + </el-col> | ||
| 106 | + <right-toolbar | ||
| 107 | + v-model:showSearch="showSearch" | ||
| 108 | + @queryTable="getList" | ||
| 109 | + ></right-toolbar> | ||
| 110 | + </el-row> | ||
| 111 | + | ||
| 112 | + <el-table | ||
| 113 | + v-loading="loading" | ||
| 114 | + :data="generatorList" | ||
| 115 | + @selection-change="handleSelectionChange" | ||
| 116 | + > | ||
| 117 | + <el-table-column type="selection" width="55" align="center" /> | ||
| 118 | + <el-table-column label="id" align="center" prop="id" /> | ||
| 119 | + <el-table-column label="站点名称" align="center" prop="name" /> | ||
| 120 | + <el-table-column label="域名" align="center" prop="domainName" /> | ||
| 121 | + <el-table-column label="生成路径" align="center" prop="path" /> | ||
| 122 | + <el-table-column label="路由地址" align="center" prop="pathPrefix" /> | ||
| 123 | + <el-table-column label="更新频率" align="center" prop="changefreq" /> | ||
| 124 | + <el-table-column label="是否有子站点" align="center" prop="sonSitemap"> | ||
| 125 | + <template slot-scope="scope"> | ||
| 126 | + {{ scope.row.sonSitemap }} | ||
| 127 | + </template> | ||
| 128 | + </el-table-column> | ||
| 129 | + <el-table-column | ||
| 130 | + label="子站点地图生成条件" | ||
| 131 | + align="center" | ||
| 132 | + prop="sonSitemapType" | ||
| 133 | + /> | ||
| 134 | + <el-table-column | ||
| 135 | + label="操作" | ||
| 136 | + align="center" | ||
| 137 | + class-name="small-padding fixed-width" | ||
| 138 | + > | ||
| 139 | + <template slot-scope="scope"> | ||
| 140 | + <el-button | ||
| 141 | + size="mini" | ||
| 142 | + type="text" | ||
| 143 | + icon="el-icon-edit" | ||
| 144 | + @click="handleUpdate(scope.row)" | ||
| 145 | + v-hasPermi="['system:generator:edit']" | ||
| 146 | + >修改</el-button | ||
| 147 | + > | ||
| 148 | + <el-button | ||
| 149 | + size="mini" | ||
| 150 | + type="text" | ||
| 151 | + icon="el-icon-delete" | ||
| 152 | + @click="handleDelete(scope.row)" | ||
| 153 | + v-hasPermi="['system:generator:remove']" | ||
| 154 | + >删除</el-button | ||
| 155 | + > | ||
| 156 | + </template> | ||
| 157 | + </el-table-column> | ||
| 158 | + </el-table> | ||
| 159 | + | ||
| 160 | + <pagination | ||
| 161 | + v-show="total > 0" | ||
| 162 | + :total="total" | ||
| 163 | + :page.sync="queryParams.pageNum" | ||
| 164 | + :limit.sync="queryParams.pageSize" | ||
| 165 | + @pagination="getList" | ||
| 166 | + /> | ||
| 167 | + | ||
| 168 | + <!-- 添加或修改【请填写功能名称】对话框 --> | ||
| 169 | + <el-dialog :title="title" :visible.sync="open" width="60%" append-to-body> | ||
| 170 | + <el-form ref="form" :model="form" :rules="rules" label-width="auto"> | ||
| 171 | + <el-form-item label="站点名称" prop="name"> | ||
| 172 | + <el-input v-model="form.name" placeholder="请输入站点名称" /> | ||
| 173 | + </el-form-item> | ||
| 174 | + <el-form-item label="域名" prop="domainName"> | ||
| 175 | + <el-input | ||
| 176 | + v-model="form.domainName" | ||
| 177 | + placeholder="请输入域名 例: http://domain.com" | ||
| 178 | + /> | ||
| 179 | + </el-form-item> | ||
| 180 | + <el-form-item label="生成路径" prop="path"> | ||
| 181 | + <el-input v-model="form.path" placeholder="请输入生成路径" /> | ||
| 182 | + </el-form-item> | ||
| 183 | + <el-form-item label="文章详情路由地址" prop="pathPrefix"> | ||
| 184 | + <el-input | ||
| 185 | + v-model="form.pathPrefix" | ||
| 186 | + placeholder="请输入文章详情路由地址,如:'/detail/info/' 或者 '/' 不加引号" | ||
| 187 | + /> | ||
| 188 | + </el-form-item> | ||
| 189 | + <el-form-item label="更新频率" prop="changefreq"> | ||
| 190 | + <el-select v-model="form.changefreq" placeholder="请选择更新频率"> | ||
| 191 | + <el-option | ||
| 192 | + v-for="item in sitemapUpdateOptions" | ||
| 193 | + :key="item.value" | ||
| 194 | + :label="item.label" | ||
| 195 | + :value="item.value" | ||
| 196 | + > | ||
| 197 | + </el-option> | ||
| 198 | + </el-select> | ||
| 199 | + </el-form-item> | ||
| 200 | + | ||
| 201 | + <el-form-item label="是否有子站点" prop="sonSitemap"> | ||
| 202 | + <!-- <el-input v-model="form.sonSitemap" placeholder="请输入是否有子站点" /> --> | ||
| 203 | + <el-switch | ||
| 204 | + v-model="form.sonSitemap" | ||
| 205 | + active-color="#13ce66" | ||
| 206 | + inactive-color="#ff4949" | ||
| 207 | + > | ||
| 208 | + </el-switch> | ||
| 209 | + </el-form-item> | ||
| 210 | + <el-form-item label="站点地图生成条件" prop="sonSitemapType"> | ||
| 211 | + <el-radio v-model="form.sonSitemapType" :label="1">分类生成</el-radio> | ||
| 212 | + <el-radio v-model="form.sonSitemapType" :label="2">日期生成</el-radio> | ||
| 213 | + <el-radio v-model="form.sonSitemapType" :label="0">生成全部</el-radio> | ||
| 214 | + </el-form-item> | ||
| 215 | + | ||
| 216 | + <el-form-item label="站点地图生成日期" prop="date"> | ||
| 217 | + <el-date-picker | ||
| 218 | + v-model="form.date" | ||
| 219 | + type="daterange" | ||
| 220 | + value-format="yyyy-MM-dd" | ||
| 221 | + range-separator="至" | ||
| 222 | + start-placeholder="开始日期" | ||
| 223 | + end-placeholder="结束日期" | ||
| 224 | + > | ||
| 225 | + </el-date-picker> | ||
| 226 | + </el-form-item> | ||
| 227 | + | ||
| 228 | + <el-form-item label="新增子站点地图"> | ||
| 229 | + <el-form-item | ||
| 230 | + v-for="(sitemap, index) in form.otherSitemap" | ||
| 231 | + :label="'子地图 : ' + (index + 1)" | ||
| 232 | + :key="sitemap.key" | ||
| 233 | + :rules="{ | ||
| 234 | + required: true, | ||
| 235 | + message: '数据未填写完整', | ||
| 236 | + trigger: 'blur', | ||
| 237 | + }" | ||
| 238 | + label-width="auto" | ||
| 239 | + style="margin-bottom: 10px" | ||
| 240 | + > | ||
| 241 | + <div style="display: flex"> | ||
| 242 | + <el-select v-model="sitemap.otherSitemap" placeholder="站点地图"> | ||
| 243 | + <el-option | ||
| 244 | + v-for="item in sitemapOptions" | ||
| 245 | + :disabled="isOptionSelected(sitemap, item.value)" | ||
| 246 | + :key="item.value" | ||
| 247 | + :label="item.label" | ||
| 248 | + :value="item.value" | ||
| 249 | + > | ||
| 250 | + </el-option> | ||
| 251 | + </el-select> | ||
| 252 | + <el-input | ||
| 253 | + v-model="sitemap.otherSitemapPrefix" | ||
| 254 | + style="margin: 0 10px" | ||
| 255 | + placeholder="请输入子路由地址,如:'/detail/info/' 或者 '/' 不加引号" | ||
| 256 | + ></el-input> | ||
| 257 | + <el-button | ||
| 258 | + @click.prevent="removeOtherSitmap(sitemap)" | ||
| 259 | + type="danger" | ||
| 260 | + >删除</el-button | ||
| 261 | + > | ||
| 262 | + </div> | ||
| 263 | + </el-form-item> | ||
| 264 | + <el-button @click="addOtherSitmap" type="primary">添加</el-button> | ||
| 265 | + </el-form-item> | ||
| 266 | + | ||
| 267 | + <el-form-item label="地图生成示例"> | ||
| 268 | + <div class="sitemap"> | ||
| 269 | + <p style="margin: 0">文章站点地图示例</p> | ||
| 270 | + <div> | ||
| 271 | + {{ form.domainName | ||
| 272 | + }}{{ | ||
| 273 | + form.pathPrefix === "/" | ||
| 274 | + ? "" | ||
| 275 | + : form.pathPrefix === "" | ||
| 276 | + ? "" | ||
| 277 | + : "" + form.pathPrefix | ||
| 278 | + }}/分类/日期/自定义url | ||
| 279 | + </div> | ||
| 280 | + <div> | ||
| 281 | + {{ form.domainName | ||
| 282 | + }}{{ | ||
| 283 | + form.pathPrefix === "/" | ||
| 284 | + ? "" | ||
| 285 | + : form.pathPrefix === "" | ||
| 286 | + ? "" | ||
| 287 | + : "" + form.pathPrefix | ||
| 288 | + }}/sitemap-article-tinmoinhat.xml | ||
| 289 | + </div> | ||
| 290 | + <div> | ||
| 291 | + {{ form.domainName | ||
| 292 | + }}{{ | ||
| 293 | + form.pathPrefix === "/" | ||
| 294 | + ? "" | ||
| 295 | + : form.pathPrefix === "" | ||
| 296 | + ? "" | ||
| 297 | + : "" + form.pathPrefix | ||
| 298 | + }}/sitemap-article-BongDaVietNam.xml | ||
| 299 | + </div> | ||
| 300 | + <!-- 子路由 --> | ||
| 301 | + <p style="margin: 0">其它站点地图示例</p> | ||
| 302 | + <div v-for="sitemap in form.otherSitemap"> | ||
| 303 | + {{ form.domainName | ||
| 304 | + }}{{ | ||
| 305 | + sitemap.otherSitemapPrefix === "/" | ||
| 306 | + ? "" | ||
| 307 | + : sitemap.otherSitemapPrefix === "" | ||
| 308 | + ? "" | ||
| 309 | + : "" + sitemap.otherSitemapPrefix | ||
| 310 | + }}/url | ||
| 311 | + </div> | ||
| 312 | + </div> | ||
| 313 | + </el-form-item> | ||
| 314 | + </el-form> | ||
| 315 | + <div slot="footer" class="dialog-footer"> | ||
| 316 | + <el-button type="primary" @click="submitForm" :loading="sitemapLoading" | ||
| 317 | + >确 定</el-button | ||
| 318 | + > | ||
| 319 | + <el-button @click="cancel">取 消</el-button> | ||
| 320 | + </div> | ||
| 321 | + </el-dialog> | ||
| 322 | + </div> | ||
| 3 | </template> | 323 | </template> |
| 4 | 324 | ||
| 5 | -<script setup name="Index"> | ||
| 6 | -import { getCurrentInstance } from "vue"; | 325 | +<script setup> |
| 326 | +import { ref } from "vue"; | ||
| 327 | + | ||
| 328 | +const queryForm = ref(null); | ||
| 329 | +// 遮罩层 | ||
| 330 | +const loading = ref(false); | ||
| 331 | +// 选中数组 | ||
| 332 | +const ids = ref([]); | ||
| 333 | +// 非单个禁用 | ||
| 334 | +const single = ref([]); | ||
| 335 | +// 非多个禁用 | ||
| 336 | +const multiple = ref(false); | ||
| 337 | +// 显示搜索条件 | ||
| 338 | +const showSearch = ref(true); | ||
| 339 | +// 总条数 | ||
| 340 | +const total = ref(0); | ||
| 341 | +// 【请填写功能名称】表格数据 | ||
| 342 | +const generatorList = ref([]); | ||
| 343 | +// 弹出层标题 | ||
| 344 | +const title = ref(""); | ||
| 345 | +// 是否显示弹出层 | ||
| 346 | +const open = ref(false); | ||
| 347 | +// 查询参数 | ||
| 348 | +const queryParams = ref({ | ||
| 349 | + pageNum: 1, | ||
| 350 | + pageSize: 10, | ||
| 351 | + name: null, | ||
| 352 | + domainName: null, | ||
| 353 | + path: null, | ||
| 354 | + pathPrefix: null, | ||
| 355 | + changefreq: null, | ||
| 356 | + sonSitemap: true, | ||
| 357 | + sonSitemapType: 0, | ||
| 358 | +}); | ||
| 359 | +// 表单参数 | ||
| 360 | +const form = ref({ | ||
| 361 | + otherSitemap: [], | ||
| 362 | + date: [], | ||
| 363 | +}); | ||
| 364 | +// 表单校验 | ||
| 365 | +const rules = { | ||
| 366 | + name: [{ required: true, message: "请输入站点名称", trigger: "blur" }], | ||
| 367 | + domainName: [ | ||
| 368 | + { required: true, message: "请输入域名", trigger: "blur" }, | ||
| 369 | + { | ||
| 370 | + type: "url", | ||
| 371 | + message: "域名格式输入错误 例: http://domain.com", | ||
| 372 | + trigger: "blur", | ||
| 373 | + }, | ||
| 374 | + ], | ||
| 375 | + path: [{ required: true, message: "请输入站点路径", trigger: "blur" }], | ||
| 376 | + pathPrefix: [ | ||
| 377 | + { | ||
| 378 | + required: true, | ||
| 379 | + message: "请输入文章详情路由地址", | ||
| 380 | + trigger: "blur", | ||
| 381 | + }, | ||
| 382 | + ], | ||
| 383 | + changefreq: [{ required: true, message: "请选择更新频率", trigger: "blur" }], | ||
| 384 | + date: [{ required: true, message: "请选择生成日期", trigger: "blur" }], | ||
| 385 | +}; | ||
| 386 | +// 站点地图选项 | ||
| 387 | +const sitemapUpdateOptions = [ | ||
| 388 | + { | ||
| 389 | + value: "always", | ||
| 390 | + label: "always 页面内容经常变化,搜索引擎会更频繁地重新抓取", | ||
| 391 | + }, | ||
| 392 | + { | ||
| 393 | + value: "hourly", | ||
| 394 | + label: "hourly 页面内容每小时都可能有变化", | ||
| 395 | + }, | ||
| 396 | + { | ||
| 397 | + value: "daily", | ||
| 398 | + label: "daily 页面内容每天可能有变化", | ||
| 399 | + }, | ||
| 400 | + { | ||
| 401 | + value: "weekly", | ||
| 402 | + label: "weekly 页面内容每周可能有变化", | ||
| 403 | + }, | ||
| 404 | + { | ||
| 405 | + value: "monthly", | ||
| 406 | + label: "monthly 页面内容每月可能有变化", | ||
| 407 | + }, | ||
| 408 | + { | ||
| 409 | + value: "yearly", | ||
| 410 | + label: "yearly 页面内容每年可能有变化", | ||
| 411 | + }, | ||
| 412 | + { | ||
| 413 | + value: "never", | ||
| 414 | + label: "never 表示页面内容几乎不会发生变化,搜索引擎会较少地重新抓取", | ||
| 415 | + }, | ||
| 416 | +]; | ||
| 417 | +const sitemapOptions = [ | ||
| 418 | + { | ||
| 419 | + value: "1", | ||
| 420 | + label: "赛事", | ||
| 421 | + }, | ||
| 422 | + { | ||
| 423 | + value: "2", | ||
| 424 | + label: "专家", | ||
| 425 | + }, | ||
| 426 | +]; | ||
| 427 | +const sitemapUpdateValue = ref(null); | ||
| 428 | +const sitemapLoading = ref(false); | ||
| 429 | +function removeOtherSitmap(item) { | ||
| 430 | + let index = form.value.otherSitemap.indexOf(item); | ||
| 431 | + if (index !== -1) { | ||
| 432 | + form.value.otherSitemap.splice(index, 1); | ||
| 433 | + } | ||
| 434 | +} | ||
| 435 | +function addOtherSitmap() { | ||
| 436 | + form.value.otherSitemap.push({}); | ||
| 437 | +} | ||
| 438 | + | ||
| 439 | +function isOptionSelected(currentSitemap, optionValue) { | ||
| 440 | + return form.value.otherSitemap.some( | ||
| 441 | + (sitemap) => | ||
| 442 | + sitemap !== currentSitemap && sitemap.otherSitemap === optionValue | ||
| 443 | + ); | ||
| 444 | +} | ||
| 445 | +/** 查询【请填写功能名称】列表 */ | ||
| 446 | +function getList() { | ||
| 447 | + loading.value = true; | ||
| 448 | +} | ||
| 449 | +// 取消按钮 | ||
| 450 | +function cancel() { | ||
| 451 | + open.value = false; | ||
| 452 | + reset(); | ||
| 453 | +} | ||
| 454 | +// 表单重置 | ||
| 455 | +function reset() { | ||
| 456 | + form.value = { | ||
| 457 | + id: null, | ||
| 458 | + name: null, | ||
| 459 | + domainName: null, | ||
| 460 | + path: null, | ||
| 461 | + pathPrefix: null, | ||
| 462 | + changefreq: null, | ||
| 463 | + sonSitemap: true, | ||
| 464 | + sonSitemapType: 0, | ||
| 465 | + createBy: null, | ||
| 466 | + createTime: null, | ||
| 467 | + updateBy: null, | ||
| 468 | + updateTime: null, | ||
| 469 | + otherSitemap: [], | ||
| 470 | + }; | ||
| 471 | +} | ||
| 472 | +/** 搜索按钮操作 */ | ||
| 473 | +function handleQuery() { | ||
| 474 | + queryParams.value.pageNum = 1; | ||
| 475 | + getList(); | ||
| 476 | +} | ||
| 477 | +/** 重置按钮操作 */ | ||
| 478 | +function resetQuery() { | ||
| 479 | + handleQuery(); | ||
| 480 | +} | ||
| 481 | +// 多选框选中数据 | ||
| 482 | +function handleSelectionChange(selection) { | ||
| 483 | + ids.value = selection.map((item) => item.id); | ||
| 484 | + single.value = selection.length !== 1; | ||
| 485 | + multiple.value = !selection.length; | ||
| 486 | +} | ||
| 487 | +/** 新增按钮操作 */ | ||
| 488 | +function handleAdd() { | ||
| 489 | + reset(); | ||
| 490 | + open.value = true; | ||
| 491 | + title.value = "添加"; | ||
| 492 | +} | ||
| 493 | +/** 修改按钮操作 */ | ||
| 494 | +function handleUpdate(row) { | ||
| 495 | + // this.reset(); | ||
| 496 | + const id = row.id || ids.value; | ||
| 7 | 497 | ||
| 8 | -const { proxy } = getCurrentInstance(); | 498 | + form.value = { |
| 499 | + // Reset the form object | ||
| 500 | + ...row, // Use the spread operator to update all properties | ||
| 501 | + date: [row.startDate, row.endDate], // Update the date | ||
| 502 | + }; | ||
| 503 | + // function getGenerator(id).then((response) => { | ||
| 504 | + // console.log(response); | ||
| 505 | + // if (this.form.otherSitemap === null) { | ||
| 506 | + // this.form.otherSitemap = []; | ||
| 507 | + // } | ||
| 508 | + | ||
| 509 | + // this.open = true; | ||
| 510 | + // this.title = "修改"; | ||
| 511 | + // }); | ||
| 512 | +} | ||
| 513 | +/** 提交按钮 */ | ||
| 514 | +function submitForm() {} | ||
| 515 | +/** 删除按钮操作 */ | ||
| 516 | +function handleDelete(row) { | ||
| 517 | + const ids = row.id || this.ids; | ||
| 518 | + this.$modal | ||
| 519 | + .confirm('是否确认删除编号为"' + ids + '"的数据项?') | ||
| 520 | + .then(function () { | ||
| 521 | + return delGenerator(ids); | ||
| 522 | + }) | ||
| 523 | + .then(() => { | ||
| 524 | + this.getList(); | ||
| 525 | + this.$modal.msgSuccess("删除成功"); | ||
| 526 | + }) | ||
| 527 | + .catch(() => {}); | ||
| 528 | +} | ||
| 529 | +/** 导出按钮操作 */ | ||
| 530 | +function handleExport() { | ||
| 531 | + this.download( | ||
| 532 | + "system/generator/export", | ||
| 533 | + { | ||
| 534 | + ...this.queryParams, | ||
| 535 | + }, | ||
| 536 | + `generator_${new Date().getTime()}.xlsx` | ||
| 537 | + ); | ||
| 538 | +} | ||
| 9 | </script> | 539 | </script> |
| 540 | + | ||
| 541 | +<style> | ||
| 542 | +.sitemap { | ||
| 543 | + background-color: #000000d6; | ||
| 544 | + color: #fff; | ||
| 545 | + padding: 20px; | ||
| 546 | + border-radius: 4px; | ||
| 547 | +} | ||
| 548 | + | ||
| 549 | +.sitemap div { | ||
| 550 | + font-size: 16px; | ||
| 551 | + color: greenyellow; | ||
| 552 | +} | ||
| 553 | +</style> |
| @@ -2,7 +2,7 @@ import { defineConfig, loadEnv } from 'vite' | @@ -2,7 +2,7 @@ import { defineConfig, loadEnv } from 'vite' | ||
| 2 | import path from 'path' | 2 | import path from 'path' |
| 3 | import createVitePlugins from './vite/plugins' | 3 | import createVitePlugins from './vite/plugins' |
| 4 | 4 | ||
| 5 | -const baseUrl = 'http://aitoolht.crgx.net' // 后端接口 | 5 | +const baseUrl = 'http://htai.toolsai.cc/' // 后端接口 |
| 6 | 6 | ||
| 7 | // https://vitejs.dev/config/ | 7 | // https://vitejs.dev/config/ |
| 8 | export default defineConfig(({ mode, command }) => { | 8 | export default defineConfig(({ mode, command }) => { |
-
请 注册 或 登录 后发表评论