Browse Source

修改网站管理

lcmxs 1 year ago
parent
commit
3fc9b30507
1 changed files with 80 additions and 74 deletions
  1. 80 74
      src/views/WEBSITE/index.vue

+ 80 - 74
src/views/WEBSITE/index.vue

@@ -10,45 +10,45 @@
       </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="['business:WEBSITE:add']"-->
-      <!--        >新增</el-button>-->
-      <!--      </el-col>-->
-      <!--      <el-col :span="1.5">-->
-      <!--        <el-button-->
-      <!--          type="primary"-->
-      <!--          plain-->
-      <!--          icon="el-icon-edit"-->
-      <!--          :disabled="single"-->
-      <!--          @click="handleUpdate"-->
-      <!--          v-hasPermi="['business:WEBSITE:edit']"-->
-      <!--        >修改</el-button>-->
-      <!--      </el-col>-->
-      <el-col :span="1.5">
-        <el-button type="danger" icon="el-icon-delete" :disabled="multiple" @click="handleDelete" v-hasPermi="['business:WEBSITE:remove']">删除</el-button>
-      </el-col>
-      <!--      <el-col :span="1.5">-->
-      <!--        <el-button-->
-      <!--          type="warning"-->
-      <!--          plain-->
-      <!--          icon="el-icon-download"-->
-      <!--          size="mini"-->
-      <!--          @click="handleExport"-->
-      <!--          v-hasPermi="['business:WEBSITE:export']"-->
-      <!--        >导出</el-button>-->
-      <!--      </el-col>-->
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
+<!--    <el-row :gutter="10" class="mb8">-->
+<!--      &lt;!&ndash;      <el-col :span="1.5">&ndash;&gt;-->
+<!--      &lt;!&ndash;        <el-button&ndash;&gt;-->
+<!--      &lt;!&ndash;          type="primary"&ndash;&gt;-->
+<!--      &lt;!&ndash;          plain&ndash;&gt;-->
+<!--      &lt;!&ndash;          icon="el-icon-plus"&ndash;&gt;-->
+<!--      &lt;!&ndash;          size="mini"&ndash;&gt;-->
+<!--      &lt;!&ndash;          @click="handleAdd"&ndash;&gt;-->
+<!--      &lt;!&ndash;          v-hasPermi="['business:WEBSITE:add']"&ndash;&gt;-->
+<!--      &lt;!&ndash;        >新增</el-button>&ndash;&gt;-->
+<!--      &lt;!&ndash;      </el-col>&ndash;&gt;-->
+<!--      &lt;!&ndash;      <el-col :span="1.5">&ndash;&gt;-->
+<!--      &lt;!&ndash;        <el-button&ndash;&gt;-->
+<!--      &lt;!&ndash;          type="primary"&ndash;&gt;-->
+<!--      &lt;!&ndash;          plain&ndash;&gt;-->
+<!--      &lt;!&ndash;          icon="el-icon-edit"&ndash;&gt;-->
+<!--      &lt;!&ndash;          :disabled="single"&ndash;&gt;-->
+<!--      &lt;!&ndash;          @click="handleUpdate"&ndash;&gt;-->
+<!--      &lt;!&ndash;          v-hasPermi="['business:WEBSITE:edit']"&ndash;&gt;-->
+<!--      &lt;!&ndash;        >修改</el-button>&ndash;&gt;-->
+<!--      &lt;!&ndash;      </el-col>&ndash;&gt;-->
+<!--      <el-col :span="1.5">-->
+<!--        <el-button type="primary" icon="el-icon-edit" :disabled="single" @click="handleUpdate" v-hasPermi="['business:WEBSITE:edit']">修改</el-button>-->
+<!--&lt;!&ndash;        <el-button type="danger" icon="el-icon-delete" :disabled="multiple" @click="handleDelete" v-hasPermi="['business:WEBSITE:remove']">删除</el-button>&ndash;&gt;-->
+<!--      </el-col>-->
+<!--      &lt;!&ndash;      <el-col :span="1.5">&ndash;&gt;-->
+<!--      &lt;!&ndash;        <el-button&ndash;&gt;-->
+<!--      &lt;!&ndash;          type="warning"&ndash;&gt;-->
+<!--      &lt;!&ndash;          plain&ndash;&gt;-->
+<!--      &lt;!&ndash;          icon="el-icon-download"&ndash;&gt;-->
+<!--      &lt;!&ndash;          size="mini"&ndash;&gt;-->
+<!--      &lt;!&ndash;          @click="handleExport"&ndash;&gt;-->
+<!--      &lt;!&ndash;          v-hasPermi="['business:WEBSITE:export']"&ndash;&gt;-->
+<!--      &lt;!&ndash;        >导出</el-button>&ndash;&gt;-->
+<!--      &lt;!&ndash;      </el-col>&ndash;&gt;-->
+<!--      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
+<!--    </el-row>-->
 
     <el-table  :data="WEBSITEList" @selection-change="handleSelectionChange" height="calc(100vh - 300px)">
-      <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="网址名字" align="center" prop="websiteName" />
       <!-- <el-table-column label="背景图片" align="center" prop="websiteUrl">
         <template slot-scope="scope">
@@ -62,7 +62,7 @@
       <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="['business:WEBSITE:edit']">修改</el-button>
-          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['business:WEBSITE:remove']">删除</el-button>
+<!--          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['business:WEBSITE:remove']">删除</el-button>-->
         </template>
       </el-table-column>
     </el-table>
@@ -79,44 +79,50 @@
             </el-form-item>
           </el-col>
         </el-row>
-        <el-form-item label="顶部背景图" prop="websiteUrl">
-          <el-upload action="#" list-type="picture-card" :limit="1" :auto-upload="true" :http-request="httprequest" :before-upload="beforeupload" :file-list="fileList">
-            <i slot="default" class="el-icon-plus"></i>
-            <div slot="file" slot-scope="{ file }">
-              <img class="el-upload-list__item-thumbnail" :src="file.url" />
-
-              <!-- 放大预览 -->
-              <span class="el-upload-list__item-actions">
-                <span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
-                  <i class="el-icon-zoom-in"></i>
-                </span>
-                <!-- 删除图片 -->
-                <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove(file)">
-                  <i class="el-icon-delete"></i>
-                </span>
-              </span>
-            </div>
-          </el-upload>
+        <el-form-item label="顶部背景图" prop="topPicture">
+          <cropper v-model="form.topPicture" :fixed_number="[4, 2]"></cropper>
         </el-form-item>
-        <el-form-item label="底部背景图" prop="websiteUrl">
-          <el-upload action="#" list-type="picture-card" :limit="1" :auto-upload="true" :http-request="httprequest" :before-upload="beforeupload2" :file-list="fileList2">
-            <i slot="default" class="el-icon-plus"></i>
-            <div slot="file" slot-scope="{ file }">
-              <img class="el-upload-list__item-thumbnail" :src="file.url" />
-
-              <!-- 放大预览 -->
-              <span class="el-upload-list__item-actions">
-                <span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">
-                  <i class="el-icon-zoom-in"></i>
-                </span>
-                <!-- 删除图片 -->
-                <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove2(file)">
-                  <i class="el-icon-delete"></i>
-                </span>
-              </span>
-            </div>
-          </el-upload>
+        <el-form-item label="底部背景图" prop="bottomPicture">
+          <cropper v-model="form.bottomPicture" :fixed_number="[34, 2]"></cropper>
         </el-form-item>
+<!--        <el-form-item label="顶部背景图" prop="websiteUrl">-->
+<!--          <el-upload action="#" list-type="picture-card" :limit="1" :auto-upload="true" :http-request="httprequest" :before-upload="beforeupload" :file-list="fileList">-->
+<!--            <i slot="default" class="el-icon-plus"></i>-->
+<!--            <div slot="file" slot-scope="{ file }">-->
+<!--              <img class="el-upload-list__item-thumbnail" :src="file.url" />-->
+
+<!--              &lt;!&ndash; 放大预览 &ndash;&gt;-->
+<!--              <span class="el-upload-list__item-actions">-->
+<!--                <span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">-->
+<!--                  <i class="el-icon-zoom-in"></i>-->
+<!--                </span>-->
+<!--                &lt;!&ndash; 删除图片 &ndash;&gt;-->
+<!--                <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove(file)">-->
+<!--                  <i class="el-icon-delete"></i>-->
+<!--                </span>-->
+<!--              </span>-->
+<!--            </div>-->
+<!--          </el-upload>-->
+<!--        </el-form-item>-->
+<!--        <el-form-item label="底部背景图" prop="websiteUrl">-->
+<!--          <el-upload action="#" list-type="picture-card" :limit="1" :auto-upload="true" :http-request="httprequest" :before-upload="beforeupload2" :file-list="fileList2">-->
+<!--            <i slot="default" class="el-icon-plus"></i>-->
+<!--            <div slot="file" slot-scope="{ file }">-->
+<!--              <img class="el-upload-list__item-thumbnail" :src="file.url" />-->
+
+<!--              &lt;!&ndash; 放大预览 &ndash;&gt;-->
+<!--              <span class="el-upload-list__item-actions">-->
+<!--                <span class="el-upload-list__item-preview" @click="handlePictureCardPreview(file)">-->
+<!--                  <i class="el-icon-zoom-in"></i>-->
+<!--                </span>-->
+<!--                &lt;!&ndash; 删除图片 &ndash;&gt;-->
+<!--                <span v-if="!disabled" class="el-upload-list__item-delete" @click="handleRemove2(file)">-->
+<!--                  <i class="el-icon-delete"></i>-->
+<!--                </span>-->
+<!--              </span>-->
+<!--            </div>-->
+<!--          </el-upload>-->
+<!--        </el-form-item>-->
       </el-form>
 
       <div slot="footer" class="dialog-footer">