| | |
| | | <template> |
| | | <div class="table-parent"> |
| | | <el-row class style="margin: 20px"> |
| | | <!-- <el-col :span="4" class="tl"> |
| | | <b class="f14">{{this.baseObject.tableName}}</b> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <b class="f14">{{this.baseObject.bwType === '1'?'黑名单':'白名单'}}</b> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <b class="f14">有效时间:{{this.baseObject.startTime}}--{{this.baseObject.endTime?this.baseObject.endTime:'永久有效'}}</b> |
| | | </el-col>--> |
| | | <div class="tl"> |
| | | <span class="f14" style="color: #000000">{{ |
| | | this.baseObject.tableName ? this.baseObject.tableName + "/ " : "" |
| | | }}</span> |
| | | <span class="f14" style="color: #000000">{{ |
| | | this.baseObject.bwType === "1" |
| | | ? "黑名单/ " |
| | | : "白名单/ " |
| | | }}</span> |
| | | <span class="f14" style="color: #000000" |
| | | >有效时间:{{ this.baseObject.startTime }}--{{ |
| | | this.baseObject.endTime ? this.baseObject.endTime : "永久有效" |
| | | }}</span |
| | | > |
| | | <el-row> |
| | | <div class="base-tip"> |
| | | <div class="left-tips"> |
| | | <span class="ku-name">{{ this.baseObject.tableName }}</span> |
| | | <span |
| | | class="list" |
| | | :class=" |
| | | this.baseObject.bwType === '1' ? 'black-list' : 'white-list' |
| | | " |
| | | >{{ this.baseObject.bwType === "1" ? "黑名单" : "白名单" }}</span |
| | | > |
| | | <span class="ok-time" |
| | | >有效时间:{{ this.baseObject.startTime }}--{{ |
| | | this.baseObject.endTime ? this.baseObject.endTime : "永久有效" |
| | | }}</span |
| | | > |
| | | </div> |
| | | |
| | | <div class="right-btns"> |
| | | <el-switch |
| | | :active-value="1" |
| | | :width="52" |
| | | :inactive-value="0" |
| | | v-model="baseObject.enable" |
| | | active-color="#4E94FF" |
| | | inactive-color="#BBBBBB" |
| | | style="margin-right: 10px" |
| | | :disabled="isDisabled(baseObject)" |
| | | @change="setEnable(baseObject)" |
| | | > |
| | | </el-switch> |
| | | |
| | | <el-tooltip content="删除" placement="top" popper-class="atooltip"> |
| | | <span |
| | | class="iconfont iconfont-wrap iconshanchuku-09" |
| | | v-if="isShow('library:set')" |
| | | @click.stop="askDelete('base')" |
| | | ></span> |
| | | </el-tooltip> |
| | | |
| | | <el-tooltip content="编辑" placement="top" popper-class="atooltip"> |
| | | <span |
| | | class="iconfont iconfont-wrap iconbianjiku-09" |
| | | @click.stop="edit" |
| | | v-if="isShow('library:set')" |
| | | ></span> |
| | | </el-tooltip> |
| | | </div> |
| | | </div> |
| | | </el-row> |
| | | <el-row class style="margin: 40px 0 40px 20px"> |
| | | <el-col :span="6"> |
| | | <el-input |
| | | placeholder="姓名/性别/身份证号/手机号" |
| | | autocomplete="off" |
| | | width="100%" |
| | | size="small" |
| | | v-model="BaseManageData.contentValue" |
| | | @keyup.enter.native="handleSearch" |
| | | ></el-input> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <el-button size="small" type="primary" @click="handleSearch" |
| | | >搜索</el-button |
| | | > |
| | | </el-col> |
| | | <el-col :offset="8" :span="3"> |
| | | <fTemplate authority="library:set"> |
| | | <el-button |
| | | |
| | | <div style="display: flex" class="border-tabl"> |
| | | <div class="head-search"> |
| | | <div class="desc"> |
| | | 本库共有 |
| | | <span class="nums">{{ BaseManageData.total }}条</span> |
| | | 数据 |
| | | </div> |
| | | <div class="right-group"> |
| | | <el-input |
| | | placeholder="姓名/性别/身份证号/手机号" |
| | | autocomplete="off" |
| | | width="100%" |
| | | size="small" |
| | | class="ml10" |
| | | type="danger" |
| | | @click="deleteBatch" |
| | | v-if="isShow('library:set')" |
| | | >批量删除</el-button |
| | | v-model="BaseManageData.contentValue" |
| | | @keyup.enter.native="handleSearch" |
| | | ></el-input> |
| | | <el-button size="small" type="primary" @click="handleSearch" |
| | | >搜索</el-button |
| | | > |
| | | </fTemplate> |
| | | </el-col> |
| | | <el-col :span="2"> |
| | | <div class="text-left"> |
| | | <el-button size="small" class="ml10" type="primary" @click="addCar" |
| | | >添加车辆</el-button |
| | | |
| | | <el-tooltip |
| | | content="批量删除" |
| | | placement="top" |
| | | popper-class="atooltip" |
| | | > |
| | | <el-drawer |
| | | title="车辆信息" |
| | | :modal="false" |
| | | :destroy-on-close="true" |
| | | :append-to-body="true" |
| | | :visible.sync="addDrawer" |
| | | :direction="direction" |
| | | :before-close="handleClose1" |
| | | <fTemplate authority="library:set"> |
| | | <span |
| | | class="iconfont iconfont-wrap iconpiliangshanchu-09" |
| | | @click="askDelete('batch')" |
| | | v-if="isShow('library:set')" |
| | | ></span> |
| | | </fTemplate> |
| | | </el-tooltip> |
| | | |
| | | <el-tooltip |
| | | content="添加车辆" |
| | | placement="top" |
| | | popper-class="atooltip" |
| | | > |
| | | <div class="drawerSpace"> |
| | | <div class="uploadLine"> |
| | | <div class="car-picture"> |
| | | <el-upload |
| | | action |
| | | :http-request="uploadCar" |
| | | accept="image/*" |
| | | list-type="picture-card" |
| | | :file-list="form.carUrls" |
| | | :before-remove="handleRemoveCarPic" |
| | | > |
| | | <i class="el-icon-plus" style="margin-top: 25px"></i> |
| | | <div>上传车辆照片</div> |
| | | </el-upload> |
| | | </div> |
| | | <div class="person-picture"> |
| | | <el-upload |
| | | action |
| | | :http-request="uploadPerson" |
| | | list-type="picture-card" |
| | | accept="image/*" |
| | | :limit="1" |
| | | :file-list="form.faceUrl" |
| | | :on-remove="handleRemoveFacePic" |
| | | > |
| | | <i class="el-icon-plus" style="margin-top: 25px"></i> |
| | | <div>上传车主照片</div> |
| | | </el-upload> |
| | | </div> |
| | | </div> |
| | | <el-form |
| | | ref="formForCar" |
| | | :model="form" |
| | | label-width="100px" |
| | | style="margin-top: 20px; margin-bottom: 50px" |
| | | :rule="rules" |
| | | > |
| | | <el-form-item label="*车牌号:"> |
| | | <el-input |
| | | placeholder="请输入车牌号" |
| | | v-model="form.carNo" |
| | | class="inputWidth" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="车辆类型:"> |
| | | <el-select |
| | | v-model="form.carType" |
| | | placeholder="请选择车辆类型" |
| | | class="inputWidth" |
| | | > |
| | | <el-option |
| | | v-for="item in VideoPhotoData.dictionary.CARTYPE" |
| | | :key="item.value" |
| | | :label="item.name" |
| | | :value="item.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="车辆品牌:"> |
| | | <el-select |
| | | v-model="form.carBrand" |
| | | placeholder="请选择车辆品牌" |
| | | class="inputWidth" |
| | | > |
| | | <el-option |
| | | v-for="item in VideoPhotoData.dictionary.BRAND" |
| | | :key="item.value" |
| | | :label="item.name" |
| | | :value="item.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="车身颜色:"> |
| | | <el-select |
| | | v-model="form.carColor" |
| | | placeholder="请选择车身颜色" |
| | | class="inputWidth" |
| | | > |
| | | <el-option |
| | | v-for="item in VideoPhotoData.dictionary.nColor" |
| | | :key="item.value" |
| | | :label="item.name" |
| | | :value="item.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="车主姓名:"> |
| | | <el-input |
| | | v-model="form.personName" |
| | | class="inputWidth" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="车主性别:"> |
| | | <el-radio-group v-model="form.sex"> |
| | | <el-radio label="男"></el-radio> |
| | | <el-radio label="女"></el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="身份证号:"> |
| | | <el-input v-model="form.idCard" class="inputWidth"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="手机号:"> |
| | | <el-input |
| | | v-model="form.phoneNum" |
| | | class="inputWidth" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="其他:"> |
| | | <el-input |
| | | v-model="form.reserved" |
| | | class="inputWidth" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item style="text-align: tight"> |
| | | <el-button |
| | | type="primary" |
| | | @click="submitCar" |
| | | style="margin-left: 120px" |
| | | >保存</el-button |
| | | > |
| | | <el-button @click="resetForm">取消</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | </el-drawer> |
| | | <span |
| | | class="iconfont iconfont-wrap icontianjiacheliang-09" |
| | | @click="addCar" |
| | | ></span> |
| | | </el-tooltip> |
| | | |
| | | <el-tooltip |
| | | content="批量上传车牌" |
| | | placement="top" |
| | | popper-class="atooltip" |
| | | > |
| | | <span |
| | | class="iconfont iconfont-wrap iconshangchuanchepai-09" |
| | | @click="addBatch" |
| | | ></span> |
| | | </el-tooltip> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <div class="text-left"> |
| | | <el-button size="small" class="ml10" type="primary" @click="addBatch" |
| | | >批量上传车牌</el-button |
| | | > |
| | | <el-drawer |
| | | title="上传车牌" |
| | | :modal="false" |
| | | :append-to-body="true" |
| | | :visible.sync="addBatchDrawer" |
| | | :direction="direction" |
| | | :before-close="handleClose2" |
| | | > |
| | | <div class="drawerSpace"> |
| | | <div class="plateAttach"> |
| | | <el-input |
| | | type="textarea" |
| | | :rows="25" |
| | | v-model="plates" |
| | | style="width: 90%" |
| | | placeholder="请输入车牌号" |
| | | ></el-input> |
| | | <p> |
| | | 车牌号以逗号或回车键隔开,单次最多支持100条上传,例如:京YAB123,京F34Y87 |
| | | </p> |
| | | <el-button |
| | | type="primary" |
| | | @click="platesBatch" |
| | | style="margin-left: 210px" |
| | | >保存</el-button |
| | | > |
| | | <el-button @click="resetForm('ruleForm')">取消</el-button> |
| | | </div> |
| | | </div> |
| | | </el-drawer> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <div style="display: flex" class="border-tabl ml20"> |
| | | </div> |
| | | |
| | | <el-table |
| | | id="multipleTable" |
| | | ref="multipleTable" |
| | | :data="BaseManageData.personList" |
| | | tooltip-effect="dark" |
| | | style="width: 100%" |
| | | style="width: 100%; overflow: auto" |
| | | :fit="true" |
| | | :default-sort="{ prop: 'createTime', order: 'descending' }" |
| | | @selection-change="handleSelectionChange" |
| | | :header-cell-style="{ background: '#f8f8f8', color: '#222222' }" |
| | | :header-cell-style="{ |
| | | background: '#fff', |
| | | color: '#222222', |
| | | padding: '2px 1px', |
| | | borderBottom: 'none', |
| | | }" |
| | | > |
| | | <el-table-column type="selection" width="30"></el-table-column> |
| | | <el-table-column label="序号" width="70" sortable align="center"> |
| | | <template slot-scope="scope">{{ scope.$index + 1 }}</template> |
| | | <el-table-column |
| | | prop="carUrls" |
| | | label="车辆照片" |
| | | width="140" |
| | | show-overflow-tooltip |
| | | sortable |
| | | class="picture" |
| | | align="center" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-carousel |
| | | style="height: 100px" |
| | | :autoplay="false" |
| | | indicator-position="none" |
| | | :arrow="scope.row.carUrls.length > 1 ? 'always' : 'never'" |
| | | > |
| | | <el-carousel-item |
| | | v-for="(item, index) in scope.row.carUrls" |
| | | :key="index" |
| | | > |
| | | <img |
| | | style="width: 100px; height: 100px; object-fit: contain" |
| | | :src="item.url" |
| | | alt |
| | | /> |
| | | </el-carousel-item> |
| | | </el-carousel> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="生效状态" align="center" width="80"> |
| | | <template slot-scope="scope"> |
| | | <el-switch |
| | | v-model="scope.row.enable" |
| | | :active-value="1" |
| | | :disabled="!isShow('library:set')" |
| | | :inactive-value="0" |
| | | @change="enable(scope.row)" |
| | | ></el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="carNo" |
| | |
| | | align="center" |
| | | width="80" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="carUrls" |
| | | label="车辆照片" |
| | | width="140" |
| | | show-overflow-tooltip |
| | | sortable |
| | | class="picture" |
| | | align="center" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-carousel |
| | | style="height: 100px" |
| | | :autoplay="false" |
| | | indicator-position="none" |
| | | :arrow="scope.row.carUrls.length > 1 ? 'always' : 'never'" |
| | | > |
| | | <el-carousel-item |
| | | v-for="(item, index) in scope.row.carUrls" |
| | | :key="index" |
| | | > |
| | | <img |
| | | style="width: 100px; height: 100px; object-fit: contain" |
| | | :src="item.url" |
| | | alt |
| | | /> |
| | | </el-carousel-item> |
| | | </el-carousel> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column |
| | | prop="createTime" |
| | | label="入库时间" |
| | |
| | | sortable |
| | | align="center" |
| | | ></el-table-column> |
| | | <!-- <el-table-column prop="reserved" label="其他" align="center"></el-table-column> --> |
| | | <el-table-column label="生效状态" align="center" width="80"> |
| | | <template slot-scope="scope"> |
| | | <el-switch |
| | | v-model="scope.row.enable" |
| | | :active-value="1" |
| | | :disabled="!isShow('library:set')" |
| | | :inactive-value="0" |
| | | @change="enable(scope.row)" |
| | | ></el-switch> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column label="操作" min-width="200" align="center"> |
| | | <template slot-scope="scope"> |
| | | <fTemplate authority="library:set"> |
| | |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div class="pt5 pb20" style="height: 40px; position: relative"> |
| | | <el-pagination |
| | | @current-change="refrash" |
| | | :current-page="BaseManageData.page" |
| | | :page-size="BaseManageData.size" |
| | | style="position: absolute; right: 10px; bottom: 5px" |
| | | style="margin-top: 10px;" |
| | | layout="total,sizes,prev,pager,next,jumper" |
| | | :total="BaseManageData.total" |
| | | ></el-pagination> |
| | | </div> |
| | |
| | | > |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <el-dialog |
| | | :visible.sync="askDeleteShow" |
| | | :center="true" |
| | | custom-class="del-dialog" |
| | | > |
| | | <div> |
| | | <div class="suc-icon"> |
| | | <i class="iconfont icongantanhao1"></i> |
| | | </div> |
| | | <div class="tt">{{ delText[0] }}</div> |
| | | <div class="flex-box"> |
| | | <span>{{ delText[1] }}</span> |
| | | </div> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="askDeleteShow = false">取 消</el-button> |
| | | <el-button type="primary" @click="handleDel">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <el-drawer |
| | | title="车辆信息" |
| | | :modal="false" |
| | | :destroy-on-close="true" |
| | | :append-to-body="true" |
| | | :visible.sync="addDrawer" |
| | | :direction="direction" |
| | | :before-close="handleClose1" |
| | | > |
| | | <div class="drawerSpace"> |
| | | <div class="uploadLine"> |
| | | <div class="car-picture"> |
| | | <el-upload |
| | | action |
| | | :http-request="uploadCar" |
| | | accept="image/*" |
| | | list-type="picture-card" |
| | | :file-list="form.carUrls" |
| | | :before-remove="handleRemoveCarPic" |
| | | > |
| | | <i class="el-icon-plus" style="margin-top: 25px"></i> |
| | | <div>上传车辆照片</div> |
| | | </el-upload> |
| | | </div> |
| | | <div class="person-picture"> |
| | | <el-upload |
| | | action |
| | | :http-request="uploadPerson" |
| | | list-type="picture-card" |
| | | accept="image/*" |
| | | :limit="1" |
| | | :file-list="form.faceUrl" |
| | | :on-remove="handleRemoveFacePic" |
| | | > |
| | | <i class="el-icon-plus" style="margin-top: 25px"></i> |
| | | <div>上传车主照片</div> |
| | | </el-upload> |
| | | </div> |
| | | </div> |
| | | <el-form |
| | | ref="formForCar" |
| | | :model="form" |
| | | label-width="100px" |
| | | style="margin-top: 20px; margin-bottom: 50px" |
| | | :rule="rules" |
| | | > |
| | | <el-form-item label="*车牌号:"> |
| | | <el-input |
| | | placeholder="请输入车牌号" |
| | | v-model="form.carNo" |
| | | class="inputWidth" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="车辆类型:"> |
| | | <el-select |
| | | v-model="form.carType" |
| | | placeholder="请选择车辆类型" |
| | | class="inputWidth" |
| | | > |
| | | <el-option |
| | | v-for="item in VideoPhotoData.dictionary.CARTYPE" |
| | | :key="item.value" |
| | | :label="item.name" |
| | | :value="item.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="车辆品牌:"> |
| | | <el-select |
| | | v-model="form.carBrand" |
| | | placeholder="请选择车辆品牌" |
| | | class="inputWidth" |
| | | > |
| | | <el-option |
| | | v-for="item in VideoPhotoData.dictionary.BRAND" |
| | | :key="item.value" |
| | | :label="item.name" |
| | | :value="item.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="车身颜色:"> |
| | | <el-select |
| | | v-model="form.carColor" |
| | | placeholder="请选择车身颜色" |
| | | class="inputWidth" |
| | | > |
| | | <el-option |
| | | v-for="item in VideoPhotoData.dictionary.nColor" |
| | | :key="item.value" |
| | | :label="item.name" |
| | | :value="item.value" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="车主姓名:"> |
| | | <el-input v-model="form.personName" class="inputWidth"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="车主性别:"> |
| | | <el-radio-group v-model="form.sex"> |
| | | <el-radio label="男"></el-radio> |
| | | <el-radio label="女"></el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | <el-form-item label="身份证号:"> |
| | | <el-input v-model="form.idCard" class="inputWidth"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="手机号:"> |
| | | <el-input v-model="form.phoneNum" class="inputWidth"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="其他:"> |
| | | <el-input v-model="form.reserved" class="inputWidth"></el-input> |
| | | </el-form-item> |
| | | <el-form-item style="text-align: tight"> |
| | | <el-button |
| | | type="primary" |
| | | @click="submitCar" |
| | | style="margin-left: 120px" |
| | | >保存</el-button |
| | | > |
| | | <el-button @click="resetForm">取消</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | </el-drawer> |
| | | |
| | | <el-drawer |
| | | title="上传车牌" |
| | | :modal="false" |
| | | :append-to-body="true" |
| | | :visible.sync="addBatchDrawer" |
| | | :direction="direction" |
| | | :before-close="handleClose2" |
| | | > |
| | | <div class="drawerSpace"> |
| | | <div class="plateAttach"> |
| | | <el-input |
| | | type="textarea" |
| | | :rows="25" |
| | | v-model="plates" |
| | | style="width: 90%" |
| | | placeholder="请输入车牌号" |
| | | ></el-input> |
| | | <p> |
| | | 车牌号以逗号或回车键隔开,单次最多支持100条上传,例如:京YAB123,京F34Y87 |
| | | </p> |
| | | <el-button |
| | | type="primary" |
| | | @click="platesBatch" |
| | | style="margin-left: 210px" |
| | | >保存</el-button |
| | | > |
| | | <el-button @click="resetForm('ruleForm')">取消</el-button> |
| | | </div> |
| | | </div> |
| | | </el-drawer> |
| | | </div> |
| | | </template> |
| | | <script> |
| | |
| | | updateBaseCar, |
| | | deleteBasePersons, |
| | | plateBatch, |
| | | updateDbTableStatus, |
| | | } from "@/api/baseLibrary"; |
| | | import axios from "axios"; |
| | | // import { findByType } from '@/server/video.js' |
| | | import Upload from "./upload"; |
| | | import fTemplate from "@/components/fTemplate"; |
| | | import request from "@/scripts/httpRequest"; |
| | | export default { |
| | | components: { |
| | | // httpImg, |
| | | fTemplate, |
| | | }, |
| | | props: { |
| | | baseObject: { |
| | | default: () => {}, |
| | | type: Object, |
| | | }, |
| | | syncType: { |
| | | type: String, |
| | | }, |
| | | }, |
| | | data() { |
| | |
| | | url: "group2/M00/0A/D7/wKgBnFyjH0-AUE5eAAC8hSMP2Yw110.jpg", |
| | | }, |
| | | ], |
| | | provinces: [ |
| | | { name: "京", value: 1 }, |
| | | { name: "津", value: 2 }, |
| | | { name: "冀", value: 3 }, |
| | | ], |
| | | // provinces: [ |
| | | // { name: "京", value: 1 }, |
| | | // { name: "津", value: 2 }, |
| | | // { name: "冀", value: 3 }, |
| | | // ], |
| | | copyVisiabled: false, |
| | | moveVisiabled: false, |
| | | buttonAuthority: sessionStorage.getItem("buttonAuthoritys") || [], |
| | | searchName: "", |
| | | current: 1, |
| | | compare: false, |
| | | pageSize: 10, |
| | |
| | | idCard: "", |
| | | phoneNum: "", |
| | | monitorLevel: "one", |
| | | carUrls: [], //{url:"/httpImage/192.168.20.10:6701/818,56d0122c44f069"},{url:"/httpImage/192.168.20.10:6701/818,56d0122c44f069"} |
| | | carUrls: [], |
| | | faceUrl: [], |
| | | faceFeature: "", |
| | | carPicUrls: "", |
| | |
| | | ], |
| | | }, |
| | | tableData: [], |
| | | tableHeight: window.innerHeight - 320, |
| | | multipleSelection: [], |
| | | peoperLevel: [], |
| | | oldWidth: "", |
| | | oldHeight: "", |
| | | // 上传后的弹框显示 |
| | | askDeleteShow: false, |
| | | delType: "", |
| | | toDeleteId: "", |
| | | dialogVisible: false, |
| | | // 批量上传后的返回结果 |
| | | uploadResult: { |
| | | failList: [], |
| | | successList: [], |
| | |
| | | } |
| | | return false; |
| | | }, |
| | | delText() { |
| | | switch (this.delType) { |
| | | case "base": |
| | | return ["删除底库", "确定删除该底库?"]; |
| | | case "single": |
| | | return ["删除人员", "确定删除该底库人员?"]; |
| | | case "batch": |
| | | return ["批量删除", "确定删除该底库选中人员?"]; |
| | | default: |
| | | return ["", ""]; |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | handleDel() { |
| | | if (this.delType == "single") { |
| | | this.deleteThis(); |
| | | } else if (this.delType == "base") { |
| | | this.deleteBase(); |
| | | } else if (this.delType == "batch") { |
| | | this.deleteBatch(); |
| | | } |
| | | }, |
| | | deleteBase() { |
| | | let token = |
| | | sessionStorage.getItem("loginedInfo") && |
| | | JSON.parse(sessionStorage.getItem("loginedInfo")).access_token; |
| | | fetch(`/data/api-v/dbtable/deleteDBtablesById?id=${this.baseObject.id}`, { |
| | | method: "GET", |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | Authorization: token, |
| | | }, |
| | | }) |
| | | .then((res) => { |
| | | return res.json(); |
| | | }) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | this.$notify({ |
| | | type: "success", |
| | | message: "底库删除成功!", |
| | | }); |
| | | } |
| | | this.$emit("onDelete"); |
| | | }) |
| | | .catch((err) => { |
| | | this.$notify({ |
| | | type: "error", |
| | | message: err, |
| | | }); |
| | | }); |
| | | }, |
| | | handleRemoveCarPic(file, fileList) { |
| | | var index = fileList.findIndex((item) => { |
| | | if (item.uid == file.uid) { |
| | |
| | | }); |
| | | this.form.carUrls.splice(index, 1); |
| | | }, |
| | | isDisabled(item) { |
| | | var flag = true; |
| | | if (this.isShow("library:set")) { |
| | | if (item.endTime == "") { |
| | | flag = false; |
| | | } else { |
| | | flag = !this.$moment(new Date()).isBetween( |
| | | item.startTime, |
| | | item.endTime |
| | | ); |
| | | } |
| | | } |
| | | return flag; |
| | | }, |
| | | handleRemoveFacePic(file, fileList) { |
| | | this.form.faceUrl.splice(0, 1); |
| | | }, |
| | | beforeUoload() {}, |
| | | edit() { |
| | | this.$emit("changeShow", this.baseObject, this.syncType); |
| | | }, |
| | | // beforeUoload() {}, |
| | | handlePictureCardPreview(file) { |
| | | this.dialogImageUrl = file.url; |
| | | this.dialogVisible = true; |
| | |
| | | idCard: "", |
| | | phoneNum: "", |
| | | monitorLevel: "one", |
| | | carUrls: [], //{url:"/httpImage/192.168.20.10:6701/818,56d0122c44f069"},{url:"/httpImage/192.168.20.10:6701/818,56d0122c44f069"} |
| | | carUrls: [], |
| | | faceUrl: [], |
| | | faceFeature: "", |
| | | carPicUrls: "", |
| | |
| | | reserved: "", |
| | | }), |
| | | done(); |
| | | // this.$confirm('确认关闭?') |
| | | // .then(_ => { |
| | | // done(); |
| | | // }) |
| | | // .catch(_ => {}); |
| | | }, |
| | | handleClose2(done) { |
| | | done(); |
| | | // this.$confirm('确认关闭?') |
| | | // .then(_ => { |
| | | // done(); |
| | | // }) |
| | | // .catch(_ => {}); |
| | | }, |
| | | isShow(authority) { |
| | | if (this.isAdmin) { |
| | |
| | | this.$refs.multipleTable.clearSelection(); |
| | | } |
| | | }, |
| | | deleteThis(id) { |
| | | |
| | | deleteThis() { |
| | | let token = |
| | | sessionStorage.getItem("loginedInfo") && |
| | | JSON.parse(sessionStorage.getItem("loginedInfo")).access_token; |
| | | this.$confirm("提示:确定删除该底库人员?", { |
| | | center: true, |
| | | cancelButtonClass: "comfirm-class-cancle", |
| | | confirmButtonClass: "comfirm-class-sure", |
| | | fetch(`/data/api-v/dbperson/deleteDbPersonById?id=${this.toDeleteId}`, { |
| | | method: "GET", |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | Authorization: token, |
| | | }, |
| | | }) |
| | | .then((_) => { |
| | | fetch(`/data/api-v/dbperson/deleteDbPersonById?id=${id}`, { |
| | | method: "GET", |
| | | headers: { |
| | | "Content-Type": "application/json", |
| | | Authorization: token, |
| | | }, |
| | | }) |
| | | .then((res) => { |
| | | return res.json(); |
| | | }) |
| | | .then((data) => { |
| | | if (data.success) { |
| | | this.$notify({ |
| | | type: "success", |
| | | message: "该人员删除成功!", |
| | | }); |
| | | } |
| | | this.getCarList(); |
| | | }) |
| | | .catch((err) => { |
| | | }); |
| | | .then((res) => { |
| | | return res.json(); |
| | | }) |
| | | .catch((_) => {}); |
| | | .then((data) => { |
| | | if (data.success) { |
| | | this.$notify({ |
| | | type: "success", |
| | | message: "该人员删除成功!", |
| | | }); |
| | | } |
| | | this.getCarList(); |
| | | }) |
| | | .catch((err) => {}); |
| | | }, |
| | | sayHello() { |
| | | }, |
| | | // sayHello() {}, |
| | | getUploadResult(result) { |
| | | this.uploadResult = result.data; |
| | | this.dialogVisible = true; |
| | |
| | | }); |
| | | }, |
| | | handleClose() { |
| | | //this.getCarList(); |
| | | this.dialogFormVisible = false; |
| | | }, |
| | | handleSelectionChange(val) { |
| | |
| | | personPicUrl: item.personPicUrl, |
| | | reserved: item.reserved, |
| | | }); |
| | | if (res.success === true) { |
| | | if (res.success) { |
| | | this.$notify({ |
| | | type: "success", |
| | | message: "底库人员成功变更生效状态!", |
| | |
| | | this.$refs.uploadDrag && this.$refs.uploadDrag.uploadStart(); |
| | | }, |
| | | haveScore(row) { |
| | | if (row.compareScore && row.compareScore !== "") { |
| | | return true; |
| | | return row.compareScore && row.compareScore !== ""; |
| | | }, |
| | | async setEnable(item) { |
| | | debugger; |
| | | let res = await updateDbTableStatus({ |
| | | id: item.id, |
| | | enable: item.enable, |
| | | }); |
| | | if (res.success) { |
| | | this.$notify({ |
| | | type: "success", |
| | | message: "底库成功变更生效状态!", |
| | | }); |
| | | } else { |
| | | return false; |
| | | this.$notify({ |
| | | type: "error", |
| | | message: "底库变更生效状态失败!", |
| | | }); |
| | | } |
| | | }, |
| | | async searchImgList(faceUrl, threshold) { |
| | |
| | | this.total = res.data.total; |
| | | this.compare = true; |
| | | }, |
| | | updateThreshold() {}, |
| | | // updateThreshold() {}, |
| | | async updateFace(param) { |
| | | const fd = new FormData(); |
| | | fd.append("file", param.file); |
| | |
| | | this.form.faceFeature = res.data.data.faceFeature; |
| | | } |
| | | }, |
| | | uploadSuccess() { |
| | | }, |
| | | uploadError() { |
| | | }, |
| | | deleteBatch() { |
| | | if (this.selectedRowKeys.length === 0) { |
| | | async deleteBatch() { |
| | | let ids = []; |
| | | this.selectedRowKeys.map((item, index) => { |
| | | ids.push(item.id); |
| | | }); |
| | | let res = await deleteBasePersons(ids); |
| | | if (res.success) { |
| | | this.$notify({ |
| | | type: "warning", |
| | | message: "请选择要删除的人员", |
| | | type: "success", |
| | | message: "删除成功!", |
| | | }); |
| | | this.getCarList(); |
| | | } else { |
| | | this.$confirm("提示:确定删除该底库选中人员?", { |
| | | center: true, |
| | | cancelButtonClass: "comfirm-class-cancle", |
| | | confirmButtonClass: "comfirm-class-sure", |
| | | }).then(async (_) => { |
| | | let ids = []; |
| | | this.selectedRowKeys.map((item, index) => { |
| | | ids.push(item.id); |
| | | }); |
| | | let res = await deleteBasePersons(ids); |
| | | if (res.success) { |
| | | this.$notify({ |
| | | type: "success", |
| | | message: "删除成功!", |
| | | }); |
| | | this.getCarList(); |
| | | } else { |
| | | this.$notify({ |
| | | type: "error", |
| | | message: "删除失败!", |
| | | }); |
| | | } |
| | | this.$notify({ |
| | | type: "error", |
| | | message: "删除失败!", |
| | | }); |
| | | } |
| | | }, |
| | |
| | | this.BaseManageData.queryPersonList(); |
| | | } |
| | | }, |
| | | handleRowStyle({ row, rowIndex }) { |
| | | if (rowIndex === 0) { |
| | | return "background:#222222;"; |
| | | askDelete(typ, id) { |
| | | if (typ == "batch") { |
| | | if (this.selectedRowKeys.length === 0) { |
| | | this.$notify({ |
| | | type: "warning", |
| | | message: "请选择要删除的人员", |
| | | }); |
| | | return; |
| | | } |
| | | } |
| | | this.askDeleteShow = true; |
| | | this.delType = typ; |
| | | id && (this.toDeleteId = id); |
| | | }, |
| | | blackAngWhite() { |
| | | if (this.BaseManageData.selectBlacks.length > 0) { |
| | |
| | | this.$refs["formForCar"].validate(async (valid) => { |
| | | if (valid) { |
| | | let { ...json } = this.form; |
| | | |
| | | for (let index in json.carUrls) { |
| | | if (index == 0) { |
| | | json.carPicUrls += json.carUrls[index].url.substring(11); |
| | |
| | | display: none; |
| | | } |
| | | .table-parent { |
| | | // position: relative; |
| | | height: 100%; |
| | | overflow: visible !important; |
| | | .picture { |
| | |
| | | padding-left: 8px !important; |
| | | padding-right: 0px !important; |
| | | } |
| | | // .addToBase1 { |
| | | // height: 350px; |
| | | // position: relative; |
| | | // .topLabel { |
| | | // margin-top: 20px; |
| | | // height: 40px; |
| | | // border-bottom: 1px solid #eee; |
| | | // font-family: PingFangSC-Medium; |
| | | // font-size: 20px; |
| | | // font-weight: 600; |
| | | // line-height: 1rem; |
| | | // color: #222222; |
| | | // text-align: left; |
| | | // margin-left: 15px; |
| | | // } |
| | | // .items { |
| | | // width: 100%; |
| | | // height: auto; |
| | | // overflow-y: auto; |
| | | // margin-bottom: 20px; |
| | | // .lable { |
| | | // // width: 15%; |
| | | // margin-top: 10px; |
| | | // // float: left; |
| | | // //font-family: PingFangSC-Medium; |
| | | // font-size: 14px; |
| | | // font-weight: 600; |
| | | // } |
| | | // .baseList { |
| | | // // width: 85%; |
| | | // height: 100%; |
| | | // // float: left; |
| | | // .base { |
| | | // width: calc(33% - 10px); |
| | | // padding: 0px 5px; |
| | | // line-height: 30px; |
| | | // float: left; |
| | | // text-align: left; |
| | | // font-size: 12px !important; |
| | | // .el-checkbox { |
| | | // width: 100%; |
| | | // display: block; |
| | | // overflow: hidden; |
| | | // text-overflow: ellipsis; |
| | | // white-space: nowrap; |
| | | // .el-checkbox__label { |
| | | // display: inline !important; |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | .copy, |
| | | .move { |
| | | .el-dialog__body { |
| | |
| | | } |
| | | |
| | | .avatar-uploader { |
| | | max-width: 100px; |
| | | max-width: 100px; |
| | | min-width: 100px; |
| | | min-height: 100px; |
| | | border: 1px solid #eee; |