| | |
| | | uploadUrl: "http://localhost:8085/api/upload/upload", |
| | | fileTypeList: { |
| | | 'video': ['mp4', 'avi'], |
| | | 'img': ['jgp', 'png', 'jpeg'], |
| | | 'img': ['jpg', 'png', 'jpeg'], |
| | | 'pdf': ['pdf'], |
| | | 'file': ['doc', 'docx', 'xls', 'xlsx', 'ppt', 'pptx', 'txt', 'png', 'jpg', 'jpge', 'pdf'], |
| | | } |
| | | }; |
| | | }, |
| | |
| | | <el-table-column prop="userName" label="用户名" /> |
| | | <el-table-column prop="departmentName" label="部门名称" /> |
| | | <el-table-column prop="nowDepartmentName" label="原部门名称" /> |
| | | <el-table-column prop="reason" label="调动原因" show-overflow-tooltip/> |
| | | <el-table-column prop="attachment" label="附件" show-overflow-tooltip> |
| | | <template slot-scope="scope"> |
| | | <div v-for="item in getUrl(scope.row.attachment)" :key="item.url"> |
| | | <el-link type="primary" :href="'/api/upload/download?url=' + item.url +'&fileName=' + item.name" >{{ item.name }}</el-link> |
| | | </div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="result" label="审核结果" width="90px" align="center"> |
| | | <template slot-scope="{row}"> |
| | | <el-tag :type="row.result === '审核通过' ? 'success' : row.result === '审核驳回' ? 'danger' : 'info'">{{row.result}}</el-tag> |
| | |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | getUrl(urlJson) { |
| | | return urlJson ? JSON.parse(urlJson) : []; |
| | | }, |
| | | isDeptAdmin() { |
| | | return sessionStorage.getItem('deptAdmin') !== '1' |
| | | }, |
| | |
| | | </router-link> |
| | | <el-button size="mini" @click="status(row)" class="link-left">状态</el-button> |
| | | <el-button type="primary" size="mini" @click="transposition(row)" class="link-left">调动</el-button> |
| | | <el-button size="mini" type="danger" @click="deleteUser(row)" class="link-left">删除</el-button> |
| | | <el-popconfirm title="确认删除吗" @confirm="deleteUser(row)"> |
| | | <el-button slot="reference" size="mini" type="danger" class="link-left">删除</el-button> |
| | | </el-popconfirm> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | @pagination="search"/> |
| | | |
| | | <!-- 状态弹窗 --> |
| | | <el-dialog :visible.sync="statusVisible" append-to-body :close-on-click-modal="false" :show-close="false" center width="400px"> |
| | | <el-dialog :visible.sync="statusVisible" append-to-body :show-close="false" center width="400px"> |
| | | <el-radio-group v-model="user.condition"> |
| | | <el-radio label="正常">正常</el-radio> |
| | | <el-radio label="病假">病假</el-radio> |
| | |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | <el-input type="textarea" maxlength="100" show-word-limit :autosize="{ minRows: 4}" :rows="2" v-model="examine.reason" placeholder="请输入情况说明" style="margin-top: 30px;"></el-input> |
| | | <upload v-show="form.contentType" ref="upload" :fileUrl="form.contentUrl" :fileType="form.contentType" |
| | | :fileSizeLimitM="1024" :uploadNum="1" @getUploadUrl="getUploadUrl" @removeFile="removeFile" style="margin-top: 30px;"/> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">取 消</el-button> |
| | | <el-button type="primary" @click="submitExamine">确 定</el-button> |
| | |
| | | import Pagination from '@/components/Pagination' |
| | | import userApi from '@/api/user' |
| | | import departmentExamineApi from '@/api/departmentExamine' |
| | | import Upload from '@/components/UploadC' |
| | | |
| | | export default { |
| | | components: { Pagination }, |
| | | components: { Pagination, Upload }, |
| | | computed: { |
| | | fileContentUrl: () => { |
| | | return this.form ? this.form.contentUrl ? [this.form.contentUrl] : [] : []; |
| | | } |
| | | }, |
| | | data () { |
| | | return { |
| | | |
| | | form: { |
| | | contentType: 'file', |
| | | subject: '', |
| | | belongType: 2, |
| | | contentUrl: [], |
| | | attachment: [], |
| | | temp: [] |
| | | }, |
| | | user:{}, |
| | | statusVisible: false, |
| | | upLoadUrl:'/api/admin/user/import', |
| | |
| | | departmentId: [], |
| | | departmentIds: '', |
| | | nowDepartmentIds: '', |
| | | attachment: '' |
| | | }, |
| | | title: '部门调动', |
| | | dialogVisible: false, |
| | |
| | | this.search() |
| | | }, |
| | | methods: { |
| | | removeFile() { |
| | | this.examine.attachment = []; |
| | | }, |
| | | getUploadUrl(uploadData) { |
| | | this.examine.attachment = JSON.stringify(uploadData); |
| | | }, |
| | | submitExamine() { |
| | | this.examine.departmentIds = this.examine.departmentId.join(',') |
| | | departmentExamineApi.save(this.examine).then(res => { |