| | |
| | | >{{ $t('common.delete') }}</el-button |
| | | > |
| | | </el-form-item> |
| | | <!-- <el-form-item v-if="btnStatus.download"> |
| | | <el-form-item v-if="btnStatus.download"> |
| | | <el-button |
| | | @click="downFormData" |
| | | icon="el-icon-download" |
| | |
| | | size="small" |
| | | >{{ $t('common.download') }}</el-button |
| | | > |
| | | </el-form-item> --> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="bottom"> |
| | |
| | | </div> |
| | | </el-dialog> |
| | | <div class="downloadBox" v-if="showCodeBox"> |
| | | <h4 style="padding: 20px">请输入下载包密码</h4> |
| | | <h4 style="padding: 20px">{{$t('common.passworld')}}</h4> |
| | | <el-form |
| | | :model="codeForm" |
| | | :rules="rules" |
| | |
| | | label-width="100px" |
| | | class="codeForm" |
| | | > |
| | | <el-form-item label="密码" prop="password"> |
| | | <el-form-item :label="$t('common.passworld')" prop="password"> |
| | | <el-input type="password" v-model="codeForm.password"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="确认密码" prop="repassword"> |
| | | <el-form-item :label="$t('common.SPassword')" prop="repassword"> |
| | | <el-input type="password" v-model="codeForm.repassword"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" size="small" @click="download('codeForm')" |
| | | >确定</el-button |
| | | <el-button class="primary" size="small" @click="download('codeForm')" |
| | | >{{$t('common.confirm')}}</el-button |
| | | > |
| | | <el-button type="info" size="small" @click="closeDown('codeForm')" |
| | | >取消</el-button |
| | | >{{$t('common.cancel')}}</el-button |
| | | > |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | var encrypt = new JSEncrypt(); |
| | | import $ from 'jquery' |
| | | import { getToken } from '@/utils/auth'; |
| | | import { |
| | | select_meta_ByPageAndCount, |
| | | // queryDataCount, |
| | |
| | | selectDictTab, |
| | | selectdirTab, |
| | | queryDepTree, |
| | | |
| | | meta_downloadReq, |
| | | } from '../../api/api'; |
| | | |
| | | import MyBread from '../../components/MyBread.vue'; |
| | | export default { |
| | | name: 'metadataManage', |
| | |
| | | callback(); |
| | | } |
| | | }; |
| | | var passwordValidator = (rule, value, callback) => { |
| | | var passwordreg = |
| | | /^(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z\W!@#$%^&*`~()\\-_+=,.?;<>]+$)(?![a-z0-9]+$)(?![a-z\W!@#$%^&*`~()\\-_+=,.?;<>]+$)(?![0-9\W!@#$%^&*`~()\\-_+=,.?;<>]+$)[a-zA-Z0-9\W!@#$%^&*`~()\\-_+=,.?;<>]{12,20}$/; |
| | | if (!passwordreg.test(value)) { |
| | | callback( |
| | | new Error('密码必须由数字、字母、特殊字符组合,请输入13-20位') |
| | | ); |
| | | } else { |
| | | callback(); |
| | | } |
| | | }; |
| | | return { |
| | | defaultProps: { |
| | | defaultProps: { |
| | | children: 'children', |
| | | label: 'name', |
| | | }, |
| | | dirComPanyOption:[], |
| | | dirComPanyOption: [], |
| | | companyOption: [], |
| | | activeName: '', |
| | | optionCount: [], |
| | |
| | | repassword: '', |
| | | }, |
| | | rules: { |
| | | password: [{ required: true, message: '请输入密码', trigger: 'blur' }], |
| | | password: [{ required: true, message: '请输入密码', trigger: 'blur' }, { validator: passwordValidator, trigger: 'blur' }], |
| | | repassword: [ |
| | | { required: true, message: '请输入确认密码', trigger: 'blur' }, |
| | | { validator: repasswordValidator, trigger: 'blur' }, |
| | |
| | | pageSize: 10, |
| | | pageIndex: 1, |
| | | name: null, |
| | | dirid:null, |
| | | dirid: null, |
| | | }, |
| | | cascader: { |
| | | label: 'name', |
| | |
| | | if (res.code != 200) { |
| | | this.$message.error('列表调用失败'); |
| | | } |
| | | this.optionCount =this.treeData(res.result); |
| | | this.dirComPanyOption= this.treeData(res.result); |
| | | this.listData.dirid=this.optionCount[0].id; |
| | | this.getMetaData(); |
| | | this.optionCount = this.treeData(res.result); |
| | | this.dirComPanyOption = this.treeData(res.result); |
| | | this.listData.dirid = this.optionCount[0].id; |
| | | this.getMetaData(); |
| | | }, |
| | | handleNodeClick(data) { |
| | | this.listData.pageSize=10; |
| | | this.listData.pageSize = 10; |
| | | this.listData.pageIndex = 1; |
| | | this.listData.dirid = data.id; |
| | | this.getMetaData(); |
| | | this.getMetaData(); |
| | | }, |
| | | getTableDesc(res) { |
| | | this.activeName = res.tab; |
| | |
| | | this.editForm = {}; |
| | | done(); |
| | | }) |
| | | .catch((_) => {}); |
| | | .catch((_) => { }); |
| | | }, |
| | | |
| | | // 提交修改 |
| | |
| | | this.editForm = JSON.parse(this.initialForm); |
| | | }); |
| | | }, |
| | | download() {}, |
| | | async download() { |
| | | var std = []; |
| | | for (var i in this.multipleSelection) { |
| | | std.push(this.multipleSelection[i].id) |
| | | } |
| | | var obj = { |
| | | pwd: encrypt.encrypt("Test!321&456"), |
| | | ids: std |
| | | }; |
| | | var token = getToken(); |
| | | $.ajax({ |
| | | url:BASE_URL+"/meta/downloadReq?token="+token, |
| | | type: 'post', |
| | | dataType: null, |
| | | data: JSON.stringify(obj), |
| | | success: function (res) { |
| | | debugger |
| | | }, |
| | | error: function () { |
| | | |
| | | } |
| | | }) |
| | | |
| | | // |
| | | // $.ajax( BASE_URL+"/meta/downloadReq?token="+token, "POST", JSON.stringify(obj), null, null, function (rs) { |
| | | // console.log(rs); |
| | | // alert("code = " + rs.code + ", msg = " + rs.msg + ", result = " + rs.result); |
| | | // }); |
| | | // const res = await meta_downloadReq(JSON.stringify(obj)) |
| | | // debugger |
| | | // |
| | | // $.ajax(BASE_URL + '/meta/downloadReq"?token=' + token, { |
| | | // type: 'post', |
| | | // data: JSON.stringify(obj), |
| | | // async: true, |
| | | // cache: false, |
| | | // processData: false, |
| | | // contentType: false, |
| | | // success: (rs) => { |
| | | // debugger |
| | | // }, |
| | | // error: (e) => { |
| | | // console.log(e); |
| | | // }, |
| | | // }); |
| | | }, |
| | | closeDown() { |
| | | this.showCodeBox = false; |
| | | this.codeForm.password = ''; |
| | |
| | | .downloadBox { |
| | | position: absolute; |
| | | top: 20%; |
| | | left: 50%; |
| | | left: 40%; |
| | | padding: 20px; |
| | | |
| | | width: 20%; |
| | | border: 1px solid #000; |
| | | background: #303030; |
| | | width: 30%; |
| | | border: 1px solid gray; |
| | | border-radius: 10px; |
| | | color: white; |
| | | } |
| | | /*修改table 表体的背景颜色和文字颜色*/ |
| | | /deep/ .el-table { |